My Project
Loading...
Searching...
No Matches
SDL_video.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2023 Sam Lantinga <slouken@libsdl.org>
4
5 This software is provided 'as-is', without any express or implied
6 warranty. In no event will the authors be held liable for any damages
7 arising from the use of this software.
8
9 Permission is granted to anyone to use this software for any purpose,
10 including commercial applications, and to alter it and redistribute it
11 freely, subject to the following restrictions:
12
13 1. The origin of this software must not be misrepresented; you must not
14 claim that you wrote the original software. If you use this software
15 in a product, an acknowledgment in the product documentation would be
16 appreciated but is not required.
17 2. Altered source versions must be plainly marked as such, and must not be
18 misrepresented as being the original software.
19 3. This notice may not be removed or altered from any source distribution.
20*/
21
28#ifndef SDL_video_h_
29#define SDL_video_h_
30
31#include "SDL_stdinc.h"
32#include "SDL_pixels.h"
33#include "SDL_rect.h"
34#include "SDL_surface.h"
35
36#include "begin_code.h"
37/* Set up for C function definitions, even when using C++ */
38#ifdef __cplusplus
39extern "C" {
40#endif
41
53typedef struct
54{
55 Uint32 format;
56 int w;
57 int h;
59 void *driverdata;
61
95typedef struct SDL_Window SDL_Window;
96
102typedef enum
103{
105 SDL_WINDOW_OPENGL = 0x00000002,
106 SDL_WINDOW_SHOWN = 0x00000004,
107 SDL_WINDOW_HIDDEN = 0x00000008,
109 SDL_WINDOW_RESIZABLE = 0x00000020,
110 SDL_WINDOW_MINIMIZED = 0x00000040,
111 SDL_WINDOW_MAXIMIZED = 0x00000080,
115 SDL_WINDOW_FULLSCREEN_DESKTOP = ( SDL_WINDOW_FULLSCREEN | 0x00001000 ),
116 SDL_WINDOW_FOREIGN = 0x00000800,
117 SDL_WINDOW_ALLOW_HIGHDPI = 0x00002000,
123 SDL_WINDOW_UTILITY = 0x00020000,
124 SDL_WINDOW_TOOLTIP = 0x00040000,
127 SDL_WINDOW_VULKAN = 0x10000000,
128 SDL_WINDOW_METAL = 0x20000000,
132
136#define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
137#define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
138#define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
139#define SDL_WINDOWPOS_ISUNDEFINED(X) \
140 (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
141
145#define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
146#define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
147#define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
148#define SDL_WINDOWPOS_ISCENTERED(X) \
149 (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
150
154typedef enum
155{
181
185typedef enum
186{
192
196typedef enum
197{
204
208typedef enum
209{
214
218typedef void *SDL_GLContext;
219
223typedef enum
224{
225 SDL_GL_RED_SIZE,
226 SDL_GL_GREEN_SIZE,
227 SDL_GL_BLUE_SIZE,
228 SDL_GL_ALPHA_SIZE,
229 SDL_GL_BUFFER_SIZE,
230 SDL_GL_DOUBLEBUFFER,
231 SDL_GL_DEPTH_SIZE,
232 SDL_GL_STENCIL_SIZE,
233 SDL_GL_ACCUM_RED_SIZE,
234 SDL_GL_ACCUM_GREEN_SIZE,
235 SDL_GL_ACCUM_BLUE_SIZE,
236 SDL_GL_ACCUM_ALPHA_SIZE,
237 SDL_GL_STEREO,
238 SDL_GL_MULTISAMPLEBUFFERS,
239 SDL_GL_MULTISAMPLESAMPLES,
240 SDL_GL_ACCELERATED_VISUAL,
241 SDL_GL_RETAINED_BACKING,
242 SDL_GL_CONTEXT_MAJOR_VERSION,
243 SDL_GL_CONTEXT_MINOR_VERSION,
244 SDL_GL_CONTEXT_EGL,
245 SDL_GL_CONTEXT_FLAGS,
246 SDL_GL_CONTEXT_PROFILE_MASK,
247 SDL_GL_SHARE_WITH_CURRENT_CONTEXT,
248 SDL_GL_FRAMEBUFFER_SRGB_CAPABLE,
249 SDL_GL_CONTEXT_RELEASE_BEHAVIOR,
250 SDL_GL_CONTEXT_RESET_NOTIFICATION,
251 SDL_GL_CONTEXT_NO_ERROR,
252 SDL_GL_FLOATBUFFERS
253} SDL_GLattr;
254
255typedef enum
256{
257 SDL_GL_CONTEXT_PROFILE_CORE = 0x0001,
258 SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = 0x0002,
261
262typedef enum
263{
264 SDL_GL_CONTEXT_DEBUG_FLAG = 0x0001,
265 SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 0x0002,
266 SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = 0x0004,
267 SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = 0x0008
268} SDL_GLcontextFlag;
269
270typedef enum
271{
272 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE = 0x0000,
273 SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH = 0x0001
274} SDL_GLcontextReleaseFlag;
275
276typedef enum
277{
278 SDL_GL_CONTEXT_RESET_NO_NOTIFICATION = 0x0000,
279 SDL_GL_CONTEXT_RESET_LOSE_CONTEXT = 0x0001
280} SDL_GLContextResetNotification;
281
282/* Function prototypes */
283
294extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
295
309extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
310
340extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
341
351extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
352
364extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
365
376extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
377
390extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
391
406extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
407
437extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
438
472extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
473
485extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
486
502extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
503
526extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
527 SDL_DisplayMode * mode);
528
549extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
550
572extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
573
574
598extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
599
612extern DECLSPEC int SDLCALL SDL_GetPointDisplayIndex(const SDL_Point * point);
613
627extern DECLSPEC int SDLCALL SDL_GetRectDisplayIndex(const SDL_Rect * rect);
628
642extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
643
663extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
664 const SDL_DisplayMode * mode);
665
680extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
681 SDL_DisplayMode * mode);
682
695extern DECLSPEC void* SDLCALL SDL_GetWindowICCProfile(SDL_Window * window, size_t* size);
696
707extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
708
780extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
781 int x, int y, int w,
782 int h, Uint32 flags);
783
801extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
802
817extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
818
833extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
834
851extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
852
865extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
866 const char *title);
867
879extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
880
889extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
890 SDL_Surface * icon);
891
906extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
907 const char *name,
908 void *userdata);
909
921extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
922 const char *name);
923
939extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
940 int x, int y);
941
958extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
959 int *x, int *y);
960
983extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
984 int h);
985
1010extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
1011 int *h);
1012
1045extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
1046 int *top, int *left,
1047 int *bottom, int *right);
1048
1067extern DECLSPEC void SDLCALL SDL_GetWindowSizeInPixels(SDL_Window * window,
1068 int *w, int *h);
1069
1082extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
1083 int min_w, int min_h);
1084
1099extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
1100 int *w, int *h);
1101
1114extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
1115 int max_w, int max_h);
1116
1131extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
1132 int *w, int *h);
1133
1150extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
1151 SDL_bool bordered);
1152
1169extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
1170 SDL_bool resizable);
1171
1186extern DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window * window,
1187 SDL_bool on_top);
1188
1199extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
1200
1210extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
1211
1219extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
1220
1231extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
1232
1243extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
1244
1255extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
1256
1274extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
1275 Uint32 flags);
1276
1300extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
1301
1319extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
1320
1341extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
1342 const SDL_Rect * rects,
1343 int numrects);
1344
1363extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
1364 SDL_bool grabbed);
1365
1394extern DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window * window,
1395 SDL_bool grabbed);
1396
1411extern DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window * window,
1412 SDL_bool grabbed);
1413
1424extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
1425
1437extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window * window);
1438
1450extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window * window);
1451
1462extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
1463
1481extern DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window * window, const SDL_Rect * rect);
1482
1494extern DECLSPEC const SDL_Rect * SDLCALL SDL_GetWindowMouseRect(SDL_Window * window);
1495
1522extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
1523
1541extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
1542
1560extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
1561
1581extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
1582
1593extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
1594
1610extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
1611
1642extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
1643 const Uint16 * red,
1644 const Uint16 * green,
1645 const Uint16 * blue);
1646
1670extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
1671 Uint16 * red,
1672 Uint16 * green,
1673 Uint16 * blue);
1674
1680typedef enum
1681{
1684 SDL_HITTEST_RESIZE_TOPLEFT,
1685 SDL_HITTEST_RESIZE_TOP,
1686 SDL_HITTEST_RESIZE_TOPRIGHT,
1687 SDL_HITTEST_RESIZE_RIGHT,
1688 SDL_HITTEST_RESIZE_BOTTOMRIGHT,
1689 SDL_HITTEST_RESIZE_BOTTOM,
1690 SDL_HITTEST_RESIZE_BOTTOMLEFT,
1691 SDL_HITTEST_RESIZE_LEFT
1693
1705 const SDL_Point *area,
1706 void *data);
1707
1748extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
1749 SDL_HitTest callback,
1750 void *callback_data);
1751
1762extern DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window * window, SDL_FlashOperation operation);
1763
1777extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1778
1779
1796extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
1797
1806extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
1807
1822extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
1823
1824
1828/* @{ */
1829
1850extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
1851
1903extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
1904
1912extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
1913
1933extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
1934 *extension);
1935
1944extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
1945
1964extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
1965
1979extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1980
2002 window);
2003
2018extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
2019 SDL_GLContext context);
2020
2029extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
2030
2041extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
2042
2063extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
2064 int *h);
2065
2093extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
2094
2110extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
2111
2126extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
2127
2137extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
2138
2139/* @} *//* OpenGL support functions */
2140
2141
2142/* Ends C function definitions when using C++ */
2143#ifdef __cplusplus
2144}
2145#endif
2146#include "close_code.h"
2147
2148#endif /* SDL_video_h_ */
2149
2150/* vi: set ts=4 sw=4 expandtab: */
DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
SDL_HitTestResult
Definition: SDL_video.h:1681
@ SDL_HITTEST_DRAGGABLE
Definition: SDL_video.h:1683
@ SDL_HITTEST_NORMAL
Definition: SDL_video.h:1682
DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name)
DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void)
DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode *mode)
DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)
DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window *window)
void * SDL_GLContext
An opaque handle to an OpenGL context.
Definition: SDL_video.h:218
DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *window)
DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window *window)
DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode)
DECLSPEC void SDLCALL SDL_SetWindowMouseGrab(SDL_Window *window, SDL_bool grabbed)
DECLSPEC void SDLCALL SDL_EnableScreenSaver(void)
DECLSPEC void *SDLCALL SDL_GetWindowICCProfile(SDL_Window *window, size_t *size)
DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)
DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right)
DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window *window)
DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char *extension)
DECLSPEC int SDLCALL SDL_FlashWindow(SDL_Window *window, SDL_FlashOperation operation)
DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window *window)
DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data)
SDL_HitTestResult(SDLCALL * SDL_HitTest)(SDL_Window *win, const SDL_Point *area, void *data)
Definition: SDL_video.h:1704
DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h)
DECLSPEC SDL_bool SDLCALL SDL_GetWindowMouseGrab(SDL_Window *window)
DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode)
SDL_GLattr
OpenGL configuration attributes.
Definition: SDL_video.h:224
SDL_FlashOperation
Window flash operation.
Definition: SDL_video.h:209
@ SDL_FLASH_UNTIL_FOCUSED
Definition: SDL_video.h:212
@ SDL_FLASH_BRIEFLY
Definition: SDL_video.h:211
@ SDL_FLASH_CANCEL
Definition: SDL_video.h:210
DECLSPEC void SDLCALL SDL_GetWindowSizeInPixels(SDL_Window *window, int *w, int *h)
DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h)
DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path)
DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window)
DECLSPEC const char *SDLCALL SDL_GetDisplayName(int displayIndex)
DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title)
DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable)
DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window *window)
DECLSPEC void SDLCALL SDL_SetWindowKeyboardGrab(SDL_Window *window, SDL_bool grabbed)
DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void)
DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window *window)
DECLSPEC void *SDLCALL SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
DECLSPEC SDL_Surface *SDLCALL SDL_GetWindowSurface(SDL_Window *window)
struct SDL_Window SDL_Window
The type used to identify a window.
Definition: SDL_video.h:95
DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context)
DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex)
DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h)
DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window *window)
DECLSPEC SDL_Window *SDLCALL SDL_GetWindowFromID(Uint32 id)
DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window *window)
DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc)
DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex)
DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window *window, const Uint16 *red, const Uint16 *green, const Uint16 *blue)
DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval)
DECLSPEC void SDLCALL SDL_DisableScreenSaver(void)
DECLSPEC SDL_Window *SDLCALL SDL_GetGrabbedWindow(void)
DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window *window)
DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void)
DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window *window)
DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
DECLSPEC SDL_Window *SDLCALL SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window *window, float brightness)
DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window *window)
DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void)
DECLSPEC int SDLCALL SDL_GetPointDisplayIndex(const SDL_Point *point)
DECLSPEC SDL_Window *SDLCALL SDL_GL_GetCurrentWindow(void)
DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect)
DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity)
DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window *window)
DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window *window)
DECLSPEC int SDLCALL SDL_SetWindowMouseRect(SDL_Window *window, const SDL_Rect *rect)
DECLSPEC SDL_Window *SDLCALL SDL_CreateWindowFrom(const void *data)
DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context)
DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window *window)
DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
SDL_WindowFlags
The flags on a window.
Definition: SDL_video.h:103
@ SDL_WINDOW_ALLOW_HIGHDPI
Definition: SDL_video.h:117
@ SDL_WINDOW_FOREIGN
Definition: SDL_video.h:116
@ SDL_WINDOW_TOOLTIP
Definition: SDL_video.h:124
@ SDL_WINDOW_ALWAYS_ON_TOP
Definition: SDL_video.h:121
@ SDL_WINDOW_SHOWN
Definition: SDL_video.h:106
@ SDL_WINDOW_SKIP_TASKBAR
Definition: SDL_video.h:122
@ SDL_WINDOW_MOUSE_CAPTURE
Definition: SDL_video.h:120
@ SDL_WINDOW_VULKAN
Definition: SDL_video.h:127
@ SDL_WINDOW_OPENGL
Definition: SDL_video.h:105
@ SDL_WINDOW_MINIMIZED
Definition: SDL_video.h:110
@ SDL_WINDOW_UTILITY
Definition: SDL_video.h:123
@ SDL_WINDOW_MOUSE_FOCUS
Definition: SDL_video.h:114
@ SDL_WINDOW_INPUT_GRABBED
Definition: SDL_video.h:130
@ SDL_WINDOW_RESIZABLE
Definition: SDL_video.h:109
@ SDL_WINDOW_KEYBOARD_GRABBED
Definition: SDL_video.h:126
@ SDL_WINDOW_FULLSCREEN
Definition: SDL_video.h:104
@ SDL_WINDOW_MAXIMIZED
Definition: SDL_video.h:111
@ SDL_WINDOW_METAL
Definition: SDL_video.h:128
@ SDL_WINDOW_HIDDEN
Definition: SDL_video.h:107
@ SDL_WINDOW_MOUSE_GRABBED
Definition: SDL_video.h:112
@ SDL_WINDOW_POPUP_MENU
Definition: SDL_video.h:125
@ SDL_WINDOW_BORDERLESS
Definition: SDL_video.h:108
@ SDL_WINDOW_INPUT_FOCUS
Definition: SDL_video.h:113
DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y)
DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags)
DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode)
DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed)
DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect)
DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float opacity)
DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window *window, int *w, int *h)
SDL_WindowEventID
Event subtype for window events.
Definition: SDL_video.h:155
@ SDL_WINDOWEVENT_HIDDEN
Definition: SDL_video.h:158
@ SDL_WINDOWEVENT_FOCUS_LOST
Definition: SDL_video.h:174
@ SDL_WINDOWEVENT_CLOSE
Definition: SDL_video.h:175
@ SDL_WINDOWEVENT_RESIZED
Definition: SDL_video.h:163
@ SDL_WINDOWEVENT_HIT_TEST
Definition: SDL_video.h:177
@ SDL_WINDOWEVENT_FOCUS_GAINED
Definition: SDL_video.h:173
@ SDL_WINDOWEVENT_SHOWN
Definition: SDL_video.h:157
@ SDL_WINDOWEVENT_MOVED
Definition: SDL_video.h:161
@ SDL_WINDOWEVENT_TAKE_FOCUS
Definition: SDL_video.h:176
@ SDL_WINDOWEVENT_MINIMIZED
Definition: SDL_video.h:167
@ SDL_WINDOWEVENT_DISPLAY_CHANGED
Definition: SDL_video.h:179
@ SDL_WINDOWEVENT_LEAVE
Definition: SDL_video.h:172
@ SDL_WINDOWEVENT_MAXIMIZED
Definition: SDL_video.h:168
@ SDL_WINDOWEVENT_SIZE_CHANGED
Definition: SDL_video.h:164
@ SDL_WINDOWEVENT_RESTORED
Definition: SDL_video.h:169
@ SDL_WINDOWEVENT_ICCPROF_CHANGED
Definition: SDL_video.h:178
@ SDL_WINDOWEVENT_EXPOSED
Definition: SDL_video.h:159
@ SDL_WINDOWEVENT_ENTER
Definition: SDL_video.h:171
@ SDL_WINDOWEVENT_NONE
Definition: SDL_video.h:156
DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void)
DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void)
DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window *window)
SDL_GLprofile
Definition: SDL_video.h:256
@ SDL_GL_CONTEXT_PROFILE_ES
Definition: SDL_video.h:259
SDL_DisplayEventID
Event subtype for display events.
Definition: SDL_video.h:186
@ SDL_DISPLAYEVENT_NONE
Definition: SDL_video.h:187
@ SDL_DISPLAYEVENT_ORIENTATION
Definition: SDL_video.h:188
@ SDL_DISPLAYEVENT_DISCONNECTED
Definition: SDL_video.h:190
@ SDL_DISPLAYEVENT_CONNECTED
Definition: SDL_video.h:189
DECLSPEC void SDLCALL SDL_VideoQuit(void)
DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window *window, const char *name)
DECLSPEC const SDL_Rect *SDLCALL SDL_GetWindowMouseRect(SDL_Window *window)
DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects)
DECLSPEC void SDLCALL SDL_SetWindowAlwaysOnTop(SDL_Window *window, SDL_bool on_top)
DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index)
DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void)
DECLSPEC int SDLCALL SDL_GetRectDisplayIndex(const SDL_Rect *rect)
DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void)
DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value)
SDL_DisplayOrientation
Display orientation.
Definition: SDL_video.h:197
@ SDL_ORIENTATION_LANDSCAPE
Definition: SDL_video.h:199
@ SDL_ORIENTATION_PORTRAIT
Definition: SDL_video.h:201
@ SDL_ORIENTATION_PORTRAIT_FLIPPED
Definition: SDL_video.h:202
@ SDL_ORIENTATION_LANDSCAPE_FLIPPED
Definition: SDL_video.h:200
@ SDL_ORIENTATION_UNKNOWN
Definition: SDL_video.h:198
DECLSPEC SDL_bool SDLCALL SDL_GetWindowKeyboardGrab(SDL_Window *window)
DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window *window, Uint16 *red, Uint16 *green, Uint16 *blue)
DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered)
DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window)
DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h)
DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window *window)
The structure that defines a display mode.
Definition: SDL_video.h:54
int h
Definition: SDL_video.h:57
int refresh_rate
Definition: SDL_video.h:58
Uint32 format
Definition: SDL_video.h:55
void * driverdata
Definition: SDL_video.h:59
int w
Definition: SDL_video.h:56
Definition: SDL_rect.h:49
Definition: SDL_rect.h:79
A collection of pixels used in software blitting.
Definition: SDL_surface.h:73