SDL  2.0
SDL_sysvideo.h File Reference
#include "../SDL_internal.h"
#include "SDL_messagebox.h"
#include "SDL_shape.h"
#include "SDL_thread.h"
#include "SDL_metal.h"
#include "SDL_vulkan_internal.h"
+ Include dependency graph for SDL_sysvideo.h:

Go to the source code of this file.

Data Structures

struct  SDL_WindowShaper
 
struct  SDL_ShapeDriver
 
struct  SDL_WindowUserData
 
struct  SDL_Window
 The type used to identify a window. More...
 
struct  SDL_VideoDisplay
 
struct  SDL_VideoDevice
 
struct  VideoBootStrap
 

Macros

#define FULLSCREEN_VISIBLE(W)
 
#define _THIS   SDL_VideoDevice *_this
 

Functions

SDL_VideoDeviceSDL_GetVideoDevice (void)
 
int SDL_AddBasicVideoDisplay (const SDL_DisplayMode *desktop_mode)
 
int SDL_AddVideoDisplay (const SDL_VideoDisplay *display)
 
SDL_bool SDL_AddDisplayMode (SDL_VideoDisplay *display, const SDL_DisplayMode *mode)
 
int SDL_GetIndexOfDisplay (SDL_VideoDisplay *display)
 
SDL_VideoDisplaySDL_GetDisplay (int displayIndex)
 
SDL_VideoDisplaySDL_GetDisplayForWindow (SDL_Window *window)
 
voidSDL_GetDisplayDriverData (int displayIndex)
 
SDL_bool SDL_IsVideoContextExternal (void)
 
void SDL_GL_DeduceMaxSupportedESProfile (int *major, int *minor)
 
int SDL_RecreateWindow (SDL_Window *window, Uint32 flags)
 
SDL_bool SDL_HasWindows (void)
 
void SDL_OnWindowShown (SDL_Window *window)
 
void SDL_OnWindowHidden (SDL_Window *window)
 
void SDL_OnWindowResized (SDL_Window *window)
 
void SDL_OnWindowMinimized (SDL_Window *window)
 
void SDL_OnWindowRestored (SDL_Window *window)
 
void SDL_OnWindowEnter (SDL_Window *window)
 
void SDL_OnWindowLeave (SDL_Window *window)
 
void SDL_OnWindowFocusGained (SDL_Window *window)
 
void SDL_OnWindowFocusLost (SDL_Window *window)
 
void SDL_UpdateWindowGrab (SDL_Window *window)
 
SDL_WindowSDL_GetFocusWindow (void)
 
SDL_bool SDL_ShouldAllowTopmost (void)
 
float SDL_ComputeDiagonalDPI (int hpix, int vpix, float hinches, float vinches)
 
void SDL_ToggleDragAndDropSupport (void)
 

Variables

VideoBootStrap COCOA_bootstrap
 
VideoBootStrap X11_bootstrap
 
VideoBootStrap DirectFB_bootstrap
 
VideoBootStrap WINDOWS_bootstrap
 
VideoBootStrap WINRT_bootstrap
 
VideoBootStrap HAIKU_bootstrap
 
VideoBootStrap PND_bootstrap
 
VideoBootStrap UIKIT_bootstrap
 
VideoBootStrap Android_bootstrap
 
VideoBootStrap PSP_bootstrap
 
VideoBootStrap RPI_bootstrap
 
VideoBootStrap KMSDRM_bootstrap
 
VideoBootStrap DUMMY_bootstrap
 
VideoBootStrap Wayland_bootstrap
 
VideoBootStrap NACL_bootstrap
 
VideoBootStrap VIVANTE_bootstrap
 
VideoBootStrap Emscripten_bootstrap
 
VideoBootStrap QNX_bootstrap
 
VideoBootStrap OFFSCREEN_bootstrap
 

Macro Definition Documentation

◆ _THIS

#define _THIS   SDL_VideoDevice *_this

Definition at line 148 of file SDL_sysvideo.h.

◆ FULLSCREEN_VISIBLE

#define FULLSCREEN_VISIBLE (   W)
Value:

Definition at line 118 of file SDL_sysvideo.h.

Function Documentation

◆ SDL_AddBasicVideoDisplay()

int SDL_AddBasicVideoDisplay ( const SDL_DisplayMode desktop_mode)

Definition at line 592 of file SDL_video.c.

593 {
594  SDL_VideoDisplay display;
595 
596  SDL_zero(display);
597  if (desktop_mode) {
598  display.desktop_mode = *desktop_mode;
599  }
600  display.current_mode = display.desktop_mode;
601 
602  return SDL_AddVideoDisplay(&display);
603 }

