Mercurial > touhou
comparison pytouhou/lib/sdl.pxd @ 512:b39ad30c6620
Add a pure SDL backend.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 05 Dec 2013 01:55:39 +0100 |
parents | 2276229282fd |
children | a7dc55ad9380 |
comparison
equal
deleted
inserted
replaced
511:2e8ceaa85d5c | 512:b39ad30c6620 |
---|---|
44 | 44 |
45 | 45 |
46 cdef class Window: | 46 cdef class Window: |
47 cdef SDL_Window *window | 47 cdef SDL_Window *window |
48 cdef SDL_GLContext context | 48 cdef SDL_GLContext context |
49 cdef SDL_Renderer *renderer | |
49 | 50 |
50 cdef void gl_create_context(self) except * | 51 cdef void gl_create_context(self) except * |
51 cdef void gl_swap_window(self) nogil | 52 cdef void present(self) nogil |
52 cdef void set_window_size(self, int width, int height) nogil | 53 cdef void set_window_size(self, int width, int height) nogil |
54 | |
55 # The following functions are there for the pure SDL backend. | |
56 cdef void create_renderer(self, Uint32 flags) | |
57 cdef void render_clear(self) | |
58 cdef void render_copy(self, Texture texture, Rect srcrect, Rect dstrect) | |
59 cdef void render_copy_ex(self, Texture texture, Rect srcrect, Rect dstrect, double angle, bint flip) | |
60 cdef void render_set_clip_rect(self, Rect rect) | |
61 cdef void render_set_viewport(self, Rect rect) | |
62 cdef Texture create_texture_from_surface(self, Surface surface) | |
63 | |
64 | |
65 cdef class Texture: | |
66 cdef SDL_Texture *texture | |
67 | |
68 cpdef set_color_mod(self, Uint8 r, Uint8 g, Uint8 b) | |
69 cpdef set_alpha_mod(self, Uint8 alpha) | |
70 cpdef set_blend_mode(self, SDL_BlendMode blend_mode) | |
71 | |
72 | |
73 cdef class Rect: | |
74 cdef SDL_Rect rect | |
75 | |
76 | |
77 cdef class Color: | |
78 cdef SDL_Color color | |
53 | 79 |
54 | 80 |
55 cdef class Surface: | 81 cdef class Surface: |
56 cdef SDL_Surface *surface | 82 cdef SDL_Surface *surface |
57 | 83 |