Mercurial > touhou
diff pytouhou/ui/window.pxd @ 463:11708a1d0a1a
Make GameRunner inherit from a Runner base class, to bypass Python calls in Window.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 11 Sep 2013 00:36:52 +0200 |
parents | 1b56d62250ab |
children | 36bc577b2392 |
line wrap: on
line diff
--- a/pytouhou/ui/window.pxd +++ b/pytouhou/ui/window.pxd @@ -10,16 +10,24 @@ cdef class Clock: cdef void tick(self) nogil except * +cdef class Runner: + cdef long width, height + + cdef void start(self) except * + cdef void finish(self) except * + cdef bint update(self) except * + + cdef class Window: cdef sdl.Window win cdef long fps_limit cdef public long width, height cdef public bint use_fixed_pipeline - cdef object runner + cdef Runner runner cdef Clock clock cdef void set_size(self, int width, int height) nogil - cpdef set_runner(self, runner=*) + cpdef set_runner(self, Runner runner=*) cpdef run(self) cdef bint run_frame(self) except? False - cpdef double get_fps(self) + cdef double get_fps(self) nogil