slouken@0
|
1 |
/*
|
slouken@0
|
2 |
SDL - Simple DirectMedia Layer
|
slouken@3697
|
3 |
Copyright (C) 1997-2010 Sam Lantinga
|
slouken@0
|
4 |
|
slouken@0
|
5 |
This library is free software; you can redistribute it and/or
|
slouken@1312
|
6 |
modify it under the terms of the GNU Lesser General Public
|
slouken@0
|
7 |
License as published by the Free Software Foundation; either
|
slouken@1312
|
8 |
version 2.1 of the License, or (at your option) any later version.
|
slouken@0
|
9 |
|
slouken@0
|
10 |
This library is distributed in the hope that it will be useful,
|
slouken@0
|
11 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
slouken@0
|
12 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
slouken@1312
|
13 |
Lesser General Public License for more details.
|
slouken@0
|
14 |
|
slouken@1312
|
15 |
You should have received a copy of the GNU Lesser General Public
|
slouken@1312
|
16 |
License along with this library; if not, write to the Free Software
|
slouken@1312
|
17 |
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
slouken@0
|
18 |
|
slouken@0
|
19 |
Sam Lantinga
|
slouken@251
|
20 |
slouken@libsdl.org
|
slouken@0
|
21 |
*/
|
slouken@0
|
22 |
|
slouken@1895
|
23 |
/**
|
slouken@3407
|
24 |
* \file SDL_video.h
|
slouken@3407
|
25 |
*
|
slouken@3407
|
26 |
* Header file for SDL video functions.
|
slouken@1895
|
27 |
*/
|
slouken@0
|
28 |
|
slouken@0
|
29 |
#ifndef _SDL_video_h
|
slouken@0
|
30 |
#define _SDL_video_h
|
slouken@0
|
31 |
|
slouken@1356
|
32 |
#include "SDL_stdinc.h"
|
slouken@1895
|
33 |
#include "SDL_pixels.h"
|
slouken@2275
|
34 |
#include "SDL_rect.h"
|
slouken@2275
|
35 |
#include "SDL_surface.h"
|
slouken@0
|
36 |
|
slouken@0
|
37 |
#include "begin_code.h"
|
slouken@0
|
38 |
/* Set up for C function definitions, even when using C++ */
|
slouken@0
|
39 |
#ifdef __cplusplus
|
slouken@1895
|
40 |
/* *INDENT-OFF* */
|
slouken@0
|
41 |
extern "C" {
|
slouken@1895
|
42 |
/* *INDENT-ON* */
|
slouken@0
|
43 |
#endif
|
slouken@0
|
44 |
|
slouken@1895
|
45 |
/**
|
slouken@3407
|
46 |
* \brief The structure that defines a display mode
|
slouken@3407
|
47 |
*
|
slouken@3407
|
48 |
* \sa SDL_GetNumDisplayModes()
|
slouken@3407
|
49 |
* \sa SDL_GetDisplayMode()
|
slouken@3407
|
50 |
* \sa SDL_GetDesktopDisplayMode()
|
slouken@3407
|
51 |
* \sa SDL_GetCurrentDisplayMode()
|
slouken@3407
|
52 |
* \sa SDL_GetClosestDisplayMode()
|
slouken@3500
|
53 |
* \sa SDL_SetWindowDisplayMode()
|
slouken@3500
|
54 |
* \sa SDL_GetWindowDisplayMode()
|
slouken@1895
|
55 |
*/
|
slouken@1895
|
56 |
typedef struct
|
slouken@1895
|
57 |
{
|
slouken@1895
|
58 |
Uint32 format; /**< pixel format */
|
slouken@1895
|
59 |
int w; /**< width */
|
slouken@1895
|
60 |
int h; /**< height */
|
slouken@1895
|
61 |
int refresh_rate; /**< refresh rate (or zero for unspecified) */
|
slouken@1895
|
62 |
void *driverdata; /**< driver-specific data, initialize to 0 */
|
slouken@1895
|
63 |
} SDL_DisplayMode;
|
slouken@0
|
64 |
|
slouken@1895
|
65 |
/**
|
slouken@3407
|
66 |
* \brief The type used to identify a window
|
slouken@3407
|
67 |
*
|
slouken@3407
|
68 |
* \sa SDL_CreateWindow()
|
slouken@3407
|
69 |
* \sa SDL_CreateWindowFrom()
|
slouken@3407
|
70 |
* \sa SDL_DestroyWindow()
|
slouken@3407
|
71 |
* \sa SDL_GetWindowData()
|
slouken@3407
|
72 |
* \sa SDL_GetWindowFlags()
|
slouken@3407
|
73 |
* \sa SDL_GetWindowGrab()
|
slouken@3407
|
74 |
* \sa SDL_GetWindowPosition()
|
slouken@3407
|
75 |
* \sa SDL_GetWindowSize()
|
slouken@3407
|
76 |
* \sa SDL_GetWindowTitle()
|
slouken@3407
|
77 |
* \sa SDL_HideWindow()
|
slouken@3407
|
78 |
* \sa SDL_MaximizeWindow()
|
slouken@3407
|
79 |
* \sa SDL_MinimizeWindow()
|
slouken@3407
|
80 |
* \sa SDL_RaiseWindow()
|
slouken@3407
|
81 |
* \sa SDL_RestoreWindow()
|
slouken@3407
|
82 |
* \sa SDL_SetWindowData()
|
slouken@3407
|
83 |
* \sa SDL_SetWindowFullscreen()
|
slouken@3407
|
84 |
* \sa SDL_SetWindowGrab()
|
slouken@3407
|
85 |
* \sa SDL_SetWindowIcon()
|
slouken@3407
|
86 |
* \sa SDL_SetWindowPosition()
|
slouken@3407
|
87 |
* \sa SDL_SetWindowSize()
|
slouken@3407
|
88 |
* \sa SDL_SetWindowTitle()
|
slouken@3407
|
89 |
* \sa SDL_ShowWindow()
|
slouken@1895
|
90 |
*/
|
slouken@3685
|
91 |
typedef struct SDL_Window SDL_Window;
|
slouken@1895
|
92 |
|
slouken@1895
|
93 |
/**
|
slouken@3407
|
94 |
* \brief The flags on a window
|
slouken@3407
|
95 |
*
|
slouken@3407
|
96 |
* \sa SDL_GetWindowFlags()
|
slouken@1895
|
97 |
*/
|
slouken@1895
|
98 |
typedef enum
|
slouken@1895
|
99 |
{
|
slouken@1895
|
100 |
SDL_WINDOW_FULLSCREEN = 0x00000001, /**< fullscreen window, implies borderless */
|
slouken@1895
|
101 |
SDL_WINDOW_OPENGL = 0x00000002, /**< window usable with OpenGL context */
|
slouken@1895
|
102 |
SDL_WINDOW_SHOWN = 0x00000004, /**< window is visible */
|
slouken@1895
|
103 |
SDL_WINDOW_BORDERLESS = 0x00000008, /**< no window decoration */
|
slouken@1895
|
104 |
SDL_WINDOW_RESIZABLE = 0x00000010, /**< window can be resized */
|
slouken@3523
|
105 |
SDL_WINDOW_MINIMIZED = 0x00000020, /**< window is minimized */
|
slouken@3523
|
106 |
SDL_WINDOW_MAXIMIZED = 0x00000040, /**< window is maximized */
|
slouken@1895
|
107 |
SDL_WINDOW_INPUT_GRABBED = 0x00000100, /**< window has grabbed input focus */
|
slouken@1895
|
108 |
SDL_WINDOW_INPUT_FOCUS = 0x00000200, /**< window has input focus */
|
slouken@3057
|
109 |
SDL_WINDOW_MOUSE_FOCUS = 0x00000400, /**< window has mouse focus */
|
slouken@3057
|
110 |
SDL_WINDOW_FOREIGN = 0x00000800 /**< window not created by SDL */
|
slouken@1895
|
111 |
} SDL_WindowFlags;
|
slouken@1895
|
112 |
|
slouken@1895
|
113 |
/**
|
slouken@3407
|
114 |
* \brief Used to indicate that you don't care what the window position is.
|
slouken@1895
|
115 |
*/
|
slouken@1895
|
116 |
#define SDL_WINDOWPOS_UNDEFINED 0x7FFFFFF
|
slouken@3407
|
117 |
|
slouken@1895
|
118 |
/**
|
slouken@3407
|
119 |
* \brief Used to indicate that the window position should be centered.
|
slouken@1895
|
120 |
*/
|
slouken@1895
|
121 |
#define SDL_WINDOWPOS_CENTERED 0x7FFFFFE
|
slouken@0
|
122 |
|
slouken@1895
|
123 |
/**
|
slouken@3407
|
124 |
* \brief Event subtype for window events
|
slouken@3407
|
125 |
*/
|
slouken@3407
|
126 |
typedef enum
|
slouken@3407
|
127 |
{
|
slouken@3407
|
128 |
SDL_WINDOWEVENT_NONE, /**< Never used */
|
slouken@3407
|
129 |
SDL_WINDOWEVENT_SHOWN, /**< Window has been shown */
|
slouken@3407
|
130 |
SDL_WINDOWEVENT_HIDDEN, /**< Window has been hidden */
|
slouken@3407
|
131 |
SDL_WINDOWEVENT_EXPOSED, /**< Window has been exposed and should be
|
slouken@3407
|
132 |
redrawn */
|
slouken@3407
|
133 |
SDL_WINDOWEVENT_MOVED, /**< Window has been moved to data1, data2
|
slouken@3407
|
134 |
*/
|
slouken@3407
|
135 |
SDL_WINDOWEVENT_RESIZED, /**< Window size changed to data1xdata2 */
|
slouken@3407
|
136 |
SDL_WINDOWEVENT_MINIMIZED, /**< Window has been minimized */
|
slouken@3407
|
137 |
SDL_WINDOWEVENT_MAXIMIZED, /**< Window has been maximized */
|
slouken@3407
|
138 |
SDL_WINDOWEVENT_RESTORED, /**< Window has been restored to normal size
|
slouken@3407
|
139 |
and position */
|
slouken@3691
|
140 |
SDL_WINDOWEVENT_ENTER, /**< Window has gained mouse focus */
|
slouken@3691
|
141 |
SDL_WINDOWEVENT_LEAVE, /**< Window has lost mouse focus */
|
slouken@3691
|
142 |
SDL_WINDOWEVENT_FOCUS_GAINED, /**< Window has gained keyboard focus */
|
slouken@3691
|
143 |
SDL_WINDOWEVENT_FOCUS_LOST, /**< Window has lost keyboard focus */
|
slouken@3407
|
144 |
SDL_WINDOWEVENT_CLOSE /**< The window manager requests that the
|
slouken@3407
|
145 |
window be closed */
|
slouken@3407
|
146 |
} SDL_WindowEventID;
|
slouken@3407
|
147 |
|
slouken@3407
|
148 |
/**
|
slouken@3407
|
149 |
* \brief Flags used when creating a rendering context
|
slouken@1895
|
150 |
*/
|
slouken@1895
|
151 |
typedef enum
|
slouken@1895
|
152 |
{
|
slouken@3407
|
153 |
SDL_RENDERER_SINGLEBUFFER = 0x00000001, /**< Render directly to the
|
slouken@3407
|
154 |
window, if possible */
|
slouken@3407
|
155 |
|
slouken@3407
|
156 |
SDL_RENDERER_PRESENTCOPY = 0x00000002, /**< Present uses a copy from
|
slouken@3407
|
157 |
back buffer to the front
|
slouken@3407
|
158 |
buffer */
|
slouken@3407
|
159 |
|
slouken@3407
|
160 |
SDL_RENDERER_PRESENTFLIP2 = 0x00000004, /**< Present uses a flip,
|
slouken@3407
|
161 |
swapping back buffer and
|
slouken@3407
|
162 |
front buffer */
|
slouken@3407
|
163 |
|
slouken@3407
|
164 |
SDL_RENDERER_PRESENTFLIP3 = 0x00000008, /**< Present uses a flip,
|
slouken@3407
|
165 |
rotating between two back
|
slouken@3407
|
166 |
buffers and a front buffer
|
slouken@3407
|
167 |
*/
|
slouken@3407
|
168 |
|
slouken@3407
|
169 |
SDL_RENDERER_PRESENTDISCARD = 0x00000010, /**< Present leaves the contents
|
slouken@3407
|
170 |
of the backbuffer undefined
|
slouken@3407
|
171 |
*/
|
slouken@3407
|
172 |
|
slouken@3407
|
173 |
SDL_RENDERER_PRESENTVSYNC = 0x00000020, /**< Present is synchronized
|
slouken@3407
|
174 |
with the refresh rate */
|
slouken@3407
|
175 |
|
slouken@3407
|
176 |
SDL_RENDERER_ACCELERATED = 0x00000040 /**< The renderer uses hardware
|
slouken@3407
|
177 |
acceleration */
|
slouken@3407
|
178 |
|
slouken@3407
|
179 |
} SDL_RendererFlags;
|
slouken@1895
|
180 |
|
slouken@1895
|
181 |
/**
|
slouken@3407
|
182 |
* \brief Information on the capabilities of a render driver or context.
|
slouken@1895
|
183 |
*/
|
slouken@1895
|
184 |
typedef struct SDL_RendererInfo
|
slouken@1895
|
185 |
{
|
slouken@1895
|
186 |
const char *name; /**< The name of the renderer */
|
slouken@3407
|
187 |
Uint32 flags; /**< Supported ::SDL_RendererFlags */
|
slouken@1985
|
188 |
Uint32 mod_modes; /**< A mask of supported channel modulation */
|
slouken@1895
|
189 |
Uint32 blend_modes; /**< A mask of supported blend modes */
|
slouken@1895
|
190 |
Uint32 scale_modes; /**< A mask of supported scale modes */
|
slouken@1895
|
191 |
Uint32 num_texture_formats; /**< The number of available texture formats */
|
sunnysachanandani@4612
|
192 |
Uint32 texture_formats[50]; /**< The available texture formats */
|
slouken@1895
|
193 |
int max_texture_width; /**< The maximimum texture width */
|
slouken@1895
|
194 |
int max_texture_height; /**< The maximimum texture height */
|
slouken@1895
|
195 |
} SDL_RendererInfo;
|
slouken@0
|
196 |
|
slouken@1895
|
197 |
/**
|
slouken@3407
|
198 |
* \brief The access pattern allowed for a texture.
|
slouken@1895
|
199 |
*/
|
slouken@1895
|
200 |
typedef enum
|
slouken@1895
|
201 |
{
|
slouken@2222
|
202 |
SDL_TEXTUREACCESS_STATIC, /**< Changes rarely, not lockable */
|
slouken@2222
|
203 |
SDL_TEXTUREACCESS_STREAMING /**< Changes frequently, lockable */
|
slouken@1895
|
204 |
} SDL_TextureAccess;
|
slouken@1895
|
205 |
|
slouken@1895
|
206 |
/**
|
slouken@3407
|
207 |
* \brief The texture channel modulation used in SDL_RenderCopy().
|
slouken@1985
|
208 |
*/
|
slouken@1985
|
209 |
typedef enum
|
slouken@1985
|
210 |
{
|
slouken@1985
|
211 |
SDL_TEXTUREMODULATE_NONE = 0x00000000, /**< No modulation */
|
slouken@1985
|
212 |
SDL_TEXTUREMODULATE_COLOR = 0x00000001, /**< srcC = srcC * color */
|
slouken@2208
|
213 |
SDL_TEXTUREMODULATE_ALPHA = 0x00000002 /**< srcA = srcA * alpha */
|
slouken@1985
|
214 |
} SDL_TextureModulate;
|
slouken@1985
|
215 |
|
slouken@1985
|
216 |
/**
|
slouken@3407
|
217 |
* \brief The blend mode used in SDL_RenderCopy() and drawing operations.
|
slouken@1895
|
218 |
*/
|
slouken@1895
|
219 |
typedef enum
|
slouken@1895
|
220 |
{
|
slouken@2884
|
221 |
SDL_BLENDMODE_NONE = 0x00000000, /**< No blending */
|
slouken@3407
|
222 |
SDL_BLENDMODE_MASK = 0x00000001, /**< dst = A ? src : dst
|
slouken@3407
|
223 |
(alpha is mask) */
|
slouken@3407
|
224 |
|
slouken@2884
|
225 |
SDL_BLENDMODE_BLEND = 0x00000002, /**< dst = (src * A) + (dst * (1-A)) */
|
slouken@2884
|
226 |
SDL_BLENDMODE_ADD = 0x00000004, /**< dst = (src * A) + dst */
|
slouken@2884
|
227 |
SDL_BLENDMODE_MOD = 0x00000008 /**< dst = src * dst */
|
slouken@2884
|
228 |
} SDL_BlendMode;
|
slouken@1895
|
229 |
|
slouken@1895
|
230 |
/**
|
slouken@3407
|
231 |
* \brief The texture scale mode used in SDL_RenderCopy().
|
slouken@1895
|
232 |
*/
|
slouken@1895
|
233 |
typedef enum
|
slouken@1895
|
234 |
{
|
slouken@3407
|
235 |
SDL_TEXTURESCALEMODE_NONE = 0x00000000, /**< No scaling, rectangles must
|
slouken@3407
|
236 |
match dimensions */
|
slouken@3407
|
237 |
|
slouken@3407
|
238 |
SDL_TEXTURESCALEMODE_FAST = 0x00000001, /**< Point sampling or
|
slouken@3407
|
239 |
equivalent algorithm */
|
slouken@3407
|
240 |
|
slouken@3407
|
241 |
SDL_TEXTURESCALEMODE_SLOW = 0x00000002, /**< Linear filtering or
|
slouken@3407
|
242 |
equivalent algorithm */
|
slouken@3407
|
243 |
|
slouken@3407
|
244 |
SDL_TEXTURESCALEMODE_BEST = 0x00000004 /**< Bicubic filtering or
|
slouken@3407
|
245 |
equivalent algorithm */
|
slouken@1895
|
246 |
} SDL_TextureScaleMode;
|
slouken@1895
|
247 |
|
slouken@1895
|
248 |
/**
|
slouken@3407
|
249 |
* \brief An efficient driver-specific representation of pixel data
|
slouken@1895
|
250 |
*/
|
slouken@3685
|
251 |
struct SDL_Texture;
|
slouken@3685
|
252 |
typedef struct SDL_Texture SDL_Texture;
|
slouken@1895
|
253 |
|
slouken@1895
|
254 |
/**
|
slouken@3407
|
255 |
* \brief An opaque handle to an OpenGL context.
|
slouken@1895
|
256 |
*/
|
slouken@1895
|
257 |
typedef void *SDL_GLContext;
|
slouken@1895
|
258 |
|
slouken@1895
|
259 |
/**
|
slouken@3407
|
260 |
* \brief OpenGL configuration attributes
|
slouken@0
|
261 |
*/
|
slouken@1895
|
262 |
typedef enum
|
slouken@1895
|
263 |
{
|
slouken@0
|
264 |
SDL_GL_RED_SIZE,
|
slouken@0
|
265 |
SDL_GL_GREEN_SIZE,
|
slouken@0
|
266 |
SDL_GL_BLUE_SIZE,
|
slouken@0
|
267 |
SDL_GL_ALPHA_SIZE,
|
slouken@0
|
268 |
SDL_GL_BUFFER_SIZE,
|
slouken@0
|
269 |
SDL_GL_DOUBLEBUFFER,
|
slouken@0
|
270 |
SDL_GL_DEPTH_SIZE,
|
slouken@0
|
271 |
SDL_GL_STENCIL_SIZE,
|
slouken@0
|
272 |
SDL_GL_ACCUM_RED_SIZE,
|
slouken@0
|
273 |
SDL_GL_ACCUM_GREEN_SIZE,
|
slouken@0
|
274 |
SDL_GL_ACCUM_BLUE_SIZE,
|
slouken@450
|
275 |
SDL_GL_ACCUM_ALPHA_SIZE,
|
slouken@655
|
276 |
SDL_GL_STEREO,
|
slouken@656
|
277 |
SDL_GL_MULTISAMPLEBUFFERS,
|
slouken@1736
|
278 |
SDL_GL_MULTISAMPLESAMPLES,
|
hfutrell@2747
|
279 |
SDL_GL_ACCELERATED_VISUAL,
|
slouken@3100
|
280 |
SDL_GL_RETAINED_BACKING,
|
slouken@3139
|
281 |
SDL_GL_CONTEXT_MAJOR_VERSION,
|
slouken@3139
|
282 |
SDL_GL_CONTEXT_MINOR_VERSION
|
slouken@0
|
283 |
} SDL_GLattr;
|
slouken@0
|
284 |
|
slouken@0
|
285 |
|
slouken@0
|
286 |
/* Function prototypes */
|
slouken@0
|
287 |
|
slouken@1895
|
288 |
/**
|
slouken@3407
|
289 |
* \brief Get the number of video drivers compiled into SDL
|
slouken@3407
|
290 |
*
|
slouken@3407
|
291 |
* \sa SDL_GetVideoDriver()
|
slouken@1895
|
292 |
*/
|
slouken@1895
|
293 |
extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
|
slouken@1895
|
294 |
|
slouken@1895
|
295 |
/**
|
slouken@3407
|
296 |
* \brief Get the name of a built in video driver.
|
slouken@3407
|
297 |
*
|
slouken@3407
|
298 |
* \note The video drivers are presented in the order in which they are
|
slouken@3407
|
299 |
* normally checked during initialization.
|
slouken@3407
|
300 |
*
|
slouken@3407
|
301 |
* \sa SDL_GetNumVideoDrivers()
|
slouken@1895
|
302 |
*/
|
slouken@1895
|
303 |
extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
|
slouken@1895
|
304 |
|
slouken@1895
|
305 |
/**
|
slouken@3407
|
306 |
* \brief Initialize the video subsystem, optionally specifying a video driver.
|
slouken@3407
|
307 |
*
|
slouken@3407
|
308 |
* \param driver_name Initialize a specific driver by name, or NULL for the
|
slouken@3407
|
309 |
* default video driver.
|
slouken@3407
|
310 |
*
|
slouken@3407
|
311 |
* \param flags FIXME: Still needed?
|
slouken@3407
|
312 |
*
|
slouken@3407
|
313 |
* \return 0 on success, -1 on error
|
slouken@3407
|
314 |
*
|
slouken@3407
|
315 |
* This function initializes the video subsystem; setting up a connection
|
slouken@3407
|
316 |
* to the window manager, etc, and determines the available display modes
|
slouken@3407
|
317 |
* and pixel formats, but does not initialize a window or graphics mode.
|
slouken@3407
|
318 |
*
|
slouken@3407
|
319 |
* \sa SDL_VideoQuit()
|
slouken@0
|
320 |
*/
|
slouken@1895
|
321 |
extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name,
|
slouken@1895
|
322 |
Uint32 flags);
|
slouken@1895
|
323 |
|
slouken@1895
|
324 |
/**
|
slouken@3407
|
325 |
* \brief Shuts down the video subsystem.
|
slouken@3407
|
326 |
*
|
slouken@3407
|
327 |
* This function closes all windows, and restores the original video mode.
|
slouken@3407
|
328 |
*
|
slouken@3407
|
329 |
* \sa SDL_VideoInit()
|
slouken@1895
|
330 |
*/
|
slouken@337
|
331 |
extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
|
slouken@0
|
332 |
|
slouken@1895
|
333 |
/**
|
slouken@3407
|
334 |
* \brief Returns the name of the currently initialized video driver.
|
slouken@3407
|
335 |
*
|
slouken@3407
|
336 |
* \return The name of the current video driver or NULL if no driver
|
slouken@3407
|
337 |
* has been initialized
|
slouken@3407
|
338 |
*
|
slouken@3407
|
339 |
* \sa SDL_GetNumVideoDrivers()
|
slouken@3407
|
340 |
* \sa SDL_GetVideoDriver()
|
slouken@0
|
341 |
*/
|
slouken@1895
|
342 |
extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
|
slouken@0
|
343 |
|
slouken@1895
|
344 |
/**
|
slouken@3407
|
345 |
* \brief Returns the number of available video displays.
|
slouken@3407
|
346 |
*
|
slouken@3528
|
347 |
* \sa SDL_GetDisplayBounds()
|
slouken@3407
|
348 |
* \sa SDL_SelectVideoDisplay()
|
slouken@0
|
349 |
*/
|
slouken@1895
|
350 |
extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
|
slouken@0
|
351 |
|
slouken@1895
|
352 |
/**
|
slouken@3528
|
353 |
* \brief Get the desktop area represented by a display, with the primary
|
slouken@3528
|
354 |
* display located at 0,0
|
slouken@3528
|
355 |
*
|
slouken@3528
|
356 |
* \return 0 on success, or -1 if the index is out of range.
|
slouken@3528
|
357 |
*
|
slouken@3528
|
358 |
* \sa SDL_GetNumVideoDisplays()
|
slouken@3528
|
359 |
*/
|
slouken@3528
|
360 |
extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int index, SDL_Rect * rect);
|
slouken@3528
|
361 |
|
slouken@3528
|
362 |
/**
|
slouken@3407
|
363 |
* \brief Set the index of the currently selected display.
|
slouken@3407
|
364 |
*
|
slouken@3407
|
365 |
* \return 0 on success, or -1 if the index is out of range.
|
slouken@3407
|
366 |
*
|
slouken@3407
|
367 |
* \sa SDL_GetNumVideoDisplays()
|
slouken@3407
|
368 |
* \sa SDL_GetCurrentVideoDisplay()
|
slouken@1963
|
369 |
*/
|
slouken@1963
|
370 |
extern DECLSPEC int SDLCALL SDL_SelectVideoDisplay(int index);
|
slouken@1963
|
371 |
|
slouken@1963
|
372 |
/**
|
slouken@3407
|
373 |
* \brief Get the index of the currently selected display.
|
slouken@3407
|
374 |
*
|
slouken@3407
|
375 |
* \return The index of the currently selected display.
|
slouken@3407
|
376 |
*
|
slouken@3407
|
377 |
* \sa SDL_GetNumVideoDisplays()
|
slouken@3407
|
378 |
* \sa SDL_SelectVideoDisplay()
|
slouken@0
|
379 |
*/
|
slouken@1963
|
380 |
extern DECLSPEC int SDLCALL SDL_GetCurrentVideoDisplay(void);
|
slouken@0
|
381 |
|
slouken@1895
|
382 |
/**
|
slouken@3407
|
383 |
* \brief Returns the number of available display modes for the current display.
|
slouken@3407
|
384 |
*
|
slouken@3407
|
385 |
* \sa SDL_GetDisplayMode()
|
slouken@0
|
386 |
*/
|
slouken@1895
|
387 |
extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(void);
|
slouken@0
|
388 |
|
slouken@1895
|
389 |
/**
|
slouken@3407
|
390 |
* \brief Fill in information about a specific display mode.
|
slouken@3407
|
391 |
*
|
slouken@3407
|
392 |
* \note The display modes are sorted in this priority:
|
slouken@3407
|
393 |
* \li bits per pixel -> more colors to fewer colors
|
slouken@3407
|
394 |
* \li width -> largest to smallest
|
slouken@3407
|
395 |
* \li height -> largest to smallest
|
slouken@3407
|
396 |
* \li refresh rate -> highest to lowest
|
slouken@3407
|
397 |
*
|
slouken@3407
|
398 |
* \sa SDL_GetNumDisplayModes()
|
slouken@1895
|
399 |
*/
|
slouken@1967
|
400 |
extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int index,
|
slouken@1967
|
401 |
SDL_DisplayMode * mode);
|
slouken@1895
|
402 |
|
slouken@1895
|
403 |
/**
|
slouken@3407
|
404 |
* \brief Fill in information about the desktop display mode for the current
|
slouken@3407
|
405 |
* display.
|
slouken@1895
|
406 |
*/
|
slouken@1967
|
407 |
extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(SDL_DisplayMode * mode);
|
slouken@1895
|
408 |
|
slouken@1895
|
409 |
/**
|
slouken@3407
|
410 |
* \brief Fill in information about the current display mode.
|
slouken@1895
|
411 |
*/
|
slouken@1967
|
412 |
extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(SDL_DisplayMode * mode);
|
slouken@1895
|
413 |
|
slouken@3400
|
414 |
|
slouken@1895
|
415 |
/**
|
slouken@3407
|
416 |
* \brief Get the closest match to the requested display mode.
|
slouken@3407
|
417 |
*
|
slouken@3407
|
418 |
* \param mode The desired display mode
|
slouken@3407
|
419 |
* \param closest A pointer to a display mode to be filled in with the closest
|
slouken@3407
|
420 |
* match of the available display modes.
|
slouken@3407
|
421 |
*
|
slouken@3407
|
422 |
* \return The passed in value \c closest, or NULL if no matching video mode
|
slouken@3407
|
423 |
* was available.
|
slouken@3407
|
424 |
*
|
slouken@3407
|
425 |
* The available display modes are scanned, and \c closest is filled in with the
|
slouken@3407
|
426 |
* closest mode matching the requested mode and returned. The mode format and
|
slouken@3407
|
427 |
* refresh_rate default to the desktop mode if they are 0. The modes are
|
slouken@3407
|
428 |
* scanned with size being first priority, format being second priority, and
|
slouken@3407
|
429 |
* finally checking the refresh_rate. If all the available modes are too
|
slouken@3407
|
430 |
* small, then NULL is returned.
|
slouken@3407
|
431 |
*
|
slouken@3407
|
432 |
* \sa SDL_GetNumDisplayModes()
|
slouken@3407
|
433 |
* \sa SDL_GetDisplayMode()
|
slouken@1895
|
434 |
*/
|
slouken@1895
|
435 |
extern DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(const
|
slouken@1895
|
436 |
SDL_DisplayMode
|
slouken@1895
|
437 |
* mode,
|
slouken@1895
|
438 |
SDL_DisplayMode
|
slouken@1895
|
439 |
* closest);
|
slouken@1895
|
440 |
|
slouken@1895
|
441 |
/**
|
slouken@3407
|
442 |
* \brief Set the display mode used when a fullscreen window is visible
|
slouken@3500
|
443 |
* on the currently selected display. By default the window's
|
slouken@3500
|
444 |
* dimensions and the desktop format and refresh rate are used.
|
slouken@3407
|
445 |
*
|
slouken@3500
|
446 |
* \param mode The mode to use, or NULL for the default mode.
|
slouken@3407
|
447 |
*
|
slouken@3407
|
448 |
* \return 0 on success, or -1 if setting the display mode failed.
|
slouken@3407
|
449 |
*
|
slouken@3522
|
450 |
* \sa SDL_GetWindowDisplayMode()
|
slouken@3407
|
451 |
* \sa SDL_SetWindowFullscreen()
|
slouken@0
|
452 |
*/
|
slouken@3685
|
453 |
extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
|
slouken@3500
|
454 |
const SDL_DisplayMode
|
slouken@1895
|
455 |
* mode);
|
slouken@0
|
456 |
|
slouken@1895
|
457 |
/**
|
slouken@3407
|
458 |
* \brief Fill in information about the display mode used when a fullscreen
|
slouken@3407
|
459 |
* window is visible on the currently selected display.
|
slouken@3522
|
460 |
*
|
slouken@3522
|
461 |
* \sa SDL_SetWindowDisplayMode()
|
slouken@3522
|
462 |
* \sa SDL_SetWindowFullscreen()
|
slouken@0
|
463 |
*/
|
slouken@3685
|
464 |
extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
|
slouken@3500
|
465 |
SDL_DisplayMode * mode);
|
slouken@0
|
466 |
|
slouken@1895
|
467 |
/**
|
slouken@3407
|
468 |
* \brief Set the palette entries for indexed display modes.
|
slouken@3407
|
469 |
*
|
slouken@3407
|
470 |
* \return 0 on success, or -1 if the display mode isn't palettized or the
|
slouken@3407
|
471 |
* colors couldn't be set.
|
slouken@0
|
472 |
*/
|
slouken@1895
|
473 |
extern DECLSPEC int SDLCALL SDL_SetDisplayPalette(const SDL_Color * colors,
|
slouken@1895
|
474 |
int firstcolor,
|
slouken@1895
|
475 |
int ncolors);
|
slouken@0
|
476 |
|
slouken@1895
|
477 |
/**
|
slouken@3407
|
478 |
* \brief Gets the palette entries for indexed display modes.
|
slouken@3407
|
479 |
*
|
slouken@3407
|
480 |
* \return 0 on success, or -1 if the display mode isn't palettized
|
slouken@1895
|
481 |
*/
|
slouken@1895
|
482 |
extern DECLSPEC int SDLCALL SDL_GetDisplayPalette(SDL_Color * colors,
|
slouken@1895
|
483 |
int firstcolor,
|
slouken@1895
|
484 |
int ncolors);
|
slouken@1895
|
485 |
|
slouken@1895
|
486 |
/**
|
slouken@3407
|
487 |
* \brief Set the gamma correction for each of the color channels on the
|
slouken@3407
|
488 |
* currently selected display.
|
slouken@3407
|
489 |
*
|
slouken@3407
|
490 |
* \return 0 on success, or -1 if setting the gamma isn't supported.
|
slouken@3407
|
491 |
*
|
slouken@3407
|
492 |
* \sa SDL_SetGammaRamp()
|
slouken@0
|
493 |
*/
|
slouken@337
|
494 |
extern DECLSPEC int SDLCALL SDL_SetGamma(float red, float green, float blue);
|
slouken@0
|
495 |
|
slouken@1895
|
496 |
/**
|
slouken@3407
|
497 |
* \brief Set the gamma ramp for the currently selected display.
|
slouken@3407
|
498 |
*
|
slouken@3407
|
499 |
* \param red The translation table for the red channel, or NULL.
|
slouken@3407
|
500 |
* \param green The translation table for the green channel, or NULL.
|
slouken@3407
|
501 |
* \param blue The translation table for the blue channel, or NULL.
|
slouken@3407
|
502 |
*
|
slouken@3407
|
503 |
* \return 0 on success, or -1 if gamma ramps are unsupported.
|
slouken@3407
|
504 |
*
|
slouken@3407
|
505 |
* Set the gamma translation table for the red, green, and blue channels
|
slouken@3407
|
506 |
* of the video hardware. Each table is an array of 256 16-bit quantities,
|
slouken@3407
|
507 |
* representing a mapping between the input and output for that channel.
|
slouken@3407
|
508 |
* The input is the index into the array, and the output is the 16-bit
|
slouken@3407
|
509 |
* gamma value at that index, scaled to the output color precision.
|
slouken@3407
|
510 |
*
|
slouken@3407
|
511 |
* \sa SDL_GetGammaRamp()
|
slouken@0
|
512 |
*/
|
slouken@1895
|
513 |
extern DECLSPEC int SDLCALL SDL_SetGammaRamp(const Uint16 * red,
|
slouken@1895
|
514 |
const Uint16 * green,
|
slouken@1895
|
515 |
const Uint16 * blue);
|
slouken@0
|
516 |
|
slouken@1895
|
517 |
/**
|
slouken@3407
|
518 |
* \brief Get the gamma ramp for the currently selected display.
|
slouken@3407
|
519 |
*
|
slouken@3407
|
520 |
* \param red A pointer to a 256 element array of 16-bit quantities to hold
|
slouken@3407
|
521 |
* the translation table for the red channel, or NULL.
|
slouken@3407
|
522 |
* \param green A pointer to a 256 element array of 16-bit quantities to hold
|
slouken@3407
|
523 |
* the translation table for the green channel, or NULL.
|
slouken@3407
|
524 |
* \param blue A pointer to a 256 element array of 16-bit quantities to hold
|
slouken@3407
|
525 |
* the translation table for the blue channel, or NULL.
|
slouken@3407
|
526 |
*
|
slouken@3407
|
527 |
* \return 0 on success, or -1 if gamma ramps are unsupported.
|
slouken@3407
|
528 |
*
|
slouken@3407
|
529 |
* \sa SDL_SetGammaRamp()
|
slouken@1895
|
530 |
*/
|
slouken@1895
|
531 |
extern DECLSPEC int SDLCALL SDL_GetGammaRamp(Uint16 * red, Uint16 * green,
|
slouken@1895
|
532 |
Uint16 * blue);
|
slouken@1895
|
533 |
|
slouken@1895
|
534 |
|
slouken@1895
|
535 |
/**
|
slouken@3407
|
536 |
* \brief Create a window with the specified position, dimensions, and flags.
|
slouken@3407
|
537 |
*
|
slouken@3407
|
538 |
* \param title The title of the window, in UTF-8 encoding.
|
slouken@3407
|
539 |
* \param x The x position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
slouken@3407
|
540 |
* ::SDL_WINDOWPOS_UNDEFINED.
|
slouken@3407
|
541 |
* \param y The y position of the window, ::SDL_WINDOWPOS_CENTERED, or
|
slouken@3407
|
542 |
* ::SDL_WINDOWPOS_UNDEFINED.
|
slouken@3407
|
543 |
* \param w The width of the window.
|
slouken@3407
|
544 |
* \param h The height of the window.
|
slouken@3407
|
545 |
* \param flags The flags for the window, a mask of any of the following:
|
slouken@3407
|
546 |
* ::SDL_WINDOW_FULLSCREEN, ::SDL_WINDOW_OPENGL,
|
slouken@3407
|
547 |
* ::SDL_WINDOW_SHOWN, ::SDL_WINDOW_BORDERLESS,
|
slouken@3407
|
548 |
* ::SDL_WINDOW_RESIZABLE, ::SDL_WINDOW_MAXIMIZED,
|
slouken@3407
|
549 |
* ::SDL_WINDOW_MINIMIZED, ::SDL_WINDOW_INPUT_GRABBED.
|
slouken@3407
|
550 |
*
|
slouken@3407
|
551 |
* \return The id of the window created, or zero if window creation failed.
|
slouken@3407
|
552 |
*
|
slouken@3407
|
553 |
* \sa SDL_DestroyWindow()
|
slouken@1895
|
554 |
*/
|
slouken@3685
|
555 |
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
|
slouken@1895
|
556 |
int x, int y, int w,
|
slouken@1895
|
557 |
int h, Uint32 flags);
|
slouken@1895
|
558 |
|
slouken@1895
|
559 |
/**
|
slouken@3493
|
560 |
* \brief Create an SDL window from an existing native window.
|
slouken@3407
|
561 |
*
|
slouken@3407
|
562 |
* \param data A pointer to driver-dependent window creation data
|
slouken@3407
|
563 |
*
|
slouken@3407
|
564 |
* \return The id of the window created, or zero if window creation failed.
|
slouken@3407
|
565 |
*
|
slouken@3407
|
566 |
* \sa SDL_DestroyWindow()
|
slouken@1895
|
567 |
*/
|
slouken@3685
|
568 |
extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
|
slouken@3685
|
569 |
|
slouken@3685
|
570 |
/**
|
slouken@4883
|
571 |
* \brief Get the numeric ID of a window, for logging purposes.
|
slouken@3685
|
572 |
*/
|
slouken@3685
|
573 |
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
|
slouken@3685
|
574 |
|
slouken@3685
|
575 |
/**
|
slouken@3685
|
576 |
* \brief Get a window from a stored ID, or NULL if it doesn't exist.
|
slouken@3685
|
577 |
*/
|
slouken@3685
|
578 |
extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
|
slouken@1895
|
579 |
|
slouken@1895
|
580 |
/**
|
slouken@3407
|
581 |
* \brief Get the window flags.
|
slouken@1895
|
582 |
*/
|
slouken@3685
|
583 |
extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
|
slouken@1895
|
584 |
|
slouken@1895
|
585 |
/**
|
slouken@4883
|
586 |
* \brief Set the title of a window, in UTF-8 format.
|
slouken@3407
|
587 |
*
|
slouken@3407
|
588 |
* \sa SDL_GetWindowTitle()
|
slouken@0
|
589 |
*/
|
slouken@3685
|
590 |
extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
|
slouken@1895
|
591 |
const char *title);
|
slouken@1895
|
592 |
|
slouken@1895
|
593 |
/**
|
slouken@4883
|
594 |
* \brief Get the title of a window, in UTF-8 format.
|
slouken@3407
|
595 |
*
|
slouken@3407
|
596 |
* \sa SDL_SetWindowTitle()
|
slouken@1895
|
597 |
*/
|
slouken@3685
|
598 |
extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
|
slouken@1895
|
599 |
|
slouken@1895
|
600 |
/**
|
slouken@4887
|
601 |
* \brief Set the icon for a window.
|
slouken@3407
|
602 |
*
|
slouken@4887
|
603 |
* \param icon The icon for the window.
|
slouken@1895
|
604 |
*/
|
slouken@3685
|
605 |
extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
|
slouken@2990
|
606 |
SDL_Surface * icon);
|
slouken@1895
|
607 |
|
slouken@1895
|
608 |
/**
|
slouken@4869
|
609 |
* \brief Associate an arbitrary pointer with a window.
|
slouken@3407
|
610 |
*
|
slouken@3407
|
611 |
* \sa SDL_GetWindowData()
|
slouken@1895
|
612 |
*/
|
slouken@3685
|
613 |
extern DECLSPEC void SDLCALL SDL_SetWindowData(SDL_Window * window,
|
slouken@1895
|
614 |
void *userdata);
|
slouken@1895
|
615 |
|
slouken@1895
|
616 |
/**
|
slouken@4883
|
617 |
* \brief Retrieve the data pointer associated with a window.
|
slouken@3407
|
618 |
*
|
slouken@3407
|
619 |
* \sa SDL_SetWindowData()
|
slouken@1895
|
620 |
*/
|
slouken@3685
|
621 |
extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window);
|
slouken@1895
|
622 |
|
slouken@1895
|
623 |
/**
|
slouken@4883
|
624 |
* \brief Set the position of a window.
|
slouken@3407
|
625 |
*
|
slouken@3685
|
626 |
* \param window The window to reposition.
|
slouken@3407
|
627 |
* \param x The x coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
slouken@3407
|
628 |
::SDL_WINDOWPOS_UNDEFINED.
|
slouken@3407
|
629 |
* \param y The y coordinate of the window, ::SDL_WINDOWPOS_CENTERED, or
|
slouken@3407
|
630 |
::SDL_WINDOWPOS_UNDEFINED.
|
slouken@3407
|
631 |
*
|
slouken@3407
|
632 |
* \note The window coordinate origin is the upper left of the display.
|
slouken@3407
|
633 |
*
|
slouken@3407
|
634 |
* \sa SDL_GetWindowPosition()
|
slouken@1895
|
635 |
*/
|
slouken@3685
|
636 |
extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
|
slouken@1895
|
637 |
int x, int y);
|
slouken@1895
|
638 |
|
slouken@1895
|
639 |
/**
|
slouken@4883
|
640 |
* \brief Get the position of a window.
|
slouken@3407
|
641 |
*
|
slouken@3407
|
642 |
* \sa SDL_SetWindowPosition()
|
slouken@1895
|
643 |
*/
|
slouken@3685
|
644 |
extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
|
slouken@1895
|
645 |
int *x, int *y);
|
slouken@0
|
646 |
|
slouken@1895
|
647 |
/**
|
slouken@4883
|
648 |
* \brief Set the size of a window's client area.
|
slouken@3407
|
649 |
*
|
slouken@3407
|
650 |
* \note You can't change the size of a fullscreen window, it automatically
|
slouken@3407
|
651 |
* matches the size of the display mode.
|
slouken@3407
|
652 |
*
|
slouken@3407
|
653 |
* \sa SDL_GetWindowSize()
|
slouken@1895
|
654 |
*/
|
slouken@3685
|
655 |
extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
|
slouken@1895
|
656 |
int h);
|
slouken@1895
|
657 |
|
slouken@1895
|
658 |
/**
|
slouken@4883
|
659 |
* \brief Get the size of a window's client area.
|
slouken@3407
|
660 |
*
|
slouken@3407
|
661 |
* \sa SDL_SetWindowSize()
|
slouken@1895
|
662 |
*/
|
slouken@3685
|
663 |
extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
|
slouken@1895
|
664 |
int *h);
|
slouken@1895
|
665 |
|
slouken@1895
|
666 |
/**
|
slouken@4883
|
667 |
* \brief Show a window.
|
slouken@3407
|
668 |
*
|
slouken@3407
|
669 |
* \sa SDL_HideWindow()
|
slouken@1895
|
670 |
*/
|
slouken@3685
|
671 |
extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
|
slouken@1895
|
672 |
|
slouken@1895
|
673 |
/**
|
slouken@4883
|
674 |
* \brief Hide a window.
|
slouken@3407
|
675 |
*
|
slouken@3407
|
676 |
* \sa SDL_ShowWindow()
|
slouken@1895
|
677 |
*/
|
slouken@3685
|
678 |
extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
|
slouken@1895
|
679 |
|
slouken@1895
|
680 |
/**
|
slouken@4883
|
681 |
* \brief Raise a window above other windows and set the input focus.
|
slouken@1895
|
682 |
*/
|
slouken@3685
|
683 |
extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
|
slouken@1895
|
684 |
|
slouken@1895
|
685 |
/**
|
slouken@4883
|
686 |
* \brief Make a window as large as possible.
|
slouken@3407
|
687 |
*
|
slouken@3407
|
688 |
* \sa SDL_RestoreWindow()
|
slouken@1895
|
689 |
*/
|
slouken@3685
|
690 |
extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
|
slouken@1895
|
691 |
|
slouken@1895
|
692 |
/**
|
slouken@4883
|
693 |
* \brief Minimize a window to an iconic representation.
|
slouken@3407
|
694 |
*
|
slouken@3407
|
695 |
* \sa SDL_RestoreWindow()
|
slouken@1895
|
696 |
*/
|
slouken@3685
|
697 |
extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
|
slouken@1895
|
698 |
|
slouken@1895
|
699 |
/**
|
slouken@3407
|
700 |
* \brief Restore the size and position of a minimized or maximized window.
|
slouken@3407
|
701 |
*
|
slouken@3407
|
702 |
* \sa SDL_MaximizeWindow()
|
slouken@3407
|
703 |
* \sa SDL_MinimizeWindow()
|
slouken@1895
|
704 |
*/
|
slouken@3685
|
705 |
extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
|
slouken@1895
|
706 |
|
slouken@1895
|
707 |
/**
|
slouken@4883
|
708 |
* \brief Set a window's fullscreen state.
|
slouken@3407
|
709 |
*
|
slouken@3407
|
710 |
* \return 0 on success, or -1 if setting the display mode failed.
|
slouken@3407
|
711 |
*
|
slouken@3522
|
712 |
* \sa SDL_SetWindowDisplayMode()
|
slouken@3522
|
713 |
* \sa SDL_GetWindowDisplayMode()
|
slouken@1895
|
714 |
*/
|
slouken@3685
|
715 |
extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
|
slouken@1895
|
716 |
int fullscreen);
|
slouken@1895
|
717 |
|
slouken@1895
|
718 |
/**
|
slouken@4883
|
719 |
* \brief Set a window's input grab mode.
|
slouken@3407
|
720 |
*
|
slouken@3407
|
721 |
* \param mode This is 1 to grab input, and 0 to release input.
|
slouken@3407
|
722 |
*
|
slouken@3407
|
723 |
* \sa SDL_GetWindowGrab()
|
slouken@1895
|
724 |
*/
|
slouken@3685
|
725 |
extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
|
slouken@1895
|
726 |
int mode);
|
slouken@1895
|
727 |
|
slouken@1895
|
728 |
/**
|
slouken@4883
|
729 |
* \brief Get a window's input grab mode.
|
slouken@3407
|
730 |
*
|
slouken@3407
|
731 |
* \return This returns 1 if input is grabbed, and 0 otherwise.
|
slouken@3407
|
732 |
*
|
slouken@3407
|
733 |
* \sa SDL_SetWindowGrab()
|
slouken@1895
|
734 |
*/
|
slouken@3685
|
735 |
extern DECLSPEC int SDLCALL SDL_GetWindowGrab(SDL_Window * window);
|
slouken@1895
|
736 |
|
slouken@1895
|
737 |
/**
|
slouken@3407
|
738 |
* \brief Get driver specific information about a window.
|
slouken@3407
|
739 |
*
|
slouken@3407
|
740 |
* \note Include SDL_syswm.h for the declaration of SDL_SysWMinfo.
|
slouken@1895
|
741 |
*/
|
slouken@1895
|
742 |
struct SDL_SysWMinfo;
|
slouken@3685
|
743 |
extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowWMInfo(SDL_Window * window,
|
slouken@1895
|
744 |
struct SDL_SysWMinfo
|
slouken@1895
|
745 |
*info);
|
slouken@1895
|
746 |
|
slouken@1895
|
747 |
/**
|
slouken@3407
|
748 |
* \brief Destroy a window.
|
slouken@1895
|
749 |
*/
|
slouken@3685
|
750 |
extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
|
slouken@1895
|
751 |
|
slouken@1895
|
752 |
/**
|
slouken@3407
|
753 |
* \brief Get the number of 2D rendering drivers available for the current
|
slouken@3407
|
754 |
* display.
|
slouken@3407
|
755 |
*
|
slouken@3407
|
756 |
* A render driver is a set of code that handles rendering and texture
|
slouken@3407
|
757 |
* management on a particular display. Normally there is only one, but
|
slouken@3407
|
758 |
* some drivers may have several available with different capabilities.
|
slouken@3407
|
759 |
*
|
slouken@3407
|
760 |
* \sa SDL_GetRenderDriverInfo()
|
slouken@3407
|
761 |
* \sa SDL_CreateRenderer()
|
slouken@1895
|
762 |
*/
|
slouken@1969
|
763 |
extern DECLSPEC int SDLCALL SDL_GetNumRenderDrivers(void);
|
slouken@1895
|
764 |
|
slouken@1895
|
765 |
/**
|
slouken@3407
|
766 |
* \brief Get information about a specific 2D rendering driver for the current
|
slouken@3407
|
767 |
* display.
|
slouken@3407
|
768 |
*
|
slouken@3407
|
769 |
* \param index The index of the driver to query information about.
|
slouken@3407
|
770 |
* \param info A pointer to an SDL_RendererInfo struct to be filled with
|
slouken@3407
|
771 |
* information on the rendering driver.
|
slouken@3407
|
772 |
*
|
slouken@3407
|
773 |
* \return 0 on success, -1 if the index was out of range.
|
slouken@3407
|
774 |
*
|
slouken@3407
|
775 |
* \sa SDL_CreateRenderer()
|
slouken@1895
|
776 |
*/
|
slouken@1969
|
777 |
extern DECLSPEC int SDLCALL SDL_GetRenderDriverInfo(int index,
|
slouken@1969
|
778 |
SDL_RendererInfo * info);
|
slouken@1895
|
779 |
|
slouken@1895
|
780 |
/**
|
slouken@3407
|
781 |
* \brief Create and make active a 2D rendering context for a window.
|
slouken@3407
|
782 |
*
|
slouken@3685
|
783 |
* \param window The window where rendering is displayed.
|
slouken@3407
|
784 |
* \param index The index of the rendering driver to initialize, or -1 to
|
slouken@3407
|
785 |
* initialize the first one supporting the requested flags.
|
slouken@3407
|
786 |
* \param flags ::SDL_RendererFlags.
|
slouken@3407
|
787 |
*
|
slouken@3407
|
788 |
* \return 0 on success, -1 if there was an error creating the renderer.
|
slouken@3407
|
789 |
*
|
slouken@3407
|
790 |
* \sa SDL_SelectRenderer()
|
slouken@3407
|
791 |
* \sa SDL_GetRendererInfo()
|
slouken@3407
|
792 |
* \sa SDL_DestroyRenderer()
|
slouken@1895
|
793 |
*/
|
slouken@3685
|
794 |
extern DECLSPEC int SDLCALL SDL_CreateRenderer(SDL_Window * window,
|
slouken@1895
|
795 |
int index, Uint32 flags);
|
slouken@1895
|
796 |
|
slouken@1895
|
797 |
/**
|
slouken@3407
|
798 |
* \brief Select the rendering context for a particular window.
|
slouken@3407
|
799 |
*
|
slouken@3407
|
800 |
* \return 0 on success, -1 if the selected window doesn't have a
|
slouken@3407
|
801 |
* rendering context.
|
slouken@1895
|
802 |
*/
|
slouken@3685
|
803 |
extern DECLSPEC int SDLCALL SDL_SelectRenderer(SDL_Window * window);
|
slouken@1895
|
804 |
|
slouken@1895
|
805 |
/**
|
slouken@3407
|
806 |
* \brief Get information about the current rendering context.
|
slouken@1969
|
807 |
*/
|
slouken@1969
|
808 |
extern DECLSPEC int SDLCALL SDL_GetRendererInfo(SDL_RendererInfo * info);
|
slouken@1969
|
809 |
|
slouken@1969
|
810 |
/**
|
slouken@3407
|
811 |
* \brief Create a texture for the current rendering context.
|
slouken@3407
|
812 |
*
|
slouken@3407
|
813 |
* \param format The format of the texture.
|
slouken@3407
|
814 |
* \param access One of the enumerated values in ::SDL_TextureAccess.
|
slouken@3407
|
815 |
* \param w The width of the texture in pixels.
|
slouken@3407
|
816 |
* \param h The height of the texture in pixels.
|
slouken@3407
|
817 |
*
|
slouken@3407
|
818 |
* \return The created texture is returned, or 0 if no rendering context was
|
slouken@3407
|
819 |
* active, the format was unsupported, or the width or height were out
|
slouken@3407
|
820 |
* of range.
|
slouken@3407
|
821 |
*
|
slouken@3407
|
822 |
* \sa SDL_QueryTexture()
|
slouken@3407
|
823 |
* \sa SDL_DestroyTexture()
|
slouken@1895
|
824 |
*/
|
slouken@3685
|
825 |
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTexture(Uint32 format,
|
slouken@1895
|
826 |
int access, int w,
|
slouken@1895
|
827 |
int h);
|
slouken@1895
|
828 |
|
slouken@1895
|
829 |
/**
|
slouken@3407
|
830 |
* \brief Create a texture from an existing surface.
|
slouken@3407
|
831 |
*
|
slouken@3407
|
832 |
* \param format The format of the texture, or 0 to pick an appropriate format.
|
slouken@3407
|
833 |
* \param surface The surface containing pixel data used to fill the texture.
|
slouken@3407
|
834 |
*
|
slouken@3407
|
835 |
* \return The created texture is returned, or 0 if no rendering context was
|
slouken@3407
|
836 |
* active, the format was unsupported, or the surface width or height
|
slouken@3407
|
837 |
* were out of range.
|
slouken@3407
|
838 |
*
|
slouken@3407
|
839 |
* \note The surface is not modified or freed by this function.
|
slouken@3407
|
840 |
*
|
slouken@3407
|
841 |
* \sa SDL_QueryTexture()
|
slouken@3407
|
842 |
* \sa SDL_DestroyTexture()
|
slouken@0
|
843 |
*/
|
slouken@3685
|
844 |
extern DECLSPEC SDL_Texture * SDLCALL SDL_CreateTextureFromSurface(Uint32
|
slouken@1895
|
845 |
format,
|
slouken@1895
|
846 |
SDL_Surface
|
slouken@1895
|
847 |
* surface);
|
slouken@1895
|
848 |
|
slouken@1895
|
849 |
/**
|
slouken@3407
|
850 |
* \brief Query the attributes of a texture
|
slouken@3407
|
851 |
*
|
slouken@3685
|
852 |
* \param texture A texture to be queried.
|
slouken@3407
|
853 |
* \param format A pointer filled in with the raw format of the texture. The
|
slouken@3407
|
854 |
* actual format may differ, but pixel transfers will use this
|
slouken@3407
|
855 |
* format.
|
slouken@3407
|
856 |
* \param access A pointer filled in with the actual access to the texture.
|
slouken@3407
|
857 |
* \param w A pointer filled in with the width of the texture in pixels.
|
slouken@3407
|
858 |
* \param h A pointer filled in with the height of the texture in pixels.
|
slouken@3407
|
859 |
*
|
slouken@3407
|
860 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@1895
|
861 |
*/
|
slouken@3685
|
862 |
extern DECLSPEC int SDLCALL SDL_QueryTexture(SDL_Texture * texture,
|
slouken@1895
|
863 |
Uint32 * format, int *access,
|
slouken@1895
|
864 |
int *w, int *h);
|
slouken@1895
|
865 |
|
slouken@1895
|
866 |
/**
|
slouken@3407
|
867 |
* \brief Query the pixels of a texture, if the texture does not need to be
|
slouken@3407
|
868 |
* locked for pixel access.
|
slouken@3407
|
869 |
*
|
slouken@3685
|
870 |
* \param texture A texture to be queried, which was created with
|
slouken@3407
|
871 |
* ::SDL_TEXTUREACCESS_STREAMING.
|
slouken@3407
|
872 |
* \param pixels A pointer filled with a pointer to the pixels for the
|
slouken@3407
|
873 |
* texture.
|
slouken@3407
|
874 |
* \param pitch A pointer filled in with the pitch of the pixel data.
|
slouken@3407
|
875 |
*
|
slouken@3407
|
876 |
* \return 0 on success, or -1 if the texture is not valid, or must be locked
|
slouken@3407
|
877 |
* for pixel access.
|
slouken@1895
|
878 |
*/
|
slouken@3685
|
879 |
extern DECLSPEC int SDLCALL SDL_QueryTexturePixels(SDL_Texture * texture,
|
slouken@1895
|
880 |
void **pixels, int *pitch);
|
slouken@1895
|
881 |
|
slouken@1895
|
882 |
/**
|
slouken@3407
|
883 |
* \brief Set the color palette of an indexed texture.
|
slouken@3407
|
884 |
*
|
slouken@3685
|
885 |
* \param texture The texture to update.
|
slouken@3407
|
886 |
* \param colors The array of RGB color data.
|
slouken@3407
|
887 |
* \param firstcolor The first index to update.
|
slouken@3407
|
888 |
* \param ncolors The number of palette entries to fill with the color data.
|
slouken@3407
|
889 |
*
|
slouken@3407
|
890 |
* \return 0 on success, or -1 if the texture is not valid or not an indexed
|
slouken@3407
|
891 |
* texture.
|
slouken@1895
|
892 |
*/
|
slouken@3685
|
893 |
extern DECLSPEC int SDLCALL SDL_SetTexturePalette(SDL_Texture * texture,
|
slouken@1895
|
894 |
const SDL_Color * colors,
|
slouken@1895
|
895 |
int firstcolor,
|
slouken@1895
|
896 |
int ncolors);
|
slouken@1895
|
897 |
|
slouken@1895
|
898 |
/**
|
slouken@3407
|
899 |
* \brief Get the color palette from an indexed texture if it has one.
|
slouken@3407
|
900 |
*
|
slouken@3685
|
901 |
* \param texture The texture to update.
|
slouken@3407
|
902 |
* \param colors The array to fill with RGB color data.
|
slouken@3407
|
903 |
* \param firstcolor The first index to retrieve.
|
slouken@3407
|
904 |
* \param ncolors The number of palette entries to retrieve.
|
slouken@3407
|
905 |
*
|
slouken@3407
|
906 |
* \return 0 on success, or -1 if the texture is not valid or not an indexed
|
slouken@3407
|
907 |
* texture.
|
slouken@1895
|
908 |
*/
|
slouken@3685
|
909 |
extern DECLSPEC int SDLCALL SDL_GetTexturePalette(SDL_Texture * texture,
|
slouken@1895
|
910 |
SDL_Color * colors,
|
slouken@1895
|
911 |
int firstcolor,
|
slouken@1895
|
912 |
int ncolors);
|
slouken@0
|
913 |
|
slouken@1895
|
914 |
/**
|
slouken@3407
|
915 |
* \brief Set an additional color value used in render copy operations.
|
slouken@3407
|
916 |
*
|
slouken@3685
|
917 |
* \param texture The texture to update.
|
slouken@3407
|
918 |
* \param r The red source color value multiplied into copy operations.
|
slouken@3407
|
919 |
* \param g The green source color value multiplied into copy operations.
|
slouken@3407
|
920 |
* \param b The blue source color value multiplied into copy operations.
|
slouken@3407
|
921 |
*
|
slouken@3407
|
922 |
* \return 0 on success, or -1 if the texture is not valid or color modulation
|
slouken@3407
|
923 |
* is not supported.
|
slouken@3407
|
924 |
*
|
slouken@3407
|
925 |
* \sa SDL_GetTextureColorMod()
|
slouken@1985
|
926 |
*/
|
slouken@3685
|
927 |
extern DECLSPEC int SDLCALL SDL_SetTextureColorMod(SDL_Texture * texture,
|
slouken@1985
|
928 |
Uint8 r, Uint8 g, Uint8 b);
|
slouken@1985
|
929 |
|
slouken@1985
|
930 |
|
slouken@1985
|
931 |
/**
|
slouken@3407
|
932 |
* \brief Get the additional color value used in render copy operations.
|
slouken@3407
|
933 |
*
|
slouken@3685
|
934 |
* \param texture The texture to query.
|
slouken@3407
|
935 |
* \param r A pointer filled in with the source red color value.
|
slouken@3407
|
936 |
* \param g A pointer filled in with the source green color value.
|
slouken@3407
|
937 |
* \param b A pointer filled in with the source blue color value.
|
slouken@3407
|
938 |
*
|
slouken@3407
|
939 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@3407
|
940 |
*
|
slouken@3407
|
941 |
* \sa SDL_SetTextureColorMod()
|
slouken@1985
|
942 |
*/
|
slouken@3685
|
943 |
extern DECLSPEC int SDLCALL SDL_GetTextureColorMod(SDL_Texture * texture,
|
slouken@1985
|
944 |
Uint8 * r, Uint8 * g,
|
slouken@1985
|
945 |
Uint8 * b);
|
slouken@1985
|
946 |
|
slouken@1985
|
947 |
/**
|
slouken@3407
|
948 |
* \brief Set an additional alpha value used in render copy operations.
|
slouken@3407
|
949 |
*
|
slouken@3685
|
950 |
* \param texture The texture to update.
|
slouken@3407
|
951 |
* \param alpha The source alpha value multiplied into copy operations.
|
slouken@3407
|
952 |
*
|
slouken@3407
|
953 |
* \return 0 on success, or -1 if the texture is not valid or alpha modulation
|
slouken@3407
|
954 |
* is not supported.
|
slouken@3407
|
955 |
*
|
slouken@3407
|
956 |
* \sa SDL_GetTextureAlphaMod()
|
slouken@1985
|
957 |
*/
|
slouken@3685
|
958 |
extern DECLSPEC int SDLCALL SDL_SetTextureAlphaMod(SDL_Texture * texture,
|
slouken@1985
|
959 |
Uint8 alpha);
|
slouken@1985
|
960 |
|
slouken@1985
|
961 |
/**
|
slouken@3407
|
962 |
* \brief Get the additional alpha value used in render copy operations.
|
slouken@3407
|
963 |
*
|
slouken@3685
|
964 |
* \param texture The texture to query.
|
slouken@3407
|
965 |
* \param alpha A pointer filled in with the source alpha value.
|
slouken@3407
|
966 |
*
|
slouken@3407
|
967 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@3407
|
968 |
*
|
slouken@3407
|
969 |
* \sa SDL_SetTextureAlphaMod()
|
slouken@1985
|
970 |
*/
|
slouken@3685
|
971 |
extern DECLSPEC int SDLCALL SDL_GetTextureAlphaMod(SDL_Texture * texture,
|
slouken@1985
|
972 |
Uint8 * alpha);
|
slouken@1985
|
973 |
|
slouken@1985
|
974 |
/**
|
slouken@3407
|
975 |
* \brief Set the blend mode used for texture copy operations.
|
slouken@3407
|
976 |
*
|
slouken@3685
|
977 |
* \param texture The texture to update.
|
slouken@3407
|
978 |
* \param blendMode ::SDL_BlendMode to use for texture blending.
|
slouken@3407
|
979 |
*
|
slouken@3407
|
980 |
* \return 0 on success, or -1 if the texture is not valid or the blend mode is
|
slouken@3407
|
981 |
* not supported.
|
slouken@3407
|
982 |
*
|
slouken@3407
|
983 |
* \note If the blend mode is not supported, the closest supported mode is
|
slouken@3407
|
984 |
* chosen.
|
slouken@3407
|
985 |
*
|
slouken@3407
|
986 |
* \sa SDL_GetTextureBlendMode()
|
slouken@1985
|
987 |
*/
|
slouken@3685
|
988 |
extern DECLSPEC int SDLCALL SDL_SetTextureBlendMode(SDL_Texture * texture,
|
slouken@1985
|
989 |
int blendMode);
|
slouken@1985
|
990 |
|
slouken@1985
|
991 |
/**
|
slouken@3407
|
992 |
* \brief Get the blend mode used for texture copy operations.
|
slouken@3407
|
993 |
*
|
slouken@3685
|
994 |
* \param texture The texture to query.
|
slouken@3407
|
995 |
* \param blendMode A pointer filled in with the current blend mode.
|
slouken@3407
|
996 |
*
|
slouken@3407
|
997 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@3407
|
998 |
*
|
slouken@3407
|
999 |
* \sa SDL_SetTextureBlendMode()
|
slouken@1985
|
1000 |
*/
|
slouken@3685
|
1001 |
extern DECLSPEC int SDLCALL SDL_GetTextureBlendMode(SDL_Texture * texture,
|
slouken@1985
|
1002 |
int *blendMode);
|
slouken@1985
|
1003 |
|
slouken@1985
|
1004 |
/**
|
slouken@3407
|
1005 |
* \brief Set the scale mode used for texture copy operations.
|
slouken@3407
|
1006 |
*
|
slouken@3685
|
1007 |
* \param texture The texture to update.
|
slouken@3407
|
1008 |
* \param scaleMode ::SDL_TextureScaleMode to use for texture scaling.
|
slouken@3407
|
1009 |
*
|
slouken@3407
|
1010 |
* \return 0 on success, or -1 if the texture is not valid or the scale mode is
|
slouken@3407
|
1011 |
* not supported.
|
slouken@3407
|
1012 |
*
|
slouken@3407
|
1013 |
* \note If the scale mode is not supported, the closest supported mode is
|
slouken@3407
|
1014 |
* chosen.
|
slouken@3407
|
1015 |
*
|
slouken@3407
|
1016 |
* \sa SDL_GetTextureScaleMode()
|
slouken@1985
|
1017 |
*/
|
slouken@3685
|
1018 |
extern DECLSPEC int SDLCALL SDL_SetTextureScaleMode(SDL_Texture * texture,
|
slouken@1985
|
1019 |
int scaleMode);
|
slouken@1985
|
1020 |
|
slouken@1985
|
1021 |
/**
|
slouken@3407
|
1022 |
* \brief Get the scale mode used for texture copy operations.
|
slouken@3407
|
1023 |
*
|
slouken@3685
|
1024 |
* \param texture The texture to query.
|
slouken@3407
|
1025 |
* \param scaleMode A pointer filled in with the current scale mode.
|
slouken@3407
|
1026 |
*
|
slouken@3407
|
1027 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@3407
|
1028 |
*
|
slouken@3407
|
1029 |
* \sa SDL_SetTextureScaleMode()
|
slouken@1985
|
1030 |
*/
|
slouken@3685
|
1031 |
extern DECLSPEC int SDLCALL SDL_GetTextureScaleMode(SDL_Texture * texture,
|
slouken@1985
|
1032 |
int *scaleMode);
|
slouken@1985
|
1033 |
|
slouken@1985
|
1034 |
/**
|
slouken@3407
|
1035 |
* \brief Update the given texture rectangle with new pixel data.
|
slouken@3407
|
1036 |
*
|
slouken@3685
|
1037 |
* \param texture The texture to update
|
slouken@3407
|
1038 |
* \param rect A pointer to the rectangle of pixels to update, or NULL to
|
slouken@3407
|
1039 |
* update the entire texture.
|
slouken@3407
|
1040 |
* \param pixels The raw pixel data.
|
slouken@3407
|
1041 |
* \param pitch The number of bytes between rows of pixel data.
|
slouken@3407
|
1042 |
*
|
slouken@3407
|
1043 |
* \return 0 on success, or -1 if the texture is not valid.
|
slouken@3407
|
1044 |
*
|
slouken@3407
|
1045 |
* \note This is a fairly slow function.
|
slouken@1895
|
1046 |
*/
|
slouken@3685
|
1047 |
extern DECLSPEC int SDLCALL SDL_UpdateTexture(SDL_Texture * texture,
|
slouken@1895
|
1048 |
const SDL_Rect * rect,
|
slouken@1895
|
1049 |
const void *pixels, int pitch);
|
slouken@1895
|
1050 |
|
slouken@1895
|
1051 |
/**
|
slouken@3407
|
1052 |
* \brief Lock a portion of the texture for pixel access.
|
slouken@3407
|
1053 |
*
|
slouken@3685
|
1054 |
* \param texture The texture to lock for access, which was created with
|
slouken@3407
|
1055 |
* ::SDL_TEXTUREACCESS_STREAMING.
|
slouken@3407
|
1056 |
* \param rect A pointer to the rectangle to lock for access. If the rect
|
slouken@3407
|
1057 |
* is NULL, the entire texture will be locked.
|
slouken@3407
|
1058 |
* \param markDirty If this is nonzero, the locked area will be marked dirty
|
slouken@3407
|
1059 |
* when the texture is unlocked.
|
slouken@3407
|
1060 |
* \param pixels This is filled in with a pointer to the locked pixels,
|
slouken@3407
|
1061 |
* appropriately offset by the locked area.
|
slouken@3407
|
1062 |
* \param pitch This is filled in with the pitch of the locked pixels.
|
slouken@3407
|
1063 |
*
|
slouken@3407
|
1064 |
* \return 0 on success, or -1 if the texture is not valid or was created with
|
slouken@3407
|
1065 |
* ::SDL_TEXTUREACCESS_STATIC.
|
slouken@3407
|
1066 |
*
|
slouken@3407
|
1067 |
* \sa SDL_DirtyTexture()
|
slouken@3407
|
1068 |
* \sa SDL_UnlockTexture()
|
slouken@1895
|
1069 |
*/
|
slouken@3685
|
1070 |
extern DECLSPEC int SDLCALL SDL_LockTexture(SDL_Texture * texture,
|
slouken@1895
|
1071 |
const SDL_Rect * rect,
|
slouken@1895
|
1072 |
int markDirty, void **pixels,
|
slouken@1895
|
1073 |
int *pitch);
|
slouken@1895
|
1074 |
|
slouken@1895
|
1075 |
/**
|
slouken@3407
|
1076 |
* \brief Unlock a texture, uploading the changes to video memory, if needed.
|
slouken@3407
|
1077 |
*
|
slouken@3407
|
1078 |
* \sa SDL_LockTexture()
|
slouken@3407
|
1079 |
* \sa SDL_DirtyTexture()
|
slouken@1895
|
1080 |
*/
|
slouken@3685
|
1081 |
extern DECLSPEC void SDLCALL SDL_UnlockTexture(SDL_Texture * texture);
|
slouken@1895
|
1082 |
|
slouken@1895
|
1083 |
/**
|
slouken@3407
|
1084 |
* \brief Mark the specified rectangles of the texture as dirty.
|
slouken@3407
|
1085 |
*
|
slouken@3685
|
1086 |
* \param texture The texture to mark dirty, which was created with
|
slouken@3407
|
1087 |
* ::SDL_TEXTUREACCESS_STREAMING.
|
slouken@3407
|
1088 |
* \param numrects The number of rectangles pointed to by rects.
|
slouken@3407
|
1089 |
* \param rects The pointer to an array of dirty rectangles.
|
slouken@3407
|
1090 |
*
|
slouken@3407
|
1091 |
* \sa SDL_LockTexture()
|
slouken@3407
|
1092 |
* \sa SDL_UnlockTexture()
|
slouken@1895
|
1093 |
*/
|
slouken@3685
|
1094 |
extern DECLSPEC void SDLCALL SDL_DirtyTexture(SDL_Texture * texture,
|
slouken@1895
|
1095 |
int numrects,
|
slouken@1895
|
1096 |
const SDL_Rect * rects);
|
slouken@1895
|
1097 |
|
slouken@1895
|
1098 |
/**
|
slouken@3407
|
1099 |
* \brief Set the color used for drawing operations (Fill and Line).
|
slouken@3407
|
1100 |
*
|
slouken@3407
|
1101 |
* \param r The red value used to draw on the rendering target.
|
slouken@3407
|
1102 |
* \param g The green value used to draw on the rendering target.
|
slouken@3407
|
1103 |
* \param b The blue value used to draw on the rendering target.
|
slouken@3407
|
1104 |
* \param a The alpha value used to draw on the rendering target, usually
|
slouken@3407
|
1105 |
* ::SDL_ALPHA_OPAQUE (255).
|
slouken@3407
|
1106 |
*
|
slouken@3407
|
1107 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@2884
|
1108 |
*/
|
slouken@2884
|
1109 |
extern DECLSPEC int SDL_SetRenderDrawColor(Uint8 r, Uint8 g, Uint8 b,
|
slouken@2884
|
1110 |
Uint8 a);
|
slouken@2884
|
1111 |
|
slouken@2884
|
1112 |
/**
|
slouken@3407
|
1113 |
* \brief Get the color used for drawing operations (Fill and Line).
|
slouken@3407
|
1114 |
*
|
slouken@3407
|
1115 |
* \param r A pointer to the red value used to draw on the rendering target.
|
slouken@3407
|
1116 |
* \param g A pointer to the green value used to draw on the rendering target.
|
slouken@3407
|
1117 |
* \param b A pointer to the blue value used to draw on the rendering target.
|
slouken@3407
|
1118 |
* \param a A pointer to the alpha value used to draw on the rendering target,
|
slouken@3407
|
1119 |
* usually ::SDL_ALPHA_OPAQUE (255).
|
slouken@3407
|
1120 |
*
|
slouken@3407
|
1121 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@2884
|
1122 |
*/
|
slouken@2884
|
1123 |
extern DECLSPEC int SDL_GetRenderDrawColor(Uint8 * r, Uint8 * g, Uint8 * b,
|
slouken@2884
|
1124 |
Uint8 * a);
|
slouken@2884
|
1125 |
|
slouken@2884
|
1126 |
/**
|
slouken@3407
|
1127 |
* \brief Set the blend mode used for drawing operations (Fill and Line).
|
slouken@3407
|
1128 |
*
|
slouken@3407
|
1129 |
* \param blendMode ::SDL_BlendMode to use for blending.
|
slouken@3407
|
1130 |
*
|
slouken@3407
|
1131 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3407
|
1132 |
*
|
slouken@3407
|
1133 |
* \note If the blend mode is not supported, the closest supported mode is
|
slouken@3407
|
1134 |
* chosen.
|
slouken@3407
|
1135 |
*
|
slouken@3407
|
1136 |
* \sa SDL_GetRenderDrawBlendMode()
|
slouken@2884
|
1137 |
*/
|
slouken@2884
|
1138 |
extern DECLSPEC int SDLCALL SDL_SetRenderDrawBlendMode(int blendMode);
|
slouken@2884
|
1139 |
|
slouken@2884
|
1140 |
/**
|
slouken@3407
|
1141 |
* \brief Get the blend mode used for drawing operations.
|
slouken@3407
|
1142 |
*
|
slouken@3407
|
1143 |
* \param blendMode A pointer filled in with the current blend mode.
|
slouken@3407
|
1144 |
*
|
slouken@3407
|
1145 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3407
|
1146 |
*
|
slouken@3407
|
1147 |
* \sa SDL_SetRenderDrawBlendMode()
|
slouken@2884
|
1148 |
*/
|
slouken@2884
|
1149 |
extern DECLSPEC int SDLCALL SDL_GetRenderDrawBlendMode(int *blendMode);
|
slouken@2884
|
1150 |
|
slouken@2884
|
1151 |
/**
|
slouken@3596
|
1152 |
* \brief Clear the current rendering target with the drawing color
|
slouken@3596
|
1153 |
*/
|
slouken@3677
|
1154 |
extern DECLSPEC int SDLCALL SDL_RenderClear(void);
|
slouken@3596
|
1155 |
|
slouken@3596
|
1156 |
/**
|
slouken@3407
|
1157 |
* \brief Draw a point on the current rendering target.
|
slouken@3407
|
1158 |
*
|
slouken@3407
|
1159 |
* \param x The x coordinate of the point.
|
slouken@3407
|
1160 |
* \param y The y coordinate of the point.
|
slouken@3407
|
1161 |
*
|
slouken@3407
|
1162 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@2901
|
1163 |
*/
|
slouken@3596
|
1164 |
extern DECLSPEC int SDLCALL SDL_RenderDrawPoint(int x, int y);
|
slouken@2901
|
1165 |
|
slouken@2901
|
1166 |
/**
|
slouken@4876
|
1167 |
* \brief Draw multiple points on the current rendering target.
|
slouken@3536
|
1168 |
*
|
slouken@3536
|
1169 |
* \param points The points to draw
|
slouken@3536
|
1170 |
* \param count The number of points to draw
|
slouken@3536
|
1171 |
*
|
slouken@3536
|
1172 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3536
|
1173 |
*/
|
slouken@3596
|
1174 |
extern DECLSPEC int SDLCALL SDL_RenderDrawPoints(const SDL_Point * points,
|
slouken@3596
|
1175 |
int count);
|
slouken@3536
|
1176 |
|
slouken@3536
|
1177 |
/**
|
slouken@3407
|
1178 |
* \brief Draw a line on the current rendering target.
|
slouken@3407
|
1179 |
*
|
slouken@3407
|
1180 |
* \param x1 The x coordinate of the start point.
|
slouken@3407
|
1181 |
* \param y1 The y coordinate of the start point.
|
slouken@3407
|
1182 |
* \param x2 The x coordinate of the end point.
|
slouken@3407
|
1183 |
* \param y2 The y coordinate of the end point.
|
slouken@3407
|
1184 |
*
|
slouken@3407
|
1185 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@2884
|
1186 |
*/
|
slouken@3596
|
1187 |
extern DECLSPEC int SDLCALL SDL_RenderDrawLine(int x1, int y1, int x2, int y2);
|
slouken@2884
|
1188 |
|
slouken@2884
|
1189 |
/**
|
slouken@3536
|
1190 |
* \brief Draw a series of connected lines on the current rendering target.
|
slouken@3536
|
1191 |
*
|
slouken@3536
|
1192 |
* \param points The points along the lines
|
slouken@3536
|
1193 |
* \param count The number of points, drawing count-1 lines
|
slouken@3536
|
1194 |
*
|
slouken@3536
|
1195 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3536
|
1196 |
*/
|
slouken@3596
|
1197 |
extern DECLSPEC int SDLCALL SDL_RenderDrawLines(const SDL_Point * points,
|
slouken@3596
|
1198 |
int count);
|
slouken@3536
|
1199 |
|
slouken@3536
|
1200 |
/**
|
slouken@4878
|
1201 |
* \brief Draw a rectangle on the current rendering target.
|
slouken@3596
|
1202 |
*
|
slouken@3596
|
1203 |
* \param rect A pointer to the destination rectangle, or NULL to outline the entire rendering target.
|
slouken@3596
|
1204 |
*
|
slouken@3596
|
1205 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3596
|
1206 |
*/
|
slouken@3596
|
1207 |
extern DECLSPEC int SDLCALL SDL_RenderDrawRect(const SDL_Rect * rect);
|
slouken@3596
|
1208 |
|
slouken@3596
|
1209 |
/**
|
slouken@4878
|
1210 |
* \brief Draw some number of rectangles on the current rendering target.
|
slouken@3596
|
1211 |
*
|
slouken@3596
|
1212 |
* \param rects A pointer to an array of destination rectangles.
|
slouken@3596
|
1213 |
* \param count The number of rectangles.
|
slouken@3596
|
1214 |
*
|
slouken@3596
|
1215 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3596
|
1216 |
*/
|
slouken@4877
|
1217 |
extern DECLSPEC int SDLCALL SDL_RenderDrawRects(const SDL_Rect ** rects, int count);
|
slouken@3596
|
1218 |
|
slouken@3596
|
1219 |
/**
|
slouken@3596
|
1220 |
* \brief Fill a rectangle on the current rendering target with the drawing color.
|
slouken@3407
|
1221 |
*
|
slouken@3407
|
1222 |
* \param rect A pointer to the destination rectangle, or NULL for the entire
|
slouken@3407
|
1223 |
* rendering target.
|
slouken@3407
|
1224 |
*
|
slouken@3407
|
1225 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@1895
|
1226 |
*/
|
slouken@3596
|
1227 |
extern DECLSPEC int SDLCALL SDL_RenderFillRect(const SDL_Rect * rect);
|
slouken@3536
|
1228 |
|
slouken@3536
|
1229 |
/**
|
slouken@4879
|
1230 |
* \brief Fill some number of rectangles on the current rendering target with the drawing color.
|
slouken@3536
|
1231 |
*
|
slouken@3536
|
1232 |
* \param rects A pointer to an array of destination rectangles.
|
slouken@3536
|
1233 |
* \param count The number of rectangles.
|
slouken@3536
|
1234 |
*
|
slouken@3536
|
1235 |
* \return 0 on success, or -1 if there is no rendering context current.
|
slouken@3536
|
1236 |
*/
|
slouken@3596
|
1237 |
extern DECLSPEC int SDLCALL SDL_RenderFillRects(const SDL_Rect ** rect, int count);
|
slouken@3596
|
1238 |
|
slouken@1895
|
1239 |
/**
|
slouken@3407
|
1240 |
* \brief Copy a portion of the texture to the current rendering target.
|
slouken@3407
|
1241 |
*
|
slouken@3685
|
1242 |
* \param texture The source texture.
|
slouken@3407
|
1243 |
* \param srcrect A pointer to the source rectangle, or NULL for the entire
|
slouken@3407
|
1244 |
* texture.
|
slouken@3407
|
1245 |
* \param dstrect A pointer to the destination rectangle, or NULL for the
|
slouken@3407
|
1246 |
* entire rendering target.
|
slouken@3407
|
1247 |
*
|
slouken@3407
|
1248 |
* \return 0 on success, or -1 if there is no rendering context current, or the
|
slouken@3407
|
1249 |
* driver doesn't support the requested operation.
|
slouken@1895
|
1250 |
*/
|
slouken@3685
|
1251 |
extern DECLSPEC int SDLCALL SDL_RenderCopy(SDL_Texture * texture,
|
slouken@1895
|
1252 |
const SDL_Rect * srcrect,
|
slouken@1985
|
1253 |
const SDL_Rect * dstrect);
|
slouken@1895
|
1254 |
|
slouken@1895
|
1255 |
/**
|
slouken@3407
|
1256 |
* \brief Read pixels from the current rendering target.
|
slouken@3407
|
1257 |
*
|
slouken@3407
|
1258 |
* \param rect A pointer to the rectangle to read, or NULL for the entire
|
slouken@3407
|
1259 |
* render target.
|
slouken@3435
|
1260 |
* \param format The desired format of the pixel data, or 0 to use the format
|
slouken@3435
|
1261 |
* of the rendering target
|
slouken@3435
|
1262 |
* \param pixels A pointer to be filled in with the pixel data
|
slouken@3407
|
1263 |
* \param pitch The pitch of the pixels parameter.
|
slouken@3407
|
1264 |
*
|
slouken@3407
|
1265 |
* \return 0 on success, or -1 if pixel reading is not supported.
|
slouken@3407
|
1266 |
*
|
slouken@3407
|
1267 |
* \warning This is a very slow operation, and should not be used frequently.
|
slouken@1895
|
1268 |
*/
|
slouken@1895
|
1269 |
extern DECLSPEC int SDLCALL SDL_RenderReadPixels(const SDL_Rect * rect,
|
slouken@3435
|
1270 |
Uint32 format,
|
slouken@1895
|
1271 |
void *pixels, int pitch);
|
slouken@1895
|
1272 |
|
slouken@1895
|
1273 |
/**
|
slouken@3407
|
1274 |
* \brief Write pixels to the current rendering target.
|
slouken@3407
|
1275 |
*
|
slouken@3407
|
1276 |
* \param rect A pointer to the rectangle to write, or NULL for the entire
|
slouken@3407
|
1277 |
* render target.
|
slouken@3435
|
1278 |
* \param format The format of the pixel data, or 0 to use the format
|
slouken@3435
|
1279 |
* of the rendering target
|
slouken@3407
|
1280 |
* \param pixels A pointer to the pixel data to write.
|
slouken@3407
|
1281 |
* \param pitch The pitch of the pixels parameter.
|
slouken@3407
|
1282 |
*
|
slouken@3407
|
1283 |
* \return 0 on success, or -1 if pixel writing is not supported.
|
slouken@3407
|
1284 |
*
|
slouken@3407
|
1285 |
* \warning This is a very slow operation, and should not be used frequently.
|
slouken@0
|
1286 |
*/
|
slouken@1895
|
1287 |
extern DECLSPEC int SDLCALL SDL_RenderWritePixels(const SDL_Rect * rect,
|
slouken@3435
|
1288 |
Uint32 format,
|
slouken@1895
|
1289 |
const void *pixels,
|
slouken@1895
|
1290 |
int pitch);
|
slouken@1895
|
1291 |
|
slouken@1895
|
1292 |
/**
|
slouken@3407
|
1293 |
* \brief Update the screen with rendering performed.
|
slouken@1895
|
1294 |
*/
|
slouken@1895
|
1295 |
extern DECLSPEC void SDLCALL SDL_RenderPresent(void);
|
slouken@1895
|
1296 |
|
slouken@1895
|
1297 |
/**
|
slouken@3407
|
1298 |
* \brief Destroy the specified texture.
|
slouken@3407
|
1299 |
*
|
slouken@3407
|
1300 |
* \sa SDL_CreateTexture()
|
slouken@3407
|
1301 |
* \sa SDL_CreateTextureFromSurface()
|
slouken@1895
|
1302 |
*/
|
slouken@3685
|
1303 |
extern DECLSPEC void SDLCALL SDL_DestroyTexture(SDL_Texture * texture);
|
slouken@1895
|
1304 |
|
slouken@1895
|
1305 |
/**
|
slouken@3407
|
1306 |
* \brief Destroy the rendering context for a window and free associated
|
slouken@3407
|
1307 |
* textures.
|
slouken@3407
|
1308 |
*
|
slouken@3407
|
1309 |
* \sa SDL_CreateRenderer()
|
slouken@1895
|
1310 |
*/
|
slouken@3685
|
1311 |
extern DECLSPEC void SDLCALL SDL_DestroyRenderer(SDL_Window * window);
|
slouken@0
|
1312 |
|
slouken@3025
|
1313 |
/**
|
slouken@4875
|
1314 |
* \brief Returns whether the screensaver is currently enabled (default on).
|
slouken@3407
|
1315 |
*
|
slouken@3407
|
1316 |
* \sa SDL_EnableScreenSaver()
|
slouken@3407
|
1317 |
* \sa SDL_DisableScreenSaver()
|
slouken@3025
|
1318 |
*/
|
couriersud@3033
|
1319 |
extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
|
slouken@3025
|
1320 |
|
slouken@3025
|
1321 |
/**
|
slouken@3407
|
1322 |
* \brief Allow the screen to be blanked by a screensaver
|
slouken@3407
|
1323 |
*
|
slouken@3407
|
1324 |
* \sa SDL_IsScreenSaverEnabled()
|
slouken@3407
|
1325 |
* \sa SDL_DisableScreenSaver()
|
slouken@3025
|
1326 |
*/
|
couriersud@3033
|
1327 |
extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
|
slouken@3025
|
1328 |
|
slouken@3025
|
1329 |
/**
|
slouken@3407
|
1330 |
* \brief Prevent the screen from being blanked by a screensaver
|
slouken@3407
|
1331 |
*
|
slouken@3407
|
1332 |
* \sa SDL_IsScreenSaverEnabled()
|
slouken@3407
|
1333 |
* \sa SDL_EnableScreenSaver()
|
slouken@3025
|
1334 |
*/
|
couriersud@3033
|
1335 |
extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
|
slouken@3025
|
1336 |
|
slouken@0
|
1337 |
|
slouken@3407
|
1338 |
/**
|
slouken@3407
|
1339 |
* \name OpenGL support functions
|
slouken@3407
|
1340 |
*/
|
slouken@3407
|
1341 |
/*@{*/
|
slouken@0
|
1342 |
|
slouken@1895
|
1343 |
/**
|
slouken@3407
|
1344 |
* \brief Dynamically load an OpenGL library.
|
slouken@3407
|
1345 |
*
|
slouken@3407
|
1346 |
* \param path The platform dependent OpenGL library name, or NULL to open the
|
slouken@3407
|
1347 |
* default OpenGL library.
|
slouken@3407
|
1348 |
*
|
slouken@3407
|
1349 |
* \return 0 on success, or -1 if the library couldn't be loaded.
|
slouken@3407
|
1350 |
*
|
slouken@3407
|
1351 |
* This should be done after initializing the video driver, but before
|
slouken@3407
|
1352 |
* creating any OpenGL windows. If no OpenGL library is loaded, the default
|
slouken@3407
|
1353 |
* library will be loaded upon creation of the first OpenGL window.
|
slouken@3407
|
1354 |
*
|
slouken@3407
|
1355 |
* \note If you do this, you need to retrieve all of the GL functions used in
|
slouken@3407
|
1356 |
* your program from the dynamic library using SDL_GL_GetProcAddress().
|
slouken@3407
|
1357 |
*
|
slouken@3407
|
1358 |
* \sa SDL_GL_GetProcAddress()
|
slouken@3407
|
1359 |
* \sa SDL_GL_UnloadLibrary()
|
slouken@0
|
1360 |
*/
|
slouken@337
|
1361 |
extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
|
slouken@0
|
1362 |
|
slouken@1895
|
1363 |
/**
|
slouken@3407
|
1364 |
* \brief Get the address of an OpenGL function.
|
slouken@0
|
1365 |
*/
|
slouken@1895
|
1366 |
extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
|
slouken@0
|
1367 |
|
slouken@1895
|
1368 |
/**
|
slouken@3407
|
1369 |
* \brief Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
|
slouken@3407
|
1370 |
*
|
slouken@3407
|
1371 |
* \sa SDL_GL_LoadLibrary()
|
slouken@3057
|
1372 |
*/
|
slouken@3057
|
1373 |
extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
|
slouken@3057
|
1374 |
|
slouken@3057
|
1375 |
/**
|
slouken@3407
|
1376 |
* \brief Return true if an OpenGL extension is supported for the current
|
slouken@3407
|
1377 |
* context.
|
slouken@1926
|
1378 |
*/
|
slouken@1926
|
1379 |
extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
|
slouken@1926
|
1380 |
*extension);
|
slouken@1926
|
1381 |
|
slouken@1926
|
1382 |
/**
|
slouken@3407
|
1383 |
* \brief Set an OpenGL window attribute before window creation.
|
slouken@0
|
1384 |
*/
|
slouken@337
|
1385 |
extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
|
slouken@0
|
1386 |
|
slouken@1895
|
1387 |
/**
|
slouken@3407
|
1388 |
* \brief Get the actual value for an attribute from the current context.
|
slouken@1895
|
1389 |
*/
|
slouken@1936
|
1390 |
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
|
slouken@1895
|
1391 |
|
slouken@1895
|
1392 |
/**
|
slouken@3407
|
1393 |
* \brief Create an OpenGL context for use with an OpenGL window, and make it
|
slouken@3407
|
1394 |
* current.
|
slouken@3407
|
1395 |
*
|
slouken@3407
|
1396 |
* \sa SDL_GL_DeleteContext()
|
slouken@1895
|
1397 |
*/
|
slouken@3685
|
1398 |
extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
|
slouken@3685
|
1399 |
window);
|
slouken@1895
|
1400 |
|
slouken@1895
|
1401 |
/**
|
slouken@3407
|
1402 |
* \brief Set up an OpenGL context for rendering into an OpenGL window.
|
slouken@3407
|
1403 |
*
|
slouken@3407
|
1404 |
* \note The context must have been created with a compatible window.
|
slouken@1895
|
1405 |
*/
|
slouken@3685
|
1406 |
extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
|
slouken@1895
|
1407 |
SDL_GLContext context);
|
slouken@1895
|
1408 |
|
slouken@1895
|
1409 |
/**
|
slouken@3407
|
1410 |
* \brief Set the swap interval for the current OpenGL context.
|
slouken@3407
|
1411 |
*
|
slouken@3407
|
1412 |
* \param interval 0 for immediate updates, 1 for updates synchronized with the
|
slouken@3407
|
1413 |
* vertical retrace.
|
slouken@3407
|
1414 |
*
|
slouken@3407
|
1415 |
* \return 0 on success, or -1 if setting the swap interval is not supported.
|
slouken@3407
|
1416 |
*
|
slouken@3407
|
1417 |
* \sa SDL_GL_GetSwapInterval()
|
slouken@0
|
1418 |
*/
|
slouken@1895
|
1419 |
extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
|
slouken@0
|
1420 |
|
slouken@1895
|
1421 |
/**
|
slouken@3407
|
1422 |
* \brief Get the swap interval for the current OpenGL context.
|
slouken@3407
|
1423 |
*
|
slouken@3407
|
1424 |
* \return 0 if there is no vertical retrace synchronization, 1 if the buffer
|
slouken@3407
|
1425 |
* swap is synchronized with the vertical retrace, and -1 if getting
|
slouken@3407
|
1426 |
* the swap interval is not supported.
|
slouken@3407
|
1427 |
*
|
slouken@3407
|
1428 |
* \sa SDL_GL_SetSwapInterval()
|
slouken@1895
|
1429 |
*/
|
slouken@1895
|
1430 |
extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
|
slouken@1895
|
1431 |
|
slouken@1895
|
1432 |
/**
|
slouken@4883
|
1433 |
* \brief Swap the OpenGL buffers for a window, if double-buffering is
|
slouken@3407
|
1434 |
* supported.
|
slouken@0
|
1435 |
*/
|
slouken@3685
|
1436 |
extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
|
slouken@0
|
1437 |
|
slouken@1895
|
1438 |
/**
|
slouken@3407
|
1439 |
* \brief Delete an OpenGL context.
|
slouken@3407
|
1440 |
*
|
slouken@3407
|
1441 |
* \sa SDL_GL_CreateContext()
|
slouken@0
|
1442 |
*/
|
slouken@1895
|
1443 |
extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
|
slouken@0
|
1444 |
|
slouken@3407
|
1445 |
/*@}*//*OpenGL support functions*/
|
slouken@3407
|
1446 |
|
slouken@0
|
1447 |
|
slouken@0
|
1448 |
/* Ends C function definitions when using C++ */
|
slouken@0
|
1449 |
#ifdef __cplusplus
|
slouken@1895
|
1450 |
/* *INDENT-OFF* */
|
slouken@0
|
1451 |
}
|
slouken@1895
|
1452 |
/* *INDENT-ON* */
|
slouken@0
|
1453 |
#endif
|
slouken@0
|
1454 |
#include "close_code.h"
|
slouken@0
|
1455 |
|
slouken@0
|
1456 |
#endif /* _SDL_video_h */
|
slouken@1895
|
1457 |
|
slouken@1895
|
1458 |
/* vi: set ts=4 sw=4 expandtab: */
|