diff 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
line wrap: on
line diff
--- a/pytouhou/lib/sdl.pxd
+++ b/pytouhou/lib/sdl.pxd
@@ -46,11 +46,37 @@ cdef SDL_EventType WINDOWEVENT
 cdef class Window:
     cdef SDL_Window *window
     cdef SDL_GLContext context
+    cdef SDL_Renderer *renderer
 
     cdef void gl_create_context(self) except *
-    cdef void gl_swap_window(self) nogil
+    cdef void present(self) nogil
     cdef void set_window_size(self, int width, int height) nogil
 
+    # The following functions are there for the pure SDL backend.
+    cdef void create_renderer(self, Uint32 flags)
+    cdef void render_clear(self)
+    cdef void render_copy(self, Texture texture, Rect srcrect, Rect dstrect)
+    cdef void render_copy_ex(self, Texture texture, Rect srcrect, Rect dstrect, double angle, bint flip)
+    cdef void render_set_clip_rect(self, Rect rect)
+    cdef void render_set_viewport(self, Rect rect)
+    cdef Texture create_texture_from_surface(self, Surface surface)
+
+
+cdef class Texture:
+    cdef SDL_Texture *texture
+
+    cpdef set_color_mod(self, Uint8 r, Uint8 g, Uint8 b)
+    cpdef set_alpha_mod(self, Uint8 alpha)
+    cpdef set_blend_mode(self, SDL_BlendMode blend_mode)
+
+
+cdef class Rect:
+    cdef SDL_Rect rect
+
+
+cdef class Color:
+    cdef SDL_Color color
+
 
 cdef class Surface:
     cdef SDL_Surface *surface