diff pytouhou/ui/window.pxd @ 458:1b56d62250ab

Make pytouhou.ui.{window,shader,game{runner,renderer}} extension types.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Thu, 05 Sep 2013 23:11:54 +0200
parents
children 11708a1d0a1a
line wrap: on
line diff
new file mode 100644
--- /dev/null
+++ b/pytouhou/ui/window.pxd
@@ -0,0 +1,25 @@
+from pytouhou.lib cimport sdl
+
+
+cdef class Clock:
+    cdef long _target_fps, _ref_tick, _ref_frame, _fps_tick, _fps_frame
+    cdef double _rate
+
+    cdef void set_target_fps(self, long fps) nogil
+    cdef double get_fps(self) nogil
+    cdef void tick(self) nogil 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 Clock clock
+
+    cdef void set_size(self, int width, int height) nogil
+    cpdef set_runner(self, runner=*)
+    cpdef run(self)
+    cdef bint run_frame(self) except? False
+    cpdef double get_fps(self)