References SDL_VideoDisplay::current_mode, SDL_VideoDisplay::desktop_mode, SDL_AddVideoDisplay(), and SDL_zero.

◆ SDL_AddDisplayMode()

SDL_bool SDL_AddDisplayMode ( SDL_VideoDisplay display,
const SDL_DisplayMode mode 
)

Definition at line 772 of file SDL_video.c.

773 {
774  SDL_DisplayMode *modes;
775  int i, nmodes;
776 
777  /* Make sure we don't already have the mode in the list */
778  modes = display->display_modes;
779  nmodes = display->num_display_modes;
780  for (i = 0; i < nmodes; ++i) {
781  if (cmpmodes(mode, &modes[i]) == 0) {
782  return SDL_FALSE;
783  }
784  }
785 
786  /* Go ahead and add the new mode */
787  if (nmodes == display->max_display_modes) {
788  modes =
789  SDL_realloc(modes,
790  (display->max_display_modes + 32) * sizeof(*modes));
791  if (!modes) {
792  return SDL_FALSE;
793  }
794  display->display_modes = modes;
795  display->max_display_modes += 32;
796  }
797  modes[nmodes] = *mode;
798  display->num_display_modes++;
799 
800  /* Re-sort video modes */
801  SDL_qsort(display->display_modes, display->num_display_modes,
802  sizeof(SDL_DisplayMode), cmpmodes);
803 
804  return SDL_TRUE;
805 }

References cmpmodes(), SDL_VideoDisplay::display_modes, i, SDL_VideoDisplay::max_display_modes, SDL_VideoDisplay::num_display_modes, SDL_FALSE, SDL_qsort, SDL_realloc, and SDL_TRUE.

◆ SDL_AddVideoDisplay()

int SDL_AddVideoDisplay ( const SDL_VideoDisplay display)

Definition at line 606 of file SDL_video.c.

607 {
608  SDL_VideoDisplay *displays;
609  int index = -1;
610 
611  displays =
613  (_this->num_displays + 1) * sizeof(*displays));
614  if (displays) {
615  index = _this->num_displays++;
616  displays[index] = *display;
617  displays[index].device = _this;
618  _this->displays = displays;
619 
620  if (display->name) {
621  displays[index].name = SDL_strdup(display->name);
622  } else {
623  char name[32];
624 
625  SDL_itoa(index, name, 10);
626  displays[index].name = SDL_strdup(name);
627  }
628  } else {
629  SDL_OutOfMemory();
630  }
631  return index;
632 }

References _this, SDL_VideoDisplay::device, SDL_VideoDevice::displays, SDL_VideoDisplay::name, SDL_VideoDevice::num_displays, SDL_itoa, SDL_OutOfMemory, SDL_realloc, and SDL_strdup.

Referenced by SDL_AddBasicVideoDisplay(), and videoInit().

◆ SDL_ComputeDiagonalDPI()

float SDL_ComputeDiagonalDPI ( int  hpix,
int  vpix,
float  hinches,
float  vinches 
)

Definition at line 4046 of file SDL_video.c.

4047 {
4048  float den2 = hinches * hinches + vinches * vinches;
4049  if (den2 <= 0.0f) {
4050  return 0.0f;
4051  }
4052 
4053  return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) /
4054  SDL_sqrt((double)den2));
4055 }

References SDL_sqrt.

◆ SDL_GetDisplay()

SDL_VideoDisplay* SDL_GetDisplay ( int  displayIndex)

Definition at line 1042 of file SDL_video.c.

1043 {
1044  CHECK_DISPLAY_INDEX(displayIndex, NULL);
1045 
1046  return &_this->displays[displayIndex];
1047 }

References _this, CHECK_DISPLAY_INDEX, SDL_VideoDevice::displays, and NULL.

◆ SDL_GetDisplayDriverData()

void* SDL_GetDisplayDriverData ( int  displayIndex)

Definition at line 660 of file SDL_video.c.

661 {
662  CHECK_DISPLAY_INDEX(displayIndex, NULL);
663 
664  return _this->displays[displayIndex].driverdata;
665 }

References _this, CHECK_DISPLAY_INDEX, SDL_VideoDevice::displays, SDL_VideoDisplay::driverdata, and NULL.

◆ SDL_GetDisplayForWindow()

SDL_VideoDisplay* SDL_GetDisplayForWindow ( SDL_Window window)

