comparison pytouhou/lib/_sdl.pxd @ 786:7e940ebeb5fd

Replace SDL2_image with the image crate
author Link Mauve <linkmauve@linkmauve.fr>
date Mon, 01 Dec 2025 17:05:48 +0100
parents ec1e06402a97
children
comparison
equal deleted inserted replaced
785:f73e8524c045 786:7e940ebeb5fd
144 int w, h 144 int w, h
145 unsigned char *pixels 145 unsigned char *pixels
146 146
147 void SDL_FreeSurface(SDL_Surface *surface) 147 void SDL_FreeSurface(SDL_Surface *surface)
148 int SDL_BlitSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect) 148 int SDL_BlitSurface(SDL_Surface *src, const SDL_Rect *srcrect, SDL_Surface *dst, SDL_Rect *dstrect)
149 SDL_Surface *SDL_CreateRGBSurface(Uint32 flags, int width, int height, int depth, Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask) 149 SDL_Surface *SDL_CreateRGBSurfaceWithFormatFrom(void *pixels, int width, int height, int depth, int pitch, Uint32 fmt)
150 150
151 151
152 cdef extern from "SDL_rwops.h" nogil: 152 cdef extern from "SDL_rwops.h" nogil:
153 ctypedef struct SDL_RWops: 153 ctypedef struct SDL_RWops:
154 pass 154 pass
155 155
156 SDL_RWops *SDL_RWFromConstMem(const void *mem, int size) 156 SDL_RWops *SDL_RWFromConstMem(const void *mem, int size)
157 int SDL_RWclose(SDL_RWops *context) 157 int SDL_RWclose(SDL_RWops *context)
158
159
160 cdef extern from "SDL_image.h" nogil:
161 int IMG_INIT_PNG
162
163 int IMG_Init(int flags)
164 void IMG_Quit()
165 SDL_Surface *IMG_LoadPNG_RW(SDL_RWops *src)
166 158
167 159
168 cdef extern from "SDL_pixels.h" nogil: 160 cdef extern from "SDL_pixels.h" nogil:
169 ctypedef struct SDL_Color: 161 ctypedef struct SDL_Color:
170 Uint8 r, g, b, a 162 Uint8 r, g, b, a
163
164 ctypedef enum SDL_PixelFormatEnum:
165 SDL_PIXELFORMAT_ABGR8888
171 166
172 167
173 cdef extern from "SDL_ttf.h" nogil: 168 cdef extern from "SDL_ttf.h" nogil:
174 ctypedef struct TTF_Font: 169 ctypedef struct TTF_Font:
175 pass 170 pass