comparison pytouhou/lib/sdl.pxd @ 616:4ce3ef053a25

Remove every case where an exception could be silently eaten by a cdef function.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Sat, 28 Mar 2015 23:21:15 +0100
parents 73f134f84c7f
children a6af3ff86612
comparison
equal deleted inserted replaced
615:d1f0bb0b7a17 616:4ce3ef053a25
58 cdef class Window: 58 cdef class Window:
59 cdef SDL_Window *window 59 cdef SDL_Window *window
60 cdef SDL_GLContext context 60 cdef SDL_GLContext context
61 cdef SDL_Renderer *renderer 61 cdef SDL_Renderer *renderer
62 62
63 cdef void gl_create_context(self) except * 63 cdef bint gl_create_context(self) except True
64 cdef void present(self) nogil 64 cdef void present(self) nogil
65 cdef void set_window_size(self, int width, int height) nogil 65 cdef void set_window_size(self, int width, int height) nogil
66 66
67 # The following functions are there for the pure SDL backend. 67 # The following functions are there for the pure SDL backend.
68 cdef void create_renderer(self, Uint32 flags) 68 cdef bint create_renderer(self, Uint32 flags) except True
69 cdef void render_clear(self) 69 cdef bint render_clear(self) except True
70 cdef void render_copy(self, Texture texture, Rect srcrect, Rect dstrect) 70 cdef bint render_copy(self, Texture texture, Rect srcrect, Rect dstrect) except True
71 cdef void render_copy_ex(self, Texture texture, Rect srcrect, Rect dstrect, double angle, bint flip) 71 cdef bint render_copy_ex(self, Texture texture, Rect srcrect, Rect dstrect, double angle, bint flip) except True
72 cdef void render_set_clip_rect(self, Rect rect) 72 cdef bint render_set_clip_rect(self, Rect rect) except True
73 cdef void render_set_viewport(self, Rect rect) 73 cdef bint render_set_viewport(self, Rect rect) except True
74 cdef Texture create_texture_from_surface(self, Surface surface) 74 cdef Texture create_texture_from_surface(self, Surface surface)
75 75
76 76
77 cdef class Texture: 77 cdef class Texture:
78 cdef SDL_Texture *texture 78 cdef SDL_Texture *texture
132 cdef int mix_volume_music(float volume) nogil 132 cdef int mix_volume_music(float volume) nogil
133 cdef Music load_music(str filename) 133 cdef Music load_music(str filename)
134 cdef Chunk load_chunk(file_) 134 cdef Chunk load_chunk(file_)
135 cdef Uint32 get_ticks() nogil 135 cdef Uint32 get_ticks() nogil
136 cdef void delay(Uint32 ms) nogil 136 cdef void delay(Uint32 ms) nogil
137 cpdef int show_simple_message_box(unicode message) 137 cpdef bint show_simple_message_box(unicode message) except True