World of Might and Magic  0.2.0
Open reimplementation of Might and Magic 6 7 8 game engine
SDL_video.h
См. документацию.
1 /*
2  Simple DirectMedia Layer
3  Copyright (C) 1997-2020 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
39 extern "C" {
40 #endif
41 
53 typedef struct
54 {
56  int w;
57  int h;
59  void *driverdata;
61 
90 typedef struct SDL_Window SDL_Window;
91 
97 typedef enum
98 {
99  SDL_WINDOW_FULLSCREEN = 0x00000001,
100  SDL_WINDOW_OPENGL = 0x00000002,
101  SDL_WINDOW_SHOWN = 0x00000004,
102  SDL_WINDOW_HIDDEN = 0x00000008,
103  SDL_WINDOW_BORDERLESS = 0x00000010,
104  SDL_WINDOW_RESIZABLE = 0x00000020,
105  SDL_WINDOW_MINIMIZED = 0x00000040,
106  SDL_WINDOW_MAXIMIZED = 0x00000080,
108  SDL_WINDOW_INPUT_FOCUS = 0x00000200,
109  SDL_WINDOW_MOUSE_FOCUS = 0x00000400,
111  SDL_WINDOW_FOREIGN = 0x00000800,
117  SDL_WINDOW_SKIP_TASKBAR = 0x00010000,
118  SDL_WINDOW_UTILITY = 0x00020000,
119  SDL_WINDOW_TOOLTIP = 0x00040000,
120  SDL_WINDOW_POPUP_MENU = 0x00080000,
121  SDL_WINDOW_VULKAN = 0x10000000
123 
127 #define SDL_WINDOWPOS_UNDEFINED_MASK 0x1FFF0000u
128 #define SDL_WINDOWPOS_UNDEFINED_DISPLAY(X) (SDL_WINDOWPOS_UNDEFINED_MASK|(X))
129 #define SDL_WINDOWPOS_UNDEFINED SDL_WINDOWPOS_UNDEFINED_DISPLAY(0)
130 #define SDL_WINDOWPOS_ISUNDEFINED(X) \
131  (((X)&0xFFFF0000) == SDL_WINDOWPOS_UNDEFINED_MASK)
132 
136 #define SDL_WINDOWPOS_CENTERED_MASK 0x2FFF0000u
137 #define SDL_WINDOWPOS_CENTERED_DISPLAY(X) (SDL_WINDOWPOS_CENTERED_MASK|(X))
138 #define SDL_WINDOWPOS_CENTERED SDL_WINDOWPOS_CENTERED_DISPLAY(0)
139 #define SDL_WINDOWPOS_ISCENTERED(X) \
140  (((X)&0xFFFF0000) == SDL_WINDOWPOS_CENTERED_MASK)
141 
145 typedef enum
146 {
170 
174 typedef enum
175 {
179 
180 typedef enum
181 {
188 
192 typedef void *SDL_GLContext;
193 
197 typedef enum
198 {
226 } SDL_GLattr;
227 
228 typedef enum
229 {
233 } SDL_GLprofile;
234 
235 typedef enum
236 {
242 
243 typedef enum
244 {
248 
249 typedef enum
250 {
254 
255 /* Function prototypes */
256 
262 extern DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void);
263 
272 extern DECLSPEC const char *SDLCALL SDL_GetVideoDriver(int index);
273 
288 extern DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name);
289 
297 extern DECLSPEC void SDLCALL SDL_VideoQuit(void);
298 
308 extern DECLSPEC const char *SDLCALL SDL_GetCurrentVideoDriver(void);
309 
315 extern DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void);
316 
324 extern DECLSPEC const char * SDLCALL SDL_GetDisplayName(int displayIndex);
325 
334 extern DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect * rect);
335 
353 extern DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect * rect);
354 
365 extern DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float * ddpi, float * hdpi, float * vdpi);
366 
374 extern DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex);
375 
381 extern DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex);
382 
394 extern DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex,
396 
400 extern DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode * mode);
401 
405 extern DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode * mode);
406 
407 
429 extern DECLSPEC SDL_DisplayMode * SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode * mode, SDL_DisplayMode * closest);
430 
437 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window * window);
438 
453 extern DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window * window,
454  const SDL_DisplayMode
455  * mode);
456 
464 extern DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window * window,
466 
470 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window * window);
471 
514 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindow(const char *title,
515  int x, int y, int w,
516  int h, Uint32 flags);
517 
527 extern DECLSPEC SDL_Window * SDLCALL SDL_CreateWindowFrom(const void *data);
528 
532 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window * window);
533 
537 extern DECLSPEC SDL_Window * SDLCALL SDL_GetWindowFromID(Uint32 id);
538 
542 extern DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window * window);
543 
549 extern DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window * window,
550  const char *title);
551 
557 extern DECLSPEC const char *SDLCALL SDL_GetWindowTitle(SDL_Window * window);
558 
565 extern DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window * window,
566  SDL_Surface * icon);
567 
581 extern DECLSPEC void* SDLCALL SDL_SetWindowData(SDL_Window * window,
582  const char *name,
583  void *userdata);
584 
595 extern DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window * window,
596  const char *name);
597 
611 extern DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window * window,
612  int x, int y);
613 
625 extern DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window * window,
626  int *x, int *y);
627 
646 extern DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window * window, int w,
647  int h);
648 
665 extern DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window * window, int *w,
666  int *h);
667 
683 extern DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window * window,
684  int *top, int *left,
685  int *bottom, int *right);
686 
700 extern DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window * window,
701  int min_w, int min_h);
702 
713 extern DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window * window,
714  int *w, int *h);
715 
729 extern DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window * window,
730  int max_w, int max_h);
731 
742 extern DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window * window,
743  int *w, int *h);
744 
759 extern DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window * window,
760  SDL_bool bordered);
761 
776 extern DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window * window,
777  SDL_bool resizable);
778 
784 extern DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window * window);
785 
791 extern DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window * window);
792 
796 extern DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window * window);
797 
803 extern DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window * window);
804 
810 extern DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window * window);
811 
818 extern DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window * window);
819 
828 extern DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window * window,
829  Uint32 flags);
830 
844 extern DECLSPEC SDL_Surface * SDLCALL SDL_GetWindowSurface(SDL_Window * window);
845 
854 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window * window);
855 
864 extern DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window * window,
865  const SDL_Rect * rects,
866  int numrects);
867 
879 extern DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window * window,
880  SDL_bool grabbed);
881 
889 extern DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window * window);
890 
898 extern DECLSPEC SDL_Window * SDLCALL SDL_GetGrabbedWindow(void);
899 
908 extern DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window * window, float brightness);
909 
917 extern DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window * window);
918 
930 extern DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window * window, float opacity);
931 
945 extern DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window * window, float * out_opacity);
946 
955 extern DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window * modal_window, SDL_Window * parent_window);
956 
969 extern DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window * window);
970 
989 extern DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window * window,
990  const Uint16 * red,
991  const Uint16 * green,
992  const Uint16 * blue);
993 
1009 extern DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window * window,
1010  Uint16 * red,
1011  Uint16 * green,
1012  Uint16 * blue);
1013 
1019 typedef enum
1020 {
1032 
1038 typedef SDL_HitTestResult (SDLCALL *SDL_HitTest)(SDL_Window *win,
1039  const SDL_Point *area,
1040  void *data);
1041 
1079 extern DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window * window,
1080  SDL_HitTest callback,
1081  void *callback_data);
1082 
1086 extern DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window * window);
1087 
1088 
1095 extern DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void);
1096 
1103 extern DECLSPEC void SDLCALL SDL_EnableScreenSaver(void);
1104 
1111 extern DECLSPEC void SDLCALL SDL_DisableScreenSaver(void);
1112 
1113 
1117 /* @{ */
1118 
1137 extern DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path);
1138 
1142 extern DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc);
1143 
1149 extern DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void);
1150 
1155 extern DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char
1156  *extension);
1157 
1161 extern DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void);
1162 
1168 extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
1169 
1176 extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
1177 
1184 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *
1185  window);
1186 
1192 extern DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window * window,
1193  SDL_GLContext context);
1194 
1198 extern DECLSPEC SDL_Window* SDLCALL SDL_GL_GetCurrentWindow(void);
1199 
1203 extern DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void);
1204 
1221 extern DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window * window, int *w,
1222  int *h);
1223 
1236 extern DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval);
1237 
1249 extern DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void);
1250 
1255 extern DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window * window);
1256 
1262 extern DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context);
1263 
1264 /* @} *//* OpenGL support functions */
1265 
1266 
1267 /* Ends C function definitions when using C++ */
1268 #ifdef __cplusplus
1269 }
1270 #endif
1271 #include "close_code.h"
1272 
1273 #endif /* SDL_video_h_ */
1274 
1275 /* vi: set ts=4 sw=4 expandtab: */
SDL_HITTEST_DRAGGABLE
@ SDL_HITTEST_DRAGGABLE
Definition: SDL_video.h:1022
SDL_GL_STENCIL_SIZE
@ SDL_GL_STENCIL_SIZE
Definition: SDL_video.h:206
SDL_WINDOW_MOUSE_CAPTURE
@ SDL_WINDOW_MOUSE_CAPTURE
Definition: SDL_video.h:115
SDL_GL_ACCUM_RED_SIZE
@ SDL_GL_ACCUM_RED_SIZE
Definition: SDL_video.h:207
SDL_GL_GetCurrentContext
DECLSPEC SDL_GLContext SDLCALL SDL_GL_GetCurrentContext(void)
Get the currently active OpenGL context.
SDL_WindowFlags
SDL_WindowFlags
The flags on a window.
Definition: SDL_video.h:97
Uint16
uint16_t Uint16
Definition: SDL_stdinc.h:191
SDL_UpdateWindowSurfaceRects
DECLSPEC int SDLCALL SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects)
Copy a number of rectangles on the window surface to the screen.
SDL_GetWindowMinimumSize
DECLSPEC void SDLCALL SDL_GetWindowMinimumSize(SDL_Window *window, int *w, int *h)
Get the minimum size of a window's client area.
SDL_GetWindowTitle
const DECLSPEC char *SDLCALL SDL_GetWindowTitle(SDL_Window *window)
Get the title of a window, in UTF-8 format.
SDL_GetGrabbedWindow
DECLSPEC SDL_Window *SDLCALL SDL_GetGrabbedWindow(void)
Get the window that currently has an input grab enabled.
SDL_DisplayMode::format
Uint32 format
Definition: SDL_video.h:55
SDL_WINDOW_ALLOW_HIGHDPI
@ SDL_WINDOW_ALLOW_HIGHDPI
Definition: SDL_video.h:112
SDL_GL_DEPTH_SIZE
@ SDL_GL_DEPTH_SIZE
Definition: SDL_video.h:205
SDL_GL_GetSwapInterval
DECLSPEC int SDLCALL SDL_GL_GetSwapInterval(void)
Get the swap interval for the current OpenGL context.
SDL_GetWindowBrightness
DECLSPEC float SDLCALL SDL_GetWindowBrightness(SDL_Window *window)
Get the brightness (gamma correction) for a window.
SDL_GL_CONTEXT_PROFILE_MASK
@ SDL_GL_CONTEXT_PROFILE_MASK
Definition: SDL_video.h:220
SDL_SetWindowMaximumSize
DECLSPEC void SDLCALL SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
Set the maximum size of a window's client area.
SDL_Surface
A collection of pixels used in software blitting.
Definition: SDL_surface.h:70
SDL_pixels.h
SDL_DISPLAYEVENT_ORIENTATION
@ SDL_DISPLAYEVENT_ORIENTATION
Definition: SDL_video.h:177
SDL_WINDOW_ALWAYS_ON_TOP
@ SDL_WINDOW_ALWAYS_ON_TOP
Definition: SDL_video.h:116
SDL_WINDOW_MINIMIZED
@ SDL_WINDOW_MINIMIZED
Definition: SDL_video.h:105
right
GLdouble GLdouble right
Definition: SDL_opengl_glext.h:6106
SDL_rect.h
SDL_GL_ALPHA_SIZE
@ SDL_GL_ALPHA_SIZE
Definition: SDL_video.h:202
mode
EGLSyncKHR EGLenum mode
Definition: SDL_egl.h:1056
SDL_GL_BUFFER_SIZE
@ SDL_GL_BUFFER_SIZE
Definition: SDL_video.h:203
SDL_VideoQuit
DECLSPEC void SDLCALL SDL_VideoQuit(void)
Shuts down the video subsystem.
SDL_WINDOWEVENT_FOCUS_LOST
@ SDL_WINDOWEVENT_FOCUS_LOST
Definition: SDL_video.h:165
SDL_GL_GetAttribute
DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
Get the actual value for an attribute from the current context.
SDL_GL_GetProcAddress
DECLSPEC void *SDLCALL SDL_GL_GetProcAddress(const char *proc)
Get the address of an OpenGL function.
SDL_WINDOWEVENT_CLOSE
@ SDL_WINDOWEVENT_CLOSE
Definition: SDL_video.h:166
SDL_GetDisplayOrientation
DECLSPEC SDL_DisplayOrientation SDLCALL SDL_GetDisplayOrientation(int displayIndex)
Get the orientation of a display.
SDL_SetWindowDisplayMode
DECLSPEC int SDLCALL SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode)
Set the display mode used when a fullscreen window is visible.
SDL_GLcontextFlag
SDL_GLcontextFlag
Definition: SDL_video.h:235
SDL_surface.h
SDL_WINDOWEVENT_ENTER
@ SDL_WINDOWEVENT_ENTER
Definition: SDL_video.h:162
SDL_GLContext
void * SDL_GLContext
An opaque handle to an OpenGL context.
Definition: SDL_video.h:192
SDL_GetWindowSize
DECLSPEC void SDLCALL SDL_GetWindowSize(SDL_Window *window, int *w, int *h)
Get the size of a window's client area.
SDL_GL_CreateContext
DECLSPEC SDL_GLContext SDLCALL SDL_GL_CreateContext(SDL_Window *window)
Create an OpenGL context for use with an OpenGL window, and make it current.
SDL_WINDOW_FULLSCREEN
@ SDL_WINDOW_FULLSCREEN
Definition: SDL_video.h:99
SDL_GL_BLUE_SIZE
@ SDL_GL_BLUE_SIZE
Definition: SDL_video.h:201
SDL_WINDOW_OPENGL
@ SDL_WINDOW_OPENGL
Definition: SDL_video.h:100
SDL_GetCurrentVideoDriver
const DECLSPEC char *SDLCALL SDL_GetCurrentVideoDriver(void)
Returns the name of the currently initialized video driver.
SDL_WINDOWEVENT_RESIZED
@ SDL_WINDOWEVENT_RESIZED
Definition: SDL_video.h:154
SDL_SetWindowSize
DECLSPEC void SDLCALL SDL_SetWindowSize(SDL_Window *window, int w, int h)
Set the size of a window's client area.
SDL_GL_CONTEXT_PROFILE_CORE
@ SDL_GL_CONTEXT_PROFILE_CORE
Definition: SDL_video.h:230
SDL_GetWindowGrab
DECLSPEC SDL_bool SDLCALL SDL_GetWindowGrab(SDL_Window *window)
Get a window's input grab mode.
SDL_WINDOW_FULLSCREEN_DESKTOP
@ SDL_WINDOW_FULLSCREEN_DESKTOP
Definition: SDL_video.h:110
SDL_SetWindowModalFor
DECLSPEC int SDLCALL SDL_SetWindowModalFor(SDL_Window *modal_window, SDL_Window *parent_window)
Sets the window as a modal for another window (TODO: reconsider this function and/or its name)
SDL_VideoInit
DECLSPEC int SDLCALL SDL_VideoInit(const char *driver_name)
Initialize the video subsystem, optionally specifying a video driver.
SDL_WINDOW_FOREIGN
@ SDL_WINDOW_FOREIGN
Definition: SDL_video.h:111
SDL_GL_GetCurrentWindow
DECLSPEC SDL_Window *SDLCALL SDL_GL_GetCurrentWindow(void)
Get the currently active OpenGL window.
w
GLubyte GLubyte GLubyte GLubyte w
Definition: SDL_opengl_glext.h:734
SDL_GL_CONTEXT_RELEASE_BEHAVIOR
@ SDL_GL_CONTEXT_RELEASE_BEHAVIOR
Definition: SDL_video.h:223
SDL_GLattr
SDL_GLattr
OpenGL configuration attributes.
Definition: SDL_video.h:197
SDL_GL_MULTISAMPLESAMPLES
@ SDL_GL_MULTISAMPLESAMPLES
Definition: SDL_video.h:213
SDL_HITTEST_RESIZE_TOPLEFT
@ SDL_HITTEST_RESIZE_TOPLEFT
Definition: SDL_video.h:1023
SDL_GetWindowDisplayMode
DECLSPEC int SDLCALL SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
Fill in information about the display mode used when a fullscreen window is visible.
SDL_GetNumDisplayModes
DECLSPEC int SDLCALL SDL_GetNumDisplayModes(int displayIndex)
Returns the number of available display modes.
path
GLsizei const GLchar *const * path
Definition: SDL_opengl_glext.h:3733
SDL_WINDOW_MAXIMIZED
@ SDL_WINDOW_MAXIMIZED
Definition: SDL_video.h:106
SDL_GL_CONTEXT_RESET_NO_NOTIFICATION
@ SDL_GL_CONTEXT_RESET_NO_NOTIFICATION
Definition: SDL_video.h:251
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
@ SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
Definition: SDL_video.h:246
SDL_WINDOWEVENT_MOVED
@ SDL_WINDOWEVENT_MOVED
Definition: SDL_video.h:152
index
GLuint index
Definition: SDL_opengl_glext.h:663
SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
@ SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
Definition: SDL_video.h:240
SDL_GetWindowGammaRamp
DECLSPEC int SDLCALL SDL_GetWindowGammaRamp(SDL_Window *window, Uint16 *red, Uint16 *green, Uint16 *blue)
Get the gamma ramp for a window.
h
GLfloat GLfloat GLfloat GLfloat h
Definition: SDL_opengl_glext.h:1949
SDL_WINDOW_INPUT_FOCUS
@ SDL_WINDOW_INPUT_FOCUS
Definition: SDL_video.h:108
SDL_WINDOW_RESIZABLE
@ SDL_WINDOW_RESIZABLE
Definition: SDL_video.h:104
SDL_DisplayMode::h
int h
Definition: SDL_video.h:57
SDL_SetWindowIcon
DECLSPEC void SDLCALL SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)
Set the icon for a window.
close_code.h
SDL_GetWindowSurface
DECLSPEC SDL_Surface *SDLCALL SDL_GetWindowSurface(SDL_Window *window)
Get the SDL surface associated with the window.
SDL_DisplayMode
The structure that defines a display mode.
Definition: SDL_video.h:53
SDL_GetDisplayUsableBounds
DECLSPEC int SDLCALL SDL_GetDisplayUsableBounds(int displayIndex, SDL_Rect *rect)
Get the usable desktop area represented by a display, with the primary display located at 0,...
SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE
@ SDL_GL_CONTEXT_RELEASE_BEHAVIOR_NONE
Definition: SDL_video.h:245
SDL_SetWindowBrightness
DECLSPEC int SDLCALL SDL_SetWindowBrightness(SDL_Window *window, float brightness)
Set the brightness (gamma correction) for a window.
begin_code.h
SDL_GetCurrentDisplayMode
DECLSPEC int SDLCALL SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode)
Fill in information about the current display mode.
SDL_MinimizeWindow
DECLSPEC void SDLCALL SDL_MinimizeWindow(SDL_Window *window)
Minimize a window to an iconic representation.
SDL_WINDOWEVENT_SHOWN
@ SDL_WINDOWEVENT_SHOWN
Definition: SDL_video.h:148
SDL_GL_ACCELERATED_VISUAL
@ SDL_GL_ACCELERATED_VISUAL
Definition: SDL_video.h:214
y
EGLSurface EGLint EGLint y
Definition: SDL_egl.h:1596
SDL_GL_RED_SIZE
@ SDL_GL_RED_SIZE
Definition: SDL_video.h:199
SDL_GL_CONTEXT_RESET_NOTIFICATION
@ SDL_GL_CONTEXT_RESET_NOTIFICATION
Definition: SDL_video.h:224
bottom
GLint GLint bottom
Definition: SDL_opengl_glext.h:1952
SDL_GL_SetSwapInterval
DECLSPEC int SDLCALL SDL_GL_SetSwapInterval(int interval)
Set the swap interval for the current OpenGL context.
SDL_GL_CONTEXT_DEBUG_FLAG
@ SDL_GL_CONTEXT_DEBUG_FLAG
Definition: SDL_video.h:237
SDL_HITTEST_RESIZE_BOTTOMRIGHT
@ SDL_HITTEST_RESIZE_BOTTOMRIGHT
Definition: SDL_video.h:1027
SDL_WINDOW_POPUP_MENU
@ SDL_WINDOW_POPUP_MENU
Definition: SDL_video.h:120
SDL_HideWindow
DECLSPEC void SDLCALL SDL_HideWindow(SDL_Window *window)
Hide a window.
SDL_GetDisplayDPI
DECLSPEC int SDLCALL SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
Get the dots/pixels-per-inch for a display.
SDL_SetWindowGrab
DECLSPEC void SDLCALL SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed)
Set a window's input grab mode.
SDL_HITTEST_RESIZE_TOPRIGHT
@ SDL_HITTEST_RESIZE_TOPRIGHT
Definition: SDL_video.h:1025
SDL_GetWindowBordersSize
DECLSPEC int SDLCALL SDL_GetWindowBordersSize(SDL_Window *window, int *top, int *left, int *bottom, int *right)
Get the size of a window's borders (decorations) around the client area.
SDL_HitTestResult
SDL_HitTestResult
Possible return values from the SDL_HitTest callback.
Definition: SDL_video.h:1019
SDL_ShowWindow
DECLSPEC void SDLCALL SDL_ShowWindow(SDL_Window *window)
Show a window.
x
EGLSurface EGLint x
Definition: SDL_egl.h:1596
SDL_GL_CONTEXT_EGL
@ SDL_GL_CONTEXT_EGL
Definition: SDL_video.h:218
SDL_GetDesktopDisplayMode
DECLSPEC int SDLCALL SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode)
Fill in information about the desktop display mode.
SDL_GL_UnloadLibrary
DECLSPEC void SDLCALL SDL_GL_UnloadLibrary(void)
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
SDL_GL_MakeCurrent
DECLSPEC int SDLCALL SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext context)
Set up an OpenGL context for rendering into an OpenGL window.
SDL_ORIENTATION_LANDSCAPE
@ SDL_ORIENTATION_LANDSCAPE
Definition: SDL_video.h:183
SDL_GL_SetAttribute
DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value)
Set an OpenGL window attribute before window creation.
SDL_GetWindowPixelFormat
DECLSPEC Uint32 SDLCALL SDL_GetWindowPixelFormat(SDL_Window *window)
Get the pixel format associated with the window.
SDL_GetClosestDisplayMode
DECLSPEC SDL_DisplayMode *SDLCALL SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
Get the closest match to the requested display mode.
SDL_RestoreWindow
DECLSPEC void SDLCALL SDL_RestoreWindow(SDL_Window *window)
Restore the size and position of a minimized or maximized window.
SDL_GL_STEREO
@ SDL_GL_STEREO
Definition: SDL_video.h:211
SDL_DisplayOrientation
SDL_DisplayOrientation
Definition: SDL_video.h:180
SDL_GetWindowFromID
DECLSPEC SDL_Window *SDLCALL SDL_GetWindowFromID(Uint32 id)
Get a window from a stored ID, or NULL if it doesn't exist.
SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
@ SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
Definition: SDL_video.h:239
SDL_GL_DeleteContext
DECLSPEC void SDLCALL SDL_GL_DeleteContext(SDL_GLContext context)
Delete an OpenGL context.
SDL_HITTEST_RESIZE_BOTTOM
@ SDL_HITTEST_RESIZE_BOTTOM
Definition: SDL_video.h:1028
SDL_GL_CONTEXT_MAJOR_VERSION
@ SDL_GL_CONTEXT_MAJOR_VERSION
Definition: SDL_video.h:216
SDL_WindowEventID
SDL_WindowEventID
Event subtype for window events.
Definition: SDL_video.h:145
SDL_DisplayMode::refresh_rate
int refresh_rate
Definition: SDL_video.h:58
SDL_GLprofile
SDL_GLprofile
Definition: SDL_video.h:228
SDL_IsScreenSaverEnabled
DECLSPEC SDL_bool SDLCALL SDL_IsScreenSaverEnabled(void)
Returns whether the screensaver is currently enabled (default off).
SDL_GLContextResetNotification
SDL_GLContextResetNotification
Definition: SDL_video.h:249
SDL_HITTEST_RESIZE_LEFT
@ SDL_HITTEST_RESIZE_LEFT
Definition: SDL_video.h:1030
SDL_CreateWindowFrom
DECLSPEC SDL_Window *SDLCALL SDL_CreateWindowFrom(const void *data)
Create an SDL window from an existing native window.
SDL_WINDOWEVENT_EXPOSED
@ SDL_WINDOWEVENT_EXPOSED
Definition: SDL_video.h:150
SDL_GL_CONTEXT_PROFILE_ES
@ SDL_GL_CONTEXT_PROFILE_ES
Definition: SDL_video.h:232
SDL_WINDOW_TOOLTIP
@ SDL_WINDOW_TOOLTIP
Definition: SDL_video.h:119
SDL_GetDisplayBounds
DECLSPEC int SDLCALL SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect)
Get the desktop area represented by a display, with the primary display located at 0,...
SDL_GetWindowPosition
DECLSPEC void SDLCALL SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
Get the position of a window.
SDL_GetWindowDisplayIndex
DECLSPEC int SDLCALL SDL_GetWindowDisplayIndex(SDL_Window *window)
Get the display index associated with a window.
window
EGLSurface EGLNativeWindowType * window
Definition: SDL_egl.h:1580
SDL_SetWindowOpacity
DECLSPEC int SDLCALL SDL_SetWindowOpacity(SDL_Window *window, float opacity)
Set the opacity for a window.
SDL_GL_CONTEXT_FLAGS
@ SDL_GL_CONTEXT_FLAGS
Definition: SDL_video.h:219
SDL_WINDOWEVENT_HIT_TEST
@ SDL_WINDOWEVENT_HIT_TEST
Definition: SDL_video.h:168
SDL_WINDOW_INPUT_GRABBED
@ SDL_WINDOW_INPUT_GRABBED
Definition: SDL_video.h:107
SDL_GetDisplayMode
DECLSPEC int SDLCALL SDL_GetDisplayMode(int displayIndex, int modeIndex, SDL_DisplayMode *mode)
Fill in information about a specific display mode.
SDL_GL_GREEN_SIZE
@ SDL_GL_GREEN_SIZE
Definition: SDL_video.h:200
SDL_WINDOWEVENT_SIZE_CHANGED
@ SDL_WINDOWEVENT_SIZE_CHANGED
Definition: SDL_video.h:155
SDL_SetWindowTitle
DECLSPEC void SDLCALL SDL_SetWindowTitle(SDL_Window *window, const char *title)
Set the title of a window, in UTF-8 format.
SDL_GL_GetDrawableSize
DECLSPEC void SDLCALL SDL_GL_GetDrawableSize(SDL_Window *window, int *w, int *h)
Get the size of a window's underlying drawable in pixels (for use with glViewport).
SDL_SetWindowData
DECLSPEC void *SDLCALL SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
Associate an arbitrary named pointer with a window.
SDL_GetWindowID
DECLSPEC Uint32 SDLCALL SDL_GetWindowID(SDL_Window *window)
Get the numeric ID of a window, for logging purposes.
SDL_MaximizeWindow
DECLSPEC void SDLCALL SDL_MaximizeWindow(SDL_Window *window)
Make a window as large as possible.
SDL_DisplayMode::w
int w
Definition: SDL_video.h:56
SDL_EnableScreenSaver
DECLSPEC void SDLCALL SDL_EnableScreenSaver(void)
Allow the screen to be blanked by a screensaver.
SDL_GL_CONTEXT_RESET_LOSE_CONTEXT
@ SDL_GL_CONTEXT_RESET_LOSE_CONTEXT
Definition: SDL_video.h:252
value
EGLSyncKHR EGLint EGLint * value
Definition: SDL_egl.h:899
blue
GLbyte GLbyte blue
Definition: SDL_opengl_glext.h:382
green
GLbyte green
Definition: SDL_opengl_glext.h:382
SDL_GetWindowData
DECLSPEC void *SDLCALL SDL_GetWindowData(SDL_Window *window, const char *name)
Retrieve the data pointer associated with a window.
SDL_GL_CONTEXT_MINOR_VERSION
@ SDL_GL_CONTEXT_MINOR_VERSION
Definition: SDL_video.h:217
SDL_WINDOWEVENT_MINIMIZED
@ SDL_WINDOWEVENT_MINIMIZED
Definition: SDL_video.h:158
SDL_WINDOW_SHOWN
@ SDL_WINDOW_SHOWN
Definition: SDL_video.h:101
SDL_WINDOWEVENT_TAKE_FOCUS
@ SDL_WINDOWEVENT_TAKE_FOCUS
Definition: SDL_video.h:167
SDL_SetWindowFullscreen
DECLSPEC int SDLCALL SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags)
Set a window's fullscreen state.
SDL_HITTEST_NORMAL
@ SDL_HITTEST_NORMAL
Definition: SDL_video.h:1021
SDL_GetWindowFlags
DECLSPEC Uint32 SDLCALL SDL_GetWindowFlags(SDL_Window *window)
Get the window flags.
SDL_WINDOW_UTILITY
@ SDL_WINDOW_UTILITY
Definition: SDL_video.h:118
SDL_HITTEST_RESIZE_RIGHT
@ SDL_HITTEST_RESIZE_RIGHT
Definition: SDL_video.h:1026
SDL_SetWindowPosition
DECLSPEC void SDLCALL SDL_SetWindowPosition(SDL_Window *window, int x, int y)
Set the position of a window.
SDL_SetWindowBordered
DECLSPEC void SDLCALL SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered)
Set the border state of a window.
SDL_GL_SHARE_WITH_CURRENT_CONTEXT
@ SDL_GL_SHARE_WITH_CURRENT_CONTEXT
Definition: SDL_video.h:221
rects
EGLSurface EGLint * rects
Definition: SDL_egl.h:1016
top
GLdouble GLdouble GLdouble GLdouble top
Definition: SDL_opengl_glext.h:6106
SDL_GetVideoDriver
const DECLSPEC char *SDLCALL SDL_GetVideoDriver(int index)
Get the name of a built in video driver.
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:161
SDL_RaiseWindow
DECLSPEC void SDLCALL SDL_RaiseWindow(SDL_Window *window)
Raise a window above other windows and set the input focus.
SDL_SetWindowInputFocus
DECLSPEC int SDLCALL SDL_SetWindowInputFocus(SDL_Window *window)
Explicitly sets input focus to the window.
SDL_GL_DOUBLEBUFFER
@ SDL_GL_DOUBLEBUFFER
Definition: SDL_video.h:204
SDL_WINDOW_HIDDEN
@ SDL_WINDOW_HIDDEN
Definition: SDL_video.h:102
data
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: SDL_opengl.h:1974
SDL_GL_ResetAttributes
DECLSPEC void SDLCALL SDL_GL_ResetAttributes(void)
Reset all previously set OpenGL context attributes to their default values.
SDL_Point
The structure that defines a point (integer)
Definition: SDL_rect.h:48
name
EGLImageKHR EGLint * name
Definition: SDL_egl.h:1497
SDL_ORIENTATION_PORTRAIT
@ SDL_ORIENTATION_PORTRAIT
Definition: SDL_video.h:185
SDL_WINDOWEVENT_NONE
@ SDL_WINDOWEVENT_NONE
Definition: SDL_video.h:147
SDL_GL_LoadLibrary
DECLSPEC int SDLCALL SDL_GL_LoadLibrary(const char *path)
Dynamically load an OpenGL library.
SDL_Window
struct SDL_Window SDL_Window
The type used to identify a window.
Definition: SDL_video.h:90
SDL_Rect
A rectangle, with the origin at the upper left (integer).
Definition: SDL_rect.h:77
SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
@ SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
Definition: SDL_video.h:222
SDL_CreateWindow
DECLSPEC SDL_Window *SDLCALL SDL_CreateWindow(const char *title, int x, int y, int w, int h, Uint32 flags)
Create a window with the specified position, dimensions, and flags.
SDL_DisplayEventID
SDL_DisplayEventID
Event subtype for display events.
Definition: SDL_video.h:174
SDL_stdinc.h
SDL_UpdateWindowSurface
DECLSPEC int SDLCALL SDL_UpdateWindowSurface(SDL_Window *window)
Copy the window surface to the screen.
Uint32
uint32_t Uint32
Definition: SDL_stdinc.h:203
SDL_HitTest
SDL_HitTestResult(SDLCALL * SDL_HitTest)(SDL_Window *win, const SDL_Point *area, void *data)
Callback used for hit-testing.
Definition: SDL_video.h:1038
flags
EGLSyncKHR EGLint flags
Definition: SDL_egl.h:898
SDL_GetWindowOpacity
DECLSPEC int SDLCALL SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity)
Get the opacity of a window.
SDL_GetNumVideoDisplays
DECLSPEC int SDLCALL SDL_GetNumVideoDisplays(void)
Returns the number of available video displays.
SDL_ORIENTATION_UNKNOWN
@ SDL_ORIENTATION_UNKNOWN
Definition: SDL_video.h:182
SDL_GL_ExtensionSupported
DECLSPEC SDL_bool SDLCALL SDL_GL_ExtensionSupported(const char *extension)
Return true if an OpenGL extension is supported for the current context.
SDL_GL_ACCUM_GREEN_SIZE
@ SDL_GL_ACCUM_GREEN_SIZE
Definition: SDL_video.h:208
SDL_GetNumVideoDrivers
DECLSPEC int SDLCALL SDL_GetNumVideoDrivers(void)
Get the number of video drivers compiled into SDL.
SDL_WINDOW_MOUSE_FOCUS
@ SDL_WINDOW_MOUSE_FOCUS
Definition: SDL_video.h:109
SDL_DestroyWindow
DECLSPEC void SDLCALL SDL_DestroyWindow(SDL_Window *window)
Destroy a window.
SDL_WINDOWEVENT_HIDDEN
@ SDL_WINDOWEVENT_HIDDEN
Definition: SDL_video.h:149
SDL_ORIENTATION_PORTRAIT_FLIPPED
@ SDL_ORIENTATION_PORTRAIT_FLIPPED
Definition: SDL_video.h:186
SDL_GL_MULTISAMPLEBUFFERS
@ SDL_GL_MULTISAMPLEBUFFERS
Definition: SDL_video.h:212
SDL_DisplayMode::driverdata
void * driverdata
Definition: SDL_video.h:59
SDL_WINDOWEVENT_RESTORED
@ SDL_WINDOWEVENT_RESTORED
Definition: SDL_video.h:160
SDL_GL_ACCUM_ALPHA_SIZE
@ SDL_GL_ACCUM_ALPHA_SIZE
Definition: SDL_video.h:210
SDL_SetWindowGammaRamp
DECLSPEC int SDLCALL SDL_SetWindowGammaRamp(SDL_Window *window, const Uint16 *red, const Uint16 *green, const Uint16 *blue)
Set the gamma ramp for a window.
SDL_DisableScreenSaver
DECLSPEC void SDLCALL SDL_DisableScreenSaver(void)
Prevent the screen from being blanked by a screensaver.
SDL_WINDOWEVENT_FOCUS_GAINED
@ SDL_WINDOWEVENT_FOCUS_GAINED
Definition: SDL_video.h:164
SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
@ SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
Definition: SDL_video.h:238
SDL_WINDOW_SKIP_TASKBAR
@ SDL_WINDOW_SKIP_TASKBAR
Definition: SDL_video.h:117
SDL_GL_ACCUM_BLUE_SIZE
@ SDL_GL_ACCUM_BLUE_SIZE
Definition: SDL_video.h:209
SDL_HITTEST_RESIZE_TOP
@ SDL_HITTEST_RESIZE_TOP
Definition: SDL_video.h:1024
SDL_GL_RETAINED_BACKING
@ SDL_GL_RETAINED_BACKING
Definition: SDL_video.h:215
SDL_GL_SwapWindow
DECLSPEC void SDLCALL SDL_GL_SwapWindow(SDL_Window *window)
Swap the OpenGL buffers for a window, if double-buffering is supported.
SDL_DISPLAYEVENT_NONE
@ SDL_DISPLAYEVENT_NONE
Definition: SDL_video.h:176
left
GLint left
Definition: SDL_opengl_glext.h:1952
SDL_ORIENTATION_LANDSCAPE_FLIPPED
@ SDL_ORIENTATION_LANDSCAPE_FLIPPED
Definition: SDL_video.h:184
SDL_GetDisplayName
const DECLSPEC char *SDLCALL SDL_GetDisplayName(int displayIndex)
Get the name of a display in UTF-8 encoding.
SDL_SetWindowHitTest
DECLSPEC int SDLCALL SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *callback_data)
Provide a callback that decides if a window region has special properties.
SDL_GLcontextReleaseFlag
SDL_GLcontextReleaseFlag
Definition: SDL_video.h:243
SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
@ SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
Definition: SDL_video.h:231
SDL_HITTEST_RESIZE_BOTTOMLEFT
@ SDL_HITTEST_RESIZE_BOTTOMLEFT
Definition: SDL_video.h:1029
SDL_SetWindowResizable
DECLSPEC void SDLCALL SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable)
Set the user-resizable state of a window.
SDL_WINDOWEVENT_MAXIMIZED
@ SDL_WINDOWEVENT_MAXIMIZED
Definition: SDL_video.h:159
SDL_WINDOWEVENT_LEAVE
@ SDL_WINDOWEVENT_LEAVE
Definition: SDL_video.h:163
SDL_WINDOW_BORDERLESS
@ SDL_WINDOW_BORDERLESS
Definition: SDL_video.h:103
SDL_WINDOW_VULKAN
@ SDL_WINDOW_VULKAN
Definition: SDL_video.h:121
SDL_GetWindowMaximumSize
DECLSPEC void SDLCALL SDL_GetWindowMaximumSize(SDL_Window *window, int *w, int *h)
Get the maximum size of a window's client area.
SDL_SetWindowMinimumSize
DECLSPEC void SDLCALL SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)
Set the minimum size of a window's client area.
SDL_GL_CONTEXT_NO_ERROR
@ SDL_GL_CONTEXT_NO_ERROR
Definition: SDL_video.h:225