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_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)
 
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_OnApplicationWillTerminate (void)
 
void SDL_OnApplicationDidReceiveMemoryWarning (void)
 
void SDL_OnApplicationWillResignActive (void)
 
void SDL_OnApplicationDidEnterBackground (void)
 
void SDL_OnApplicationWillEnterForeground (void)
 
void SDL_OnApplicationDidBecomeActive (void)
 
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
 

Macro Definition Documentation

◆ _THIS

#define _THIS   SDL_VideoDevice *_this

Definition at line 146 of file SDL_sysvideo.h.

◆ FULLSCREEN_VISIBLE

#define FULLSCREEN_VISIBLE (   W)
Value:

Definition at line 116 of file SDL_sysvideo.h.

Function Documentation

◆ SDL_AddBasicVideoDisplay()

int SDL_AddBasicVideoDisplay ( const SDL_DisplayMode desktop_mode)

Definition at line 589 of file SDL_video.c.

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

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 751 of file SDL_video.c.

752 {
753  SDL_DisplayMode *modes;
754  int i, nmodes;
755 
756  /* Make sure we don't already have the mode in the list */
757  modes = display->display_modes;
758  nmodes = display->num_display_modes;
759  for (i = 0; i < nmodes; ++i) {
760  if (cmpmodes(mode, &modes[i]) == 0) {
761  return SDL_FALSE;
762  }
763  }
764 
765  /* Go ahead and add the new mode */
766  if (nmodes == display->max_display_modes) {
767  modes =
768  SDL_realloc(modes,
769  (display->max_display_modes + 32) * sizeof(*modes));
770  if (!modes) {
771  return SDL_FALSE;
772  }
773  display->display_modes = modes;
774  display->max_display_modes += 32;
775  }
776  modes[nmodes] = *mode;
777  display->num_display_modes++;
778 
779  /* Re-sort video modes */
780  SDL_qsort(display->display_modes, display->num_display_modes,
781  sizeof(SDL_DisplayMode), cmpmodes);
782 
783  return SDL_TRUE;
784 }

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 603 of file SDL_video.c.

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

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 4015 of file SDL_video.c.

4016 {
4017  float den2 = hinches * hinches + vinches * vinches;
4018  if (den2 <= 0.0f) {
4019  return 0.0f;
4020  }
4021 
4022  return (float)(SDL_sqrt((double)hpix * (double)hpix + (double)vpix * (double)vpix) /
4023  SDL_sqrt((double)den2));
4024 }

References SDL_sqrt.

◆ SDL_GetDisplay()

SDL_VideoDisplay* SDL_GetDisplay ( int  displayIndex)

Definition at line 1021 of file SDL_video.c.

1022 {
1023  CHECK_DISPLAY_INDEX(displayIndex, NULL);
1024 
1025  return &_this->displays[displayIndex];
1026 }

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

◆ SDL_GetDisplayDriverData()

void* SDL_GetDisplayDriverData ( int  displayIndex)

Definition at line 657 of file SDL_video.c.

658 {
659  CHECK_DISPLAY_INDEX(displayIndex, NULL);
660 
661  return _this->displays[displayIndex].driverdata;
662 }

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 1089 of file SDL_video.c.

1090 {
1091  int displayIndex = SDL_GetWindowDisplayIndex(window);
1092  if (displayIndex >= 0) {
1093  return &_this->displays[displayIndex];
1094  } else {
1095  return NULL;
1096  }
1097 }

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 2696 of file SDL_video.c.

2697 {
2698  SDL_Window *window;
2699 
2700  if (!_this) {
2701  return NULL;
2702  }
2703  for (window = _this->windows; window; window = window->next) {
2704  if (window->flags & SDL_WINDOW_INPUT_FOCUS) {
2705  return window;
2706  }
2707  }
2708  return NULL;
2709 }

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 642 of file SDL_video.c.

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

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 3044 of file SDL_video.c.

