Go to the documentation of this file.
21 #include "../SDL_internal.h"
31 #include "../events/SDL_events_c.h"
32 #include "../timer/SDL_timer_c.h"
40 #if SDL_VIDEO_OPENGL_ES && !SDL_VIDEO_OPENGL
45 #if SDL_VIDEO_OPENGL_ES2 && !SDL_VIDEO_OPENGL
50 #ifndef GL_CONTEXT_RELEASE_BEHAVIOR_KHR
51 #define GL_CONTEXT_RELEASE_BEHAVIOR_KHR 0x82FB
56 #include <emscripten.h>
61 #if SDL_VIDEO_DRIVER_COCOA
64 #if SDL_VIDEO_DRIVER_X11
67 #if SDL_VIDEO_DRIVER_WAYLAND
70 #if SDL_VIDEO_DRIVER_VIVANTE
73 #if SDL_VIDEO_DRIVER_DIRECTFB
76 #if SDL_VIDEO_DRIVER_WINDOWS
79 #if SDL_VIDEO_DRIVER_WINRT
82 #if SDL_VIDEO_DRIVER_HAIKU
85 #if SDL_VIDEO_DRIVER_PANDORA
88 #if SDL_VIDEO_DRIVER_UIKIT
91 #if SDL_VIDEO_DRIVER_ANDROID
94 #if SDL_VIDEO_DRIVER_PSP
97 #if SDL_VIDEO_DRIVER_KMSDRM
100 #if SDL_VIDEO_DRIVER_RPI
103 #if SDL_VIDEO_DRIVER_NACL
106 #if SDL_VIDEO_DRIVER_EMSCRIPTEN
109 #if SDL_VIDEO_DRIVER_QNX
112 #if SDL_VIDEO_DRIVER_OFFSCREEN
115 #if SDL_VIDEO_DRIVER_DUMMY
123 #define CHECK_WINDOW_MAGIC(window, retval) \
125 SDL_UninitializedVideo(); \
128 SDL_assert(window && window->magic == &_this->window_magic); \
129 if (!window || window->magic != &_this->window_magic) { \
130 SDL_SetError("Invalid window"); \
134 #define CHECK_DISPLAY_INDEX(displayIndex, retval) \
136 SDL_UninitializedVideo(); \
139 SDL_assert(_this->displays != NULL); \
140 SDL_assert(displayIndex >= 0 && displayIndex < _this->num_displays); \
141 if (displayIndex < 0 || displayIndex >= _this->num_displays) { \
142 SDL_SetError("displayIndex must be in the range 0 - %d", \
143 _this->num_displays - 1); \
147 #define FULLSCREEN_MASK (SDL_WINDOW_FULLSCREEN_DESKTOP | SDL_WINDOW_FULLSCREEN)
158 #define SDL_WINDOWTEXTUREDATA "_SDL_WindowTextureData"
202 #if defined(__WIN32__)
207 #elif defined(__MACOSX__)
211 #elif defined(__LINUX__)
225 const char *vendor =
NULL;
228 if (glGetStringFunc) {
229 vendor = (
const char *) glGetStringFunc(
GL_VENDOR);
241 return hasAcceleratedOpenGL;
243 #elif SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
270 if (hint && *hint !=
'0' && *hint !=
'1' &&
297 return SDL_SetError(
"No hardware accelerated renderers available");
342 if (!
data->texture) {
352 const size_t allocsize =
window->h *
data->pitch;
360 *pitch =
data->pitch;
410 if (
data->renderer) {
425 }
else if (
a->w !=
b->w) {
427 }
else if (
a->h !=
b->h) {
433 }
else if (
a->refresh_rate !=
b->refresh_rate) {
434 return b->refresh_rate -
a->refresh_rate;
442 return SDL_SetError(
"Video subsystem has not been initialized");
475 #if !SDL_TIMERS_DISABLED
490 if (driver_name ==
NULL) {
493 if (driver_name !=
NULL) {
540 return SDL_SetError(
"The video driver did not add any displays");
616 displays[
index] = *display;
696 if (displayIndex == 0) {
780 for (
i = 0;
i < nmodes; ++
i) {
797 modes[nmodes] = *
mode;
835 return SDL_SetError(
"index must be in the range of 0 - %d",
878 int target_refresh_rate;
882 if (!
mode || !closest) {
883 SDL_SetError(
"Missing desired mode or closest mode parameter");
889 target_format =
mode->format;
895 if (
mode->refresh_rate) {
896 target_refresh_rate =
mode->refresh_rate;
905 if (current->
w && (current->
w <
mode->w)) {
909 if (current->
h && (current->
h <
mode->h)) {
910 if (current->
w && (current->
w ==
mode->w)) {
919 if (!match || current->
w < match->
w || current->
h < match->
h) {
925 if (current->
format == target_format ||
947 if (match->
w && match->
h) {
948 closest->
w = match->
w;
949 closest->
h = match->
h;
951 closest->
w =
mode->w;
952 closest->
h =
mode->h;
999 display_mode = *
mode;
1002 if (!display_mode.
format) {
1005 if (!display_mode.
w) {
1008 if (!display_mode.
h) {
1017 return SDL_SetError(
"No video mode large enough for %dx%d",
1018 display_mode.
w, display_mode.
h);
1026 if (
SDL_memcmp(&display_mode, ¤t_mode,
sizeof(display_mode)) == 0) {
1032 return SDL_SetError(
"SDL video driver doesn't support changing display mode");
1055 int closest_dist = 0x7FFFFFFF;
1064 displayIndex = (
window->x & 0xFFFF);
1068 return displayIndex;
1072 displayIndex = (
window->y & 0xFFFF);
1076 return displayIndex;
1097 dist = (delta.
x*delta.
x + delta.
y*delta.
y);
1098 if (dist < closest_dist) {
1100 closest_dist = dist;
1113 if (displayIndex >= 0) {
1152 fullscreen_mode =
window->fullscreen_mode;
1153 if (!fullscreen_mode.
w) {
1154 fullscreen_mode.
w =
window->windowed.w;
1156 if (!fullscreen_mode.
h) {
1157 fullscreen_mode.
h =
window->windowed.h;
1167 &fullscreen_mode)) {
1168 return SDL_SetError(
"Couldn't find display mode match");
1172 *
mode = fullscreen_mode;
1212 if (
window->is_hiding && fullscreen) {
1237 if (Cocoa_SetWindowFullscreenSpace(
window, fullscreen)) {
1238 if (Cocoa_IsWindowInFullscreenSpace(
window) != fullscreen) {
1245 #elif __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
1293 setDisplayMode = fullscreen;
1299 if (setDisplayMode) {
1307 if (other->
w == fullscreen_mode.
w && other->
h == fullscreen_mode.
h) {
1336 fullscreen_mode.
w, fullscreen_mode.
h);
1368 #define CREATE_FLAGS \
1369 (SDL_WINDOW_OPENGL | SDL_WINDOW_BORDERLESS | SDL_WINDOW_RESIZABLE | SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_ALWAYS_ON_TOP | SDL_WINDOW_SKIP_TASKBAR | SDL_WINDOW_POPUP_MENU | SDL_WINDOW_UTILITY | SDL_WINDOW_TOOLTIP | SDL_WINDOW_VULKAN | SDL_WINDOW_MINIMIZED)
1451 if ((
w > 16384) || (
h > 16384)) {
1457 #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
1464 SDL_SetError(
"OpenGL support is either not configured in SDL "
1465 "or not available in current SDL video driver "
1476 SDL_SetError(
"Vulkan support is either not configured in SDL "
1477 "or not available in current SDL video driver "
1482 SDL_SetError(
"Vulkan and OpenGL not supported on same window");
1519 window->x = bounds.
x + (bounds.
w -
w) / 2;
1522 window->y = bounds.
y + (bounds.
h -
h) / 2;
1547 window->brightness = 1.0f;
1564 #if !defined(__WIN32__)
1570 #if __WINRT__ && (NTDDI_VERSION < NTDDI_WIN10)
1617 window->brightness = 1.0f;
1640 return SDL_SetError(
"OpenGL support is either not configured in SDL "
1641 "or not available in current SDL video driver "
1687 SDL_SetError(
"Can't change SDL_WINDOW_VULKAN window flag");
1692 SDL_SetError(
"Vulkan and OpenGL not supported on same window");
1702 if (loaded_opengl) {
1774 if (title ==
window->title) {
1833 void *last_value =
data->data;
1837 data->data = userdata;
1856 data->data = userdata;
1890 int displayIndex = (
x & 0xFFFF);
1900 x = bounds.
x + (bounds.
w -
window->w) / 2;
1903 y = bounds.
y + (bounds.
h -
window->h) / 2;
1947 if (displayIndex >= 0) {
1975 const int want = (bordered !=
SDL_FALSE);
1993 const int want = (resizable !=
SDL_FALSE);
2038 window->last_fullscreen_flags = 0;
2071 if (!
top) {
top = &dummy; }
2103 SDL_SetError(
"SDL_SetWindowMinimumSize(): Tried to set minimum size larger than maximum size");
2144 if (max_w <= window->min_w || max_h <= window->min_h) {
2145 SDL_SetError(
"SDL_SetWindowMaximumSize(): Tried to set maximum size smaller than minimum size");
2301 window->flags |= oldflags;
2312 Uint32 Rmask, Gmask, Bmask, Amask;
2334 if (!
window->surface_valid) {
2368 if (!
window->surface_valid) {
2369 return SDL_SetError(
"Window surface is invalid, please call SDL_GetWindowSurface() to get a new surface");
2386 window->brightness = brightness;
2396 return window->brightness;
2409 if (opacity < 0.0
f) {
2411 }
else if (opacity > 1.0
f) {
2417 window->opacity = opacity;
2429 *out_opacity =
window->opacity;
2517 for (
i = 0;
i < 256; ++
i) {
2554 if (grabbed_window && (grabbed_window !=
window)) {
2562 }
else if (grabbed_window ==
window) {
2682 if (Cocoa_IsWindowInFullscreenSpace(
window)) {
2966 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
2970 return (verstr && (
SDL_atoi(verstr) >= 3));
2977 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
2979 const char *extensions;
2981 const char *where, *terminator;
2985 if (where || *extension ==
'\0') {
2997 if (!glGetStringFunc) {
3009 if ((!glGetStringiFunc) || (!glGetIntegervFunc)) {
3013 #ifndef GL_NUM_EXTENSIONS
3014 #define GL_NUM_EXTENSIONS 0x821D
3017 for (
i = 0;
i < num_exts;
i++) {
3018 const char *thisext = (
const char *) glGetStringiFunc(
GL_EXTENSIONS,
i);
3046 if (where == extensions || *(where - 1) ==
' ')
3047 if (*terminator ==
' ' || *terminator ==
'\0')
3069 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
3119 #if SDL_VIDEO_OPENGL
3123 #elif SDL_VIDEO_OPENGL_ES2
3127 #elif SDL_VIDEO_OPENGL_ES
3146 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
3267 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
3278 #if SDL_VIDEO_OPENGL
3282 GLenum attachmentattrib = 0;
3298 #if SDL_VIDEO_OPENGL
3304 #if SDL_VIDEO_OPENGL
3310 #if SDL_VIDEO_OPENGL
3316 #if SDL_VIDEO_OPENGL
3322 #if SDL_VIDEO_OPENGL
3333 #if SDL_VIDEO_OPENGL
3340 #if SDL_VIDEO_OPENGL
3346 #if SDL_VIDEO_OPENGL
3379 #if SDL_VIDEO_OPENGL
3387 int rsize = 0, gsize = 0, bsize = 0, asize = 0;
3403 *
value = rsize + gsize + bsize + asize;
3467 #if SDL_VIDEO_OPENGL
3469 if (!glGetStringFunc) {
3474 glGetFramebufferAttachmentParameterivFunc =
SDL_GL_GetProcAddress(
"glGetFramebufferAttachmentParameteriv");
3476 if (glGetFramebufferAttachmentParameterivFunc) {
3486 if (glGetIntegervFunc) {
3494 if (!glGetErrorFunc) {
3498 error = glGetErrorFunc();
3520 SDL_SetError(
"The specified window isn't an OpenGL window");
3553 return SDL_SetError(
"The specified window isn't an OpenGL window");
3604 return SDL_SetError(
"No OpenGL context has been made current");
3608 return SDL_SetError(
"Setting the swap interval is not supported");
3632 SDL_SetError(
"The specified window isn't an OpenGL window");
3637 SDL_SetError(
"The specified window has not been made current");
3668 #define SET_MASKBIT(icon, x, y, mask) \
3669 mask[(y*((icon->w+7)/8))+(x/8)] &= ~(0x01<<(7-(x%8)))
3671 colorkey = icon->
format->colorkey;
3676 for (
y = 0;
y < icon->
h; ++
y) {
3678 for (
x = 0;
x < icon->
w; ++
x) {
3679 if (*
pixels++ == colorkey) {
3680 SET_MASKBIT(icon,
x,
y,
mask);
3690 for (
y = 0;
y < icon->
h; ++
y) {
3692 for (
x = 0;
x < icon->
w; ++
x) {
3694 SET_MASKBIT(icon,
x,
y,
mask);
3695 }
else if ((
flags & 2)
3697 SET_MASKBIT(icon,
x,
y,
mask);
3708 for (
y = 0;
y < icon->
h; ++
y) {
3710 for (
x = 0;
x < icon->
w; ++
x) {
3712 SET_MASKBIT(icon,
x,
y,
mask);
3713 }
else if ((
flags & 2)
3715 SET_MASKBIT(icon,
x,
y,
mask);
3731 if (icon &&
_this->SetIcon) {
3734 int mask_len = icon->
h * (icon->
w + 7) / 8;
3741 if (icon->
flags & SDL_SRCCOLORKEY)
3743 if (icon->
flags & SDL_SRCALPHA)
3746 CreateMaskFromColorKeyOrAlpha(icon,
mask,
flags);
3849 #if SDL_VIDEO_DRIVER_ANDROID
3852 #if SDL_VIDEO_DRIVER_WINDOWS
3855 #if SDL_VIDEO_DRIVER_WINRT
3858 #if SDL_VIDEO_DRIVER_COCOA
3861 #if SDL_VIDEO_DRIVER_UIKIT
3864 #if SDL_VIDEO_DRIVER_X11
3867 #if SDL_VIDEO_DRIVER_HAIKU
3872 #if SDL_VIDEO_DRIVER_WINDOWS || SDL_VIDEO_DRIVER_WINRT || SDL_VIDEO_DRIVER_COCOA || SDL_VIDEO_DRIVER_UIKIT || SDL_VIDEO_DRIVER_X11 || SDL_VIDEO_DRIVER_HAIKU
3897 int show_cursor_prev;
3901 if (!messageboxdata) {
3916 buttonid = &dummybutton;
3924 #if SDL_VIDEO_DRIVER_ANDROID
3926 Android_ShowMessageBox(messageboxdata, buttonid) == 0) {
3930 #if SDL_VIDEO_DRIVER_WINDOWS
3933 WIN_ShowMessageBox(messageboxdata, buttonid) == 0) {
3937 #if SDL_VIDEO_DRIVER_WINRT
3940 WINRT_ShowMessageBox(messageboxdata, buttonid) == 0) {
3944 #if SDL_VIDEO_DRIVER_COCOA
3947 Cocoa_ShowMessageBox(messageboxdata, buttonid) == 0) {
3951 #if SDL_VIDEO_DRIVER_UIKIT
3954 UIKit_ShowMessageBox(messageboxdata, buttonid) == 0) {
3958 #if SDL_VIDEO_DRIVER_X11
3961 X11_ShowMessageBox(messageboxdata, buttonid) == 0) {
3965 #if SDL_VIDEO_DRIVER_HAIKU
3968 HAIKU_ShowMessageBox(messageboxdata, buttonid) == 0) {
3976 if (current_window) {
3978 if (mouse_captured) {
3992 #ifdef __EMSCRIPTEN__
3998 alert(UTF8ToString($0) +
"\n\n" + UTF8ToString($1));
4009 data.numbuttons = 1;
4040 window->hit_test_data = userdata;
4048 float den2 = hinches * hinches + vinches * vinches;
4053 return (
float)(
SDL_sqrt((
double)hpix * (
double)hpix + (
double)vpix * (
double)vpix) /
4105 #define NOT_A_VULKAN_WINDOW "The specified window isn't a Vulkan window"
4116 return SDL_SetError(
"Vulkan loader library already loaded");
4121 return SDL_SetError(
"Vulkan support is either not configured in SDL "
4122 "or not available in current SDL video driver "
4183 VkInstance instance,
int(* CreateSDLWindow)(_THIS, SDL_Window *window)
void SDL_OnWindowLeave(SDL_Window *window)
SDL_Mouse * SDL_GetMouse(void)
@ SDL_WINDOW_MOUSE_CAPTURE
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT
A variable controlling whether the graphics context is externally managed.
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
#define SDL_GetMouseState
const char * SDL_GetWindowTitle(SDL_Window *window)
Get the title of a window, in UTF-8 format.
static SDL_Surface * SDL_CreateWindowFramebuffer(SDL_Window *window)
#define SDL_BITSPERPIXEL(X)
void SDL_GetWindowMinimumSize(SDL_Window *window, int *min_w, int *min_h)
Get the minimum size of a window's client area.
void(* SetWindowPosition)(_THIS, SDL_Window *window)
void(* Metal_DestroyView)(_THIS, SDL_MetalView view)
#define SDL_RenderPresent
SDL_DisplayMode * display_modes
int 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.
void SDL_DisableScreenSaver()
Prevent the screen from being blanked by a screensaver.
SDL_bool SDL_Vulkan_GetInstanceExtensions(SDL_Window *window, unsigned *count, const char **names)
VideoBootStrap WINRT_bootstrap
@ SDL_WINDOW_ALLOW_HIGHDPI
void SDL_GL_ResetAttributes()
Reset all previously set OpenGL context attributes to their default values.
void SDL_OnApplicationDidReceiveMemoryWarning(void)
void(* SuspendScreenSaver)(_THIS)
@ SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT
@ SDL_GL_MULTISAMPLESAMPLES
PFN_vkGetInstanceProcAddr vkGetInstanceProcAddr
@ SDL_APP_DIDENTERBACKGROUND
@ SDL_APP_DIDENTERFOREGROUND
int(* Vulkan_LoadLibrary)(_THIS, const char *path)
SDL_Window * SDL_GetFocusWindow(void)
A collection of pixels used in software blitting.
#define SDL_ConvertSurfaceFormat
#define SDL_RenderSetViewport
SDL_TLSID current_glwin_tls
int(* SetWindowModalFor)(_THIS, SDL_Window *modal_window, SDL_Window *parent_window)
void SDL_VideoQuit(void)
Shuts down the video subsystem.
void(* OnWindowEnter)(_THIS, SDL_Window *window)
void SDL_ShowWindow(SDL_Window *window)
Show a window.
SDL_bool SDL_IsScreenKeyboardShown(SDL_Window *window)
Returns whether the screen keyboard is shown for given window.
void SDL_OnWindowFocusGained(SDL_Window *window)
int SDL_GL_LoadLibrary(const char *path)
Dynamically load an OpenGL library.
GLboolean GLboolean GLboolean b
#define SDL_HINT_VIDEO_HIGHDPI_DISABLED
If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
GLuint GLsizei const GLchar * message
void 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_WINDOWEVENT_FOCUS_LOST
#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER
A variable controlling whether the screensaver is enabled.
VideoBootStrap X11_bootstrap
#define SDL_GetNumRenderDrivers
SDL_bool SDL_IsScreenSaverEnabled()
Returns whether the screensaver is currently enabled (default off).
#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS
Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
static int ParseDisplayUsableBoundsHint(SDL_Rect *rect)
#define SDL_VERSION(x)
Macro to determine SDL version program was compiled against.
#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE
void SDL_SetWindowSize(SDL_Window *window, int w, int h)
Set the size of a window's client area.
int SDL_SetWindowInputFocus(SDL_Window *window)
Explicitly sets input focus to the window.
#define SDL_PIXELLAYOUT(X)
void(* SetTextInputRect)(_THIS, SDL_Rect *rect)
#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE
SDL_Window * grabbed_window
GLuint GLuint GLsizei count
SDL_Window * SDL_GetWindowFromID(Uint32 id)
Get a window from a stored ID, or NULL if it doesn't exist.
void SDL_SetWindowGrab(SDL_Window *window, SDL_bool grabbed)
Set a window's input grab mode.
int SDL_GetDisplayMode(int displayIndex, int index, SDL_DisplayMode *mode)
Fill in information about a specific display mode.
void SDL_OnApplicationWillEnterForeground(void)
struct SDL_VideoDevice::@256 vulkan_config
SDL_TLSID current_glctx_tls
void(* SetWindowTitle)(_THIS, SDL_Window *window)
int(* UpdateWindowFramebuffer)(_THIS, SDL_Window *window, const SDL_Rect *rects, int numrects)
int SDL_GetWindowOpacity(SDL_Window *window, float *out_opacity)
Get the opacity of a window.
@ SDL_WINDOWEVENT_RESIZED
GLdouble GLdouble GLdouble GLdouble top
#define SDL_InvalidParamError(param)
int SDL_GL_SetSwapInterval(int interval)
Set the swap interval for the current OpenGL context.
VideoBootStrap Emscripten_bootstrap
void(* Vulkan_UnloadLibrary)(_THIS)
static void SDL_RestoreMousePosition(SDL_Window *window)
void SDL_HideWindow(SDL_Window *window)
Hide a window.
#define SDL_QuitSubSystem
void(* Vulkan_GetDrawableSize)(_THIS, SDL_Window *window, int *w, int *h)
@ SDL_GL_CONTEXT_PROFILE_CORE
void SDL_SetWindowMinimumSize(SDL_Window *window, int min_w, int min_h)
Set the minimum size of a window's client area.
@ SDL_WINDOW_FULLSCREEN_DESKTOP
@ SDL_GL_RETAINED_BACKING
#define NOT_A_VULKAN_WINDOW
VideoBootStrap COCOA_bootstrap
void SDL_SetKeyboardFocus(SDL_Window *window)
void SDL_GetWindowPosition(SDL_Window *window, int *x, int *y)
Get the position of a window.
@ SDL_GL_CONTEXT_PROFILE_MASK
#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE
set set set set set set set set set set set set set set set set set set set set *set set set macro pixldst op &r &cond WK op &r &cond WK op &r &cond WK else op &m &cond &ia op &r &cond WK else op &m &cond &ia elseif elseif else error unsupported base if elseif elseif else error unsupported unaligned pixldst unaligned endm macro pixst base base else pixldst base endif endm macro PF base if bpp PF set rept prefetch_distance PF set OFFSET endr endif endm macro preload_leading_step2 base if bpp ifc DST PF PF else if bpp lsl PF PF lsl PF PF lsl PF PF PF else PF lsl PF lsl PF lsl PF endif SIZE macro preload_middle scratch_holds_offset if bpp if else PF PF endif endif endif endm macro preload_trailing base if bpp if bpp *pix_per_block PF PF lsl PF PF PF PF PF else PF lsl PF lsl PF PF PF PF PF base if bpp if narrow_case &&bpp<=dst_w_bpp) PF bic, WK0, base, #31 PF pld,[WK0] PF add, WK1, base, X, LSL #bpp_shift PF sub, WK1, WK1, #1 PF bic, WK1, WK1, #31 PF cmp, WK1, WK0 PF beq, 90f PF pld,[WK1]90:.else PF bic, WK0, base, #31 PF pld,[WK0] PF add, WK1, base, X, lsl #bpp_shift PF sub, WK1, WK1, #1 PF bic, WK1, WK1, #31 PF cmp, WK1, WK0 PF beq, 92f91:PF add, WK0, WK0, #32 PF cmp, WK0, WK1 PF pld,[WK0] PF bne, 91b92:.endif .endif.endm.macro conditional_process1_helper cond, process_head, process_tail, numbytes, firstreg, unaligned_src, unaligned_mask, decrementx process_head cond, numbytes, firstreg, unaligned_src, unaligned_mask, 0 .if decrementx sub &cond X, X, #8 *numbytes/dst_w_bpp .endif process_tail cond, numbytes, firstreg .if !((flags) &FLAG_PROCESS_DOES_STORE) pixst cond, numbytes, firstreg, DST .endif.endm.macro conditional_process1 cond, process_head, process_tail, numbytes, firstreg, unaligned_src, unaligned_mask, decrementx .if(flags) &FLAG_BRANCH_OVER .ifc cond, mi bpl 100f .endif .ifc cond, cs bcc 100f .endif .ifc cond, ne beq 100f .endif conditional_process1_helper, process_head, process_tail, numbytes, firstreg, unaligned_src, unaligned_mask, decrementx100:.else conditional_process1_helper cond, process_head, process_tail, numbytes, firstreg, unaligned_src, unaligned_mask, decrementx .endif.endm.macro conditional_process2 test, cond1, cond2, process_head, process_tail, numbytes1, numbytes2, firstreg1, firstreg2, unaligned_src, unaligned_mask, decrementx .if(flags) &(FLAG_DST_READWRITE|FLAG_BRANCH_OVER|FLAG_PROCESS_CORRUPTS_PSR|FLAG_PROCESS_DOES_STORE) test conditional_process1 cond1, process_head, process_tail, numbytes1, firstreg1, unaligned_src, unaligned_mask, decrementx .if(flags) &FLAG_PROCESS_CORRUPTS_PSR test .endif conditional_process1 cond2, process_head, process_tail, numbytes2, firstreg2, unaligned_src, unaligned_mask, decrementx .else test process_head cond1, numbytes1, firstreg1, unaligned_src, unaligned_mask, 0 process_head cond2, numbytes2, firstreg2, unaligned_src, unaligned_mask, 0 .if decrementx sub &cond1 X, X, #8 *numbytes1/dst_w_bpp sub &cond2 X, X, #8 *numbytes2/dst_w_bpp .endif process_tail cond1, numbytes1, firstreg1 process_tail cond2, numbytes2, firstreg2 pixst cond1, numbytes1, firstreg1, DST pixst cond2, numbytes2, firstreg2, DST .endif.endm.macro test_bits_1_0_ptr .if(flags) &FLAG_PROCESS_CORRUPTS_WK0 movs SCRATCH, X, lsl #32-1 .else movs SCRATCH, WK0, lsl #32-1 .endif.endm.macro test_bits_3_2_ptr .if(flags) &FLAG_PROCESS_CORRUPTS_WK0 movs SCRATCH, X, lsl #32-3 .else movs SCRATCH, WK0, lsl #32-3 .endif.endm.macro leading_15bytes process_head, process_tail .set DECREMENT_X, 1 .if(flags) &FLAG_PROCESS_CORRUPTS_WK0 .set DECREMENT_X, 0 sub X, X, WK0, lsr #dst_bpp_shift str X,[sp, #LINE_SAVED_REG_COUNT *4] mov X, WK0 .endif .if dst_w_bpp==8 conditional_process2 test_bits_1_0_ptr, mi, cs, process_head, process_tail, 1, 2, 1, 2, 1, 1, DECREMENT_X .elseif dst_w_bpp==16 test_bits_1_0_ptr conditional_process1 cs, process_head, process_tail, 2, 2, 1, 1, DECREMENT_X .endif conditional_process2 test_bits_3_2_ptr, mi, cs, process_head, process_tail, 4, 8, 1, 2, 1, 1, DECREMENT_X .if(flags) &FLAG_PROCESS_CORRUPTS_WK0 ldr X,[sp, #LINE_SAVED_REG_COUNT *4] .endif.endm.macro test_bits_3_2_pix movs SCRATCH, X, lsl #dst_bpp_shift+32-3.endm.macro test_bits_1_0_pix .if dst_w_bpp==8 movs SCRATCH, X, lsl #dst_bpp_shift+32-1 .else movs SCRATCH, X, lsr #1 .endif.endm.macro trailing_15bytes process_head, process_tail, unaligned_src, unaligned_mask conditional_process2 test_bits_3_2_pix, cs, mi, process_head, process_tail, 8, 4, 0, 2, unaligned_src, unaligned_mask, 0 .if dst_w_bpp==16 test_bits_1_0_pix conditional_process1 cs, process_head, process_tail, 2, 0, unaligned_src, unaligned_mask, 0 .elseif dst_w_bpp==8 conditional_process2 test_bits_1_0_pix, cs, mi, process_head, process_tail, 2, 1, 0, 1, unaligned_src, unaligned_mask, 0 .endif.endm.macro wide_case_inner_loop process_head, process_tail, unaligned_src, unaligned_mask, dst_alignment110:.set SUBBLOCK, 0 .rept pix_per_block *dst_w_bpp/128 process_head, 16, 0, unaligned_src, unaligned_mask, 1 .if(src_bpp > 0) &&(mask_bpp==0) &&((flags) &FLAG_PROCESS_PRESERVES_SCRATCH) preload_middle src_bpp, SRC, 1 .elseif(src_bpp==0) &&(mask_bpp > 0) &&((flags) &FLAG_PROCESS_PRESERVES_SCRATCH) preload_middle mask_bpp, MASK, 1 .else preload_middle src_bpp, SRC, 0 preload_middle mask_bpp, MASK, 0 .endif .if(dst_r_bpp > 0) &&((SUBBLOCK % 2)==0) &&(((flags) &FLAG_NO_PRELOAD_DST)==0) PF pld,[DST, #32 *prefetch_distance - dst_alignment] .endif process_tail, 16, 0 .if !((flags) &FLAG_PROCESS_DOES_STORE) pixst, 16, 0, DST .endif .set SUBBLOCK, SUBBLOCK+1 .endr subs X, X, #pix_per_block bhs 110b.endm.macro wide_case_inner_loop_and_trailing_pixels process_head, process_tail, process_inner_loop, exit_label, unaligned_src, unaligned_mask .if dst_r_bpp > tst bne process_inner_loop DST_PRELOAD_BIAS endif preload_trailing SRC preload_trailing MASK DST endif add medium_case_inner_loop_and_trailing_pixels unaligned_mask endm macro medium_case_inner_loop_and_trailing_pixels unused
SDL_bool(* GetWindowWMInfo)(_THIS, SDL_Window *window, struct SDL_SysWMinfo *info)
static Uint32 callback(Uint32 interval, void *param)
void SDL_GL_DeleteContext(SDL_GLContext context)
Delete an OpenGL context.
int SDL_UpdateWindowSurfaceRects(SDL_Window *window, const SDL_Rect *rects, int numrects)
Copy a number of rectangles on the window surface to the screen.
SDL_Window * SDL_CreateWindowFrom(const void *data)
Create an SDL window from an existing native window.
int(* GetWindowBordersSize)(_THIS, SDL_Window *window, int *top, int *left, int *bottom, int *right)
#define SDL_WINDOWPOS_ISCENTERED(X)
SDL_HitTestResult(* SDL_HitTest)(SDL_Window *win, const SDL_Point *area, void *data)
Callback used for hit-testing.
GLsizei const GLchar *const * path
int SDL_GetDesktopDisplayMode(int displayIndex, SDL_DisplayMode *mode)
Fill in information about the desktop display mode.
void SDL_SetWindowTitle(SDL_Window *window, const char *title)
Set the title of a window, in UTF-8 format.
@ SDL_GL_CONTEXT_RESET_NO_NOTIFICATION
SDL_DisplayMode desktop_mode
@ SDL_GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH
@ SDL_GL_CONTEXT_RESET_ISOLATION_FLAG
GLboolean GLboolean GLboolean GLboolean a
#define SDL_InitSubSystem
void SDL_RaiseWindow(SDL_Window *window)
Raise a window above other windows and set the input focus.
@ SDL_GL_CONTEXT_NO_ERROR
GLfloat GLfloat GLfloat GLfloat h
VideoBootStrap Android_bootstrap
void SDL_OnWindowMinimized(SDL_Window *window)
void SDL_KeyboardQuit(void)
void SDL_SetMouseFocus(SDL_Window *window)
float SDL_GetWindowBrightness(SDL_Window *window)
Get the brightness (gamma correction) for a window.
void SDL_ToggleDragAndDropSupport(void)
void(* HideWindow)(_THIS, SDL_Window *window)
Information on the capabilities of a render driver or context.
int SDL_SetWindowOpacity(SDL_Window *window, float opacity)
Set the opacity for a window.
@ SDL_APP_WILLENTERFOREGROUND
void SDL_GL_DeduceMaxSupportedESProfile(int *major, int *minor)
SDL_GLattr
OpenGL configuration attributes.
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
int SDL_SetWindowBrightness(SDL_Window *window, float brightness)
Set the brightness (gamma correction) for a window.
void SDL_OnWindowRestored(SDL_Window *window)
#define SDL_SetRelativeMouseMode
int SDL_SetWindowHitTest(SDL_Window *window, SDL_HitTest callback, void *userdata)
Provide a callback that decides if a window region has special properties.
The type used to identify a window.
const char * SDL_GetCurrentVideoDriver()
Returns the name of the currently initialized video driver.
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
#define SDL_GetRenderDriverInfo
The structure that defines a display mode.
#define SDL_GetKeyboardFocus
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
SDL_Surface * SDL_GetWindowSurface(SDL_Window *window)
Get the SDL surface associated with the window.
void SDL_OnApplicationWillTerminate(void)
SDL_bool(* Vulkan_CreateSurface)(_THIS, SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface)
void SDL_ResetKeyboard(void)
void(* ShowScreenKeyboard)(_THIS, SDL_Window *window)
#define GL_NUM_EXTENSIONS
VideoBootStrap RPI_bootstrap
#define GL_SAMPLE_BUFFERS
int(* GetDisplayUsableBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
const char * SDL_GetDisplayName(int displayIndex)
Get the name of a display in UTF-8 encoding.
void * SDL_GLContext
An opaque handle to an OpenGL context.
SDL_VideoDisplay * SDL_GetDisplay(int displayIndex)
void SDL_MinimizeWindow(SDL_Window *window)
Minimize a window to an iconic representation.
#define SDL_CreateRGBSurfaceFrom
struct SDL_VideoDevice::@255 gl_config
SDL_GLContext SDL_GL_CreateContext(SDL_Window *window)
Create an OpenGL context for use with an OpenGL window, and make it current.
#define SDL_UpdateTexture
int SDL_GetWindowDisplayMode(SDL_Window *window, SDL_DisplayMode *mode)
Fill in information about the display mode used when a fullscreen window is visible.
int SDL_GL_GetSwapInterval(void)
Get the swap interval for the current OpenGL context.
@ SDL_GL_CONTEXT_DEBUG_FLAG
SDL_DisplayMode * SDL_GetClosestDisplayMode(int displayIndex, const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
Get the closest match to the requested display mode.
VideoBootStrap DUMMY_bootstrap
int SDL_SetWindowDisplayMode(SDL_Window *window, const SDL_DisplayMode *mode)
Set the display mode used when a fullscreen window is visible.
#define SDL_GetHintBoolean
void * SDL_SetWindowData(SDL_Window *window, const char *name, void *userdata)
Associate an arbitrary named pointer with a window.
SDL_bool SDL_ShouldAllowTopmost(void)
static screen_context_t context
static int SDL_UpdateWindowTexture(SDL_VideoDevice *unused, SDL_Window *window, const SDL_Rect *rects, int numrects)
int(* SetWindowGammaRamp)(_THIS, SDL_Window *window, const Uint16 *ramp)
int SDL_GetIndexOfDisplay(SDL_VideoDisplay *display)
Uint32 SDL_GetWindowFlags(SDL_Window *window)
Get the window flags.
static SDL_VideoDevice * _this
static int cmpmodes(const void *A, const void *B)
GLint GLint GLint GLint GLint x
@ SDL_GL_SHARE_WITH_CURRENT_CONTEXT
@ SDL_GL_FRAMEBUFFER_SRGB_CAPABLE
#define SDL_GetEventState(type)
EGLSurface EGLNativeWindowType * window
static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void)
const char * SDL_GetVideoDriver(int index)
Get the name of a built in video driver.
void(* SetWindowFullscreen)(_THIS, SDL_Window *window, SDL_VideoDisplay *display, SDL_bool fullscreen)
SDL_MetalView(* Metal_CreateView)(_THIS, SDL_Window *window)
static SDL_bool CanMinimizeWindow(SDL_Window *window)
VideoBootStrap KMSDRM_bootstrap
#define SDL_HINT_ALLOW_TOPMOST
If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it....
#define SDL_GetRelativeMouseMode
SDL_bool(* HasScreenKeyboardSupport)(_THIS)
@ SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG
SDL_Window * 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.
int(* ShowMessageBox)(_THIS, const SDL_MessageBoxData *messageboxdata, int *buttonid)
SDL_bool SDL_GetWindowGrab(SDL_Window *window)
Get a window's input grab mode.
void SDL_DestroyWindow(SDL_Window *window)
Destroy a window.
void SDL_UpdateWindowGrab(SDL_Window *window)
static SDL_INLINE SDL_bool isAtLeastGL3(const char *verstr)
int SDL_GL_MakeCurrent(SDL_Window *window, SDL_GLContext ctx)
Set up an OpenGL context for rendering into an OpenGL window.
MessageBox structure containing title, text, window, etc.
void(* GL_GetDrawableSize)(_THIS, SDL_Window *window, int *w, int *h)
GLuint const GLchar * name
SDL_VideoDisplay * displays
void(* GetDisplayModes)(_THIS, SDL_VideoDisplay *display)
void SDL_GetWindowSize(SDL_Window *window, int *w, int *h)
Get the size of a window's client area.
SDL_VideoDisplay * SDL_GetDisplayForWindow(SDL_Window *window)
#define GL_ACCUM_RED_BITS
@ SDL_GL_ACCELERATED_VISUAL
void SDL_Vulkan_GetDrawableSize(SDL_Window *window, int *w, int *h)
Get the size of a window's underlying drawable in pixels (for use with setting viewport,...
VideoBootStrap WINDOWS_bootstrap
SDL_bool SDL_HasWindows(void)
#define SDL_WINDOWTEXTUREDATA
@ SDL_GL_CONTEXT_PROFILE_ES
int share_with_current_context
#define SDL_PixelFormatEnumToMasks
void SDL_SetWindowMaximumSize(SDL_Window *window, int max_w, int max_h)
Set the maximum size of a window's client area.
int SDL_GetDisplayBounds(int displayIndex, SDL_Rect *rect)
Get the desktop area represented by a display, with the primary display located at 0,...
int SDL_AddBasicVideoDisplay(const SDL_DisplayMode *desktop_mode)
void(* StartTextInput)(_THIS)
void(* RaiseWindow)(_THIS, SDL_Window *window)
void SDL_StopTextInput(void)
Stop receiving any text input events. This function will hide the on-screen keyboard if supported.
VideoBootStrap OFFSCREEN_bootstrap
void(* StopTextInput)(_THIS)
void SDL_OnApplicationDidEnterBackground(void)
static void SDL_DestroyWindowTexture(SDL_VideoDevice *unused, SDL_Window *window)
void SDL_OnWindowEnter(SDL_Window *window)
void(* SetWindowMinimumSize)(_THIS, SDL_Window *window)
@ SDL_WINDOW_INPUT_GRABBED
void SDL_RestoreWindow(SDL_Window *window)
Restore the size and position of a minimized or maximized window.
@ SDL_APP_WILLENTERBACKGROUND
static int SDL_CreateWindowTexture(SDL_VideoDevice *unused, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
static int SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
@ SDL_WINDOWEVENT_SIZE_CHANGED
int 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_ACCUM_ALPHA_SIZE
int SDL_GetNumVideoDisplays(void)
Returns the number of available video displays.
void(* MinimizeWindow)(_THIS, SDL_Window *window)
@ SDL_PIXELFORMAT_ARGB8888
void SDL_MaximizeWindow(SDL_Window *window)
Make a window as large as possible.
void SDL_GL_UnloadLibrary(void)
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
VideoBootStrap PSP_bootstrap
Uint32 WINRT_DetectWindowFlags(SDL_Window *window)
int(* SetWindowHitTest)(SDL_Window *window, SDL_bool enabled)
#define SDL_assert(condition)
void SDL_OnApplicationDidBecomeActive(void)
Uint32 SDL_GetWindowPixelFormat(SDL_Window *window)
Get the pixel format associated with the window.
void(* SetWindowMaximumSize)(_THIS, SDL_Window *window)
int SDL_GetCurrentDisplayMode(int displayIndex, SDL_DisplayMode *mode)
Fill in information about the current display mode.
@ SDL_WINDOWEVENT_MINIMIZED
VideoBootStrap Wayland_bootstrap
VideoBootStrap VIVANTE_bootstrap
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
VideoBootStrap NACL_bootstrap
VideoBootStrap DirectFB_bootstrap
SDL_bool SDL_GetWindowWMInfo(SDL_Window *window, struct SDL_SysWMinfo *info)
This function allows access to driver-dependent window information.
#define SDL_OutOfMemory()
SDL_bool(* IsScreenKeyboardShown)(_THIS, SDL_Window *window)
int SDL_SetWindowGammaRamp(SDL_Window *window, const Uint16 *red, const Uint16 *green, const Uint16 *blue)
Set the gamma ramp for a window.
GLint GLint GLint GLint GLint GLint y
#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE
void(* DestroyWindow)(_THIS, SDL_Window *window)
set set set set set set set macro pixldst1 abits if abits op else op endif endm macro pixldst2 abits if abits op else op endif endm macro pixldst4 abits if abits op else op endif endm macro pixldst0 abits op endm macro pixldst3 mem_operand op endm macro pixldst30 mem_operand op endm macro pixldst abits if abits elseif abits elseif abits elseif abits elseif abits pixldst0 abits else pixldst0 abits pixldst0 abits pixldst0 abits pixldst0 abits endif elseif abits else pixldst0 abits pixldst0 abits endif elseif abits else error unsupported bpp
VideoBootStrap HAIKU_bootstrap
static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
void(* SetWindowBordered)(_THIS, SDL_Window *window, SDL_bool bordered)
SDL_bool SDL_AddDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
void SDL_SetWindowBordered(SDL_Window *window, SDL_bool bordered)
Set the border state of a window.
int 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)
static SDL_bool SDL_MessageboxValidForDriver(const SDL_MessageBoxData *messageboxdata, SDL_SYSWM_TYPE drivertype)
SDL_Window * SDL_GetGrabbedWindow(void)
Get the window that currently has an input grab enabled.
void SDL_OnApplicationWillResignActive(void)
#define SDL_arraysize(array)
void SDL_SetWindowResizable(SDL_Window *window, SDL_bool resizable)
Set the user-resizable state of a window.
#define SDL_DestroyTexture
void SDL_StartTextInput(void)
Start accepting Unicode text input events. This function will show the on-screen keyboard if supporte...
#define FULLSCREEN_VISIBLE(W)
#define SDL_HINT_DISPLAY_USABLE_BOUNDS
#define GL_ACCUM_BLUE_BITS
int(* GL_SetSwapInterval)(_THIS, int interval)
void SDL_GetWindowMaximumSize(SDL_Window *window, int *max_w, int *max_h)
Get the maximum size of a window's client area.
void(* SetWindowResizable)(_THIS, SDL_Window *window, SDL_bool resizable)
void(* AcceptDragAndDrop)(SDL_Window *window, SDL_bool accept)
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
int(* CreateSDLWindowFrom)(_THIS, SDL_Window *window, const void *data)
SDL_bool SDL_Vulkan_CreateSurface(SDL_Window *window, VkInstance instance, VkSurfaceKHR *surface)
Create a Vulkan rendering surface for a window.
float SDL_ComputeDiagonalDPI(int hpix, int vpix, float hinches, float vinches)
static SDL_Renderer * renderer
int SDL_AddVideoDisplay(const SDL_VideoDisplay *display)
SDL_VideoDevice * SDL_GetVideoDevice(void)
@ SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT
int SDL_GL_SetAttribute(SDL_GLattr attr, int value)
Set an OpenGL window attribute before window creation.
SDL_GLContext SDL_GL_GetCurrentContext(void)
Get the currently active OpenGL context.
#define SDL_ISPIXELFORMAT_FOURCC(format)
int SDL_GetDisplayDPI(int displayIndex, float *ddpi, float *hdpi, float *vdpi)
Get the dots/pixels-per-inch for a display.
#define GL_ACCUM_ALPHA_BITS
int SDL_KeyboardInit(void)
The structure that defines a point (integer)
SDL_bool SDL_IsTextInputActive(void)
Return whether or not Unicode text input events are enabled.
void * SDL_GetDisplayDriverData(int displayIndex)
GLsizei const GLfloat * value
static VideoBootStrap * bootstrap[]
@ SDL_GL_CONTEXT_MINOR_VERSION
#define SDL_BYTESPERPIXEL(X)
int(* SetWindowInputFocus)(_THIS, SDL_Window *window)
int(* GL_MakeCurrent)(_THIS, SDL_Window *window, SDL_GLContext context)
int(* GL_LoadLibrary)(_THIS, const char *path)
A rectangle, with the origin at the upper left (integer).
#define SDL_GetMouseFocus
int(* SetDisplayMode)(_THIS, SDL_VideoDisplay *display, SDL_DisplayMode *mode)
@ SDL_GL_MULTISAMPLEBUFFERS
#define GL_ACCUM_GREEN_BITS
void(* GL_UnloadLibrary)(_THIS)
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
int(* GetDisplayBounds)(_THIS, SDL_VideoDisplay *display, SDL_Rect *rect)
int(* GetDisplayDPI)(_THIS, SDL_VideoDisplay *display, float *ddpi, float *hdpi, float *vdpi)
int SDL_GL_GetAttribute(SDL_GLattr attr, int *value)
Get the actual value for an attribute from the current context.
struct SDL_WindowUserData * next
static SDL_bool ShouldUseTextureFramebuffer()
SDL_VideoDevice *(* create)(int devindex)
@ SDL_PIXELFORMAT_UNKNOWN
SDL_MetalView SDL_Metal_CreateView(SDL_Window *window)
Create a CAMetalLayer-backed NSView/UIView and attach it to the specified window.
void SDL_SetWindowIcon(SDL_Window *window, SDL_Surface *icon)
Set the icon for a window.
int SDL_VideoInit(const char *driver_name)
Initialize the video subsystem, optionally specifying a video driver.
void SDL_Vulkan_UnloadLibrary(void)
Unload the Vulkan loader library previously loaded by SDL_Vulkan_LoadLibrary().
int framebuffer_srgb_capable
int(* GL_GetSwapInterval)(_THIS)
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
VideoBootStrap UIKIT_bootstrap
SDL_DisplayOrientation SDL_GetDisplayOrientation(int displayIndex)
Get the orientation of a display.
int SDL_ShowSimpleMessageBox(Uint32 flags, const char *title, const char *message, SDL_Window *window)
Create a simple modal message box.
#define SDL_HINT_FRAMEBUFFER_ACCELERATION
A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
int SDL_Vulkan_LoadLibrary(const char *path)
Dynamically load a Vulkan loader library.
#define CHECK_DISPLAY_INDEX(displayIndex, retval)
static SDL_INLINE void PrepareDragAndDropSupport(SDL_Window *window)
#define SDL_EnclosePoints
SDL_Window * current_glwin
@ SDL_ORIENTATION_UNKNOWN
SDL_bool(* Vulkan_GetInstanceExtensions)(_THIS, SDL_Window *window, unsigned *count, const char **names)
@ SDL_GL_CONTEXT_RELEASE_BEHAVIOR
SDL_bool SDL_GL_ExtensionSupported(const char *extension)
Return true if an OpenGL extension is supported for the current context.
int SDL_ShowMessageBox(const SDL_MessageBoxData *messageboxdata, int *buttonid)
Create a modal message box.
static void SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
int(* GL_SwapWindow)(_THIS, SDL_Window *window)
void(* MaximizeWindow)(_THIS, SDL_Window *window)
void(* HideScreenKeyboard)(_THIS, SDL_Window *window)
void(* SetWindowSize)(_THIS, SDL_Window *window)
void(* GL_DefaultProfileConfig)(_THIS, int *mask, int *major, int *minor)
SDL_bool Android_JNI_ShouldMinimizeOnFocusLoss(void)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int int in j)
static int SDL_UninitializedVideo()
int(* SetWindowOpacity)(_THIS, SDL_Window *window, float opacity)
SDL_bool SDL_IsVideoContextExternal(void)
#define SDL_HINT_RENDER_DRIVER
A variable specifying which render driver to use.
int(* GetWindowGammaRamp)(_THIS, SDL_Window *window, Uint16 *ramp)
Uint32 SDL_GetWindowID(SDL_Window *window)
Get the numeric ID of a window, for logging purposes.
@ SDL_WINDOWEVENT_RESTORED
#define SDL_ISPIXELFORMAT_ALPHA(format)
#define SDL_Unsupported()
VideoBootStrap QNX_bootstrap
#define SDL_CalculateGammaRamp
void(* ShowWindow)(_THIS, SDL_Window *window)
#define GL_CONTEXT_RELEASE_BEHAVIOR
int(* CreateWindowFramebuffer)(_THIS, SDL_Window *window, Uint32 *format, void **pixels, int *pitch)
void * SDL_GL_GetProcAddress(const char *proc)
Get the address of an OpenGL function.
SDL_DisplayMode current_mode
void * SDL_Vulkan_GetVkGetInstanceProcAddr(void)
Get the address of the vkGetInstanceProcAddr function.
void *(* GL_GetProcAddress)(_THIS, const char *proc)
int SDL_GetWindowGammaRamp(SDL_Window *window, Uint16 *red, Uint16 *green, Uint16 *blue)
Get the gamma ramp for a window.
Uint32 texture_formats[16]
#define SDL_CreateRenderer
VideoBootStrap PND_bootstrap
int SDL_UpdateWindowSurface(SDL_Window *window)
Copy the window surface to the screen.
SDL_bool SDL_HasScreenKeyboardSupport(void)
Returns whether the platform has some screen keyboard support.
void SDL_GL_SwapWindow(SDL_Window *window)
Swap the OpenGL buffers for a window, if double-buffering is supported.
SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char int SDL_PRINTF_FORMAT_STRING const char const char SDL_SCANF_FORMAT_STRING const char return SDL_ThreadFunction const char void return Uint32 return Uint32 void
void SDL_SetWindowPosition(SDL_Window *window, int x, int y)
Set the position of a window.
int SDL_RecreateWindow(SDL_Window *window, Uint32 flags)
void SDL_OnWindowResized(SDL_Window *window)
@ SDL_GL_CONTEXT_RESET_NOTIFICATION
static SDL_DisplayMode * SDL_GetClosestDisplayModeForDisplay(SDL_VideoDisplay *display, const SDL_DisplayMode *mode, SDL_DisplayMode *closest)
@ SDL_WINDOWEVENT_FOCUS_GAINED
@ SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG
void SDL_OnWindowHidden(SDL_Window *window)
#define SDL_DestroyRenderer
@ SDL_TEXTUREACCESS_STREAMING
#define CHECK_WINDOW_MAGIC(window, retval)
int SDL_SendAppEvent(SDL_EventType eventType)
SDL_GLContext current_glctx
void(* RestoreWindow)(_THIS, SDL_Window *window)
void SDL_SetTextInputRect(SDL_Rect *rect)
Set the rectangle used to type Unicode text inputs. This is used as a hint for IME and on-screen keyb...
EGLSurface EGLint * rects
#define SDL_WarpMouseInWindow
void(* GL_DeleteContext)(_THIS, SDL_GLContext context)
void SDL_OnWindowFocusLost(SDL_Window *window)
int SDL_SetWindowFullscreen(SDL_Window *window, Uint32 flags)
Set a window's fullscreen state.
SDL_DisplayOrientation orientation
#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE
static int SDL_GetNumDisplayModesForDisplay(SDL_VideoDisplay *display)
SDL_bool suspend_screensaver
int SDL_GetNumDisplayModes(int displayIndex)
Returns the number of available display modes.
SDL_Window * SDL_GL_GetCurrentWindow(void)
Get the currently active OpenGL window.
@ SDL_GL_CONTEXT_PROFILE_COMPATIBILITY
void * SDL_GetWindowData(SDL_Window *window, const char *name)
Retrieve the data pointer associated with a window.
#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE
#define SDL_CreateTexture
int SDL_GetWindowDisplayIndex(SDL_Window *window)
Get the display index associated with a window.
void SDL_OnWindowShown(SDL_Window *window)
void SDL_EnableScreenSaver()
Allow the screen to be blanked by a screensaver.
static SDL_bool ShouldMinimizeOnFocusLoss(SDL_Window *window)
return Display return Display Bool Bool int int int return Display XEvent Bool(*) XPointer return Display return Display Drawable _Xconst char unsigned int unsigned int return Display Pixmap Pixmap XColor XColor unsigned int unsigned int return Display _Xconst char char int char return Display Visual unsigned int int int char unsigned int unsigned int in i)
#define SDL_WINDOWPOS_ISUNDEFINED(X)
SDL_Window * fullscreen_window
void SDL_Metal_DestroyView(SDL_MetalView view)
Destroy an existing SDL_MetalView object.
Uint32 num_texture_formats
@ SDL_GL_CONTEXT_MAJOR_VERSION
int SDL_GetNumVideoDrivers(void)
Get the number of video drivers compiled into SDL.
GLubyte GLubyte GLubyte GLubyte w
@ SDL_GL_ACCUM_GREEN_SIZE
SDL_bool SDL_GetSpanEnclosingRect(int width, int height, int numrects, const SDL_Rect *rects, SDL_Rect *span)
#define SDL_GetRendererInfo
#define GL_CONTEXT_RELEASE_BEHAVIOR_KHR