comparison pytouhou/lib/sdl.pxd @ 783:ec1e06402a97

Replace SDL2_mixer with the kira crate
author Link Mauve <linkmauve@linkmauve.fr>
date Fri, 21 Nov 2025 10:21:59 +0100
parents 80687f258001
children f73e8524c045
comparison
equal deleted inserted replaced
782:a30ce01b9154 783:ec1e06402a97
93 93
94 cdef bint blit(self, Surface other) except True 94 cdef bint blit(self, Surface other) except True
95 cdef void set_alpha(self, Surface alpha_surface) nogil 95 cdef void set_alpha(self, Surface alpha_surface) nogil
96 96
97 97
98 cdef class Music:
99 cdef Mix_Music *music
100
101 cdef void play(self, int loops) nogil
102 cdef void set_loop_points(self, double start, double end) nogil
103
104
105 cdef class Chunk:
106 cdef Mix_Chunk *chunk
107
108 cdef void play(self, int channel, int loops) nogil
109 cdef void set_volume(self, float volume) nogil
110
111
112 cdef class Font: 98 cdef class Font:
113 cdef TTF_Font *font 99 cdef TTF_Font *font
114 100
115 cdef Surface render(self, unicode text) 101 cdef Surface render(self, unicode text)
116 102
117 103
118 cdef bint init(Uint32 flags) except True 104 cdef bint init(Uint32 flags) except True
119 cdef bint img_init(int flags) except True 105 cdef bint img_init(int flags) except True
120 cdef bint mix_init(int flags) except True
121 cdef bint ttf_init() except True 106 cdef bint ttf_init() except True
122 cdef bint gl_set_attribute(SDL_GLattr attr, int value) except True 107 cdef bint gl_set_attribute(SDL_GLattr attr, int value) except True
123 cdef Surface load_png(file_) 108 cdef Surface load_png(file_)
124 cdef Surface create_rgb_surface(int width, int height, int depth, Uint32 rmask=*, Uint32 gmask=*, Uint32 bmask=*, Uint32 amask=*) 109 cdef Surface create_rgb_surface(int width, int height, int depth, Uint32 rmask=*, Uint32 gmask=*, Uint32 bmask=*, Uint32 amask=*)
125 cdef bint mix_open_audio(int frequency, Uint16 format_, int channels, int chunksize) except True
126 cdef bint mix_allocate_channels(int numchans) except True
127 cdef int mix_volume(int channel, float volume) nogil
128 cdef int mix_volume_music(float volume) nogil
129 cdef Music load_music(str filename)
130 cdef Chunk load_chunk(file_)
131 cdef Uint32 get_ticks() nogil 110 cdef Uint32 get_ticks() nogil
132 cdef void delay(Uint32 ms) nogil 111 cdef void delay(Uint32 ms) nogil
133 cpdef bint show_simple_message_box(unicode message) except True 112 cpdef bint show_simple_message_box(unicode message) except True