3045 {
3046 /* THIS REQUIRES AN EXISTING GL CONTEXT THAT HAS BEEN MADE CURRENT. */
3047 /* Please refer to https://bugzilla.libsdl.org/show_bug.cgi?id=3725 for discussion. */
3048 #if SDL_VIDEO_OPENGL || SDL_VIDEO_OPENGL_ES || SDL_VIDEO_OPENGL_ES2
3049  /* XXX This is fragile; it will break in the event of release of
3050  * new versions of OpenGL ES.
3051  */
3052  if (SDL_GL_ExtensionSupported("GL_ARB_ES3_2_compatibility")) {
3053  *major = 3;
3054  *minor = 2;
3055  } else if (SDL_GL_ExtensionSupported("GL_ARB_ES3_1_compatibility")) {
3056  *major = 3;
3057  *minor = 1;
3058  } else if (SDL_GL_ExtensionSupported("GL_ARB_ES3_compatibility")) {
3059  *major = 3;
3060  *minor = 0;
3061  } else {
3062  *major = 2;
3063  *minor = 0;
3064  }
3065 #endif
3066 }

References SDL_GL_ExtensionSupported().

◆ SDL_HasWindows()

SDL_bool SDL_HasWindows ( void  )

Definition at line 1711 of file SDL_video.c.

1712 {
1713  return (_this && _this->windows != NULL);
1714 }

References _this, NULL, and SDL_VideoDevice::windows.

Referenced by SDL_PrivateJoystickShouldIgnoreEvent().

◆ SDL_OnApplicationDidBecomeActive()

void SDL_OnApplicationDidBecomeActive ( void  )

◆ SDL_OnApplicationDidEnterBackground()

void SDL_OnApplicationDidEnterBackground ( void  )

Definition at line 4051 of file SDL_video.c.

4052 {
4054 }

References SDL_APP_DIDENTERBACKGROUND, and SDL_SendAppEvent().

◆ SDL_OnApplicationDidReceiveMemoryWarning()

void SDL_OnApplicationDidReceiveMemoryWarning ( void  )

Definition at line 4034 of file SDL_video.c.

4035 {
4037 }

References SDL_APP_LOWMEMORY, and SDL_SendAppEvent().

◆ SDL_OnApplicationWillEnterForeground()

void SDL_OnApplicationWillEnterForeground ( void  )

Definition at line 4056 of file SDL_video.c.

References SDL_APP_WILLENTERFOREGROUND, and SDL_SendAppEvent().

◆ SDL_OnApplicationWillResignActive()

◆ SDL_OnApplicationWillTerminate()

void SDL_OnApplicationWillTerminate ( void  )

Definition at line 4029 of file SDL_video.c.

4030 {
4032 }

References SDL_APP_TERMINATING, and SDL_SendAppEvent().

◆ SDL_OnWindowEnter()

void SDL_OnWindowEnter ( SDL_Window window)

Definition at line 2623 of file SDL_video.c.

2624 {
2625  if (_this->OnWindowEnter) {
2627  }
2628 }

References _this, and SDL_VideoDevice::OnWindowEnter.

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowFocusGained()

void SDL_OnWindowFocusGained ( SDL_Window window)

Definition at line 2636 of file SDL_video.c.

2637 {
2638  SDL_Mouse *mouse = SDL_GetMouse();
2639 
2640  if (window->gamma && _this->SetWindowGammaRamp) {
2642  }
2643 
2644  if (mouse && mouse->relative_mode) {
2647  }
2648 
2650 }

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 2680 of file SDL_video.c.

2681 {
2682  if (window->gamma && _this->SetWindowGammaRamp) {
2683  _this->SetWindowGammaRamp(_this, window, window->saved_gamma);
2684  }
2685 
2687 
2690  }
2691 }

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 2588 of file SDL_video.c.

2589 {
2591 }

References SDL_FALSE, and SDL_UpdateFullscreenMode().

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowLeave()

void SDL_OnWindowLeave ( SDL_Window window)

