Atlas - SDL_sysvideo.h
Home / ext / SDL / src / video Lines: 1 | Size: 24984 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)][FILE BEGIN]1/* 2 Simple DirectMedia Layer 3 Copyright (C) 1997-2025 Sam Lantinga <[email protected]> 4 5 This software is provided 'as-is', without any express or implied 6 warranty. In no event will the authors be held liable for any damages 7 arising from the use of this software. 8 9 Permission is granted to anyone to use this software for any purpose, 10 including commercial applications, and to alter it and redistribute it 11 freely, subject to the following restrictions: 12 13 1. The origin of this software must not be misrepresented; you must not 14 claim that you wrote the original software. If you use this software 15 in a product, an acknowledgment in the product documentation would be 16 appreciated but is not required. 17 2. Altered source versions must be plainly marked as such, and must not be 18 misrepresented as being the original software. 19 3. This notice may not be removed or altered from any source distribution. 20*/ 21#include "SDL_internal.h" 22 23#ifndef SDL_sysvideo_h_ 24#define SDL_sysvideo_h_ 25 26#include <SDL3/SDL_vulkan.h> 27 28#include "SDL_surface_c.h" 29 30// The SDL video driver 31 32typedef struct SDL_VideoDisplay SDL_VideoDisplay; 33typedef struct SDL_VideoDevice SDL_VideoDevice; 34typedef struct SDL_VideoData SDL_VideoData; 35typedef struct SDL_DisplayData SDL_DisplayData; 36typedef struct SDL_WindowData SDL_WindowData; 37 38typedef struct 39{ 40 float SDR_white_level; 41 float HDR_headroom; 42} SDL_HDROutputProperties; 43 44// Define the SDL window structure, corresponding to toplevel windows 45struct SDL_Window 46{ 47 SDL_WindowID id; 48 char *title; 49 SDL_Surface *icon; 50 int x, y; 51 int w, h; 52 int min_w, min_h; 53 int max_w, max_h; 54 float min_aspect; 55 float max_aspect; 56 int last_pixel_w, last_pixel_h; 57 SDL_WindowFlags flags; 58 SDL_WindowFlags pending_flags; 59 float display_scale; 60 bool external_graphics_context; 61 bool fullscreen_exclusive; // The window is currently fullscreen exclusive 62 SDL_DisplayID last_fullscreen_exclusive_display; // The last fullscreen_exclusive display 63 SDL_DisplayID displayID; 64 SDL_DisplayID pending_displayID; 65 66 /* Stored position and size for the window in the non-fullscreen state, 67 * including when the window is maximized or tiled. 68 * 69 * This is the size and position to which the window should return when 70 * leaving the fullscreen state. 71 */ 72 SDL_Rect windowed; 73 74 /* Stored position and size for the window in the base 'floating' state; 75 * when not fullscreen, nor in a state such as maximized or tiled. 76 * 77 * This is the size and position to which the window should return when 78 * it's maximized and SDL_RestoreWindow() is called. 79 */ 80 SDL_Rect floating; 81 82 // The last client requested size and position for the window. 83 SDL_Rect pending; 84 85 /* Toggle for drivers to indicate that the current window state is tiled, 86 * and sizes set non-programmatically shouldn't be cached. 87 */ 88 bool tiled; 89 90 // Whether or not the initial position was defined 91 bool undefined_x; 92 bool undefined_y; 93 94 SDL_DisplayMode requested_fullscreen_mode; 95 SDL_DisplayMode current_fullscreen_mode; 96 SDL_HDROutputProperties HDR; 97 98 float opacity; 99 100 SDL_Surface *surface; 101 bool surface_valid; 102 103 bool is_hiding; 104 bool restore_on_show; // Child was hidden recursively by the parent, restore when shown. 105 bool last_position_pending; // This should NOT be cleared by the backend, as it is used for fullscreen positioning. 106 bool last_size_pending; // This should be cleared by the backend if the new size cannot be applied. 107 bool update_fullscreen_on_display_changed; 108 bool constrain_popup; 109 bool is_destroying; 110 bool is_dropping; // drag/drop in progress, expecting SDL_SendDropComplete(). 111 112 int safe_inset_left; 113 int safe_inset_right; 114 int safe_inset_top; 115 int safe_inset_bottom; 116 SDL_Rect safe_rect; 117 118 SDL_PropertiesID text_input_props; 119 bool text_input_active; 120 SDL_Rect text_input_rect; 121 int text_input_cursor; 122 123 SDL_Rect mouse_rect; 124 125 SDL_HitTest hit_test; 126 void *hit_test_data; 127 128 SDL_ProgressState progress_state; 129 float progress_value; 130 131 SDL_PropertiesID props; 132 133 int num_renderers; 134 SDL_Renderer **renderers; 135 136 SDL_WindowData *internal; 137 138 // If a toplevel window, holds the current keyboard focus for grabbing popups. 139 SDL_Window *keyboard_focus; 140 141 SDL_Window *prev; 142 SDL_Window *next; 143 144 SDL_Window *parent; 145 SDL_Window *first_child; 146 SDL_Window *prev_sibling; 147 SDL_Window *next_sibling; 148}; 149#define SDL_WINDOW_FULLSCREEN_VISIBLE(W) \ 150 ((((W)->flags & SDL_WINDOW_FULLSCREEN) != 0) && \ 151 (((W)->flags & SDL_WINDOW_HIDDEN) == 0) && \ 152 (((W)->flags & SDL_WINDOW_MINIMIZED) == 0)) 153 154#define SDL_WINDOW_IS_POPUP(W) \ 155 (((W)->flags & (SDL_WINDOW_TOOLTIP | SDL_WINDOW_POPUP_MENU)) != 0) 156 157/* 158 * Define the SDL display structure. 159 * This corresponds to physical monitors attached to the system. 160 */ 161struct SDL_VideoDisplay 162{ 163 SDL_DisplayID id; 164 char *name; 165 int max_fullscreen_modes; 166 int num_fullscreen_modes; 167 SDL_DisplayMode *fullscreen_modes; 168 SDL_DisplayMode desktop_mode; 169 const SDL_DisplayMode *current_mode; 170 SDL_DisplayOrientation natural_orientation; 171 SDL_DisplayOrientation current_orientation; 172 float content_scale; 173 SDL_HDROutputProperties HDR; 174 175 // This is true if we are fullscreen or fullscreen is pending 176 bool fullscreen_active; 177 SDL_Window *fullscreen_window; 178 179 SDL_VideoDevice *device; 180 181 SDL_PropertiesID props; 182 183 SDL_DisplayData *internal; 184}; 185 186// Video device flags 187typedef enum 188{ 189 VIDEO_DEVICE_CAPS_MODE_SWITCHING_EMULATED = 0x01, 190 VIDEO_DEVICE_CAPS_HAS_POPUP_WINDOW_SUPPORT = 0x02, 191 VIDEO_DEVICE_CAPS_SENDS_FULLSCREEN_DIMENSIONS = 0x04, 192 VIDEO_DEVICE_CAPS_FULLSCREEN_ONLY = 0x08, 193 VIDEO_DEVICE_CAPS_SENDS_DISPLAY_CHANGES = 0x10, 194 VIDEO_DEVICE_CAPS_SENDS_HDR_CHANGES = 0x20 195} DeviceCaps; 196 197// Fullscreen operations 198typedef enum 199{ 200 SDL_FULLSCREEN_OP_LEAVE = 0, 201 SDL_FULLSCREEN_OP_ENTER, 202 SDL_FULLSCREEN_OP_UPDATE 203} SDL_FullscreenOp; 204 205typedef enum 206{ 207 SDL_FULLSCREEN_FAILED, 208 SDL_FULLSCREEN_SUCCEEDED, 209 SDL_FULLSCREEN_PENDING 210} SDL_FullscreenResult; 211 212struct SDL_VideoDevice 213{ 214 /* * * */ 215 // The name of this video driver 216 const char *name; 217 218 /* * * */ 219 // Initialization/Query functions 220 221 /* 222 * Initialize the native video subsystem, filling in the list of 223 * displays for this driver, returning true (success) or false (error). 224 */ 225 bool (*VideoInit)(SDL_VideoDevice *_this); 226 227 /* 228 * Reverse the effects VideoInit() -- called if VideoInit() fails or 229 * if the application is shutting down the video subsystem. 230 */ 231 void (*VideoQuit)(SDL_VideoDevice *_this); 232 233 /* 234 * Reinitialize the touch devices -- called if an unknown touch ID occurs. 235 */ 236 void (*ResetTouch)(SDL_VideoDevice *_this); 237 238 /* * * */ 239 /* 240 * Display functions 241 */ 242 243 /* 244 * Refresh the display list 245 */ 246 void (*RefreshDisplays)(SDL_VideoDevice *_this); 247 248 /* 249 * Get the bounds of a display 250 */ 251 bool (*GetDisplayBounds)(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect); 252 253 /* 254 * Get the usable bounds of a display (bounds minus menubar or whatever) 255 */ 256 bool (*GetDisplayUsableBounds)(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_Rect *rect); 257 258 /* 259 * Get a list of the available display modes for a display. 260 */ 261 bool (*GetDisplayModes)(SDL_VideoDevice *_this, SDL_VideoDisplay *display); 262 263 /* 264 * Setting the display mode is independent of creating windows, so 265 * when the display mode is changed, all existing windows should have 266 * their data updated accordingly, including the display surfaces 267 * associated with them. 268 */ 269 bool (*SetDisplayMode)(SDL_VideoDevice *_this, SDL_VideoDisplay *display, SDL_DisplayMode *mode); 270 271 /* * * */ 272 /* 273 * Window functions 274 */ 275 bool (*CreateSDLWindow)(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID create_props); 276 void (*SetWindowTitle)(SDL_VideoDevice *_this, SDL_Window *window); 277 bool (*SetWindowIcon)(SDL_VideoDevice *_this, SDL_Window *window, SDL_Surface *icon); 278 bool (*SetWindowPosition)(SDL_VideoDevice *_this, SDL_Window *window); 279 void (*SetWindowSize)(SDL_VideoDevice *_this, SDL_Window *window); 280 void (*SetWindowMinimumSize)(SDL_VideoDevice *_this, SDL_Window *window); 281 void (*SetWindowMaximumSize)(SDL_VideoDevice *_this, SDL_Window *window); 282 void (*SetWindowAspectRatio)(SDL_VideoDevice *_this, SDL_Window *window); 283 bool (*GetWindowBordersSize)(SDL_VideoDevice *_this, SDL_Window *window, int *top, int *left, int *bottom, int *right); 284 float (*GetWindowContentScale)(SDL_VideoDevice *_this, SDL_Window *window); 285 void (*GetWindowSizeInPixels)(SDL_VideoDevice *_this, SDL_Window *window, int *w, int *h); 286 bool (*SetWindowOpacity)(SDL_VideoDevice *_this, SDL_Window *window, float opacity); 287 bool (*SetWindowParent)(SDL_VideoDevice *_this, SDL_Window *window, SDL_Window *parent); 288 bool (*SetWindowModal)(SDL_VideoDevice *_this, SDL_Window *window, bool modal); 289 void (*ShowWindow)(SDL_VideoDevice *_this, SDL_Window *window); 290 void (*HideWindow)(SDL_VideoDevice *_this, SDL_Window *window); 291 void (*RaiseWindow)(SDL_VideoDevice *_this, SDL_Window *window); 292 void (*MaximizeWindow)(SDL_VideoDevice *_this, SDL_Window *window); 293 void (*MinimizeWindow)(SDL_VideoDevice *_this, SDL_Window *window); 294 void (*RestoreWindow)(SDL_VideoDevice *_this, SDL_Window *window); 295 void (*SetWindowBordered)(SDL_VideoDevice *_this, SDL_Window *window, bool bordered); 296 void (*SetWindowResizable)(SDL_VideoDevice *_this, SDL_Window *window, bool resizable); 297 void (*SetWindowAlwaysOnTop)(SDL_VideoDevice *_this, SDL_Window *window, bool on_top); 298 SDL_FullscreenResult (*SetWindowFullscreen)(SDL_VideoDevice *_this, SDL_Window *window, SDL_VideoDisplay *display, SDL_FullscreenOp fullscreen); 299 void *(*GetWindowICCProfile)(SDL_VideoDevice *_this, SDL_Window *window, size_t *size); 300 SDL_DisplayID (*GetDisplayForWindow)(SDL_VideoDevice *_this, SDL_Window *window); 301 bool (*SetWindowMouseRect)(SDL_VideoDevice *_this, SDL_Window *window); 302 bool (*SetWindowMouseGrab)(SDL_VideoDevice *_this, SDL_Window *window, bool grabbed); 303 bool (*SetWindowKeyboardGrab)(SDL_VideoDevice *_this, SDL_Window *window, bool grabbed); 304 void (*DestroyWindow)(SDL_VideoDevice *_this, SDL_Window *window); 305 bool (*CreateWindowFramebuffer)(SDL_VideoDevice *_this, SDL_Window *window, SDL_PixelFormat *format, void **pixels, int *pitch); 306 bool (*SetWindowFramebufferVSync)(SDL_VideoDevice *_this, SDL_Window *window, int vsync); 307 bool (*GetWindowFramebufferVSync)(SDL_VideoDevice *_this, SDL_Window *window, int *vsync); 308 bool (*UpdateWindowFramebuffer)(SDL_VideoDevice *_this, SDL_Window *window, const SDL_Rect *rects, int numrects); 309 void (*DestroyWindowFramebuffer)(SDL_VideoDevice *_this, SDL_Window *window); 310 void (*OnWindowEnter)(SDL_VideoDevice *_this, SDL_Window *window); 311 bool (*UpdateWindowShape)(SDL_VideoDevice *_this, SDL_Window *window, SDL_Surface *shape); 312 bool (*FlashWindow)(SDL_VideoDevice *_this, SDL_Window *window, SDL_FlashOperation operation); 313 bool (*ApplyWindowProgress)(SDL_VideoDevice *_this, SDL_Window *window); 314 bool (*SetWindowFocusable)(SDL_VideoDevice *_this, SDL_Window *window, bool focusable); 315 bool (*SetWindowFillDocument)(SDL_VideoDevice *_this, SDL_Window *window, bool fill); 316 bool (*SyncWindow)(SDL_VideoDevice *_this, SDL_Window *window); 317 bool (*ReconfigureWindow)(SDL_VideoDevice *_this, SDL_Window *window, SDL_WindowFlags flags); 318 319 /* * * */ 320 /* 321 * OpenGL support 322 */ 323 bool (*GL_LoadLibrary)(SDL_VideoDevice *_this, const char *path); 324 SDL_FunctionPointer (*GL_GetProcAddress)(SDL_VideoDevice *_this, const char *proc); 325 void (*GL_UnloadLibrary)(SDL_VideoDevice *_this); 326 SDL_GLContext (*GL_CreateContext)(SDL_VideoDevice *_this, SDL_Window *window); 327 bool (*GL_MakeCurrent)(SDL_VideoDevice *_this, SDL_Window *window, SDL_GLContext context); 328 SDL_EGLSurface (*GL_GetEGLSurface)(SDL_VideoDevice *_this, SDL_Window *window); 329 bool (*GL_SetSwapInterval)(SDL_VideoDevice *_this, int interval); 330 bool (*GL_GetSwapInterval)(SDL_VideoDevice *_this, int *interval); 331 bool (*GL_SwapWindow)(SDL_VideoDevice *_this, SDL_Window *window); 332 bool (*GL_DestroyContext)(SDL_VideoDevice *_this, SDL_GLContext context); 333 void (*GL_DefaultProfileConfig)(SDL_VideoDevice *_this, int *mask, int *major, int *minor); 334 335 /* * * */ 336 /* 337 * Vulkan support 338 */ 339 bool (*Vulkan_LoadLibrary)(SDL_VideoDevice *_this, const char *path); 340 void (*Vulkan_UnloadLibrary)(SDL_VideoDevice *_this); 341 char const * const *(*Vulkan_GetInstanceExtensions)(SDL_VideoDevice *_this, Uint32 *count); 342 bool (*Vulkan_CreateSurface)(SDL_VideoDevice *_this, SDL_Window *window, VkInstance instance, const struct VkAllocationCallbacks *allocator, VkSurfaceKHR *surface); 343 void (*Vulkan_DestroySurface)(SDL_VideoDevice *_this, VkInstance instance, VkSurfaceKHR surface, const struct VkAllocationCallbacks *allocator); 344 bool (*Vulkan_GetPresentationSupport)(SDL_VideoDevice *_this, VkInstance instance, VkPhysicalDevice physicalDevice, Uint32 queueFamilyIndex); 345 346 /* * * */ 347 /* 348 * Metal support 349 */ 350 SDL_MetalView (*Metal_CreateView)(SDL_VideoDevice *_this, SDL_Window *window); 351 void (*Metal_DestroyView)(SDL_VideoDevice *_this, SDL_MetalView view); 352 void *(*Metal_GetLayer)(SDL_VideoDevice *_this, SDL_MetalView view); 353 354 /* * * */ 355 /* 356 * Event manager functions 357 */ 358 int (*WaitEventTimeout)(SDL_VideoDevice *_this, Sint64 timeoutNS); 359 void (*SendWakeupEvent)(SDL_VideoDevice *_this, SDL_Window *window); 360 void (*PumpEvents)(SDL_VideoDevice *_this); 361 362 // Suspend/resume the screensaver 363 bool (*SuspendScreenSaver)(SDL_VideoDevice *_this); 364 365 // Text input 366 bool (*StartTextInput)(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props); 367 bool (*StopTextInput)(SDL_VideoDevice *_this, SDL_Window *window); 368 bool (*UpdateTextInputArea)(SDL_VideoDevice *_this, SDL_Window *window); 369 bool (*ClearComposition)(SDL_VideoDevice *_this, SDL_Window *window); 370 371 // Screen keyboard 372 bool (*HasScreenKeyboardSupport)(SDL_VideoDevice *_this); 373 void (*ShowScreenKeyboard)(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props); 374 void (*HideScreenKeyboard)(SDL_VideoDevice *_this, SDL_Window *window); 375 void (*SetTextInputProperties)(SDL_VideoDevice *_this, SDL_Window *window, SDL_PropertiesID props); 376 377 // Clipboard 378 const char **(*GetTextMimeTypes)(SDL_VideoDevice *_this, size_t *num_mime_types); 379 bool (*SetClipboardData)(SDL_VideoDevice *_this); 380 void *(*GetClipboardData)(SDL_VideoDevice *_this, const char *mime_type, size_t *size); 381 bool (*HasClipboardData)(SDL_VideoDevice *_this, const char *mime_type); 382 /* If you implement *ClipboardData, you don't need to implement *ClipboardText */ 383 bool (*SetClipboardText)(SDL_VideoDevice *_this, const char *text); 384 char *(*GetClipboardText)(SDL_VideoDevice *_this); 385 bool (*HasClipboardText)(SDL_VideoDevice *_this); 386 // These functions are only needed if the platform has a separate primary selection buffer 387 bool (*SetPrimarySelectionText)(SDL_VideoDevice *_this, const char *text); 388 char *(*GetPrimarySelectionText)(SDL_VideoDevice *_this); 389 bool (*HasPrimarySelectionText)(SDL_VideoDevice *_this); 390 391 // MessageBox 392 bool (*ShowMessageBox)(SDL_VideoDevice *_this, const SDL_MessageBoxData *messageboxdata, int *buttonID); 393 394 // Hit-testing 395 bool (*SetWindowHitTest)(SDL_Window *window, bool enabled); 396 397 // Tell window that app enabled drag'n'drop events 398 void (*AcceptDragAndDrop)(SDL_Window *window, bool accept); 399 400 // Display the system-level window menu 401 void (*ShowWindowSystemMenu)(SDL_Window *window, int x, int y); 402 403 /* * * */ 404 // Data common to all drivers 405 SDL_ThreadID thread; 406 bool checked_texture_framebuffer; 407 bool is_dummy; 408 bool suspend_screensaver; 409 void *wakeup_window; 410 int num_displays; 411 SDL_VideoDisplay **displays; 412 SDL_Rect desktop_bounds; 413 SDL_Window *windows; 414 SDL_Window *grabbed_window; 415 Uint32 clipboard_sequence; 416 SDL_ClipboardDataCallback clipboard_callback; 417 SDL_ClipboardCleanupCallback clipboard_cleanup; 418 void *clipboard_userdata; 419 char **clipboard_mime_types; 420 size_t num_clipboard_mime_types; 421 char *primary_selection_text; 422 bool setting_display_mode; 423 Uint32 device_caps; 424 SDL_SystemTheme system_theme; 425 bool screen_keyboard_shown; 426 bool is_quitting; 427 428 /* * * */ 429 // Data used by the GL drivers 430 struct 431 { 432 int red_size; 433 int green_size; 434 int blue_size; 435 int alpha_size; 436 int depth_size; 437 int buffer_size; 438 int stencil_size; 439 int double_buffer; 440 int accum_red_size; 441 int accum_green_size; 442 int accum_blue_size; 443 int accum_alpha_size; 444 int stereo; 445 int multisamplebuffers; 446 int multisamplesamples; 447 int floatbuffers; 448 int accelerated; 449 int major_version; 450 int minor_version; 451 int flags; 452 int profile_mask; 453 int share_with_current_context; 454 int release_behavior; 455 int reset_notification; 456 int framebuffer_srgb_capable; 457 int no_error; 458 int retained_backing; 459 int egl_platform; 460 int driver_loaded; 461 int HAS_GL_ARB_color_buffer_float; 462 char driver_path[256]; 463 SDL_SharedObject *dll_handle; 464 } gl_config; 465 466 SDL_EGLAttribArrayCallback egl_platformattrib_callback; 467 SDL_EGLIntArrayCallback egl_surfaceattrib_callback; 468 SDL_EGLIntArrayCallback egl_contextattrib_callback; 469 void *egl_attrib_callback_userdata; 470 471 /* * * */ 472 // Cache current GL context; don't call the OS when it hasn't changed. 473 /* We have the global pointers here so Cocoa continues to work the way 474 it always has, and the thread-local storage for the general case. 475 */ 476 SDL_Window *current_glwin; 477 SDL_GLContext current_glctx; 478 SDL_TLSID current_glwin_tls; 479 SDL_TLSID current_glctx_tls; 480 481 /* Flag that stores whether it's allowed to call SDL_GL_MakeCurrent() 482 * with a NULL window, but a non-NULL context. (Not allowed in most cases, 483 * except on EGL under some circumstances.) */ 484 bool gl_allow_no_surface; 485 486 /* * * */ 487 // Data used by the Vulkan drivers 488 struct 489 { 490 SDL_FunctionPointer vkGetInstanceProcAddr; 491 SDL_FunctionPointer vkEnumerateInstanceExtensionProperties; 492 int loader_loaded; 493 char loader_path[256]; 494 SDL_SharedObject *loader_handle; 495 } vulkan_config; 496 497 /* * * */ 498 // Data private to this driver 499 SDL_VideoData *internal; 500 struct SDL_GLDriverData *gl_data; 501 502#ifdef SDL_VIDEO_OPENGL_EGL 503 struct SDL_EGL_VideoData *egl_data; 504#endif 505 506#if defined(SDL_VIDEO_OPENGL_ES) || defined(SDL_VIDEO_OPENGL_ES2) 507 struct SDL_PrivateGLESData *gles_data; 508#endif 509 510 /* * * */ 511 // The function used to dispose of this structure 512 void (*free)(SDL_VideoDevice *_this); 513}; 514 515typedef struct VideoBootStrap 516{ 517 const char *name; 518 const char *desc; 519 SDL_VideoDevice *(*create)(void); 520 bool (*ShowMessageBox)(const SDL_MessageBoxData *messageboxdata, int *buttonID); // can be done without initializing backend! 521 bool is_preferred; 522} VideoBootStrap; 523 524// Not all of these are available in a given build. Use #ifdefs, etc. 525extern VideoBootStrap PRIVATE_bootstrap; 526extern VideoBootStrap COCOA_bootstrap; 527extern VideoBootStrap X11_bootstrap; 528extern VideoBootStrap WINDOWS_bootstrap; 529extern VideoBootStrap HAIKU_bootstrap; 530extern VideoBootStrap UIKIT_bootstrap; 531extern VideoBootStrap Android_bootstrap; 532extern VideoBootStrap PS2_bootstrap; 533extern VideoBootStrap PSP_bootstrap; 534extern VideoBootStrap VITA_bootstrap; 535extern VideoBootStrap RISCOS_bootstrap; 536extern VideoBootStrap N3DS_bootstrap; 537extern VideoBootStrap NGAGE_bootstrap; 538extern VideoBootStrap RPI_bootstrap; 539extern VideoBootStrap KMSDRM_bootstrap; 540extern VideoBootStrap DUMMY_bootstrap; 541extern VideoBootStrap DUMMY_evdev_bootstrap; 542extern VideoBootStrap Wayland_preferred_bootstrap; 543extern VideoBootStrap Wayland_bootstrap; 544extern VideoBootStrap VIVANTE_bootstrap; 545extern VideoBootStrap Emscripten_bootstrap; 546extern VideoBootStrap OFFSCREEN_bootstrap; 547extern VideoBootStrap QNX_bootstrap; 548extern VideoBootStrap OPENVR_bootstrap; 549 550extern bool SDL_UninitializedVideo(void); 551// Use SDL_OnVideoThread() sparingly, to avoid regressions in use cases that currently happen to work 552extern bool SDL_OnVideoThread(void); 553extern SDL_VideoDevice *SDL_GetVideoDevice(void); 554extern void SDL_SetSystemTheme(SDL_SystemTheme theme); 555extern SDL_DisplayID SDL_AddBasicVideoDisplay(const SDL_DisplayMode *desktop_mode); 556extern SDL_DisplayID SDL_AddVideoDisplay(const SDL_VideoDisplay *display, bool send_event); 557extern void SDL_DelVideoDisplay(SDL_DisplayID display, bool send_event); 558extern bool SDL_AddFullscreenDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); 559extern void SDL_ResetFullscreenDisplayModes(SDL_VideoDisplay *display); 560extern void SDL_SetDesktopDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); 561extern void SDL_SetCurrentDisplayMode(SDL_VideoDisplay *display, const SDL_DisplayMode *mode); 562extern void SDL_SetDisplayContentScale(SDL_VideoDisplay *display, float scale); 563extern void SDL_SetDisplayHDRProperties(SDL_VideoDisplay *display, const SDL_HDROutputProperties *HDR); 564extern bool SDL_SetDisplayModeForDisplay(SDL_VideoDisplay *display, SDL_DisplayMode *mode); 565extern SDL_VideoDisplay *SDL_GetVideoDisplay(SDL_DisplayID display); 566extern SDL_DisplayID SDL_GetDisplayForWindowPosition(SDL_Window *window); 567extern SDL_VideoDisplay *SDL_GetVideoDisplayForWindow(SDL_Window *window); 568extern SDL_VideoDisplay *SDL_GetVideoDisplayForFullscreenWindow(SDL_Window *window); 569extern int SDL_GetDisplayIndex(SDL_DisplayID displayID); 570extern SDL_DisplayData *SDL_GetDisplayDriverData(SDL_DisplayID display); 571extern SDL_DisplayData *SDL_GetDisplayDriverDataForWindow(SDL_Window *window); 572extern int SDL_GetMessageBoxCount(void); 573extern void SDL_SetWindowHDRProperties(SDL_Window *window, const SDL_HDROutputProperties *HDR, bool send_event); 574extern void SDL_SetWindowSafeAreaInsets(SDL_Window *window, int left, int right, int top, int bottom); 575 576extern void SDL_GL_DeduceMaxSupportedESProfile(int *major, int *minor); 577 578extern bool SDL_RecreateWindow(SDL_Window *window, SDL_WindowFlags flags); 579extern bool SDL_ReconfigureWindow(SDL_Window *window, SDL_WindowFlags flags); 580extern bool SDL_HasWindows(void); 581extern void SDL_RelativeToGlobalForWindow(SDL_Window *window, int rel_x, int rel_y, int *abs_x, int *abs_y); 582extern void SDL_GlobalToRelativeForWindow(SDL_Window *window, int abs_x, int abs_y, int *rel_x, int *rel_y); 583extern bool SDL_ShouldFocusPopup(SDL_Window *window); 584extern bool SDL_ShouldRelinquishPopupFocus(SDL_Window *window, SDL_Window **new_focus); 585 586extern void SDL_OnDisplayAdded(SDL_VideoDisplay *display); 587extern void SDL_OnDisplayMoved(SDL_VideoDisplay *display); 588extern void SDL_OnWindowShown(SDL_Window *window); 589extern void SDL_OnWindowHidden(SDL_Window *window); 590extern void SDL_OnWindowMoved(SDL_Window *window); 591extern void SDL_OnWindowResized(SDL_Window *window); 592extern void SDL_CheckWindowPixelSizeChanged(SDL_Window *window); 593extern void SDL_OnWindowPixelSizeChanged(SDL_Window *window); 594extern void SDL_OnWindowLiveResizeUpdate(SDL_Window *window); 595extern void SDL_OnWindowMinimized(SDL_Window *window); 596extern void SDL_OnWindowMaximized(SDL_Window *window); 597extern void SDL_OnWindowRestored(SDL_Window *window); 598extern void SDL_OnWindowEnter(SDL_Window *window); 599extern void SDL_OnWindowLeave(SDL_Window *window); 600extern void SDL_OnWindowFocusGained(SDL_Window *window); 601extern void SDL_OnWindowFocusLost(SDL_Window *window); 602extern void SDL_OnWindowDisplayChanged(SDL_Window *window); 603extern void SDL_UpdateWindowGrab(SDL_Window *window); 604extern bool SDL_UpdateFullscreenMode(SDL_Window *window, SDL_FullscreenOp fullscreen, bool commit); 605extern SDL_Window *SDL_GetToplevelForKeyboardFocus(void); 606 607extern bool SDL_ShouldAllowTopmost(void); 608 609extern void SDL_ToggleDragAndDropSupport(void); 610 611extern void SDL_UpdateDesktopBounds(void); 612 613extern SDL_TextInputType SDL_GetTextInputType(SDL_PropertiesID props); 614extern SDL_Capitalization SDL_GetTextInputCapitalization(SDL_PropertiesID props); 615extern bool SDL_GetTextInputAutocorrect(SDL_PropertiesID props); 616extern bool SDL_GetTextInputMultiline(SDL_PropertiesID props); 617 618extern void SDL_SendScreenKeyboardShown(void); 619extern void SDL_SendScreenKeyboardHidden(void); 620 621#endif // SDL_sysvideo_h_ 622[FILE END](C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.