Definition at line 1110 of file SDL_video.c.

1111 {
1112  int displayIndex = SDL_GetWindowDisplayIndex(window);
1113  if (displayIndex >= 0) {
1114  return &_this->displays[displayIndex];
1115  } else {
1116  return NULL;
1117  }
1118 }

References _this, SDL_VideoDevice::displays, NULL, and SDL_GetWindowDisplayIndex().

Referenced by SDL_CreateWindow(), SDL_DestroyWindow(), SDL_GetWindowDisplayMode(), SDL_GetWindowPixelFormat(), SDL_SetWindowDisplayMode(), and SDL_UpdateFullscreenMode().

◆ SDL_GetFocusWindow()

SDL_Window* SDL_GetFocusWindow ( void  )

Definition at line 2717 of file SDL_video.c.

2718 {
2719  SDL_Window *window;
2720 
2721  if (!_this) {
2722  return NULL;
2723  }
2724  for (window = _this->windows; window; window = window->next) {
2725  if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
2726  return window;
2727  }
2728  }
2729  return NULL;
2730 }

References _this, SDL_Window::next, NULL, SDL_WINDOW_INPUT_FOCUS, and SDL_VideoDevice::windows.

Referenced by SDL_PromptAssertion(), SDL_StartTextInput(), and SDL_StopTextInput().

◆ SDL_GetIndexOfDisplay()

int SDL_GetIndexOfDisplay ( SDL_VideoDisplay display)

Definition at line 645 of file SDL_video.c.

646 {
647  int displayIndex;
648 
649  for (displayIndex = 0; displayIndex < _this->num_displays; ++displayIndex) {
650  if (display == &_this->displays[displayIndex]) {
651  return displayIndex;
652  }
653  }
654 
655  /* Couldn't find the display, just use index 0 */
656  return 0;
657 }

References _this, SDL_VideoDevice::displays, and SDL_VideoDevice::num_displays.

Referenced by SDL_CreateWindow(), and SDL_SendDisplayEvent().

◆ SDL_GetVideoDevice()

◆ SDL_GL_DeduceMaxSupportedESProfile()

void SDL_GL_DeduceMaxSupportedESProfile ( int *  major,
int *  minor 
)

Definition at line 3065 of file SDL_video.c.

3066 {
3067 /* THIS REQUIRES AN EXISTING GL CONTEXT THAT HAS BEEN MADE CURRENT. */
3068 /* Please refer to https://bugzilla.libsdl.org/show_bug.cgi?id=3725 for discussion. */
3069 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
3070  /* XXX This is fragile; it will break in the event of release of
3071  * new versions of OpenGL ES.
3072  */
3073  if (SDL_GL_ExtensionSupported("GL_ARB_ES3_2_compatibility")) {
3074  *major = 3;
3075  *minor = 2;
3076  } else if (SDL_GL_ExtensionSupported("GL_ARB_ES3_1_compatibility")) {
3077  *major = 3;
3078  *minor = 1;
3079  } else if (SDL_GL_ExtensionSupported("GL_ARB_ES3_compatibility")) {
3080  *major = 3;
3081  *minor = 0;
3082  } else {
3083  *major = 2;
3084  *minor = 0;
3085  }
3086 #endif
3087 }

References SDL_GL_ExtensionSupported().

◆ SDL_HasWindows()

SDL_bool SDL_HasWindows ( void  )

Definition at line 1732 of file SDL_video.c.

1733 {
1734  return (_this && _this->windows != NULL);
1735 }

References _this, NULL, and SDL_VideoDevice::windows.

Referenced by SDL_PrivateJoystickShouldIgnoreEvent().

◆ SDL_IsVideoContextExternal()

SDL_bool SDL_IsVideoContextExternal ( void  )

Definition at line 668 of file SDL_video.c.

References SDL_FALSE, SDL_GetHintBoolean, and SDL_HINT_VIDEO_EXTERNAL_CONTEXT.

Referenced by SDL_CreateWindow().

◆ SDL_OnWindowEnter()

void SDL_OnWindowEnter ( SDL_Window window)

Definition at line 2644 of file SDL_video.c.

2645 {
2646  if (_this->OnWindowEnter) {
2648  }
2649 }

References _this, and SDL_VideoDevice::OnWindowEnter.

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowFocusGained()

void SDL_OnWindowFocusGained ( SDL_Window window)

Definition at line 2657 of file SDL_video.c.

