Mercurial > touhou
comparison pytouhou/ui/window.pxd @ 635:80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 14 Apr 2016 21:18:03 +0100 |
parents | a6af3ff86612 |
children |
comparison
equal
deleted
inserted
replaced
634:5270c34b4c00 | 635:80687f258001 |
---|---|
1 from pytouhou.lib cimport sdl | 1 cimport pytouhou.lib.gui as gui |
2 | 2 |
3 | 3 |
4 cdef class Clock: | 4 cdef class Clock: |
5 cdef unsigned long _ref_tick | 5 cdef unsigned long _ref_tick |
6 cdef long _target_fps, _ref_frame, _fps_tick, _fps_frame | 6 cdef long _target_fps, _ref_frame, _fps_tick, _fps_frame |
17 cdef bint finish(self) except True | 17 cdef bint finish(self) except True |
18 cpdef bint update(self, bint render) except -1 | 18 cpdef bint update(self, bint render) except -1 |
19 | 19 |
20 | 20 |
21 cdef class Window: | 21 cdef class Window: |
22 cdef sdl.Window win | 22 cdef gui.Window win |
23 cdef Runner runner | 23 cdef Runner runner |
24 cdef Clock clock | 24 cdef Clock clock |
25 cdef int frame, frameskip | 25 cdef int frame, frameskip |
26 cdef int width, height | 26 cdef int width, height |
27 | 27 |
28 cdef void set_size(self, int width, int height) nogil | 28 cdef void set_size(self, int width, int height) nogil |
29 cpdef set_runner(self, Runner runner=*) | 29 cpdef set_runner(self, Runner runner=*) |
30 cpdef run(self) | 30 cpdef run(self) |
31 cdef bint run_frame(self) except -1 | 31 cdef bint run_frame(self) except -1 |
32 cdef double get_fps(self) nogil | 32 cdef double get_fps(self) nogil |
33 cdef list get_events(self) | |
34 cdef int get_keystate(self) nogil | |
35 cdef void toggle_fullscreen(self) nogil |