comparison pytouhou/lib/gui.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
children
comparison
equal deleted inserted replaced
634:5270c34b4c00 635:80687f258001
1 # Events
2 EXIT = 1
3 PAUSE = 2
4 SCREENSHOT = 3
5 RESIZE = 4
6 FULLSCREEN = 5
7 DOWN = 6
8
9 # Possible keystates.
10 SHOOT = 1
11 BOMB = 2
12 FOCUS = 4
13 # ??
14 UP = 16
15 DOWN = 32
16 LEFT = 64
17 RIGHT = 128
18 SKIP = 256
19
20
21 class Error(Exception):
22 pass
23
24
25 cdef class Window:
26 cdef void create_gl_context(self) except *:
27 pass
28
29 cdef void present(self) nogil:
30 pass
31
32 cdef void set_window_size(self, int width, int height) nogil:
33 pass
34
35 cdef void set_swap_interval(self, int interval) except *:
36 pass
37
38 cdef list get_events(self):
39 return []
40
41 cdef int get_keystate(self) nogil:
42 return 0
43
44 cdef void toggle_fullscreen(self) nogil:
45 pass