2658 {
2659  SDL_Mouse *mouse = SDL_GetMouse();
2660 
2661  if (window->gamma && _this->SetWindowGammaRamp) {
2663  }
2664 
2665  if (mouse && mouse->relative_mode) {
2668  }
2669 
2671 }

References _this, SDL_Mouse::relative_mode, SDL_GetMouse(), SDL_SetMouseFocus(), SDL_UpdateWindowGrab(), SDL_WarpMouseInWindow, and SDL_VideoDevice::SetWindowGammaRamp.

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowFocusLost()

void SDL_OnWindowFocusLost ( SDL_Window window)

Definition at line 2701 of file SDL_video.c.

2702 {
2703  if (window->gamma && _this->SetWindowGammaRamp) {
2704  _this->SetWindowGammaRamp(_this, window, window->saved_gamma);
2705  }
2706 
2708 
2711  }
2712 }

References _this, SDL_MinimizeWindow(), SDL_UpdateWindowGrab(), SDL_VideoDevice::SetWindowGammaRamp, and ShouldMinimizeOnFocusLoss().

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowHidden()

void SDL_OnWindowHidden ( SDL_Window window)

Definition at line 2609 of file SDL_video.c.

2610 {
2612 }

References SDL_FALSE, and SDL_UpdateFullscreenMode().

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowLeave()

void SDL_OnWindowLeave ( SDL_Window window)

Definition at line 2652 of file SDL_video.c.

2653 {
2654 }

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowMinimized()

void SDL_OnWindowMinimized ( SDL_Window window)

Definition at line 2622 of file SDL_video.c.

2623 {
2625 }

References SDL_FALSE, and SDL_UpdateFullscreenMode().

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowResized()

void SDL_OnWindowResized ( SDL_Window window)

◆ SDL_OnWindowRestored()

void SDL_OnWindowRestored ( SDL_Window window)

Definition at line 2628 of file SDL_video.c.

2629 {
2630  /*
2631  * FIXME: Is this fine to just remove this, or should it be preserved just
2632  * for the fullscreen case? In principle it seems like just hiding/showing
2633  * windows shouldn't affect the stacking order; maybe the right fix is to
2634  * re-decouple OnWindowShown and OnWindowRestored.
2635  */
2636  /*SDL_RaiseWindow(window);*/
2637 
2638  if (FULLSCREEN_VISIBLE(window)) {
2640  }
2641 }

References FULLSCREEN_VISIBLE, SDL_TRUE, and SDL_UpdateFullscreenMode().

Referenced by SDL_OnWindowShown(), and SDL_SendWindowEvent().

◆ SDL_OnWindowShown()

void SDL_OnWindowShown ( SDL_Window window)

Definition at line 2603 of file SDL_video.c.

2604 {
2606 }

References SDL_OnWindowRestored().

Referenced by SDL_SendWindowEvent().

◆ SDL_RecreateWindow()

int SDL_RecreateWindow ( SDL_Window window,
Uint32  flags 
)

Definition at line 1635 of file SDL_video.c.

1636 {
1637  SDL_bool loaded_opengl = SDL_FALSE;
1638 
1640  return SDL_SetError("OpenGL support is either not configured in SDL "
1641  "or not available in current SDL video driver "
1642  "(%s) or platform", _this->name);
1643  }
1644 
1645  if (window->flags & SDL_WINDOW_FOREIGN) {
1646  /* Can't destroy and re-create foreign windows, hrm */
1648  } else {
1650  }
1651 
1652  /* Restore video mode, etc. */
1654 
1655  /* Tear down the old native window */
1656  if (window->surface) {
1657  window->surface->flags &= ~SDL_DONTFREE;
1658  SDL_FreeSurface(window->surface);
1659  window->surface = NULL;
1660  window->surface_valid = SDL_FALSE;
1661  }
1664  }
1667  }
1668 
1669  if ((window->flags & SDL_WINDOW_OPENGL) != (flags & SDL_WINDOW_OPENGL)) {
1670  if (flags & SDL_WINDOW_OPENGL) {
1671  if (SDL_GL_LoadLibrary(NULL) < 0) {
1672  return -1;
1673  }
1674  loaded_opengl = SDL_TRUE;
1675  } else {
1677  }
1678  } else if (window->flags & SDL_WINDOW_OPENGL) {
1680  if (SDL_GL_LoadLibrary(NULL) < 0) {
1681  return -1;
1682  }
1683  loaded_opengl = SDL_TRUE;
1684  }
1685 
1686  if ((window->flags & SDL_WINDOW_VULKAN) != (flags & SDL_WINDOW_VULKAN)) {
1687  SDL_SetError("Can't change SDL_WINDOW_VULKAN window flag");
1688  return -1;
1689  }
1690 
1691  if ((window->flags & SDL_WINDOW_VULKAN) && (flags & SDL_WINDOW_OPENGL)) {
1692  SDL_SetError("Vulkan and OpenGL not supported on same window");
1693  return -1;
1694  }
1695 
1696  window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN);
1697  window->last_fullscreen_flags = window->flags;
1698  window->is_destroying = SDL_FALSE;
1699 
1701  if (_this->CreateSDLWindow(_this, window) < 0) {
1702  if (loaded_opengl) {
1704  window->flags &= ~SDL_WINDOW_OPENGL;
1705  }
1706  return -1;
1707  }
1708  }
1709 
1710  if (flags & SDL_WINDOW_FOREIGN) {
1711  window->flags |= SDL_WINDOW_FOREIGN;
1712  }
1713 
1714  if (_this->SetWindowTitle && window->title) {
1716  }
1717 
1718  if (_this->SetWindowIcon && window->icon) {
1720  }
1721 
1722  if (window->hit_test) {
1724  }
1725 
1727 
1728  return 0;
1729 }