Definition at line 2631 of file SDL_video.c.

2632 {
2633 }

Referenced by SDL_SendWindowEvent().

◆ SDL_OnWindowMinimized()

void SDL_OnWindowMinimized ( SDL_Window window)

Definition at line 2601 of file SDL_video.c.

2602 {
2604 }

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 2607 of file SDL_video.c.

2608 {
2609  /*
2610  * FIXME: Is this fine to just remove this, or should it be preserved just
2611  * for the fullscreen case? In principle it seems like just hiding/showing
2612  * windows shouldn't affect the stacking order; maybe the right fix is to
2613  * re-decouple OnWindowShown and OnWindowRestored.
2614  */
2615  /*SDL_RaiseWindow(window);*/
2616 
2617  if (FULLSCREEN_VISIBLE(window)) {
2619  }
2620 }

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 2582 of file SDL_video.c.

2583 {
2585 }

References SDL_OnWindowRestored().

Referenced by SDL_SendWindowEvent().

◆ SDL_RecreateWindow()

int SDL_RecreateWindow ( SDL_Window window,
Uint32  flags 
)

Definition at line 1614 of file SDL_video.c.

1615 {
1616  SDL_bool loaded_opengl = SDL_FALSE;
1617 
1619  return SDL_SetError("OpenGL support is either not configured in SDL "
1620  "or not available in current SDL video driver "
1621  "(%s) or platform", _this->name);
1622  }
1623 
1624  if (window->flags & SDL_WINDOW_FOREIGN) {
1625  /* Can't destroy and re-create foreign windows, hrm */
1627  } else {
1629  }
1630 
1631  /* Restore video mode, etc. */
1633 
1634  /* Tear down the old native window */
1635  if (window->surface) {
1636  window->surface->flags &= ~SDL_DONTFREE;
1637  SDL_FreeSurface(window->surface);
1638  window->surface = NULL;
1639  window->surface_valid = SDL_FALSE;
1640  }
1643  }
1646  }
1647 
1648  if ((window->flags & SDL_WINDOW_OPENGL) != (flags & SDL_WINDOW_OPENGL)) {
1649  if (flags & SDL_WINDOW_OPENGL) {
1650  if (SDL_GL_LoadLibrary(NULL) < 0) {
1651  return -1;
1652  }
1653  loaded_opengl = SDL_TRUE;
1654  } else {
1656  }
1657  } else if (window->flags & SDL_WINDOW_OPENGL) {
1659  if (SDL_GL_LoadLibrary(NULL) < 0) {
1660  return -1;
1661  }
1662  loaded_opengl = SDL_TRUE;
1663  }
1664 
1665  if ((window->flags & SDL_WINDOW_VULKAN) != (flags & SDL_WINDOW_VULKAN)) {
1666  SDL_SetError("Can't change SDL_WINDOW_VULKAN window flag");
1667  return -1;
1668  }
1669 
1670  if ((window->flags & SDL_WINDOW_VULKAN) && (flags & SDL_WINDOW_OPENGL)) {
1671  SDL_SetError("Vulkan and OpenGL not supported on same window");
1672  return -1;
1673  }
1674 
1675  window->flags = ((flags & CREATE_FLAGS) | SDL_WINDOW_HIDDEN);
1676  window->last_fullscreen_flags = window->flags;
1677  window->is_destroying = SDL_FALSE;
1678 
1680  if (_this->CreateSDLWindow(_this, window) < 0) {
1681  if (loaded_opengl) {
1683  window->flags &= ~SDL_WINDOW_OPENGL;
1684  }
1685  return -1;
1686  }
1687  }
1688 
1689  if (flags & SDL_WINDOW_FOREIGN) {
1690  window->flags |= SDL_WINDOW_FOREIGN;
1691  }
1692 
1693  if (_this->SetWindowTitle && window->title) {
1695  }
1696 
1697  if (_this->SetWindowIcon && window->icon) {
1699  }
1700 
1701  if (window->hit_test) {
1703  }
1704 
1706 
1707  return 0;
1708 }

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 3992 of file SDL_video.c.

