Mercurial > touhou
annotate pytouhou/lib/gui.pyx @ 761:f506ad5c9b17
formats: Replace unwrap() with proper io::Error.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 06 Jan 2021 01:47:06 +0100 |
parents | 80687f258001 |
children |
rev | line source |
---|---|
635
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
1 # Events |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
2 EXIT = 1 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
3 PAUSE = 2 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
4 SCREENSHOT = 3 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
5 RESIZE = 4 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
6 FULLSCREEN = 5 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
7 DOWN = 6 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
8 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
9 # Possible keystates. |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
10 SHOOT = 1 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
11 BOMB = 2 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
12 FOCUS = 4 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
13 # ?? |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
14 UP = 16 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
15 DOWN = 32 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
16 LEFT = 64 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
17 RIGHT = 128 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
18 SKIP = 256 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
19 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
20 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
21 class Error(Exception): |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
22 pass |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
23 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
24 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
25 cdef class Window: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
26 cdef void create_gl_context(self) except *: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
27 pass |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
28 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
29 cdef void present(self) nogil: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
30 pass |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
31 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
32 cdef void set_window_size(self, int width, int height) nogil: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
33 pass |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
34 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
35 cdef void set_swap_interval(self, int interval) except *: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
36 pass |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
37 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
38 cdef list get_events(self): |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
39 return [] |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
40 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
41 cdef int get_keystate(self) nogil: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
42 return 0 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
43 |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
44 cdef void toggle_fullscreen(self) nogil: |
80687f258001
Make sdl.Window inherit from gui.Window, so we can swap implementations.
Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
parents:
diff
changeset
|
45 pass |