diff pytouhou/ui/window.pyx @ 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
line wrap: on
line diff
--- a/pytouhou/ui/window.pyx
+++ b/pytouhou/ui/window.pyx
@@ -14,6 +14,8 @@
 
 cimport cython
 
+cimport pytouhou.lib.sdl as sdl
+
 
 cdef class Clock:
     def __init__(self, long fps=-1):
@@ -130,3 +132,15 @@ cdef class Window:
 
     cdef double get_fps(self) nogil:
         return self.clock.fps
+
+
+    cdef list get_events(self):
+        return self.win.get_events()
+
+
+    cdef int get_keystate(self) nogil:
+        return self.win.get_keystate()
+
+
+    cdef void toggle_fullscreen(self) nogil:
+        self.win.toggle_fullscreen()