Mercurial > touhou
comparison pytouhou/lib/_sdl.pxd @ 464:36bc577b2392
Make the window resizable, and scale its content correctly.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Wed, 11 Sep 2013 15:55:19 +0200 |
parents | cae1ae9de430 |
children | b39ad30c6620 |
comparison
equal
deleted
inserted
replaced
463:11708a1d0a1a | 464:36bc577b2392 |
---|---|
41 | 41 |
42 ctypedef enum SDL_WindowFlags: | 42 ctypedef enum SDL_WindowFlags: |
43 SDL_WINDOWPOS_CENTERED | 43 SDL_WINDOWPOS_CENTERED |
44 SDL_WINDOW_OPENGL | 44 SDL_WINDOW_OPENGL |
45 SDL_WINDOW_SHOWN | 45 SDL_WINDOW_SHOWN |
46 SDL_WINDOW_RESIZABLE | |
46 | 47 |
47 ctypedef struct SDL_Window: | 48 ctypedef struct SDL_Window: |
48 pass | 49 pass |
49 | 50 |
50 ctypedef void *SDL_GLContext | 51 ctypedef void *SDL_GLContext |
74 | 75 |
75 cdef extern from "SDL_events.h" nogil: | 76 cdef extern from "SDL_events.h" nogil: |
76 ctypedef enum SDL_EventType: | 77 ctypedef enum SDL_EventType: |
77 SDL_KEYDOWN | 78 SDL_KEYDOWN |
78 SDL_QUIT | 79 SDL_QUIT |
80 SDL_WINDOWEVENT | |
79 | 81 |
80 ctypedef struct SDL_Keysym: | 82 ctypedef struct SDL_Keysym: |
81 SDL_Scancode scancode | 83 SDL_Scancode scancode |
82 | 84 |
83 ctypedef struct SDL_KeyboardEvent: | 85 ctypedef struct SDL_KeyboardEvent: |
84 Uint32 type | 86 Uint32 type |
85 SDL_Keysym keysym | 87 SDL_Keysym keysym |
86 | 88 |
89 ctypedef enum SDL_WindowEventID: | |
90 SDL_WINDOWEVENT_RESIZED | |
91 | |
92 ctypedef struct SDL_WindowEvent: | |
93 Uint32 type | |
94 SDL_WindowEventID event | |
95 int data1 | |
96 int data2 | |
97 | |
87 ctypedef union SDL_Event: | 98 ctypedef union SDL_Event: |
88 Uint32 type | 99 Uint32 type |
89 SDL_KeyboardEvent key | 100 SDL_KeyboardEvent key |
101 SDL_WindowEvent window | |
90 | 102 |
91 int SDL_PollEvent(SDL_Event *event) | 103 int SDL_PollEvent(SDL_Event *event) |
92 | 104 |
93 | 105 |
94 cdef extern from "SDL_keyboard.h" nogil: | 106 cdef extern from "SDL_keyboard.h" nogil: |