Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
462:a71b912b45b7 | 463:11708a1d0a1a |
---|---|
8 cdef void set_target_fps(self, long fps) nogil | 8 cdef void set_target_fps(self, long fps) nogil |
9 cdef double get_fps(self) nogil | 9 cdef double get_fps(self) nogil |
10 cdef void tick(self) nogil except * | 10 cdef void tick(self) nogil except * |
11 | 11 |
12 | 12 |
13 cdef class Runner: | |
14 cdef long width, height | |
15 | |
16 cdef void start(self) except * | |
17 cdef void finish(self) except * | |
18 cdef bint update(self) except * | |
19 | |
20 | |
13 cdef class Window: | 21 cdef class Window: |
14 cdef sdl.Window win | 22 cdef sdl.Window win |
15 cdef long fps_limit | 23 cdef long fps_limit |
16 cdef public long width, height | 24 cdef public long width, height |
17 cdef public bint use_fixed_pipeline | 25 cdef public bint use_fixed_pipeline |
18 cdef object runner | 26 cdef Runner runner |
19 cdef Clock clock | 27 cdef Clock clock |
20 | 28 |
21 cdef void set_size(self, int width, int height) nogil | 29 cdef void set_size(self, int width, int height) nogil |
22 cpdef set_runner(self, runner=*) | 30 cpdef set_runner(self, Runner runner=*) |
23 cpdef run(self) | 31 cpdef run(self) |
24 cdef bint run_frame(self) except? False | 32 cdef bint run_frame(self) except? False |
25 cpdef double get_fps(self) | 33 cdef double get_fps(self) nogil |