3993 {
3995 }

References SDL_GetHintBoolean, SDL_HINT_ALLOW_TOPMOST, and SDL_TRUE.

◆ SDL_ToggleDragAndDropSupport()

void SDL_ToggleDragAndDropSupport ( void  )

Definition at line 1371 of file SDL_video.c.

1372 {
1373  if (_this && _this->AcceptDragAndDrop) {
1375  SDL_Window *window;
1376  for (window = _this->windows; window; window = window->next) {
1378  }
1379  }
1380 }

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 2520 of file SDL_video.c.

2521 {
2522  SDL_Window *grabbed_window;
2523  SDL_bool grabbed;
2524  if ((SDL_GetMouse()->relative_mode || (window->flags & SDL_WINDOW_INPUT_GRABBED)) &&
2525  (window->flags & SDL_WINDOW_INPUT_FOCUS)) {
2526  grabbed = SDL_TRUE;
2527  } else {
2528  grabbed = SDL_FALSE;
2529  }
2530 
2531  grabbed_window = _this->grabbed_window;
2532  if (grabbed) {
2533  if (grabbed_window && (grabbed_window != window)) {
2534  /* stealing a grab from another window! */
2535  grabbed_window->flags &= ~SDL_WINDOW_INPUT_GRABBED;
2536  if (_this->SetWindowGrab) {
2537  _this->SetWindowGrab(_this, grabbed_window, SDL_FALSE);
2538  }
2539  }
2541  } else if (grabbed_window == window) {
2542  _this->grabbed_window = NULL; /* ungrabbing. */
2543  }
2544 
2545  if (_this->SetWindowGrab) {
2546  _this->SetWindowGrab(_this, window, grabbed);
2547  }
2548 }

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

