Mercurial > touhou
comparison pytouhou/lib/sdl.pxd @ 538:1abb6f7db8cc
Don’t retrieve the keyboard_state pointer at each frame.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 24 Apr 2014 20:01:42 +0200 |
parents | a7dc55ad9380 |
children | c34b23e29d16 |
comparison
equal
deleted
inserted
replaced
537:63440d1e0717 | 538:1abb6f7db8cc |
---|---|
39 cdef SDL_WindowEventID WINDOWEVENT_RESIZED | 39 cdef SDL_WindowEventID WINDOWEVENT_RESIZED |
40 | 40 |
41 cdef SDL_EventType KEYDOWN | 41 cdef SDL_EventType KEYDOWN |
42 cdef SDL_EventType QUIT | 42 cdef SDL_EventType QUIT |
43 cdef SDL_EventType WINDOWEVENT | 43 cdef SDL_EventType WINDOWEVENT |
44 | |
45 cdef const Uint8 *keyboard_state | |
44 | 46 |
45 | 47 |
46 cdef class Window: | 48 cdef class Window: |
47 cdef SDL_Window *window | 49 cdef SDL_Window *window |
48 cdef SDL_GLContext context | 50 cdef SDL_GLContext context |
109 cdef void img_init(int flags) except * | 111 cdef void img_init(int flags) except * |
110 cdef void mix_init(int flags) except * | 112 cdef void mix_init(int flags) except * |
111 cdef void ttf_init() except * | 113 cdef void ttf_init() except * |
112 cdef void gl_set_attribute(SDL_GLattr attr, int value) except * | 114 cdef void gl_set_attribute(SDL_GLattr attr, int value) except * |
113 cdef list poll_events() | 115 cdef list poll_events() |
114 cdef const Uint8* get_keyboard_state() nogil | |
115 cdef Surface load_png(file_) | 116 cdef Surface load_png(file_) |
116 cdef Surface create_rgb_surface(int width, int height, int depth, Uint32 rmask=*, Uint32 gmask=*, Uint32 bmask=*, Uint32 amask=*) | 117 cdef Surface create_rgb_surface(int width, int height, int depth, Uint32 rmask=*, Uint32 gmask=*, Uint32 bmask=*, Uint32 amask=*) |
117 cdef void mix_open_audio(int frequency, Uint16 format_, int channels, int chunksize) except * | 118 cdef void mix_open_audio(int frequency, Uint16 format_, int channels, int chunksize) except * |
118 cdef void mix_allocate_channels(int numchans) except * | 119 cdef void mix_allocate_channels(int numchans) except * |
119 cdef int mix_volume(int channel, float volume) nogil | 120 cdef int mix_volume(int channel, float volume) nogil |