Mercurial > sdl-ios-xcode
comparison src/video/SDL_sysvideo.h @ 4862:7b1d35d98294
Merged Eli's Google Summer of Code work from SDL-gsoc2010-shaped_windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 22 Aug 2010 13:45:56 -0700 |
parents | 518d1679d2d0 5624fb0190b5 |
children | aa8888658021 |
comparison
equal
deleted
inserted
replaced
4764:102675835e08 | 4862:7b1d35d98294 |
---|---|
24 #ifndef _SDL_sysvideo_h | 24 #ifndef _SDL_sysvideo_h |
25 #define _SDL_sysvideo_h | 25 #define _SDL_sysvideo_h |
26 | 26 |
27 #include "SDL_mouse.h" | 27 #include "SDL_mouse.h" |
28 #include "SDL_keysym.h" | 28 #include "SDL_keysym.h" |
29 #include "SDL_shape.h" | |
29 | 30 |
30 /* The SDL video driver */ | 31 /* The SDL video driver */ |
31 | 32 |
32 typedef struct SDL_Renderer SDL_Renderer; | 33 typedef struct SDL_Renderer SDL_Renderer; |
33 typedef struct SDL_RenderDriver SDL_RenderDriver; | 34 typedef struct SDL_RenderDriver SDL_RenderDriver; |
35 typedef struct SDL_WindowShaper SDL_WindowShaper; | |
36 typedef struct SDL_ShapeDriver SDL_ShapeDriver; | |
34 typedef struct SDL_VideoDisplay SDL_VideoDisplay; | 37 typedef struct SDL_VideoDisplay SDL_VideoDisplay; |
35 typedef struct SDL_VideoDevice SDL_VideoDevice; | 38 typedef struct SDL_VideoDevice SDL_VideoDevice; |
36 | 39 |
37 /* Define the SDL texture structure */ | 40 /* Define the SDL texture structure */ |
38 struct SDL_Texture | 41 struct SDL_Texture |
95 int count); | 98 int count); |
96 int (*RenderDrawRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, | 99 int (*RenderDrawRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, |
97 int count); | 100 int count); |
98 int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, | 101 int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, |
99 int count); | 102 int count); |
100 int (*RenderDrawEllipse) (SDL_Renderer * renderer, int x, int y, | |
101 int w, int h); | |
102 int (*RenderFillEllipse) (SDL_Renderer * renderer, int x, int y, | |
103 int w, int h); | |
104 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture, | 103 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture, |
105 const SDL_Rect * srcrect, const SDL_Rect * dstrect); | 104 const SDL_Rect * srcrect, const SDL_Rect * dstrect); |
106 int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, | 105 int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
107 Uint32 format, void * pixels, int pitch); | 106 Uint32 format, void * pixels, int pitch); |
108 int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect, | 107 int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
134 | 133 |
135 /* Info about the renderer capabilities */ | 134 /* Info about the renderer capabilities */ |
136 SDL_RendererInfo info; | 135 SDL_RendererInfo info; |
137 }; | 136 }; |
138 | 137 |
138 /* Define the SDL window-shaper structure */ | |
139 struct SDL_WindowShaper | |
140 { | |
141 /* The window associated with the shaper */ | |
142 SDL_Window *window; | |
143 | |
144 /* The user's specified coordinates for the window, for once we give it a shape. */ | |
145 Uint32 userx,usery; | |
146 | |
147 /* The parameters for shape calculation. */ | |
148 SDL_WindowShapeMode mode; | |
149 | |
150 /* Has this window been assigned a shape? */ | |
151 SDL_bool hasshape; | |
152 | |
153 void *driverdata; | |
154 }; | |
155 | |
156 /* Define the SDL shape driver structure */ | |
157 struct SDL_ShapeDriver | |
158 { | |
159 SDL_WindowShaper *(*CreateShaper)(SDL_Window * window); | |
160 int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode); | |
161 int (*ResizeWindowShape)(SDL_Window *window); | |
162 }; | |
163 | |
139 /* Define the SDL window structure, corresponding to toplevel windows */ | 164 /* Define the SDL window structure, corresponding to toplevel windows */ |
140 struct SDL_Window | 165 struct SDL_Window |
141 { | 166 { |
142 const void *magic; | 167 const void *magic; |
143 Uint32 id; | 168 Uint32 id; |
148 | 173 |
149 SDL_VideoDisplay *display; | 174 SDL_VideoDisplay *display; |
150 SDL_Renderer *renderer; | 175 SDL_Renderer *renderer; |
151 | 176 |
152 SDL_DisplayMode fullscreen_mode; | 177 SDL_DisplayMode fullscreen_mode; |
178 | |
179 SDL_WindowShaper *shaper; | |
153 | 180 |
154 void *userdata; | 181 void *userdata; |
155 void *driverdata; | 182 void *driverdata; |
156 | 183 |
157 SDL_Window *prev; | 184 SDL_Window *prev; |
268 void (*MaximizeWindow) (_THIS, SDL_Window * window); | 295 void (*MaximizeWindow) (_THIS, SDL_Window * window); |
269 void (*MinimizeWindow) (_THIS, SDL_Window * window); | 296 void (*MinimizeWindow) (_THIS, SDL_Window * window); |
270 void (*RestoreWindow) (_THIS, SDL_Window * window); | 297 void (*RestoreWindow) (_THIS, SDL_Window * window); |
271 void (*SetWindowGrab) (_THIS, SDL_Window * window); | 298 void (*SetWindowGrab) (_THIS, SDL_Window * window); |
272 void (*DestroyWindow) (_THIS, SDL_Window * window); | 299 void (*DestroyWindow) (_THIS, SDL_Window * window); |
300 | |
301 /* * * */ | |
302 /* | |
303 * Shaped-window functions | |
304 */ | |
305 SDL_ShapeDriver shape_driver; | |
273 | 306 |
274 /* Get some platform dependent window information */ | 307 /* Get some platform dependent window information */ |
275 SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window, | 308 SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window, |
276 struct SDL_SysWMinfo * info); | 309 struct SDL_SysWMinfo * info); |
277 | 310 |