◆ 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:211
SDL_GetMouse
SDL_Mouse * SDL_GetMouse(void)
Definition: SDL_mouse.c:178
SDL_zero
#define SDL_zero(x)
Definition: SDL_stdinc.h:416
SDL_VideoDisplay::display_modes
SDL_DisplayMode * display_modes
Definition: SDL_sysvideo.h:130
SDL_APP_TERMINATING
@ SDL_APP_TERMINATING
Definition: SDL_events.h:63
SDL_VideoDisplay::name
char * name
Definition: SDL_sysvideo.h:127
SDL_APP_DIDENTERBACKGROUND
@ SDL_APP_DIDENTERBACKGROUND
Definition: SDL_events.h:75
SDL_APP_DIDENTERFOREGROUND
@ SDL_APP_DIDENTERFOREGROUND
Definition: SDL_events.h:83
SDL_WINDOW_MINIMIZED
@ SDL_WINDOW_MINIMIZED
Definition: SDL_video.h:106
SDL_VideoDevice::OnWindowEnter
void(* OnWindowEnter)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:239
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:2878
enable
GLboolean enable
Definition: SDL_opengl_glext.h:4996
SDL_VideoDisplay::device
SDL_VideoDevice * device
Definition: SDL_sysvideo.h:137
SDL_WINDOWEVENT_FOCUS_LOST
@ SDL_WINDOWEVENT_FOCUS_LOST
Definition: SDL_video.h:166
SDL_qsort
#define SDL_qsort
Definition: SDL_dynapi_overrides.h:380
mode
GLenum mode
Definition: SDL_opengl_glext.h:1122
SDL_VideoDevice::grabbed_window
SDL_Window * grabbed_window
Definition: SDL_sysvideo.h:318
SDL_WINDOW_FULLSCREEN
@ SDL_WINDOW_FULLSCREEN
Definition: SDL_video.h:100
SDL_VideoDevice::SetWindowTitle
void(* SetWindowTitle)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:213
SDL_WINDOW_OPENGL
@ SDL_WINDOW_OPENGL
Definition: SDL_video.h:101
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:2168
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:112
SDL_VideoDisplay::desktop_mode
SDL_DisplayMode desktop_mode
Definition: SDL_sysvideo.h:131
index
GLuint index
Definition: SDL_opengl_glext.h:660
SDL_APP_LOWMEMORY
@ SDL_APP_LOWMEMORY
Definition: SDL_events.h:67
SDL_SetMouseFocus
void SDL_SetMouseFocus(SDL_Window *window)
Definition: SDL_mouse.c:211
SDL_WINDOW_INPUT_FOCUS
@ SDL_WINDOW_INPUT_FOCUS
Definition: SDL_video.h:109
SDL_APP_WILLENTERFOREGROUND
@ SDL_APP_WILLENTERFOREGROUND
Definition: SDL_events.h:79
SDL_OnWindowRestored
void SDL_OnWindowRestored(SDL_Window *window)
Definition: SDL_video.c:2607
SDL_Window
The type used to identify a window.
Definition: SDL_sysvideo.h:73
SDL_VideoDevice::SetWindowIcon
void(* SetWindowIcon)(_THIS, SDL_Window *window, SDL_Surface *icon)
Definition: SDL_sysvideo.h:214
SDL_DisplayMode
The structure that defines a display mode.
Definition: SDL_video.h:53
SDL_VideoDevice::SetWindowGrab
void(* SetWindowGrab)(_THIS, SDL_Window *window, SDL_bool grabbed)
Definition: SDL_sysvideo.h:234
CREATE_FLAGS
#define CREATE_FLAGS
Definition: SDL_video.c:1347
SDL_MinimizeWindow
void SDL_MinimizeWindow(SDL_Window *window)
Minimize a window to an iconic representation.
Definition: SDL_video.c:2225
SDL_GetHintBoolean
#define SDL_GetHintBoolean
Definition: SDL_dynapi_overrides.h:608
SDL_FALSE
@ SDL_FALSE
Definition: SDL_stdinc.h:163
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:232
_this
static SDL_VideoDevice * _this
Definition: SDL_video.c:118
SDL_VideoDevice::num_displays
int num_displays
Definition: SDL_sysvideo.h:315
cmpmodes
static int cmpmodes(const void *A, const void *B)
Definition: SDL_video.c:416
window
EGLSurface EGLNativeWindowType * window
Definition: eglext.h:1025
IsAcceptingDragAndDrop
static SDL_INLINE SDL_bool IsAcceptingDragAndDrop(void)
Definition: SDL_video.c:1351
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:588
f
GLfloat f
Definition: SDL_opengl_glext.h:1870
SDL_UpdateWindowGrab
void SDL_UpdateWindowGrab(SDL_Window *window)
Definition: SDL_video.c:2520
name
GLuint const GLchar * name
Definition: SDL_opengl_glext.h:660
SDL_VideoDevice::displays
SDL_VideoDisplay * displays
Definition: SDL_sysvideo.h:316
SDL_FreeSurface
#define SDL_FreeSurface
Definition: SDL_dynapi_overrides.h:446
SDL_WINDOW_INPUT_GRABBED
@ SDL_WINDOW_INPUT_GRABBED
Definition: SDL_video.h:108
SDL_Mouse
Definition: SDL_mouse_c.h:43
SDL_APP_WILLENTERBACKGROUND
@ SDL_APP_WILLENTERBACKGROUND
Definition: SDL_events.h:71
SDL_WINDOWEVENT_SIZE_CHANGED
@ SDL_WINDOWEVENT_SIZE_CHANGED
Definition: SDL_video.h:156
SDL_GL_UnloadLibrary
void SDL_GL_UnloadLibrary(void)
Unload the OpenGL library previously loaded by SDL_GL_LoadLibrary().
Definition: SDL_video.c:2929
SDL_VideoDevice::SetWindowHitTest
int(* SetWindowHitTest)(SDL_Window *window, SDL_bool enabled)
Definition: SDL_sysvideo.h:306
SDL_WINDOWEVENT_MINIMIZED
@ SDL_WINDOWEVENT_MINIMIZED
Definition: SDL_video.h:159
SDL_WINDOW_SHOWN
@ SDL_WINDOW_SHOWN
Definition: SDL_video.h:102
SDL_VideoDisplay::driverdata
void * driverdata
Definition: SDL_sysvideo.h:139
SDL_OutOfMemory
#define SDL_OutOfMemory()
Definition: SDL_error.h:52
SDL_VideoDevice::DestroyWindow
void(* DestroyWindow)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:235
SDL_UpdateFullscreenMode
static int SDL_UpdateFullscreenMode(SDL_Window *window, SDL_bool fullscreen)
Definition: SDL_video.c:1183
FULLSCREEN_VISIBLE
#define FULLSCREEN_VISIBLE(W)
Definition: SDL_sysvideo.h:116
SDL_VideoDisplay::max_display_modes
int max_display_modes
Definition: SDL_sysvideo.h:128
SDL_VideoDisplay::num_display_modes
int num_display_modes
Definition: SDL_sysvideo.h:129
SDL_VideoDevice::AcceptDragAndDrop
void(* AcceptDragAndDrop)(SDL_Window *window, SDL_bool accept)
Definition: SDL_sysvideo.h:309
SDL_VideoDevice::DestroyWindowFramebuffer
void(* DestroyWindowFramebuffer)(_THIS, SDL_Window *window)
Definition: SDL_sysvideo.h:238
SDL_TRUE
@ SDL_TRUE
Definition: SDL_stdinc.h:164
SDL_AddVideoDisplay
int SDL_AddVideoDisplay(const SDL_VideoDisplay *display)
Definition: SDL_video.c:603
SDL_WINDOW_HIDDEN
@ SDL_WINDOW_HIDDEN
Definition: SDL_video.h:103
SDL_Window::next
SDL_Window * next
Definition: SDL_sysvideo.h:114
SDL_sqrt
#define SDL_sqrt
Definition: SDL_dynapi_overrides.h:437
SDL_VideoDisplay
Definition: SDL_sysvideo.h:125
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:258
SDL_VideoDevice::name
const char * name
Definition: SDL_sysvideo.h:152
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:131
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:2954
SDL_FinishWindowCreation
static void SDL_FinishWindowCreation(SDL_Window *window, Uint32 flags)
Definition: SDL_video.c:1383
SDL_WINDOWEVENT_RESTORED
@ SDL_WINDOWEVENT_RESTORED
Definition: SDL_video.h:161
SDL_VideoDisplay::current_mode
SDL_DisplayMode current_mode
Definition: SDL_sysvideo.h:132
flags
GLbitfield flags
Definition: SDL_opengl_glext.h:1480
SDL_WINDOWEVENT_FOCUS_GAINED
@ SDL_WINDOWEVENT_FOCUS_GAINED
Definition: SDL_video.h:165
SDL_SendAppEvent
int SDL_SendAppEvent(SDL_EventType eventType)
Definition: SDL_events.c:965
SDL_WarpMouseInWindow
#define SDL_WarpMouseInWindow
Definition: SDL_dynapi_overrides.h:248
SDL_Window::flags
Uint32 flags
Definition: SDL_sysvideo.h:83
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_GetWindowDisplayIndex
int SDL_GetWindowDisplayIndex(SDL_Window *window)
Get the display index associated with a window.
Definition: SDL_video.c:1029
ShouldMinimizeOnFocusLoss
static SDL_bool ShouldMinimizeOnFocusLoss(SDL_Window *window)
Definition: SDL_video.c:2653
SDL_bool
SDL_bool
Definition: SDL_stdinc.h:161
SDL_VideoDevice::windows
SDL_Window * windows
Definition: SDL_sysvideo.h:317
SDL_WINDOW_VULKAN
@ SDL_WINDOW_VULKAN
Definition: SDL_video.h:122