References _this, CREATE_FLAGS, SDL_VideoDevice::CreateSDLWindow, SDL_VideoDevice::DestroyWindow, SDL_VideoDevice::DestroyWindowFramebuffer, SDL_VideoDevice::GL_CreateContext, SDL_VideoDevice::name, NULL, SDL_DONTFREE, SDL_FALSE, SDL_FinishWindowCreation(), SDL_FreeSurface, SDL_GL_LoadLibrary(), SDL_GL_UnloadLibrary(), SDL_HideWindow(), SDL_SetError, SDL_TRUE, SDL_WINDOW_FOREIGN, SDL_WINDOW_HIDDEN, SDL_WINDOW_OPENGL, SDL_WINDOW_VULKAN, SDL_VideoDevice::SetWindowHitTest, SDL_VideoDevice::SetWindowIcon, and SDL_VideoDevice::SetWindowTitle.

◆ SDL_ShouldAllowTopmost()

SDL_bool SDL_ShouldAllowTopmost ( void  )

Definition at line 4023 of file SDL_video.c.

4024 {
4026 }

References SDL_GetHintBoolean, SDL_HINT_ALLOW_TOPMOST, and SDL_TRUE.

◆ SDL_ToggleDragAndDropSupport()

void SDL_ToggleDragAndDropSupport ( void  )

Definition at line 1392 of file SDL_video.c.

1393 {
1394  if (_this && _this->AcceptDragAndDrop) {
1396  SDL_Window *window;
1397  for (window = _this->windows; window; window = window->next) {
1399  }
1400  }
1401 }

References _this, SDL_VideoDevice::AcceptDragAndDrop, IsAcceptingDragAndDrop(), SDL_Window::next, and SDL_VideoDevice::windows.

Referenced by SDL_EventState().

◆ SDL_UpdateWindowGrab()

void SDL_UpdateWindowGrab ( SDL_Window window)

Definition at line 2541 of file SDL_video.c.

