Mercurial > sdl-ios-xcode
annotate src/video/SDL_sysvideo.h @ 3542:97eae5a705f9
Make sure we fully clip the first point before starting to adjust the second point.
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 11 Dec 2009 09:57:54 +0000 |
parents | 0267b8b1595c |
children | f638ded38b8a |
rev | line source |
---|---|
0 | 1 /* |
2 SDL - Simple DirectMedia Layer | |
2859 | 3 Copyright (C) 1997-2009 Sam Lantinga |
0 | 4 |
5 This library is free software; you can redistribute it and/or | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
6 modify it under the terms of the GNU Lesser General Public |
0 | 7 License as published by the Free Software Foundation; either |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
8 version 2.1 of the License, or (at your option) any later version. |
0 | 9 |
10 This library is distributed in the hope that it will be useful, | |
11 but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
13 Lesser General Public License for more details. |
0 | 14 |
1312
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
15 You should have received a copy of the GNU Lesser General Public |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
16 License along with this library; if not, write to the Free Software |
c9b51268668f
Updated copyright information and removed rcs id lines (problematic in branch merges)
Sam Lantinga <slouken@libsdl.org>
parents:
1251
diff
changeset
|
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
0 | 18 |
19 Sam Lantinga | |
252
e8157fcb3114
Updated the source with the correct e-mail address
Sam Lantinga <slouken@libsdl.org>
parents:
173
diff
changeset
|
20 slouken@libsdl.org |
0 | 21 */ |
1402
d910939febfa
Use consistent identifiers for the various platforms we support.
Sam Lantinga <slouken@libsdl.org>
parents:
1361
diff
changeset
|
22 #include "SDL_config.h" |
0 | 23 |
24 #ifndef _SDL_sysvideo_h | |
25 #define _SDL_sysvideo_h | |
26 | |
27 #include "SDL_mouse.h" | |
2268
4baee598306d
Date: Thu, 05 Jul 2007 14:02:33 -0700
Sam Lantinga <slouken@libsdl.org>
parents:
2245
diff
changeset
|
28 #include "SDL_keysym.h" |
0 | 29 |
30 /* The SDL video driver */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
31 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
32 typedef struct SDL_Window SDL_Window; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
33 typedef struct SDL_Texture SDL_Texture; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
34 typedef struct SDL_Renderer SDL_Renderer; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
35 typedef struct SDL_RenderDriver SDL_RenderDriver; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
36 typedef struct SDL_VideoDisplay SDL_VideoDisplay; |
0 | 37 typedef struct SDL_VideoDevice SDL_VideoDevice; |
38 | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
39 /* Define the SDL texture structure */ |
2753 | 40 struct SDL_Texture |
41 { | |
42 Uint32 id; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
43 |
2753 | 44 Uint32 format; /**< The pixel format of the texture */ |
45 int access; /**< SDL_TextureAccess */ | |
46 int w; /**< The width of the texture */ | |
47 int h; /**< The height of the texture */ | |
48 int modMode; /**< The texture modulation mode */ | |
49 int blendMode; /**< The texture blend mode */ | |
50 int scaleMode; /**< The texture scale mode */ | |
51 Uint8 r, g, b, a; /**< Texture modulation values */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
52 |
2753 | 53 SDL_Renderer *renderer; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
54 |
2753 | 55 void *driverdata; /**< Driver specific texture representation */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
56 |
2753 | 57 SDL_Texture *next; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
58 }; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
59 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
60 /* Define the SDL renderer structure */ |
2753 | 61 struct SDL_Renderer |
62 { | |
63 int (*ActivateRenderer) (SDL_Renderer * renderer); | |
64 int (*DisplayModeChanged) (SDL_Renderer * renderer); | |
65 int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture); | |
66 int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture, | |
67 void **pixels, int *pitch); | |
68 int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture, | |
69 const SDL_Color * colors, int firstcolor, | |
70 int ncolors); | |
71 int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture, | |
72 SDL_Color * colors, int firstcolor, | |
73 int ncolors); | |
74 int (*SetTextureColorMod) (SDL_Renderer * renderer, | |
75 SDL_Texture * texture); | |
76 int (*SetTextureAlphaMod) (SDL_Renderer * renderer, | |
77 SDL_Texture * texture); | |
78 int (*SetTextureBlendMode) (SDL_Renderer * renderer, | |
79 SDL_Texture * texture); | |
80 int (*SetTextureScaleMode) (SDL_Renderer * renderer, | |
81 SDL_Texture * texture); | |
82 int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture, | |
83 const SDL_Rect * rect, const void *pixels, | |
84 int pitch); | |
85 int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture, | |
86 const SDL_Rect * rect, int markDirty, void **pixels, | |
87 int *pitch); | |
88 void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture); | |
89 void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture, | |
90 int numrects, const SDL_Rect * rects); | |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
91 int (*SetDrawColor) (SDL_Renderer * renderer); |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
92 int (*SetDrawBlendMode) (SDL_Renderer * renderer); |
3536
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
93 int (*RenderPoints) (SDL_Renderer * renderer, const SDL_Point * points, |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
94 int count); |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
95 int (*RenderLines) (SDL_Renderer * renderer, const SDL_Point * points, |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
96 int count); |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
97 int (*RenderRects) (SDL_Renderer * renderer, const SDL_Rect ** rects, |
0267b8b1595c
Added interfaces for batch drawing of points, lines and rects:
Sam Lantinga <slouken@libsdl.org>
parents:
3528
diff
changeset
|
98 int count); |
2753 | 99 int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture, |
100 const SDL_Rect * srcrect, const SDL_Rect * dstrect); | |
3427
36cf454ba065
Work in progress on implementation of SDL_RenderReadPixels() and SDL_RenderWritePixels(), code untested.
Sam Lantinga <slouken@libsdl.org>
parents:
3417
diff
changeset
|
101 int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3427
diff
changeset
|
102 Uint32 format, void * pixels, int pitch); |
3427
36cf454ba065
Work in progress on implementation of SDL_RenderReadPixels() and SDL_RenderWritePixels(), code untested.
Sam Lantinga <slouken@libsdl.org>
parents:
3417
diff
changeset
|
103 int (*RenderWritePixels) (SDL_Renderer * renderer, const SDL_Rect * rect, |
3435
9f62f47d989b
You can specify the format for pixel data in SDL_RenderReadPixels() and SDL_RenderWritePixels()
Sam Lantinga <slouken@libsdl.org>
parents:
3427
diff
changeset
|
104 Uint32 format, const void * pixels, int pitch); |
2753 | 105 void (*RenderPresent) (SDL_Renderer * renderer); |
106 void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture); | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
107 |
2753 | 108 void (*DestroyRenderer) (SDL_Renderer * renderer); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
109 |
2753 | 110 /* The current renderer info */ |
111 SDL_RendererInfo info; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
112 |
2753 | 113 /* The window associated with the renderer */ |
114 SDL_WindowID window; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
115 |
2884
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
116 Uint8 r, g, b, a; /**< Color for drawing operations values */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
117 int blendMode; /**< The drawing blend mode */ |
9dde605c7540
Date: Fri, 19 Dec 2008 20:17:35 +0100
Sam Lantinga <slouken@libsdl.org>
parents:
2859
diff
changeset
|
118 |
2753 | 119 void *driverdata; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
120 }; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
121 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
122 /* Define the SDL render driver structure */ |
2753 | 123 struct SDL_RenderDriver |
124 { | |
125 SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags); | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
126 |
2753 | 127 /* Info about the renderer capabilities */ |
128 SDL_RendererInfo info; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
129 }; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
130 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
131 /* Define the SDL window structure, corresponding to toplevel windows */ |
2753 | 132 struct SDL_Window |
133 { | |
134 Uint32 id; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
135 |
2753 | 136 char *title; |
137 int x, y; | |
138 int w, h; | |
139 Uint32 flags; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
140 |
2753 | 141 int display; |
142 SDL_Renderer *renderer; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
143 |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
144 SDL_DisplayMode fullscreen_mode; |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
145 |
2753 | 146 void *userdata; |
147 void *driverdata; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
148 }; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
149 #define FULLSCREEN_VISIBLE(W) \ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
150 (((W)->flags & SDL_WINDOW_FULLSCREEN) && \ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
151 ((W)->flags & SDL_WINDOW_SHOWN) && \ |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
152 !((W)->flags & SDL_WINDOW_MINIMIZED)) |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
153 |
2742
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
154 /* |
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
155 * Define the SDL display structure This corresponds to physical monitors |
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
156 * attached to the system. |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
157 */ |
2753 | 158 struct SDL_VideoDisplay |
159 { | |
160 int max_display_modes; | |
161 int num_display_modes; | |
162 SDL_DisplayMode *display_modes; | |
163 SDL_DisplayMode desktop_mode; | |
164 SDL_DisplayMode current_mode; | |
3502
98a819296cdc
Whenever a window becomes fullscreen, shown, unminimized, and has input focus it will change the display to the corresponding fullscreen video mode.
Sam Lantinga <slouken@libsdl.org>
parents:
3501
diff
changeset
|
165 SDL_bool updating_fullscreen; |
2753 | 166 SDL_Palette *palette; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
167 |
2753 | 168 Uint16 *gamma; |
169 Uint16 *saved_gamma; /* (just offset into gamma) */ | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
170 |
2753 | 171 int num_render_drivers; |
172 SDL_RenderDriver *render_drivers; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
173 |
2753 | 174 int num_windows; |
175 SDL_Window *windows; | |
3517
e7eec78e4b92
Fixed mouse events for fullscreen windows on Mac OS X
Sam Lantinga <slouken@libsdl.org>
parents:
3511
diff
changeset
|
176 SDL_Window *fullscreen_window; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
177 |
2753 | 178 SDL_Renderer *current_renderer; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
179 |
2753 | 180 /* The hash list of textures */ |
181 SDL_Texture *textures[64]; | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
182 |
2753 | 183 SDL_VideoDevice *device; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
184 |
2753 | 185 void *driverdata; |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
186 }; |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
187 |
0 | 188 /* Define the SDL video driver structure */ |
189 #define _THIS SDL_VideoDevice *_this | |
190 | |
2753 | 191 struct SDL_VideoDevice |
192 { | |
193 /* * * */ | |
194 /* The name of this video driver */ | |
195 const char *name; | |
0 | 196 |
2753 | 197 /* * * */ |
198 /* Initialization/Query functions */ | |
0 | 199 |
2753 | 200 /* |
201 * Initialize the native video subsystem, filling in the list of | |
202 * displays for this driver, returning 0 or -1 if there's an error. | |
203 */ | |
204 int (*VideoInit) (_THIS); | |
0 | 205 |
2753 | 206 /* |
207 * Reverse the effects VideoInit() -- called if VideoInit() fails or | |
208 * if the application is shutting down the video subsystem. | |
209 */ | |
210 void (*VideoQuit) (_THIS); | |
1913
83420da906a5
Implemented Windows OpenGL support
Sam Lantinga <slouken@libsdl.org>
parents:
1912
diff
changeset
|
211 |
2753 | 212 /* * * */ |
213 /* | |
214 * Display functions | |
215 */ | |
0 | 216 |
2753 | 217 /* |
3528
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3517
diff
changeset
|
218 * Get the bounds of a display |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3517
diff
changeset
|
219 */ |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3517
diff
changeset
|
220 int (*GetDisplayBounds) (_THIS, SDL_VideoDisplay * display, SDL_Rect * rect); |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3517
diff
changeset
|
221 |
59ff7a2beb57
Added an API function to query geometry of multiple monitors:
Sam Lantinga <slouken@libsdl.org>
parents:
3517
diff
changeset
|
222 /* |
2753 | 223 * Get a list of the available display modes. e.g. |
224 * SDL_AddDisplayMode(_this->current_display, mode) | |
225 */ | |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
226 void (*GetDisplayModes) (_THIS, SDL_VideoDisplay * display); |
0 | 227 |
2753 | 228 /* |
229 * Setting the display mode is independent of creating windows, so | |
230 * when the display mode is changed, all existing windows should have | |
231 * their data updated accordingly, including the display surfaces | |
232 * associated with them. | |
233 */ | |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
234 int (*SetDisplayMode) (_THIS, SDL_VideoDisplay * display, SDL_DisplayMode * mode); |
0 | 235 |
2753 | 236 /* Set the color entries of the display palette */ |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
237 int (*SetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette); |
2742
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
238 |
2753 | 239 /* Get the color entries of the display palette */ |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
240 int (*GetDisplayPalette) (_THIS, SDL_VideoDisplay * display, SDL_Palette * palette); |
0 | 241 |
2753 | 242 /* Set the gamma ramp */ |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
243 int (*SetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp); |
2742
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
244 |
2753 | 245 /* Get the gamma ramp */ |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
246 int (*GetDisplayGammaRamp) (_THIS, SDL_VideoDisplay * display, Uint16 * ramp); |
0 | 247 |
2753 | 248 /* * * */ |
249 /* | |
250 * Window functions | |
251 */ | |
252 int (*CreateWindow) (_THIS, SDL_Window * window); | |
253 int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data); | |
254 void (*SetWindowTitle) (_THIS, SDL_Window * window); | |
2967
e4a469d6ddab
Implemented SDL_SetWindowIcon(), with translucent icon support under X11.
Sam Lantinga <slouken@libsdl.org>
parents:
2901
diff
changeset
|
255 void (*SetWindowIcon) (_THIS, SDL_Window * window, SDL_Surface * icon); |
2753 | 256 void (*SetWindowPosition) (_THIS, SDL_Window * window); |
257 void (*SetWindowSize) (_THIS, SDL_Window * window); | |
258 void (*ShowWindow) (_THIS, SDL_Window * window); | |
259 void (*HideWindow) (_THIS, SDL_Window * window); | |
260 void (*RaiseWindow) (_THIS, SDL_Window * window); | |
261 void (*MaximizeWindow) (_THIS, SDL_Window * window); | |
262 void (*MinimizeWindow) (_THIS, SDL_Window * window); | |
263 void (*RestoreWindow) (_THIS, SDL_Window * window); | |
264 void (*SetWindowGrab) (_THIS, SDL_Window * window); | |
265 void (*DestroyWindow) (_THIS, SDL_Window * window); | |
0 | 266 |
2753 | 267 /* Get some platform dependent window information */ |
268 SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window, | |
269 struct SDL_SysWMinfo * info); | |
0 | 270 |
2753 | 271 /* * * */ |
272 /* | |
273 * OpenGL support | |
274 */ | |
275 int (*GL_LoadLibrary) (_THIS, const char *path); | |
276 void *(*GL_GetProcAddress) (_THIS, const char *proc); | |
3057
089a77aebb7d
Added test program for SDL_CreateWindowFrom()
Sam Lantinga <slouken@libsdl.org>
parents:
3025
diff
changeset
|
277 void (*GL_UnloadLibrary) (_THIS); |
2753 | 278 SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window); |
279 int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context); | |
280 int (*GL_SetSwapInterval) (_THIS, int interval); | |
281 int (*GL_GetSwapInterval) (_THIS); | |
282 void (*GL_SwapWindow) (_THIS, SDL_Window * window); | |
283 void (*GL_DeleteContext) (_THIS, SDL_GLContext context); | |
0 | 284 |
2753 | 285 /* * * */ |
286 /* | |
287 * Event manager functions | |
288 */ | |
289 void (*PumpEvents) (_THIS); | |
0 | 290 |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2967
diff
changeset
|
291 /* Suspend the screensaver */ |
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2967
diff
changeset
|
292 void (*SuspendScreenSaver) (_THIS); |
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2967
diff
changeset
|
293 |
3280
00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3276
diff
changeset
|
294 /* Text input */ |
00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3276
diff
changeset
|
295 void (*StartTextInput) (_THIS); |
00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3276
diff
changeset
|
296 void (*StopTextInput) (_THIS); |
00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3276
diff
changeset
|
297 void (*SetTextInputRect) (_THIS, SDL_Rect *rect); |
00cace2d9080
Merged a cleaned up version of Jiang's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3276
diff
changeset
|
298 |
2753 | 299 /* * * */ |
300 /* Data common to all drivers */ | |
3025
54fac87e1f34
Added an API to enable/disable the screen saver.
Sam Lantinga <slouken@libsdl.org>
parents:
2967
diff
changeset
|
301 SDL_bool suspend_screensaver; |
2753 | 302 int num_displays; |
303 SDL_VideoDisplay *displays; | |
304 int current_display; | |
305 Uint32 next_object_id; | |
0 | 306 |
2753 | 307 /* * * */ |
308 /* Data used by the GL drivers */ | |
309 struct | |
310 { | |
311 int red_size; | |
312 int green_size; | |
313 int blue_size; | |
314 int alpha_size; | |
315 int depth_size; | |
316 int buffer_size; | |
317 int stencil_size; | |
318 int double_buffer; | |
319 int accum_red_size; | |
320 int accum_green_size; | |
321 int accum_blue_size; | |
322 int accum_alpha_size; | |
323 int stereo; | |
324 int multisamplebuffers; | |
325 int multisamplesamples; | |
326 int accelerated; | |
3100
7dc982143c06
Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents:
3083
diff
changeset
|
327 int major_version; |
7dc982143c06
Date: Sun, 22 Mar 2009 12:52:29 +0000
Sam Lantinga <slouken@libsdl.org>
parents:
3083
diff
changeset
|
328 int minor_version; |
2753 | 329 int retained_backing; |
330 int driver_loaded; | |
331 char driver_path[256]; | |
332 void *dll_handle; | |
333 } gl_config; | |
0 | 334 |
2753 | 335 /* * * */ |
336 /* Data private to this driver */ | |
337 void *driverdata; | |
338 struct SDL_GLDriverData *gl_data; | |
0 | 339 |
3161
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
340 #if SDL_VIDEO_DRIVER_PANDORA |
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
341 struct SDL_PrivateGLESData *gles_data; |
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
342 #endif |
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
343 |
2753 | 344 /* * * */ |
345 /* The function used to dispose of this structure */ | |
346 void (*free) (_THIS); | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
347 }; |
0 | 348 |
2753 | 349 typedef struct VideoBootStrap |
350 { | |
351 const char *name; | |
352 const char *desc; | |
353 int (*available) (void); | |
354 SDL_VideoDevice *(*create) (int devindex); | |
355 } VideoBootStrap; | |
0 | 356 |
1931
103c6fec2a60
The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents:
1928
diff
changeset
|
357 #if SDL_VIDEO_DRIVER_COCOA |
103c6fec2a60
The Mac OS X Cocoa video driver is under construction...
Sam Lantinga <slouken@libsdl.org>
parents:
1928
diff
changeset
|
358 extern VideoBootStrap COCOA_bootstrap; |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
359 #endif |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
360 #if SDL_VIDEO_DRIVER_X11 |
0 | 361 extern VideoBootStrap X11_bootstrap; |
362 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
363 #if SDL_VIDEO_DRIVER_FBCON |
0 | 364 extern VideoBootStrap FBCON_bootstrap; |
365 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
366 #if SDL_VIDEO_DRIVER_DIRECTFB |
167
cb384ef627f6
Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents:
75
diff
changeset
|
367 extern VideoBootStrap DirectFB_bootstrap; |
cb384ef627f6
Added support for DirectFB video on Linux (thanks Denis!)
Sam Lantinga <slouken@libsdl.org>
parents:
75
diff
changeset
|
368 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
369 #if SDL_VIDEO_DRIVER_PS2GS |
0 | 370 extern VideoBootStrap PS2GS_bootstrap; |
371 #endif | |
3257
94fb40a4a9a7
Merged Martin's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3161
diff
changeset
|
372 #if SDL_VIDEO_DRIVER_PS3 |
94fb40a4a9a7
Merged Martin's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3161
diff
changeset
|
373 extern VideoBootStrap PS3_bootstrap; |
94fb40a4a9a7
Merged Martin's code changes from Google Summer of Code 2009
Sam Lantinga <slouken@libsdl.org>
parents:
3161
diff
changeset
|
374 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
375 #if SDL_VIDEO_DRIVER_SVGALIB |
0 | 376 extern VideoBootStrap SVGALIB_bootstrap; |
377 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
378 #if SDL_VIDEO_DRIVER_GAPI |
1251
86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
Ryan C. Gordon <icculus@icculus.org>
parents:
1190
diff
changeset
|
379 extern VideoBootStrap GAPI_bootstrap; |
86d0d01290ea
Updated Windows CE/PocketPC support...adds GAPI driver, landscape mode,
Ryan C. Gordon <icculus@icculus.org>
parents:
1190
diff
changeset
|
380 #endif |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
381 #if SDL_VIDEO_DRIVER_WIN32 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
382 extern VideoBootStrap WIN32_bootstrap; |
0 | 383 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
384 #if SDL_VIDEO_DRIVER_BWINDOW |
0 | 385 extern VideoBootStrap BWINDOW_bootstrap; |
386 #endif | |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
387 #if SDL_VIDEO_DRIVER_PHOTON |
3083
0bc41e0361d3
Date: Mon, 2 Mar 2009 16:27:42 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
3057
diff
changeset
|
388 extern VideoBootStrap photon_bootstrap; |
0bc41e0361d3
Date: Mon, 2 Mar 2009 16:27:42 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
3057
diff
changeset
|
389 #endif |
0bc41e0361d3
Date: Mon, 2 Mar 2009 16:27:42 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
3057
diff
changeset
|
390 #if SDL_VIDEO_DRIVER_QNXGF |
0bc41e0361d3
Date: Mon, 2 Mar 2009 16:27:42 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
3057
diff
changeset
|
391 extern VideoBootStrap qnxgf_bootstrap; |
173
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
392 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
393 #if SDL_VIDEO_DRIVER_EPOC |
173
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
394 extern VideoBootStrap EPOC_bootstrap; |
83018110dce8
Added initial support for EPOC/Symbian OS (thanks Hannu!)
Sam Lantinga <slouken@libsdl.org>
parents:
167
diff
changeset
|
395 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
396 #if SDL_VIDEO_DRIVER_RISCOS |
630
550bccdf04bd
Added initial support for RISC OS (thanks Peter Naulls!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
397 extern VideoBootStrap RISCOS_bootstrap; |
550bccdf04bd
Added initial support for RISC OS (thanks Peter Naulls!)
Sam Lantinga <slouken@libsdl.org>
parents:
509
diff
changeset
|
398 #endif |
2742
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
399 #if SDL_VIDEO_DRIVER_UIKIT |
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
400 extern VideoBootStrap UIKIT_bootstrap; |
b86247d21929
Added retained backing attribute, reference to UIKit renderer
Holmes Futrell <hfutrell@umail.ucsb.edu>
parents:
2735
diff
changeset
|
401 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
402 #if SDL_VIDEO_DRIVER_DUMMY |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
403 extern VideoBootStrap DUMMY_bootstrap; |
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
404 #endif |
2735
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
2702
diff
changeset
|
405 #if SDL_VIDEO_DRIVER_NDS |
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
2702
diff
changeset
|
406 extern VideoBootStrap NDS_bootstrap; |
204be4fc2726
Final merge of Google Summer of Code 2008 work...
Sam Lantinga <slouken@libsdl.org>
parents:
2702
diff
changeset
|
407 #endif |
3161
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
408 #if SDL_VIDEO_DRIVER_PANDORA |
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
409 extern VideoBootStrap PND_bootstrap; |
494559cc723b
OpenPandora support added by David Carré
Sam Lantinga <slouken@libsdl.org>
parents:
3100
diff
changeset
|
410 #endif |
1361
19418e4422cb
New configure-based build system. Still work in progress, but much improved
Sam Lantinga <slouken@libsdl.org>
parents:
1330
diff
changeset
|
411 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
412 #define SDL_CurrentDisplay (_this->displays[_this->current_display]) |
3417
64a60c5d502e
Automatically initialize the video system and create a renderer to simplify use.
Sam Lantinga <slouken@libsdl.org>
parents:
3283
diff
changeset
|
413 #define SDL_CurrentRenderer (SDL_CurrentDisplay.current_renderer) |
0 | 414 |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
415 extern SDL_VideoDevice *SDL_GetVideoDevice(); |
2753 | 416 extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode); |
417 extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display); | |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
418 extern SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode * mode); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
419 extern int SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay * display); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
420 extern int SDL_GetDisplayModeForDisplay(SDL_VideoDisplay * display, int index, SDL_DisplayMode * mode); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
421 extern int SDL_GetDesktopDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
422 extern int SDL_GetCurrentDisplayModeForDisplay(SDL_VideoDisplay * display, SDL_DisplayMode * mode); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
423 extern SDL_DisplayMode * SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode, SDL_DisplayMode * closest); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
424 extern int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay * display, const SDL_DisplayMode * mode); |
3501
467e67d301f3
Removed a little redundancy in the naming
Sam Lantinga <slouken@libsdl.org>
parents:
3500
diff
changeset
|
425 extern int SDL_SetPaletteForDisplay(SDL_VideoDisplay * display, const SDL_Color * colors, int firstcolor, int ncolors); |
467e67d301f3
Removed a little redundancy in the naming
Sam Lantinga <slouken@libsdl.org>
parents:
3500
diff
changeset
|
426 extern int SDL_GetPaletteForDisplay(SDL_VideoDisplay * display, SDL_Color * colors, int firstcolor, int ncolors); |
3500
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
427 extern int SDL_SetGammaRampForDisplay(SDL_VideoDisplay * display, const Uint16 * red, const Uint16 * green, const Uint16 * blue); |
4b594623401b
Work in progress on multi-display support:
Sam Lantinga <slouken@libsdl.org>
parents:
3435
diff
changeset
|
428 extern int SDL_GetGammaRampForDisplay(SDL_VideoDisplay * display, Uint16 * red, Uint16 * green, Uint16 * blue); |
3501
467e67d301f3
Removed a little redundancy in the naming
Sam Lantinga <slouken@libsdl.org>
parents:
3500
diff
changeset
|
429 extern void SDL_AddRenderDriver(SDL_VideoDisplay *display, const SDL_RenderDriver * driver); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
430 |
2753 | 431 extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags); |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
432 extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
433 extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window); |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
434 |
2753 | 435 extern void SDL_OnWindowShown(SDL_Window * window); |
436 extern void SDL_OnWindowHidden(SDL_Window * window); | |
437 extern void SDL_OnWindowResized(SDL_Window * window); | |
3502
98a819296cdc
Whenever a window becomes fullscreen, shown, unminimized, and has input focus it will change the display to the corresponding fullscreen video mode.
Sam Lantinga <slouken@libsdl.org>
parents:
3501
diff
changeset
|
438 extern void SDL_OnWindowMinimized(SDL_Window * window); |
98a819296cdc
Whenever a window becomes fullscreen, shown, unminimized, and has input focus it will change the display to the corresponding fullscreen video mode.
Sam Lantinga <slouken@libsdl.org>
parents:
3501
diff
changeset
|
439 extern void SDL_OnWindowRestored(SDL_Window * window); |
2753 | 440 extern void SDL_OnWindowFocusGained(SDL_Window * window); |
441 extern void SDL_OnWindowFocusLost(SDL_Window * window); | |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
442 extern SDL_WindowID SDL_GetFocusWindow(void); |
0 | 443 |
2753 | 444 #endif /* _SDL_sysvideo_h */ |
1895
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
445 |
c121d94672cb
SDL 1.2 is moving to a branch, and SDL 1.3 is becoming the head.
Sam Lantinga <slouken@libsdl.org>
parents:
1737
diff
changeset
|
446 /* vi: set ts=4 sw=4 expandtab: */ |