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