2542 {
2543  SDL_Window *grabbed_window;
2544  SDL_bool grabbed;
2545  if ((SDL_GetMouse()->relative_mode || (window->flags & SDL_WINDOW_INPUT_GRABBED)) &&
2546  (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
2547  grabbed = SDL_TRUE;
2548  } else {
2549  grabbed = SDL_FALSE;
2550  }
2551 
2552  grabbed_window = _this->grabbed_window;
2553  if (grabbed) {
2554  if (grabbed_window && (grabbed_window != window)) {
2555  /* stealing a grab from another window! */
2556  grabbed_window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
2557  if (_this->SetWindowGrab) {
2558  _this->SetWindowGrab(_this, grabbed_window, SDL_FALSE);
2559  }
2560  }
2562  } else if (grabbed_window == window) {
2563  _this->grabbed_window = NULL; /* ungrabbing. */
2564  }
2565 
2566  if (_this->SetWindowGrab) {
2567  _this->SetWindowGrab(_this, window, grabbed);
2568  }
2569 }

References _this, SDL_Window::flags, SDL_VideoDevice::grabbed_window, NULL, SDL_FALSE, SDL_GetMouse(), SDL_TRUE, SDL_WINDOW_INPUT_FOCUS, SDL_WINDOW_INPUT_GRABBED, and SDL_VideoDevice::SetWindowGrab.

Referenced by SDL_OnWindowFocusGained(), SDL_OnWindowFocusLost(), SDL_SetRelativeMouseMode(), and SDL_SetWindowGrab().

Variable Documentation

◆ Android_bootstrap

VideoBootStrap Android_bootstrap

◆ COCOA_bootstrap

VideoBootStrap COCOA_bootstrap

◆ DirectFB_bootstrap

VideoBootStrap DirectFB_bootstrap

◆ DUMMY_bootstrap

VideoBootStrap DUMMY_bootstrap

◆ Emscripten_bootstrap

VideoBootStrap Emscripten_bootstrap

◆ HAIKU_bootstrap

VideoBootStrap HAIKU_bootstrap

◆ KMSDRM_bootstrap

VideoBootStrap KMSDRM_bootstrap

◆ NACL_bootstrap

VideoBootStrap NACL_bootstrap

◆ OFFSCREEN_bootstrap

VideoBootStrap OFFSCREEN_bootstrap

◆ PND_bootstrap

VideoBootStrap PND_bootstrap

◆ PSP_bootstrap

VideoBootStrap PSP_bootstrap

◆ QNX_bootstrap

VideoBootStrap QNX_bootstrap

Definition at line 361 of file video.c.

◆ RPI_bootstrap

VideoBootStrap RPI_bootstrap

◆ UIKIT_bootstrap

VideoBootStrap UIKIT_bootstrap

◆ VIVANTE_bootstrap

VideoBootStrap VIVANTE_bootstrap

◆ Wayland_bootstrap

VideoBootStrap Wayland_bootstrap

◆ WINDOWS_bootstrap

VideoBootStrap WINDOWS_bootstrap

◆ WINRT_bootstrap

VideoBootStrap WINRT_bootstrap

◆ X11_bootstrap

VideoBootStrap X11_bootstrap
SDL_VideoDevice::CreateSDLWindow
int(* CreateSDLWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:212
SDL_GetMouse
SDL_Mouse * SDL_GetMouse(void)
Definition: SDL_mouse.c:170
SDL_zero
#define SDL_zero(x)
Definition: SDL_stdinc.h:418
SDL_HINT_VIDEO_EXTERNAL_CONTEXT
#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT
A variable controlling whether the graphics context is externally managed.
Definition: SDL_hints.h:180
SDL_VideoDisplay::display_modes
SDL_DisplayMode * display_modes
Definition: SDL_sysvideo.h:131
SDL_VideoDisplay::name
char * name
Definition: SDL_sysvideo.h:128
SDL_WINDOW_MINIMIZED
@ SDL_WINDOW_MINIMIZED
Definition: SDL_video.h:105
SDL_VideoDevice::OnWindowEnter
void(* OnWindowEnter)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:240
NULL
#define NULL
Definition: begin_code.h:167
SDL_GL_LoadLibrary
int SDL_GL_LoadLibrary(const char *path)
Dynamically load an OpenGL library.
Definition: SDL_video.c:2899
enable
GLboolean enable
Definition: SDL_opengl_glext.h:4999
SDL_VideoDisplay::device
SDL_VideoDevice * device
Definition: SDL_sysvideo.h:138
SDL_qsort
#define SDL_qsort
Definition: SDL_dynapi_overrides.h:380
mode
GLenum mode
Definition: SDL_opengl_glext.h:1125
SDL_VideoDevice::grabbed_window
SDL_Window * grabbed_window
Definition: SDL_sysvideo.h:326
SDL_WINDOW_FULLSCREEN
@ SDL_WINDOW_FULLSCREEN
Definition: SDL_video.h:99
SDL_VideoDevice::SetWindowTitle
void(* SetWindowTitle)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:214
SDL_WINDOW_OPENGL
@ SDL_WINDOW_OPENGL
Definition: SDL_video.h:100
SDL_realloc
#define SDL_realloc
Definition: SDL_dynapi_overrides.h:376
SDL_HideWindow
void SDL_HideWindow(SDL_Window *window)
Hide a window.
Definition: SDL_video.c:2189
SDL_DONTFREE
#define SDL_DONTFREE
Definition: SDL_surface.h:55
SDL_itoa
#define SDL_itoa
Definition: SDL_dynapi_overrides.h:404
SDL_WINDOW_FOREIGN
@ SDL_WINDOW_FOREIGN
Definition: SDL_video.h:111
SDL_VideoDisplay::desktop_mode
SDL_DisplayMode desktop_mode
Definition: SDL_sysvideo.h:132
index
GLuint index
Definition: SDL_opengl_glext.h:663
SDL_SetMouseFocus
void SDL_SetMouseFocus(SDL_Window *window)
Definition: SDL_mouse.c:203
SDL_WINDOW_INPUT_FOCUS
@ SDL_WINDOW_INPUT_FOCUS
Definition: SDL_video.h:108
SDL_OnWindowRestored
void SDL_OnWindowRestored(SDL_Window *window)
Definition: SDL_video.c:2628
SDL_Window
The type used to identify a window.
Definition: SDL_sysvideo.h:75
SDL_VideoDevice::SetWindowIcon
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
Definition: SDL_sysvideo.h:215
SDL_DisplayMode
The structure that defines a display mode.
Definition: SDL_video.h:54
SDL_VideoDevice::SetWindowGrab
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
Definition: SDL_sysvideo.h:235
CREATE_FLAGS
#define CREATE_FLAGS
Definition: SDL_video.c:1368
SDL_MinimizeWindow
void SDL_MinimizeWindow(SDL_Window *window)
Minimize a window to an iconic representation.
Definition: SDL_video.c:2246
SDL_GetHintBoolean
#define SDL_GetHintBoolean
Definition: SDL_dynapi_overrides.h:608
SDL_Mouse::relative_mode
SDL_bool relative_mode
Definition: SDL_mouse_c.h:87
SDL_VideoDevice::SetWindowGammaRamp
int(* SetWindowGammaRamp)(_THIS, SDL_Window *window, const Uint16 *ramp)
Definition: SDL_sysvideo.h:233
_this
static SDL_VideoDevice * _this
Definition: SDL_video.c:121
SDL_VideoDevice::num_displays
int num_displays
Definition: SDL_sysvideo.h:323
cmpmodes
static int cmpmodes(const void *A, const void *B)
Definition: SDL_video.c:419
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
IsAcceptingDragAndDrop
static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void)
Definition: SDL_video.c:1372
SDL_HINT_ALLOW_TOPMOST
#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....
Definition: SDL_hints.h:672
f
GLfloat f
Definition: SDL_opengl_glext.h:1873
SDL_UpdateWindowGrab
void SDL_UpdateWindowGrab(SDL_Window *window)
Definition: SDL_video.c:2541
name
GLuint const GLchar * name
Definition: SDL_opengl_glext.h:663
SDL_VideoDevice::displays
SDL_VideoDisplay * displays
Definition: SDL_sysvideo.h:324
SDL_FreeSurface
#define SDL_FreeSurface
Definition: SDL_dynapi_overrides.h:446
SDL_WINDOW_INPUT_GRABBED
@ SDL_WINDOW_INPUT_GRABBED
Definition: SDL_video.h:107
SDL_Mouse
Definition: SDL_mouse_c.h:44
SDL_WINDOWEVENT_SIZE_CHANGED
@ SDL_WINDOWEVENT_SIZE_CHANGED
Definition: SDL_video.h:155
SDL_TRUE
@ SDL_TRUE
Definition: SDL_stdinc.h:164
SDL_GL_UnloadLibrary
void SDL_GL_UnloadLibrary(void)
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
Definition: SDL_video.c:2950
SDL_VideoDevice::SetWindowHitTest
int(* SetWindowHitTest)(SDL_Window *window, SDL_bool enabled)
Definition: SDL_sysvideo.h:314
SDL_WINDOW_SHOWN
@ SDL_WINDOW_SHOWN
Definition: SDL_video.h:101
SDL_VideoDisplay::driverdata
void * driverdata
Definition: SDL_sysvideo.h:140
W
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 *numpix else pixst endif endm macro pixld1_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl mov asr adds SRC_WIDTH_FIXED bpl add asl else error unsupported endif endm macro pixld2_s mem_operand if mov asr add asl add asl mov asr sub UNIT_X add asl mov asr add asl add asl mov asr add UNIT_X add asl else pixld1_s mem_operand pixld1_s mem_operand endif endm macro pixld0_s mem_operand if asr adds SRC_WIDTH_FIXED bpl add asl elseif asr adds SRC_WIDTH_FIXED bpl add asl endif endm macro pixld_s_internal mem_operand if mem_operand pixld2_s mem_operand pixdeinterleave basereg elseif mem_operand elseif mem_operand elseif mem_operand elseif mem_operand pixld0_s mem_operand else pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else pixld0_s mem_operand pixld0_s mem_operand endif elseif mem_operand else error unsupported mem_operand if bpp mem_operand endif endm macro vuzp8 reg2 vuzp d d &reg2 endm macro vzip8 reg2 vzip d d &reg2 endm macro pixdeinterleave basereg basereg basereg basereg basereg endif endm macro pixinterleave basereg basereg basereg basereg basereg endif endm macro PF boost_increment endif if endif PF tst PF addne PF subne PF cmp ORIG_W if endif if endif if endif PF subge ORIG_W PF subges if endif if endif if endif endif endm macro cache_preload_simple endif if dst_r_bpp pld[DST_R, #(PREFETCH_DISTANCE_SIMPLE *dst_r_bpp/8)] endif if mask_bpp pld W[MASK, #(PREFETCH_DISTANCE_SIMPLE *mask_bpp/8)] endif endif endm macro fetch_mask_pixblock pixld mask_basereg pixblock_size MASK endm macro ensure_destination_ptr_alignment process_pixblock_tail_head if beq irp skip1 beq endif SRC MASK if dst_r_bpp DST_R else add endif PF add sub
Definition: pixman-arm-neon-asm.h:482
SDL_OutOfMemory
#define SDL_OutOfMemory()
Definition: SDL_error.h:52
SDL_VideoDevice::DestroyWindow
void(* DestroyWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:236
SDL_UpdateFullscreenMode
static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
Definition: SDL_video.c:1204
FULLSCREEN_VISIBLE
#define FULLSCREEN_VISIBLE(W)
Definition: SDL_sysvideo.h:117
SDL_VideoDisplay::max_display_modes
int max_display_modes
Definition: SDL_sysvideo.h:129
SDL_VideoDisplay::num_display_modes
int num_display_modes
Definition: SDL_sysvideo.h:130
SDL_VideoDevice::AcceptDragAndDrop
void(* AcceptDragAndDrop)(SDL_Window *window, SDL_bool accept)
Definition: SDL_sysvideo.h:317
SDL_VideoDevice::DestroyWindowFramebuffer
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:239
SDL_AddVideoDisplay
int SDL_AddVideoDisplay(const SDL_VideoDisplay *display)
Definition: SDL_video.c:606
SDL_WINDOW_HIDDEN
@ SDL_WINDOW_HIDDEN
Definition: SDL_video.h:102
SDL_Window::next
SDL_Window * next
Definition: SDL_sysvideo.h:115
SDL_sqrt
#define SDL_sqrt
Definition: SDL_dynapi_overrides.h:437
SDL_VideoDisplay
Definition: SDL_sysvideo.h:127
SDL_SetError
#define SDL_SetError
Definition: SDL_dynapi_overrides.h:30
SDL_VideoDevice::GL_CreateContext
SDL_GLContext(* GL_CreateContext)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:259
SDL_VideoDevice::name
const char * name
Definition: SDL_sysvideo.h:153
SDL_SendWindowEvent
int SDL_SendWindowEvent(SDL_Window *window, Uint8 windowevent, int data1, int data2)
Definition: SDL_windowevents.c:74
CHECK_DISPLAY_INDEX
#define CHECK_DISPLAY_INDEX(displayIndex, retval)
Definition: SDL_video.c:134
SDL_strdup
#define SDL_strdup
Definition: SDL_dynapi_overrides.h:397
SDL_GL_ExtensionSupported
SDL_bool SDL_GL_ExtensionSupported(const char *extension)
Return true if an OpenGL extension is supported for the current context.
Definition: SDL_video.c:2975
SDL_FinishWindowCreation
static void SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
Definition: SDL_video.c:1404
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:162
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163
SDL_VideoDisplay::current_mode
SDL_DisplayMode current_mode
Definition: SDL_sysvideo.h:133
flags
GLbitfield flags
Definition: SDL_opengl_glext.h:1483
SDL_WarpMouseInWindow
#define SDL_WarpMouseInWindow
Definition: SDL_dynapi_overrides.h:248
SDL_Window::flags
Uint32 flags
Definition: SDL_sysvideo.h:84
SDL_GetWindowDisplayIndex
int SDL_GetWindowDisplayIndex(SDL_Window *window)
Get the display index associated with a window.
Definition: SDL_video.c:1050
ShouldMinimizeOnFocusLoss
static SDL_bool ShouldMinimizeOnFocusLoss(SDL_Window *window)
Definition: SDL_video.c:2674
i
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)
Definition: SDL_x11sym.h:50
SDL_VideoDevice::windows
SDL_Window * windows
Definition: SDL_sysvideo.h:325
SDL_WINDOW_VULKAN
@ SDL_WINDOW_VULKAN
Definition: SDL_video.h:121