SDL 3.0
SDL_hints.h
Go to the documentation of this file.
1/*
2 Simple DirectMedia Layer
3 Copyright (C) 1997-2023 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
22/**
23 * \file SDL_hints.h
24 *
25 * \brief Official documentation for SDL configuration variables
26 *
27 * This file contains functions to set and get configuration hints,
28 * as well as listing each of them alphabetically.
29 *
30 * The convention for naming hints is SDL_HINT_X, where "SDL_X" is
31 * the environment variable that can be used to override the default.
32 *
33 * In general these hints are just that - they may or may not be
34 * supported or applicable on any given platform, but they provide
35 * a way for an application or user to give the library a hint as
36 * to how they would like the library to work.
37 */
38
39#ifndef SDL_hints_h_
40#define SDL_hints_h_
41
42#include <SDL3/SDL_stdinc.h>
43
44#include <SDL3/SDL_begin_code.h>
45/* Set up for C function definitions, even when using C++ */
46#ifdef __cplusplus
47extern "C" {
48#endif
49
50/**
51 * \brief A variable controlling whether the Android / iOS built-in
52 * accelerometer should be listed as a joystick device.
53 *
54 * This variable can be set to the following values:
55 * "0" - The accelerometer is not listed as a joystick
56 * "1" - The accelerometer is available as a 3 axis joystick (the default).
57 */
58#define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
59
60/**
61 * \brief Specify the behavior of Alt+Tab while the keyboard is grabbed.
62 *
63 * By default, SDL emulates Alt+Tab functionality while the keyboard is grabbed
64 * and your window is full-screen. This prevents the user from getting stuck in
65 * your application if you've enabled keyboard grab.
66 *
67 * The variable can be set to the following values:
68 * "0" - SDL will not handle Alt+Tab. Your application is responsible
69 for handling Alt+Tab while the keyboard is grabbed.
70 * "1" - SDL will minimize your window when Alt+Tab is pressed (default)
71*/
72#define SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"
73
74/**
75 * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
76 * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
77 *
78 * This variable can be set to the following values:
79 * "0" - don't allow topmost
80 * "1" - allow topmost
81 */
82#define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
83
84/**
85 * \brief A variable to control whether the event loop will block itself when the app is paused.
86 *
87 * The variable can be set to the following values:
88 * "0" - Non blocking.
89 * "1" - Blocking. (default)
90 *
91 * The value should be set before SDL is initialized.
92 */
93#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE "SDL_ANDROID_BLOCK_ON_PAUSE"
94
95/**
96 * \brief A variable to control whether SDL will pause audio in background
97 * (Requires SDL_ANDROID_BLOCK_ON_PAUSE as "Non blocking")
98 *
99 * The variable can be set to the following values:
100 * "0" - Non paused.
101 * "1" - Paused. (default)
102 *
103 * The value should be set before SDL is initialized.
104 */
105#define SDL_HINT_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO "SDL_ANDROID_BLOCK_ON_PAUSE_PAUSEAUDIO"
106
107/**
108 * \brief A variable to control whether we trap the Android back button to handle it manually.
109 * This is necessary for the right mouse button to work on some Android devices, or
110 * to be able to trap the back button for use in your code reliably. If set to true,
111 * the back button will show up as an SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of
112 * SDL_SCANCODE_AC_BACK.
113 *
114 * The variable can be set to the following values:
115 * "0" - Back button will be handled as usual for system. (default)
116 * "1" - Back button will be trapped, allowing you to handle the key press
117 * manually. (This will also let right mouse click work on systems
118 * where the right mouse button functions as back.)
119 *
120 * The value of this hint is used at runtime, so it can be changed at any time.
121 */
122#define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
123
124/**
125 * \brief A variable to control whether SDL activity is allowed to be re-created.
126 * If so, java static datas and static datas from native libraries remain with their current values.
127 * When not allowed, the activity terminates with exit(0) to be fully re-initialized afterward.
128 *
129 * The variable can be set to the following values:
130 * "0" - Not allowed. (default)
131 * "1" - Allowed.
132 *
133 * The value of this hint is used at runtime, so it can be changed at any time.
134 */
135#define SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"
136
137/**
138 * \brief A variable setting the app ID string.
139 * This string is used by desktop compositors to identify and group windows
140 * together, as well as match applications with associated desktop settings
141 * and icons.
142 *
143 * On Wayland this corresponds to the "app ID" window property and on X11 this
144 * corresponds to the WM_CLASS property. Windows inherit the value of this hint
145 * at creation time. Changing this hint after a window has been created will not
146 * change the app ID or class of existing windows.
147 *
148 * For *nix platforms, this string should be formatted in reverse-DNS notation
149 * and follow some basic rules to be valid:
150 *
151 * - The application ID must be composed of two or more elements separated by a
152 * period (‘.’) character.
153 *
154 * - Each element must contain one or more of the alphanumeric characters
155 * (A-Z, a-z, 0-9) plus underscore (‘_’) and hyphen (‘-’) and must not start
156 * with a digit. Note that hyphens, while technically allowed, should not be
157 * used if possible, as they are not supported by all components that use the ID,
158 * such as D-Bus. For maximum compatibility, replace hyphens with an underscore.
159 *
160 * - The empty string is not a valid element (ie: your application ID may not
161 * start or end with a period and it is not valid to have two periods in a row).
162 *
163 * - The entire ID must be less than 255 characters in length.
164 *
165 * Examples of valid app ID strings:
166 *
167 * - org.MyOrg.MyApp
168 * - com.your_company.your_app
169 *
170 * Desktops such as GNOME and KDE require that the app ID string matches your
171 * application's .desktop file name (e.g. if the app ID string is 'org.MyOrg.MyApp',
172 * your application's .desktop file should be named 'org.MyOrg.MyApp.desktop').
173 *
174 * If you plan to package your application in a container such as Flatpak, the
175 * app ID should match the name of your Flatpak container as well.
176 *
177 * If not set, SDL will attempt to use the application executable name.
178 * If the executable name cannot be retrieved, the generic string "SDL_App" will be used.
179 *
180 * On targets where this is not supported, this hint does nothing.
181 */
182#define SDL_HINT_APP_ID "SDL_APP_ID"
183
184/**
185 * \brief Specify an application name.
186 *
187 * This hint lets you specify the application name sent to the OS when
188 * required. For example, this will often appear in volume control applets for
189 * audio streams, and in lists of applications which are inhibiting the
190 * screensaver. You should use a string that describes your program ("My Game
191 * 2: The Revenge")
192 *
193 * Setting this to "" or leaving it unset will have SDL use a reasonable
194 * default: probably the application's name or "SDL Application" if SDL
195 * doesn't have any better information.
196 *
197 * Note that, for audio streams, this can be overridden with
198 * SDL_HINT_AUDIO_DEVICE_APP_NAME.
199 *
200 * On targets where this is not supported, this hint does nothing.
201 */
202#define SDL_HINT_APP_NAME "SDL_APP_NAME"
203
204/**
205 * \brief A variable controlling whether controllers used with the Apple TV
206 * generate UI events.
207 *
208 * When UI events are generated by controller input, the app will be
209 * backgrounded when the Apple TV remote's menu button is pressed, and when the
210 * pause or B buttons on gamepads are pressed.
211 *
212 * More information about properly making use of controllers for the Apple TV
213 * can be found here:
214 * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
215 *
216 * This variable can be set to the following values:
217 * "0" - Controller input does not generate UI events (the default).
218 * "1" - Controller input generates UI events.
219 */
220#define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
221
222/**
223 * \brief A variable controlling whether the Apple TV remote's joystick axes
224 * will automatically match the rotation of the remote.
225 *
226 * This variable can be set to the following values:
227 * "0" - Remote orientation does not affect joystick axes (the default).
228 * "1" - Joystick axes are based on the orientation of the remote.
229 */
230#define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
231
232/**
233 * \brief A variable controlling the audio category on iOS and macOS
234 *
235 * This variable can be set to the following values:
236 *
237 * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
238 * "playback" - Use the AVAudioSessionCategoryPlayback category
239 *
240 * For more information, see Apple's documentation:
241 * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
242 */
243#define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
244
245/**
246 * \brief Specify an application name for an audio device.
247 *
248 * Some audio backends (such as PulseAudio) allow you to describe your audio
249 * stream. Among other things, this description might show up in a system
250 * control panel that lets the user adjust the volume on specific audio
251 * streams instead of using one giant master volume slider.
252 *
253 * This hints lets you transmit that information to the OS. The contents of
254 * this hint are used while opening an audio device. You should use a string
255 * that describes your program ("My Game 2: The Revenge")
256 *
257 * Setting this to "" or leaving it unset will have SDL use a reasonable
258 * default: this will be the name set with SDL_HINT_APP_NAME, if that hint is
259 * set. Otherwise, it'll probably the application's name or "SDL Application"
260 * if SDL doesn't have any better information.
261 *
262 * On targets where this is not supported, this hint does nothing.
263 */
264#define SDL_HINT_AUDIO_DEVICE_APP_NAME "SDL_AUDIO_DEVICE_APP_NAME"
265
266/**
267 * \brief Specify an application name for an audio device.
268 *
269 * Some audio backends (such as PulseAudio) allow you to describe your audio
270 * stream. Among other things, this description might show up in a system
271 * control panel that lets the user adjust the volume on specific audio
272 * streams instead of using one giant master volume slider.
273 *
274 * This hints lets you transmit that information to the OS. The contents of
275 * this hint are used while opening an audio device. You should use a string
276 * that describes your what your program is playing ("audio stream" is
277 * probably sufficient in many cases, but this could be useful for something
278 * like "team chat" if you have a headset playing VoIP audio separately).
279 *
280 * Setting this to "" or leaving it unset will have SDL use a reasonable
281 * default: "audio stream" or something similar.
282 *
283 * On targets where this is not supported, this hint does nothing.
284 */
285#define SDL_HINT_AUDIO_DEVICE_STREAM_NAME "SDL_AUDIO_DEVICE_STREAM_NAME"
286
287/**
288 * \brief Specify an application role for an audio device.
289 *
290 * Some audio backends (such as Pipewire) allow you to describe the role of
291 * your audio stream. Among other things, this description might show up in
292 * a system control panel or software for displaying and manipulating media
293 * playback/capture graphs.
294 *
295 * This hints lets you transmit that information to the OS. The contents of
296 * this hint are used while opening an audio device. You should use a string
297 * that describes your what your program is playing (Game, Music, Movie,
298 * etc...).
299 *
300 * Setting this to "" or leaving it unset will have SDL use a reasonable
301 * default: "Game" or something similar.
302 *
303 * On targets where this is not supported, this hint does nothing.
304 */
305#define SDL_HINT_AUDIO_DEVICE_STREAM_ROLE "SDL_AUDIO_DEVICE_STREAM_ROLE"
306
307/**
308 * \brief A variable controlling whether SDL updates joystick state when getting input events
309 *
310 * This variable can be set to the following values:
311 *
312 * "0" - You'll call SDL_UpdateJoysticks() manually
313 * "1" - SDL will automatically call SDL_UpdateJoysticks() (default)
314 *
315 * This hint can be toggled on and off at runtime.
316 */
317#define SDL_HINT_AUTO_UPDATE_JOYSTICKS "SDL_AUTO_UPDATE_JOYSTICKS"
318
319/**
320 * \brief A variable controlling whether SDL updates sensor state when getting input events
321 *
322 * This variable can be set to the following values:
323 *
324 * "0" - You'll call SDL_UpdateSensors() manually
325 * "1" - SDL will automatically call SDL_UpdateSensors() (default)
326 *
327 * This hint can be toggled on and off at runtime.
328 */
329#define SDL_HINT_AUTO_UPDATE_SENSORS "SDL_AUTO_UPDATE_SENSORS"
330
331/**
332 * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
333 *
334 * The bitmap header version 4 is required for proper alpha channel support and
335 * SDL will use it when required. Should this not be desired, this hint can
336 * force the use of the 40 byte header version which is supported everywhere.
337 *
338 * The variable can be set to the following values:
339 * "0" - Surfaces with a colorkey or an alpha channel are saved to a
340 * 32-bit BMP file with an alpha mask. SDL will use the bitmap
341 * header version 4 and set the alpha mask accordingly.
342 * "1" - Surfaces with a colorkey or an alpha channel are saved to a
343 * 32-bit BMP file without an alpha mask. The alpha channel data
344 * will be in the file, but applications are going to ignore it.
345 *
346 * The default value is "0".
347 */
348#define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
349
350/**
351 * \brief Override for SDL_GetDisplayUsableBounds()
352 *
353 * If set, this hint will override the expected results for
354 * SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want
355 * to do this, but this allows an embedded system to request that some of the
356 * screen be reserved for other uses when paired with a well-behaved
357 * application.
358 *
359 * The contents of this hint must be 4 comma-separated integers, the first
360 * is the bounds x, then y, width and height, in that order.
361 */
362#define SDL_HINT_DISPLAY_USABLE_BOUNDS "SDL_DISPLAY_USABLE_BOUNDS"
363
364/**
365 * \brief Disable giving back control to the browser automatically
366 * when running with asyncify
367 *
368 * With -s ASYNCIFY, SDL calls emscripten_sleep during operations
369 * such as refreshing the screen or polling events.
370 *
371 * This hint only applies to the emscripten platform
372 *
373 * The variable can be set to the following values:
374 * "0" - Disable emscripten_sleep calls (if you give back browser control manually or use asyncify for other purposes)
375 * "1" - Enable emscripten_sleep calls (the default)
376 */
377#define SDL_HINT_EMSCRIPTEN_ASYNCIFY "SDL_EMSCRIPTEN_ASYNCIFY"
378
379/**
380 * \brief Specify the CSS selector used for the "default" window/canvas
381 *
382 * This hint only applies to the emscripten platform
383 *
384 * The default value is "#canvas"
385 */
386#define SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR "SDL_EMSCRIPTEN_CANVAS_SELECTOR"
387
388/**
389 * \brief override the binding element for keyboard inputs for Emscripten builds
390 *
391 * This hint only applies to the emscripten platform
392 *
393 * The variable can be one of
394 * "#window" - The javascript window object (this is the default)
395 * "#document" - The javascript document object
396 * "#screen" - the javascript window.screen object
397 * "#canvas" - the WebGL canvas element
398 * any other string without a leading # sign applies to the element on the page with that ID.
399 */
400#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
401
402/**
403 * \brief A variable that controls whether the on-screen keyboard should be shown when text input is active
404 *
405 * The variable can be set to the following values:
406 * "0" - Do not show the on-screen keyboard
407 * "1" - Show the on-screen keyboard
408 *
409 * The default value is "1". This hint must be set before text input is activated.
410 */
411#define SDL_HINT_ENABLE_SCREEN_KEYBOARD "SDL_ENABLE_SCREEN_KEYBOARD"
412
413/**
414 * \brief A variable controlling verbosity of the logging of SDL events pushed onto the internal queue.
415 *
416 * This variable can be set to the following values, from least to most verbose:
417 *
418 * "0" - Don't log any events (default)
419 * "1" - Log most events (other than the really spammy ones).
420 * "2" - Include mouse and finger motion events.
421 * "3" - Include SDL_SysWMEvent events.
422 *
423 * This is generally meant to be used to debug SDL itself, but can be useful
424 * for application developers that need better visibility into what is going
425 * on in the event queue. Logged events are sent through SDL_Log(), which
426 * means by default they appear on stdout on most platforms or maybe
427 * OutputDebugString() on Windows, and can be funneled by the app with
428 * SDL_LogSetOutputFunction(), etc.
429 *
430 * This hint can be toggled on and off at runtime, if you only need to log
431 * events for a small subset of program execution.
432 */
433#define SDL_HINT_EVENT_LOGGING "SDL_EVENT_LOGGING"
434
435/**
436 * \brief A variable controlling whether raising the window should be done more forcefully
437 *
438 * This variable can be set to the following values:
439 * "0" - No forcing (the default)
440 * "1" - Extra level of forcing
441 *
442 * At present, this is only an issue under MS Windows, which makes it nearly impossible to
443 * programmatically move a window to the foreground, for "security" reasons. See
444 * http://stackoverflow.com/a/34414846 for a discussion.
445 */
446#define SDL_HINT_FORCE_RAISEWINDOW "SDL_HINT_FORCE_RAISEWINDOW"
447
448/**
449* \brief A variable controlling whether the window is activated when the SDL_RaiseWindow function is called
450*
451* This variable can be set to the following values:
452* "0" - The window is not activated when the SDL_RaiseWindow function is called
453* "1" - The window is activated when the SDL_RaiseWindow function is called
454*
455* By default SDL will activate the window when the SDL_RaiseWindow function is called.
456* At present this is only available for MS Windows.
457*/
458#define SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED "SDL_WINDOW_ACTIVATE_WHEN_RAISED"
459
460/**
461 * \brief A variable controlling how 3D acceleration is used to accelerate the SDL screen surface.
462 *
463 * SDL can try to accelerate the SDL screen surface by using streaming
464 * textures with a 3D rendering engine. This variable controls whether and
465 * how this is done.
466 *
467 * This variable can be set to the following values:
468 * "0" - Disable 3D acceleration
469 * "1" - Enable 3D acceleration, using the default renderer.
470 * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
471 *
472 * By default SDL tries to make a best guess for each platform whether
473 * to use acceleration or not.
474 */
475#define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
476
477/**
478 * \brief A variable that lets you manually hint extra gamecontroller db entries.
479 *
480 * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamepad.h
481 *
482 * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
483 * You can update mappings after the system is initialized with SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
484 */
485#define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
486
487/**
488 * \brief A variable that lets you provide a file with extra gamecontroller db entries.
489 *
490 * The file should contain lines of gamecontroller config data, see SDL_gamepad.h
491 *
492 * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
493 * You can update mappings after the system is initialized with SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping()
494 */
495#define SDL_HINT_GAMECONTROLLERCONFIG_FILE "SDL_GAMECONTROLLERCONFIG_FILE"
496
497/**
498 * \brief A variable that overrides the automatic controller type detection
499 *
500 * The variable should be comma separated entries, in the form: VID/PID=type
501 *
502 * The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd
503 *
504 * The type should be one of:
505 * Xbox360
506 * XboxOne
507 * PS3
508 * PS4
509 * PS5
510 * SwitchPro
511 *
512 * This hint affects what driver is used, and must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
513 */
514#define SDL_HINT_GAMECONTROLLERTYPE "SDL_GAMECONTROLLERTYPE"
515
516/**
517 * \brief A variable containing a list of devices to skip when scanning for game controllers.
518 *
519 * The format of the string is a comma separated list of USB VID/PID pairs
520 * in hexadecimal form, e.g.
521 *
522 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
523 *
524 * The variable can also take the form of @file, in which case the named
525 * file will be loaded and interpreted as the value of the variable.
526 */
527#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
528
529/**
530 * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
531 *
532 * The format of the string is a comma separated list of USB VID/PID pairs
533 * in hexadecimal form, e.g.
534 *
535 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
536 *
537 * The variable can also take the form of @file, in which case the named
538 * file will be loaded and interpreted as the value of the variable.
539 */
540#define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
541
542/**
543 * \brief If set, game controller face buttons report their values according to their labels instead of their positional layout.
544 *
545 * For example, on Nintendo Switch controllers, normally you'd get:
546 *
547 * (Y)
548 * (X) (B)
549 * (A)
550 *
551 * but if this hint is set, you'll get:
552 *
553 * (X)
554 * (Y) (A)
555 * (B)
556 *
557 * The variable can be set to the following values:
558 * "0" - Report the face buttons by position, as though they were on an Xbox controller.
559 * "1" - Report the face buttons by label instead of position
560 *
561 * The default value is "1". This hint may be set at any time.
562 */
563#define SDL_HINT_GAMECONTROLLER_USE_BUTTON_LABELS "SDL_GAMECONTROLLER_USE_BUTTON_LABELS"
564
565/**
566 * \brief Controls whether the device's built-in accelerometer and gyro should be used as sensors for gamepads.
567 *
568 * The variable can be set to the following values:
569 * "0" - Sensor fusion is disabled
570 * "1" - Sensor fusion is enabled for all controllers that lack sensors
571 *
572 * Or the variable can be a comma separated list of USB VID/PID pairs
573 * in hexadecimal form, e.g.
574 *
575 * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
576 *
577 * The variable can also take the form of @file, in which case the named
578 * file will be loaded and interpreted as the value of the variable.
579 *
580 * This hint is checked when a gamepad is opened.
581 */
582#define SDL_HINT_GAMECONTROLLER_SENSOR_FUSION "SDL_GAMECONTROLLER_SENSOR_FUSION"
583
584/**
585 * \brief A variable controlling whether grabbing input grabs the keyboard
586 *
587 * This variable can be set to the following values:
588 * "0" - Grab will affect only the mouse
589 * "1" - Grab will affect mouse and keyboard
590 *
591 * By default SDL will not grab the keyboard so system shortcuts still work.
592 */
593#define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
594
595/**
596 * \brief A variable to control whether SDL_hid_enumerate() enumerates all HID devices or only controllers.
597 *
598 * This variable can be set to the following values:
599 * "0" - SDL_hid_enumerate() will enumerate all HID devices
600 * "1" - SDL_hid_enumerate() will only enumerate controllers
601 *
602 * By default SDL will only enumerate controllers, to reduce risk of hanging or crashing on devices with bad drivers and avoiding macOS keyboard capture permission prompts.
603 */
604#define SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"
605
606/**
607 * \brief A variable containing a list of devices to ignore in SDL_hid_enumerate()
608 *
609 * For example, to ignore the Shanwan DS3 controller and any Valve controller, you might
610 * have the string "0x2563/0x0523,0x28de/0x0000"
611 */
612#define SDL_HINT_HIDAPI_IGNORE_DEVICES "SDL_HIDAPI_IGNORE_DEVICES"
613
614/**
615 * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_EVENT_TEXT_EDITING events.
616 *
617 * The variable can be set to the following values:
618 * "0" - SDL_EVENT_TEXT_EDITING events are sent, and it is the application's
619 * responsibility to render the text from these events and
620 * differentiate it somehow from committed text. (default)
621 * "1" - If supported by the IME then SDL_EVENT_TEXT_EDITING events are not sent,
622 * and text that is being composed will be rendered in its own UI.
623 */
624#define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
625
626/**
627 * \brief A variable to control whether certain IMEs should show native UI components (such as the Candidate List) instead of suppressing them.
628 *
629 * The variable can be set to the following values:
630 * "0" - Native UI components are not display. (default)
631 * "1" - Native UI components are displayed.
632 */
633#define SDL_HINT_IME_SHOW_UI "SDL_IME_SHOW_UI"
634
635/**
636 * \brief A variable to control if extended IME text support is enabled.
637 * If enabled then SDL_TextEditingExtEvent will be issued if the text would be truncated otherwise.
638 * Additionally SDL_TextInputEvent will be dispatched multiple times so that it is not truncated.
639 *
640 * The variable can be set to the following values:
641 * "0" - Legacy behavior. Text can be truncated, no heap allocations. (default)
642 * "1" - Modern behavior.
643 */
644#define SDL_HINT_IME_SUPPORT_EXTENDED_TEXT "SDL_IME_SUPPORT_EXTENDED_TEXT"
645
646/**
647 * \brief A variable controlling whether the home indicator bar on iPhone X
648 * should be hidden.
649 *
650 * This variable can be set to the following values:
651 * "0" - The indicator bar is not hidden (default for windowed applications)
652 * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
653 * "2" - The indicator bar is dim and the first swipe makes it visible and the second swipe performs the "home" action (default for fullscreen applications)
654 */
655#define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
656
657/**
658 * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
659 *
660 * The variable can be set to the following values:
661 * "0" - Disable joystick & gamecontroller input events when the
662 * application is in the background.
663 * "1" - Enable joystick & gamecontroller input events when the
664 * application is in the background.
665 *
666 * The default value is "0". This hint may be set at any time.
667 */
668#define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
669
670/**
671 * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
672 *
673 * This variable can be set to the following values:
674 * "0" - HIDAPI drivers are not used
675 * "1" - HIDAPI drivers are used (the default)
676 *
677 * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
678 */
679#define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
680
681/**
682 * \brief A variable controlling whether the HIDAPI driver for Nintendo GameCube controllers should be used.
683 *
684 * This variable can be set to the following values:
685 * "0" - HIDAPI driver is not used
686 * "1" - HIDAPI driver is used
687 *
688 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
689 */
690#define SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE "SDL_JOYSTICK_HIDAPI_GAMECUBE"
691
692/**
693 * \brief A variable controlling whether "low_frequency_rumble" and "high_frequency_rumble" is used to implement
694 * the GameCube controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2)
695 * this is useful for applications that need full compatibility for things like ADSR envelopes.
696 * Stop is implemented by setting "low_frequency_rumble" to "0" and "high_frequency_rumble" ">0"
697 * Rumble is both at any arbitrary value,
698 * StopHard is implemented by setting both "low_frequency_rumble" and "high_frequency_rumble" to "0"
699 *
700 * This variable can be set to the following values:
701 * "0" - Normal rumble behavior is behavior is used (default)
702 * "1" - Proper GameCube controller rumble behavior is used
703 *
704 */
705#define SDL_HINT_JOYSTICK_GAMECUBE_RUMBLE_BRAKE "SDL_JOYSTICK_GAMECUBE_RUMBLE_BRAKE"
706
707/**
708 * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch Joy-Cons should be used.
709 *
710 * This variable can be set to the following values:
711 * "0" - HIDAPI driver is not used
712 * "1" - HIDAPI driver is used
713 *
714 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
715 */
716#define SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS "SDL_JOYSTICK_HIDAPI_JOY_CONS"
717
718/**
719 * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be combined into a single Pro-like controller when using the HIDAPI driver
720 *
721 * This variable can be set to the following values:
722 * "0" - Left and right Joy-Con controllers will not be combined and each will be a mini-gamepad
723 * "1" - Left and right Joy-Con controllers will be combined into a single controller (the default)
724 */
725#define SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"
726
727/**
728 * \brief A variable controlling whether Nintendo Switch Joy-Con controllers will be in vertical mode when using the HIDAPI driver
729 *
730 * This variable can be set to the following values:
731 * "0" - Left and right Joy-Con controllers will not be in vertical mode (the default)
732 * "1" - Left and right Joy-Con controllers will be in vertical mode
733 *
734 * This hint must be set before calling SDL_Init(SDL_INIT_GAMEPAD)
735 */
736#define SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"
737
738/**
739 * \brief A variable controlling whether the HIDAPI driver for Amazon Luna controllers connected via Bluetooth should be used.
740 *
741 * This variable can be set to the following values:
742 * "0" - HIDAPI driver is not used
743 * "1" - HIDAPI driver is used
744 *
745 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
746 */
747#define SDL_HINT_JOYSTICK_HIDAPI_LUNA "SDL_JOYSTICK_HIDAPI_LUNA"
748
749/**
750 * \brief A variable controlling whether the HIDAPI driver for Nintendo Online classic controllers should be used.
751 *
752 * This variable can be set to the following values:
753 * "0" - HIDAPI driver is not used
754 * "1" - HIDAPI driver is used
755 *
756 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
757 */
758#define SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"
759
760/**
761 * \brief A variable controlling whether the HIDAPI driver for NVIDIA SHIELD controllers should be used.
762 *
763 * This variable can be set to the following values:
764 * "0" - HIDAPI driver is not used
765 * "1" - HIDAPI driver is used
766 *
767 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
768 */
769#define SDL_HINT_JOYSTICK_HIDAPI_SHIELD "SDL_JOYSTICK_HIDAPI_SHIELD"
770
771/**
772 * \brief A variable controlling whether the HIDAPI driver for PS3 controllers should be used.
773 *
774 * This variable can be set to the following values:
775 * "0" - HIDAPI driver is not used
776 * "1" - HIDAPI driver is used
777 *
778 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on other platforms.
779 *
780 * It is not possible to use this driver on Windows, due to limitations in the default drivers
781 * installed. See https://github.com/ViGEm/DsHidMini for an alternative driver on Windows.
782 */
783#define SDL_HINT_JOYSTICK_HIDAPI_PS3 "SDL_JOYSTICK_HIDAPI_PS3"
784
785/**
786 * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
787 *
788 * This variable can be set to the following values:
789 * "0" - HIDAPI driver is not used
790 * "1" - HIDAPI driver is used
791 *
792 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
793 */
794#define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
795
796/**
797 * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
798 *
799 * This variable can be set to the following values:
800 * "0" - extended reports are not enabled (the default)
801 * "1" - extended reports
802 *
803 * Extended input reports allow rumble on Bluetooth PS4 controllers, but
804 * break DirectInput handling for applications that don't use SDL.
805 *
806 * Once extended reports are enabled, they can not be disabled without
807 * power cycling the controller.
808 *
809 * For compatibility with applications written for versions of SDL prior
810 * to the introduction of PS5 controller support, this value will also
811 * control the state of extended reports on PS5 controllers when the
812 * SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE hint is not explicitly set.
813 */
814#define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
815
816/**
817 * \brief A variable controlling whether the HIDAPI driver for PS5 controllers should be used.
818 *
819 * This variable can be set to the following values:
820 * "0" - HIDAPI driver is not used
821 * "1" - HIDAPI driver is used
822 *
823 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
824 */
825#define SDL_HINT_JOYSTICK_HIDAPI_PS5 "SDL_JOYSTICK_HIDAPI_PS5"
826
827/**
828 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a PS5 controller.
829 *
830 * This variable can be set to the following values:
831 * "0" - player LEDs are not enabled
832 * "1" - player LEDs are enabled (the default)
833 */
834#define SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"
835
836/**
837 * \brief A variable controlling whether extended input reports should be used for PS5 controllers when using the HIDAPI driver.
838 *
839 * This variable can be set to the following values:
840 * "0" - extended reports are not enabled (the default)
841 * "1" - extended reports
842 *
843 * Extended input reports allow rumble on Bluetooth PS5 controllers, but
844 * break DirectInput handling for applications that don't use SDL.
845 *
846 * Once extended reports are enabled, they can not be disabled without
847 * power cycling the controller.
848 *
849 * For compatibility with applications written for versions of SDL prior
850 * to the introduction of PS5 controller support, this value defaults to
851 * the value of SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE.
852 */
853#define SDL_HINT_JOYSTICK_HIDAPI_PS5_RUMBLE "SDL_JOYSTICK_HIDAPI_PS5_RUMBLE"
854
855/**
856 * \brief A variable controlling whether the HIDAPI driver for Google Stadia controllers should be used.
857 *
858 * This variable can be set to the following values:
859 * "0" - HIDAPI driver is not used
860 * "1" - HIDAPI driver is used
861 *
862 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
863 */
864#define SDL_HINT_JOYSTICK_HIDAPI_STADIA "SDL_JOYSTICK_HIDAPI_STADIA"
865
866/**
867 * \brief A variable controlling whether the HIDAPI driver for Bluetooth Steam Controllers should be used.
868 *
869 * This variable can be set to the following values:
870 * "0" - HIDAPI driver is not used
871 * "1" - HIDAPI driver is used for Steam Controllers, which requires Bluetooth access
872 * and may prompt the user for permission on iOS and Android.
873 *
874 * The default is "0"
875 */
876#define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
877
878/**
879 * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
880 *
881 * This variable can be set to the following values:
882 * "0" - HIDAPI driver is not used
883 * "1" - HIDAPI driver is used
884 *
885 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
886 */
887#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
888
889/**
890 * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Pro controller is opened
891 *
892 * This variable can be set to the following values:
893 * "0" - home button LED is turned off
894 * "1" - home button LED is turned on
895 *
896 * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
897 */
898#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"
899
900/**
901 * \brief A variable controlling whether the Home button LED should be turned on when a Nintendo Switch Joy-Con controller is opened
902 *
903 * This variable can be set to the following values:
904 * "0" - home button LED is turned off
905 * "1" - home button LED is turned on
906 *
907 * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED.
908 */
909#define SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"
910
911/**
912 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Nintendo Switch controller.
913 *
914 * This variable can be set to the following values:
915 * "0" - player LEDs are not enabled
916 * "1" - player LEDs are enabled (the default)
917 */
918#define SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"
919
920/**
921 * \brief A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U controllers should be used.
922 *
923 * This variable can be set to the following values:
924 * "0" - HIDAPI driver is not used
925 * "1" - HIDAPI driver is used
926 *
927 * This driver doesn't work with the dolphinbar, so the default is SDL_FALSE for now.
928 */
929#define SDL_HINT_JOYSTICK_HIDAPI_WII "SDL_JOYSTICK_HIDAPI_WII"
930
931/**
932 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with a Wii controller.
933 *
934 * This variable can be set to the following values:
935 * "0" - player LEDs are not enabled
936 * "1" - player LEDs are enabled (the default)
937 */
938#define SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"
939
940/**
941 * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
942 *
943 * This variable can be set to the following values:
944 * "0" - HIDAPI driver is not used
945 * "1" - HIDAPI driver is used
946 *
947 * The default is "0" on Windows, otherwise the value of SDL_HINT_JOYSTICK_HIDAPI
948 */
949#define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
950
951/**
952 * \brief A variable controlling whether the HIDAPI driver for XBox 360 controllers should be used.
953 *
954 * This variable can be set to the following values:
955 * "0" - HIDAPI driver is not used
956 * "1" - HIDAPI driver is used
957 *
958 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
959 */
960#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 "SDL_JOYSTICK_HIDAPI_XBOX_360"
961
962/**
963 * \brief A variable controlling whether the player LEDs should be lit to indicate which player is associated with an Xbox 360 controller.
964 *
965 * This variable can be set to the following values:
966 * "0" - player LEDs are not enabled
967 * "1" - player LEDs are enabled (the default)
968 */
969#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"
970
971/**
972 * \brief A variable controlling whether the HIDAPI driver for XBox 360 wireless controllers should be used.
973 *
974 * This variable can be set to the following values:
975 * "0" - HIDAPI driver is not used
976 * "1" - HIDAPI driver is used
977 *
978 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360
979 */
980#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"
981
982/**
983 * \brief A variable controlling whether the HIDAPI driver for XBox One controllers should be used.
984 *
985 * This variable can be set to the following values:
986 * "0" - HIDAPI driver is not used
987 * "1" - HIDAPI driver is used
988 *
989 * The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX
990 */
991#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE "SDL_JOYSTICK_HIDAPI_XBOX_ONE"
992
993/**
994 * \brief A variable controlling whether the Home button LED should be turned on when an Xbox One controller is opened
995 *
996 * This variable can be set to the following values:
997 * "0" - home button LED is turned off
998 * "1" - home button LED is turned on
999 *
1000 * By default the Home button LED state is not changed. This hint can also be set to a floating point value between 0.0 and 1.0 which controls the brightness of the Home button LED. The default brightness is 0.4.
1001 */
1002#define SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"
1003
1004/**
1005 * \brief A variable controlling whether the RAWINPUT joystick drivers should be used for better handling XInput-capable devices.
1006 *
1007 * This variable can be set to the following values:
1008 * "0" - RAWINPUT drivers are not used
1009 * "1" - RAWINPUT drivers are used (the default)
1010 */
1011#define SDL_HINT_JOYSTICK_RAWINPUT "SDL_JOYSTICK_RAWINPUT"
1012
1013/**
1014 * \brief A variable controlling whether the RAWINPUT driver should pull correlated data from XInput.
1015 *
1016 * This variable can be set to the following values:
1017 * "0" - RAWINPUT driver will only use data from raw input APIs
1018 * "1" - RAWINPUT driver will also pull data from XInput, providing
1019 * better trigger axes, guide button presses, and rumble support
1020 * for Xbox controllers
1021 *
1022 * The default is "1". This hint applies to any joysticks opened after setting the hint.
1023 */
1024#define SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"
1025
1026/**
1027 * \brief A variable controlling whether the ROG Chakram mice should show up as joysticks
1028 *
1029 * This variable can be set to the following values:
1030 * "0" - ROG Chakram mice do not show up as joysticks (the default)
1031 * "1" - ROG Chakram mice show up as joysticks
1032 */
1033#define SDL_HINT_JOYSTICK_ROG_CHAKRAM "SDL_JOYSTICK_ROG_CHAKRAM"
1034
1035/**
1036 * \brief A variable controlling whether a separate thread should be used
1037 * for handling joystick detection and raw input messages on Windows
1038 *
1039 * This variable can be set to the following values:
1040 * "0" - A separate thread is not used (the default)
1041 * "1" - A separate thread is used for handling raw input messages
1042 *
1043 */
1044#define SDL_HINT_JOYSTICK_THREAD "SDL_JOYSTICK_THREAD"
1045
1046/**
1047 * \brief A variable controlling whether Windows.Gaming.Input should be used for controller handling.
1048 *
1049 * This variable can be set to the following values:
1050 * "0" - WGI is not used
1051 * "1" - WGI is used (the default)
1052 */
1053#define SDL_HINT_JOYSTICK_WGI "SDL_JOYSTICK_WGI"
1054
1055/**
1056 * \brief Determines whether SDL enforces that DRM master is required in order
1057 * to initialize the KMSDRM video backend.
1058 *
1059 * The DRM subsystem has a concept of a "DRM master" which is a DRM client that
1060 * has the ability to set planes, set cursor, etc. When SDL is DRM master, it
1061 * can draw to the screen using the SDL rendering APIs. Without DRM master, SDL
1062 * is still able to process input and query attributes of attached displays,
1063 * but it cannot change display state or draw to the screen directly.
1064 *
1065 * In some cases, it can be useful to have the KMSDRM backend even if it cannot
1066 * be used for rendering. An app may want to use SDL for input processing while
1067 * using another rendering API (such as an MMAL overlay on Raspberry Pi) or
1068 * using its own code to render to DRM overlays that SDL doesn't support.
1069 *
1070 * This hint must be set before initializing the video subsystem.
1071 *
1072 * This variable can be set to the following values:
1073 * "0" - SDL will allow usage of the KMSDRM backend without DRM master
1074 * "1" - SDL Will require DRM master to use the KMSDRM backend (default)
1075 */
1076#define SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER "SDL_KMSDRM_REQUIRE_DRM_MASTER"
1077
1078/**
1079 * \brief A comma separated list of devices to open as joysticks
1080 *
1081 * This variable is currently only used by the Linux joystick driver.
1082 */
1083#define SDL_HINT_JOYSTICK_DEVICE "SDL_JOYSTICK_DEVICE"
1084
1085/**
1086 * \brief A variable controlling whether joysticks on Linux will always treat 'hat' axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking whether they may be analog.
1087 *
1088 * This variable can be set to the following values:
1089 * "0" - Only map hat axis inputs to digital hat outputs if the input axes appear to actually be digital (the default)
1090 * "1" - Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as digital hats
1091 */
1092#define SDL_HINT_LINUX_DIGITAL_HATS "SDL_LINUX_DIGITAL_HATS"
1093
1094/**
1095 * \brief A variable controlling whether digital hats on Linux will apply deadzones to their underlying input axes or use unfiltered values.
1096 *
1097 * This variable can be set to the following values:
1098 * "0" - Return digital hat values based on unfiltered input axis values
1099 * "1" - Return digital hat values with deadzones on the input axes taken into account (the default)
1100 */
1101#define SDL_HINT_LINUX_HAT_DEADZONES "SDL_LINUX_HAT_DEADZONES"
1102
1103/**
1104 * \brief A variable controlling whether to use the classic /dev/input/js* joystick interface or the newer /dev/input/event* joystick interface on Linux
1105 *
1106 * This variable can be set to the following values:
1107 * "0" - Use /dev/input/event*
1108 * "1" - Use /dev/input/js*
1109 *
1110 * By default the /dev/input/event* interfaces are used
1111 */
1112#define SDL_HINT_LINUX_JOYSTICK_CLASSIC "SDL_LINUX_JOYSTICK_CLASSIC"
1113
1114/**
1115 * \brief A variable controlling whether joysticks on Linux adhere to their HID-defined deadzones or return unfiltered values.
1116 *
1117 * This variable can be set to the following values:
1118 * "0" - Return unfiltered joystick axis values (the default)
1119 * "1" - Return axis values with deadzones taken into account
1120 */
1121#define SDL_HINT_LINUX_JOYSTICK_DEADZONES "SDL_LINUX_JOYSTICK_DEADZONES"
1122
1123/**
1124* \brief When set don't force the SDL app to become a foreground process
1125*
1126* This hint only applies to macOS.
1127*
1128*/
1129#define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
1130
1131/**
1132 * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
1133 *
1134 * If present, holding ctrl while left clicking will generate a right click
1135 * event when on Mac.
1136 */
1137#define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
1138
1139/**
1140 * \brief A variable controlling whether dispatching OpenGL context updates should block the dispatching thread until the main thread finishes processing
1141 *
1142 * This variable can be set to the following values:
1143 * "0" - Dispatching OpenGL context updates will block the dispatching thread until the main thread finishes processing (default).
1144 * "1" - Dispatching OpenGL context updates will allow the dispatching thread to continue execution.
1145 *
1146 * Generally you want the default, but if you have OpenGL code in a background thread on a Mac, and the main thread
1147 * hangs because it's waiting for that background thread, but that background thread is also hanging because it's
1148 * waiting for the main thread to do an update, this might fix your issue.
1149 *
1150 * This hint only applies to macOS.
1151 *
1152 * This hint is available since SDL 2.24.0.
1153 *
1154 */
1155#define SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH "SDL_MAC_OPENGL_ASYNC_DISPATCH"
1156
1157/**
1158 * \brief A variable setting the double click radius, in pixels.
1159 */
1160#define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
1161
1162/**
1163 * \brief A variable setting the double click time, in milliseconds.
1164 */
1165#define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
1166
1167/**
1168 * \brief Allow mouse click events when clicking to focus an SDL window
1169 *
1170 * This variable can be set to the following values:
1171 * "0" - Ignore mouse clicks that activate a window
1172 * "1" - Generate events for mouse clicks that activate a window
1173 *
1174 * By default SDL will ignore mouse clicks that activate a window
1175 */
1176#define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
1177
1178/**
1179 * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
1180 */
1181#define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
1182
1183/**
1184 * \brief A variable controlling whether relative mouse mode constrains the mouse to the center of the window
1185 *
1186 * This variable can be set to the following values:
1187 * "0" - Relative mouse mode constrains the mouse to the window
1188 * "1" - Relative mouse mode constrains the mouse to the center of the window
1189 *
1190 * Constraining to the center of the window works better for FPS games and when the
1191 * application is running over RDP. Constraining to the whole window works better
1192 * for 2D games and increases the chance that the mouse will be in the correct
1193 * position when using high DPI mice.
1194 *
1195 * By default SDL will constrain the mouse to the center of the window
1196 */
1197#define SDL_HINT_MOUSE_RELATIVE_MODE_CENTER "SDL_MOUSE_RELATIVE_MODE_CENTER"
1198
1199/**
1200 * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
1201 *
1202 * This variable can be set to the following values:
1203 * "0" - Relative mouse mode uses raw input
1204 * "1" - Relative mouse mode uses mouse warping
1205 *
1206 * By default SDL will use raw input for relative mouse mode
1207 */
1208#define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
1209
1210/**
1211 * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
1212 */
1213#define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
1214
1215/**
1216 * \brief A variable controlling whether the system mouse acceleration curve is used for relative mouse motion.
1217 *
1218 * This variable can be set to the following values:
1219 * "0" - Relative mouse motion will be unscaled (the default)
1220 * "1" - Relative mouse motion will be scaled using the system mouse acceleration curve.
1221 *
1222 * If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will override the system speed scale.
1223 */
1224#define SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"
1225
1226/**
1227 * \brief A variable controlling whether a motion event should be generated for mouse warping in relative mode.
1228 *
1229 * This variable can be set to the following values:
1230 * "0" - Warping the mouse will not generate a motion event in relative mode
1231 * "1" - Warping the mouse will generate a motion event in relative mode
1232 *
1233 * By default warping the mouse will not generate motion events in relative mode. This avoids the application having to filter out large relative motion due to warping.
1234 */
1235#define SDL_HINT_MOUSE_RELATIVE_WARP_MOTION "SDL_MOUSE_RELATIVE_WARP_MOTION"
1236
1237/**
1238 * \brief A variable controlling whether mouse events should generate synthetic touch events
1239 *
1240 * This variable can be set to the following values:
1241 * "0" - Mouse events will not generate touch events (default for desktop platforms)
1242 * "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
1243 */
1244#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
1245
1246/**
1247 * \brief A variable controlling whether the mouse is captured while mouse buttons are pressed
1248 *
1249 * This variable can be set to the following values:
1250 * "0" - The mouse is not captured while mouse buttons are pressed
1251 * "1" - The mouse is captured while mouse buttons are pressed
1252 *
1253 * By default the mouse is captured while mouse buttons are pressed so if the mouse is dragged
1254 * outside the window, the application continues to receive mouse events until the button is
1255 * released.
1256 */
1257#define SDL_HINT_MOUSE_AUTO_CAPTURE "SDL_MOUSE_AUTO_CAPTURE"
1258
1259/**
1260 * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
1261 *
1262 * This hint only applies to Unix-like platforms, and should set before
1263 * any calls to SDL_Init()
1264 *
1265 * The variable can be set to the following values:
1266 * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
1267 * catches a signal, convert it into an SDL_EVENT_QUIT event.
1268 * "1" - SDL will not install a signal handler at all.
1269 */
1270#define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
1271
1272/**
1273 * \brief A variable controlling what driver to use for OpenGL ES contexts.
1274 *
1275 * On some platforms, currently Windows and X11, OpenGL drivers may support
1276 * creating contexts with an OpenGL ES profile. By default SDL uses these
1277 * profiles, when available, otherwise it attempts to load an OpenGL ES
1278 * library, e.g. that provided by the ANGLE project. This variable controls
1279 * whether SDL follows this default behaviour or will always load an
1280 * OpenGL ES library.
1281 *
1282 * Circumstances where this is useful include
1283 * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
1284 * or emulator, e.g. those from ARM, Imagination or Qualcomm.
1285 * - Resolving OpenGL ES function addresses at link time by linking with
1286 * the OpenGL ES library instead of querying them at run time with
1287 * SDL_GL_GetProcAddress().
1288 *
1289 * Caution: for an application to work with the default behaviour across
1290 * different OpenGL drivers it must query the OpenGL ES function
1291 * addresses at run time using SDL_GL_GetProcAddress().
1292 *
1293 * This variable is ignored on most platforms because OpenGL ES is native
1294 * or not supported.
1295 *
1296 * This variable can be set to the following values:
1297 * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
1298 * "1" - Load OpenGL ES library using the default library names.
1299 *
1300 */
1301#define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
1302
1303/**
1304 * \brief A variable controlling which orientations are allowed on iOS/Android.
1305 *
1306 * In some circumstances it is necessary to be able to explicitly control
1307 * which UI orientations are allowed.
1308 *
1309 * This variable is a space delimited list of the following values:
1310 * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
1311 */
1312#define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
1313
1314/**
1315 * \brief A variable controlling the use of a sentinel event when polling the event queue
1316 *
1317 * This variable can be set to the following values:
1318 * "0" - Disable poll sentinels
1319 * "1" - Enable poll sentinels
1320 *
1321 * When polling for events, SDL_PumpEvents is used to gather new events from devices.
1322 * If a device keeps producing new events between calls to SDL_PumpEvents, a poll loop will
1323 * become stuck until the new events stop.
1324 * This is most noticeable when moving a high frequency mouse.
1325 *
1326 * By default, poll sentinels are enabled.
1327 */
1328#define SDL_HINT_POLL_SENTINEL "SDL_POLL_SENTINEL"
1329
1330/**
1331 * \brief Override for SDL_GetPreferredLocales()
1332 *
1333 * If set, this will be favored over anything the OS might report for the
1334 * user's preferred locales. Changing this hint at runtime will not generate
1335 * a SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can push
1336 * your own event, if you want).
1337 *
1338 * The format of this hint is a comma-separated list of language and locale,
1339 * combined with an underscore, as is a common format: "en_GB". Locale is
1340 * optional: "en". So you might have a list like this: "en_GB,jp,es_PT"
1341 */
1342#define SDL_HINT_PREFERRED_LOCALES "SDL_PREFERRED_LOCALES"
1343
1344/**
1345 * \brief A variable describing the content orientation on QtWayland-based platforms.
1346 *
1347 * On QtWayland platforms, windows are rotated client-side to allow for custom
1348 * transitions. In order to correctly position overlays (e.g. volume bar) and
1349 * gestures (e.g. events view, close/minimize gestures), the system needs to
1350 * know in which orientation the application is currently drawing its contents.
1351 *
1352 * This does not cause the window to be rotated or resized, the application
1353 * needs to take care of drawing the content in the right orientation (the
1354 * framebuffer is always in portrait mode).
1355 *
1356 * This variable can be one of the following values:
1357 * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
1358 *
1359 * Since SDL 2.0.22 this variable accepts a comma-separated list of values above.
1360 */
1361#define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
1362
1363/**
1364 * \brief Flags to set on QtWayland windows to integrate with the native window manager.
1365 *
1366 * On QtWayland platforms, this hint controls the flags to set on the windows.
1367 * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
1368 *
1369 * This variable is a space-separated list of the following values (empty = no flags):
1370 * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
1371 */
1372#define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
1373
1374/**
1375 * \brief A variable controlling whether the 2D render API is compatible or efficient.
1376 *
1377 * This variable can be set to the following values:
1378 *
1379 * "0" - Don't use batching to make rendering more efficient.
1380 * "1" - Use batching, but might cause problems if app makes its own direct OpenGL calls.
1381 *
1382 * Up to SDL 2.0.9, the render API would draw immediately when requested. Now
1383 * it batches up draw requests and sends them all to the GPU only when forced
1384 * to (during SDL_RenderPresent, when changing render targets, by updating a
1385 * texture that the batch needs, etc). This is significantly more efficient,
1386 * but it can cause problems for apps that expect to render on top of the
1387 * render API's output. As such, SDL will disable batching if a specific
1388 * render backend is requested (since this might indicate that the app is
1389 * planning to use the underlying graphics API directly). This hint can
1390 * be used to explicitly request batching in this instance. It is a contract
1391 * that you will either never use the underlying graphics API directly, or
1392 * if you do, you will call SDL_RenderFlush() before you do so any current
1393 * batch goes to the GPU before your work begins. Not following this contract
1394 * will result in undefined behavior.
1395 */
1396#define SDL_HINT_RENDER_BATCHING "SDL_RENDER_BATCHING"
1397
1398/**
1399 * \brief A variable controlling how the 2D render API renders lines
1400 *
1401 * This variable can be set to the following values:
1402 * "0" - Use the default line drawing method (Bresenham's line algorithm as of SDL 2.0.20)
1403 * "1" - Use the driver point API using Bresenham's line algorithm (correct, draws many points)
1404 * "2" - Use the driver line API (occasionally misses line endpoints based on hardware driver quirks, was the default before 2.0.20)
1405 * "3" - Use the driver geometry API (correct, draws thicker diagonal lines)
1406 *
1407 * This variable should be set when the renderer is created.
1408 */
1409#define SDL_HINT_RENDER_LINE_METHOD "SDL_RENDER_LINE_METHOD"
1410
1411/**
1412 * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
1413 *
1414 * This variable does not have any effect on the Direct3D 9 based renderer.
1415 *
1416 * This variable can be set to the following values:
1417 * "0" - Disable Debug Layer use
1418 * "1" - Enable Debug Layer use
1419 *
1420 * By default, SDL does not use Direct3D Debug Layer.
1421 */
1422#define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
1423
1424/**
1425 * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
1426 *
1427 * This variable can be set to the following values:
1428 * "0" - Thread-safety is not enabled (faster)
1429 * "1" - Thread-safety is enabled
1430 *
1431 * By default the Direct3D device is created with thread-safety disabled.
1432 */
1433#define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
1434
1435/**
1436 * \brief A variable specifying which render driver to use.
1437 *
1438 * If the application doesn't pick a specific renderer to use, this variable
1439 * specifies the name of the preferred renderer. If the preferred renderer
1440 * can't be initialized, the normal default renderer is used.
1441 *
1442 * This variable is case insensitive and can be set to the following values:
1443 * "direct3d"
1444 * "direct3d11"
1445 * "direct3d12"
1446 * "opengl"
1447 * "opengles2"
1448 * "opengles"
1449 * "metal"
1450 * "software"
1451 *
1452 * The default varies by platform, but it's the first one in the list that
1453 * is available on the current platform.
1454 */
1455#define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
1456
1457/**
1458 * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
1459 *
1460 * This variable can be set to the following values:
1461 * "0" - Disable shaders
1462 * "1" - Enable shaders
1463 *
1464 * By default shaders are used if OpenGL supports them.
1465 */
1466#define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
1467
1468/**
1469 * \brief A variable controlling the scaling quality
1470 *
1471 * This variable can be set to the following values:
1472 * "0" or "nearest" - Nearest pixel sampling
1473 * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
1474 * "2" or "best" - Currently this is the same as "linear"
1475 *
1476 * By default nearest pixel sampling is used
1477 */
1478#define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
1479
1480/**
1481 * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
1482 *
1483 * This variable can be set to the following values:
1484 * "0" - Disable vsync
1485 * "1" - Enable vsync
1486 *
1487 * By default SDL does not sync screen surface updates with vertical refresh.
1488 */
1489#define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
1490
1491/**
1492 * \brief A variable controlling if VSYNC is automatically disable if doesn't reach the enough FPS
1493 *
1494 * This variable can be set to the following values:
1495 * "0" - It will be using VSYNC as defined in the main flag. Default
1496 * "1" - If VSYNC was previously enabled, then it will disable VSYNC if doesn't reach enough speed
1497 *
1498 * By default SDL does not enable the automatic VSYNC
1499 */
1500#define SDL_HINT_PS2_DYNAMIC_VSYNC "SDL_PS2_DYNAMIC_VSYNC"
1501
1502/**
1503 * \brief A variable to control whether the return key on the soft keyboard
1504 * should hide the soft keyboard on Android and iOS.
1505 *
1506 * The variable can be set to the following values:
1507 * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
1508 * "1" - The return key will hide the keyboard.
1509 *
1510 * The value of this hint is used at runtime, so it can be changed at any time.
1511 */
1512#define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
1513
1514/**
1515 * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
1516 *
1517 * Also known as Z-order. The variable can take a negative or positive value.
1518 * The default is 10000.
1519 */
1520#define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
1521
1522/**
1523 * \brief Specify an "activity name" for screensaver inhibition.
1524 *
1525 * Some platforms, notably Linux desktops, list the applications which are
1526 * inhibiting the screensaver or other power-saving features.
1527 *
1528 * This hint lets you specify the "activity name" sent to the OS when
1529 * SDL_DisableScreenSaver() is used (or the screensaver is automatically
1530 * disabled). The contents of this hint are used when the screensaver is
1531 * disabled. You should use a string that describes what your program is doing
1532 * (and, therefore, why the screensaver is disabled). For example, "Playing a
1533 * game" or "Watching a video".
1534 *
1535 * Setting this to "" or leaving it unset will have SDL use a reasonable
1536 * default: "Playing a game" or something similar.
1537 *
1538 * On targets where this is not supported, this hint does nothing.
1539 */
1540#define SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"
1541
1542/**
1543 * \brief Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as realtime.
1544 *
1545 * On some platforms, like Linux, a realtime priority thread may be subject to restrictions
1546 * that require special handling by the application. This hint exists to let SDL know that
1547 * the app is prepared to handle said restrictions.
1548 *
1549 * On Linux, SDL will apply the following configuration to any thread that becomes realtime:
1550 * * The SCHED_RESET_ON_FORK bit will be set on the scheduling policy,
1551 * * An RLIMIT_RTTIME budget will be configured to the rtkit specified limit.
1552 * * Exceeding this limit will result in the kernel sending SIGKILL to the app,
1553 * * Refer to the man pages for more information.
1554 *
1555 * This variable can be set to the following values:
1556 * "0" - default platform specific behaviour
1557 * "1" - Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling policy
1558 */
1559#define SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"
1560
1561/**
1562* \brief A string specifying additional information to use with SDL_SetThreadPriority.
1563*
1564* By default SDL_SetThreadPriority will make appropriate system changes in order to
1565* apply a thread priority. For example on systems using pthreads the scheduler policy
1566* is changed automatically to a policy that works well with a given priority.
1567* Code which has specific requirements can override SDL's default behavior with this hint.
1568*
1569* pthread hint values are "current", "other", "fifo" and "rr".
1570* Currently no other platform hint values are defined but may be in the future.
1571*
1572* \note On Linux, the kernel may send SIGKILL to realtime tasks which exceed the distro
1573* configured execution budget for rtkit. This budget can be queried through RLIMIT_RTTIME
1574* after calling SDL_SetThreadPriority().
1575*/
1576#define SDL_HINT_THREAD_PRIORITY_POLICY "SDL_THREAD_PRIORITY_POLICY"
1577
1578/**
1579* \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
1580*
1581* Use this hint in case you need to set SDL's threads stack size to other than the default.
1582* This is specially useful if you build SDL against a non glibc libc library (such as musl) which
1583* provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
1584* Support for this hint is currently available only in the pthread, Windows, and PSP backend.
1585*
1586* Instead of this hint, in 2.0.9 and later, you can use
1587* SDL_CreateThreadWithStackSize(). This hint only works with the classic
1588* SDL_CreateThread().
1589*/
1590#define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
1591
1592/**
1593 * \brief A variable that controls the timer resolution, in milliseconds.
1594 *
1595 * The higher resolution the timer, the more frequently the CPU services
1596 * timer interrupts, and the more precise delays are, but this takes up
1597 * power and CPU time. This hint is only used on Windows.
1598 *
1599 * See this blog post for more information:
1600 * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
1601 *
1602 * If this variable is set to "0", the system timer resolution is not set.
1603 *
1604 * The default value is "1". This hint may be set at any time.
1605 */
1606#define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
1607
1608/**
1609 * \brief A variable controlling whether touch events should generate synthetic mouse events
1610 *
1611 * This variable can be set to the following values:
1612 * "0" - Touch events will not generate mouse events
1613 * "1" - Touch events will generate mouse events
1614 *
1615 * By default SDL will generate mouse events for touch events
1616 */
1617#define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
1618
1619/**
1620 * \brief A variable controlling which touchpad should generate synthetic mouse events
1621 *
1622 * This variable can be set to the following values:
1623 * "0" - Only front touchpad should generate mouse events. Default
1624 * "1" - Only back touchpad should generate mouse events.
1625 * "2" - Both touchpads should generate mouse events.
1626 *
1627 * By default SDL will generate mouse events for all touch devices
1628 */
1629#define SDL_HINT_VITA_TOUCH_MOUSE_DEVICE "SDL_HINT_VITA_TOUCH_MOUSE_DEVICE"
1630
1631/**
1632 * \brief A variable controlling whether the Android / tvOS remotes
1633 * should be listed as joystick devices, instead of sending keyboard events.
1634 *
1635 * This variable can be set to the following values:
1636 * "0" - Remotes send enter/escape/arrow key events
1637 * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
1638 */
1639#define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
1640
1641/**
1642 * \brief A variable controlling whether the screensaver is enabled.
1643 *
1644 * This variable can be set to the following values:
1645 * "0" - Disable screensaver
1646 * "1" - Enable screensaver
1647 *
1648 * By default SDL will disable the screensaver.
1649 */
1650#define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
1651
1652/**
1653 * \brief Tell the video driver that we only want a double buffer.
1654 *
1655 * By default, most lowlevel 2D APIs will use a triple buffer scheme that
1656 * wastes no CPU time on waiting for vsync after issuing a flip, but
1657 * introduces a frame of latency. On the other hand, using a double buffer
1658 * scheme instead is recommended for cases where low latency is an important
1659 * factor because we save a whole frame of latency.
1660 * We do so by waiting for vsync immediately after issuing a flip, usually just
1661 * after eglSwapBuffers call in the backend's *_SwapWindow function.
1662 *
1663 * Since it's driver-specific, it's only supported where possible and
1664 * implemented. Currently supported the following drivers:
1665 *
1666 * - KMSDRM (kmsdrm)
1667 * - Raspberry Pi (raspberrypi)
1668 */
1669#define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
1670
1671/**
1672 * \brief If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay.
1673 *
1674 * This variable can be set to one of the following values:
1675 * "0" - Do not fall back to eglGetDisplay
1676 * "1" - Fall back to eglGetDisplay if eglGetPlatformDisplay fails.
1677 *
1678 * By default, SDL will fall back to eglGetDisplay if eglGetPlatformDisplay
1679 * fails.
1680 */
1681#define SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK "SDL_VIDEO_EGL_GETDISPLAY_FALLBACK"
1682
1683/**
1684 * \brief A variable controlling whether the graphics context is externally managed.
1685 *
1686 * This variable can be set to the following values:
1687 * "0" - SDL will manage graphics contexts that are attached to windows.
1688 * "1" - Disable graphics context management on windows.
1689 *
1690 * By default SDL will manage OpenGL contexts in certain situations. For example, on Android the
1691 * context will be automatically saved and restored when pausing the application. Additionally, some
1692 * platforms will assume usage of OpenGL if Vulkan isn't used. Setting this to "1" will prevent this
1693 * behavior, which is desirable when the application manages the graphics context, such as
1694 * an externally managed OpenGL context or attaching a Vulkan surface to the window.
1695 */
1696#define SDL_HINT_VIDEO_EXTERNAL_CONTEXT "SDL_VIDEO_EXTERNAL_CONTEXT"
1697
1698/**
1699 * \brief A variable that dictates policy for fullscreen Spaces on macOS.
1700 *
1701 * This hint only applies to macOS.
1702 *
1703 * The variable can be set to the following values:
1704 * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
1705 * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
1706 * button on their titlebars).
1707 * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
1708 * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
1709 * button on their titlebars).
1710 *
1711 * The default value is "1". This hint must be set before any windows are created.
1712 */
1713#define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
1714
1715/**
1716 * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to false.
1717 * \warning Before SDL 2.0.14, this defaulted to true! In 2.0.14, we're
1718 * seeing if "true" causes more problems than it solves in modern times.
1719 *
1720 */
1721#define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
1722
1723/**
1724 * \brief A variable controlling whether the libdecor Wayland backend is allowed to be used.
1725 *
1726 * This variable can be set to the following values:
1727 * "0" - libdecor use is disabled.
1728 * "1" - libdecor use is enabled (default).
1729 *
1730 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1731 */
1732#define SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"
1733
1734/**
1735 * \brief A variable controlling whether the libdecor Wayland backend is preferred over native decrations.
1736 *
1737 * When this hint is set, libdecor will be used to provide window decorations, even if xdg-decoration is
1738 * available. (Note that, by default, libdecor will use xdg-decoration itself if available).
1739 *
1740 * This variable can be set to the following values:
1741 * "0" - libdecor is enabled only if server-side decorations are unavailable.
1742 * "1" - libdecor is always enabled if available.
1743 *
1744 * libdecor is used over xdg-shell when xdg-decoration protocol is unavailable.
1745 */
1746#define SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"
1747
1748/**
1749 * \brief A variable controlling whether video mode emulation is enabled under Wayland.
1750 *
1751 * When this hint is set, a standard set of emulated CVT video modes will be exposed for use by the application.
1752 * If it is disabled, the only modes exposed will be the logical desktop size and, in the case of a scaled
1753 * desktop, the native display resolution.
1754 *
1755 * This variable can be set to the following values:
1756 * "0" - Video mode emulation is disabled.
1757 * "1" - Video mode emulation is enabled.
1758 *
1759 * By default video mode emulation is enabled.
1760 */
1761#define SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION "SDL_VIDEO_WAYLAND_MODE_EMULATION"
1762
1763/**
1764 * \brief A variable controlling how modes with a non-native aspect ratio are displayed under Wayland.
1765 *
1766 * When this hint is set, the requested scaling will be used when displaying fullscreen video modes
1767 * that don't match the display's native aspect ratio. This is contingent on compositor viewport support.
1768 *
1769 * This variable can be set to the following values:
1770 * "aspect" - Video modes will be displayed scaled, in their proper aspect ratio, with black bars.
1771 * "stretch" - Video modes will be scaled to fill the entire display.
1772 * "none" - Video modes will be displayed as 1:1 with no scaling.
1773 *
1774 * By default 'stretch' is used.
1775 */
1776#define SDL_HINT_VIDEO_WAYLAND_MODE_SCALING "SDL_VIDEO_WAYLAND_MODE_SCALING"
1777
1778/**
1779 * \brief Enable or disable mouse pointer warp emulation, needed by some older games.
1780 *
1781 * When this hint is set, any SDL will emulate mouse warps using relative mouse mode.
1782 * This is required for some older games (such as Source engine games), which warp the
1783 * mouse to the centre of the screen rather than using relative mouse motion. Note that
1784 * relative mouse mode may have different mouse acceleration behaviour than pointer warps.
1785 *
1786 * This variable can be set to the following values:
1787 * "0" - All mouse warps fail, as mouse warping is not available under wayland.
1788 * "1" - Some mouse warps will be emulated by forcing relative mouse mode.
1789 *
1790 * If not set, this is automatically enabled unless an application uses relative mouse
1791 * mode directly.
1792 */
1793#define SDL_HINT_VIDEO_WAYLAND_EMULATE_MOUSE_WARP "SDL_VIDEO_WAYLAND_EMULATE_MOUSE_WARP"
1794
1795/**
1796* \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
1797*
1798* If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
1799* SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
1800* created SDL_Window:
1801*
1802* 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
1803* needed for example when sharing an OpenGL context across multiple windows.
1804*
1805* 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
1806* OpenGL rendering.
1807*
1808* This variable can be set to the following values:
1809* The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
1810* share a pixel format with.
1811*/
1812#define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
1813
1814/**
1815 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with OpenGL.
1816 *
1817 * This variable can be set to the following values:
1818 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1819 * "1" - Add SDL_WINDOW_OPENGL to the SDL_WindowFlags
1820 *
1821 * By default SDL will not make the foreign window compatible with OpenGL.
1822 */
1823#define SDL_HINT_VIDEO_FOREIGN_WINDOW_OPENGL "SDL_VIDEO_FOREIGN_WINDOW_OPENGL"
1824
1825/**
1826 * \brief When calling SDL_CreateWindowFrom(), make the window compatible with Vulkan.
1827 *
1828 * This variable can be set to the following values:
1829 * "0" - Don't add any graphics flags to the SDL_WindowFlags
1830 * "1" - Add SDL_WINDOW_VULKAN to the SDL_WindowFlags
1831 *
1832 * By default SDL will not make the foreign window compatible with Vulkan.
1833 */
1834#define SDL_HINT_VIDEO_FOREIGN_WINDOW_VULKAN "SDL_VIDEO_FOREIGN_WINDOW_VULKAN"
1835
1836/**
1837* \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
1838*
1839* SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
1840* can use two different sets of binaries, those compiled by the user from source
1841* or those provided by the Chrome browser. In the later case, these binaries require
1842* that SDL loads a DLL providing the shader compiler.
1843*
1844* This variable can be set to the following values:
1845* "d3dcompiler_46.dll" - default, best for Vista or later.
1846* "d3dcompiler_43.dll" - for XP support.
1847* "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
1848*
1849*/
1850#define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
1851
1852/**
1853 * \brief A variable controlling whether the OpenGL context should be created
1854 * with EGL by default
1855 *
1856 * This variable can be set to the following values:
1857 * "0" - Use platform-specific GL context creation API (GLX, WGL, CGL, etc)
1858 * "1" - Use EGL
1859 *
1860 * By default SDL will use the platform-specific GL context API when both are present.
1861 */
1862#define SDL_HINT_VIDEO_FORCE_EGL "SDL_VIDEO_FORCE_EGL"
1863
1864/**
1865 * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
1866 *
1867 * This variable can be set to the following values:
1868 * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
1869 * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
1870 *
1871 * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
1872 *
1873 */
1874#define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
1875
1876/**
1877 * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
1878 *
1879 * This variable can be set to the following values:
1880 * "0" - Disable _NET_WM_PING
1881 * "1" - Enable _NET_WM_PING
1882 *
1883 * By default SDL will use _NET_WM_PING, but for applications that know they
1884 * will not always be able to respond to ping requests in a timely manner they can
1885 * turn it off to avoid the window manager thinking the app is hung.
1886 * The hint is checked in CreateWindow.
1887 */
1888#define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
1889
1890/**
1891 * \brief A variable forcing the visual ID chosen for new X11 windows
1892 *
1893 */
1894#define SDL_HINT_VIDEO_X11_WINDOW_VISUALID "SDL_VIDEO_X11_WINDOW_VISUALID"
1895
1896/**
1897 * \brief A variable forcing the scaling factor for X11 windows
1898 *
1899 * This variable can be set to a floating point value in the range 1.0-10.0f
1900 */
1901#define SDL_HINT_VIDEO_X11_SCALING_FACTOR "SDL_VIDEO_X11_SCALING_FACTOR"
1902
1903/**
1904 * \brief A variable controlling whether the X11 XRandR extension should be used.
1905 *
1906 * This variable can be set to the following values:
1907 * "0" - Disable XRandR
1908 * "1" - Enable XRandR
1909 *
1910 * By default SDL will use XRandR.
1911 */
1912#define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
1913
1914/**
1915 * \brief Controls how the fact chunk affects the loading of a WAVE file.
1916 *
1917 * The fact chunk stores information about the number of samples of a WAVE
1918 * file. The Standards Update from Microsoft notes that this value can be used
1919 * to 'determine the length of the data in seconds'. This is especially useful
1920 * for compressed formats (for which this is a mandatory chunk) if they produce
1921 * multiple sample frames per block and truncating the block is not allowed.
1922 * The fact chunk can exactly specify how many sample frames there should be
1923 * in this case.
1924 *
1925 * Unfortunately, most application seem to ignore the fact chunk and so SDL
1926 * ignores it by default as well.
1927 *
1928 * This variable can be set to the following values:
1929 *
1930 * "truncate" - Use the number of samples to truncate the wave data if
1931 * the fact chunk is present and valid
1932 * "strict" - Like "truncate", but raise an error if the fact chunk
1933 * is invalid, not present for non-PCM formats, or if the
1934 * data chunk doesn't have that many samples
1935 * "ignorezero" - Like "truncate", but ignore fact chunk if the number of
1936 * samples is zero
1937 * "ignore" - Ignore fact chunk entirely (default)
1938 */
1939#define SDL_HINT_WAVE_FACT_CHUNK "SDL_WAVE_FACT_CHUNK"
1940
1941/**
1942 * \brief Controls how the size of the RIFF chunk affects the loading of a WAVE file.
1943 *
1944 * The size of the RIFF chunk (which includes all the sub-chunks of the WAVE
1945 * file) is not always reliable. In case the size is wrong, it's possible to
1946 * just ignore it and step through the chunks until a fixed limit is reached.
1947 *
1948 * Note that files that have trailing data unrelated to the WAVE file or
1949 * corrupt files may slow down the loading process without a reliable boundary.
1950 * By default, SDL stops after 10000 chunks to prevent wasting time. Use the
1951 * environment variable SDL_WAVE_CHUNK_LIMIT to adjust this value.
1952 *
1953 * This variable can be set to the following values:
1954 *
1955 * "force" - Always use the RIFF chunk size as a boundary for the chunk search
1956 * "ignorezero" - Like "force", but a zero size searches up to 4 GiB (default)
1957 * "ignore" - Ignore the RIFF chunk size and always search up to 4 GiB
1958 * "maximum" - Search for chunks until the end of file (not recommended)
1959 */
1960#define SDL_HINT_WAVE_RIFF_CHUNK_SIZE "SDL_WAVE_RIFF_CHUNK_SIZE"
1961
1962/**
1963 * \brief Controls how a truncated WAVE file is handled.
1964 *
1965 * A WAVE file is considered truncated if any of the chunks are incomplete or
1966 * the data chunk size is not a multiple of the block size. By default, SDL
1967 * decodes until the first incomplete block, as most applications seem to do.
1968 *
1969 * This variable can be set to the following values:
1970 *
1971 * "verystrict" - Raise an error if the file is truncated
1972 * "strict" - Like "verystrict", but the size of the RIFF chunk is ignored
1973 * "dropframe" - Decode until the first incomplete sample frame
1974 * "dropblock" - Decode until the first incomplete block (default)
1975 */
1976#define SDL_HINT_WAVE_TRUNCATION "SDL_WAVE_TRUNCATION"
1977
1978/**
1979 * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
1980 * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
1981 * thread's name, but it tends to cause problems with other debuggers,
1982 * and the .NET runtime. Note that SDL 2.0.6 and later will still use
1983 * the (safer) SetThreadDescription API, introduced in the Windows 10
1984 * Creators Update, if available.
1985 *
1986 * The variable can be set to the following values:
1987 * "0" - SDL will raise the 0x406D1388 Exception to name threads.
1988 * This is the default behavior of SDL <= 2.0.4.
1989 * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
1990 * This is necessary with .NET languages or debuggers that aren't Visual Studio.
1991 */
1992#define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
1993
1994/**
1995 * \brief Controls whether menus can be opened with their keyboard shortcut (Alt+mnemonic).
1996 *
1997 * If the mnemonics are enabled, then menus can be opened by pressing the Alt
1998 * key and the corresponding mnemonic (for example, Alt+F opens the File menu).
1999 * However, in case an invalid mnemonic is pressed, Windows makes an audible
2000 * beep to convey that nothing happened. This is true even if the window has
2001 * no menu at all!
2002 *
2003 * Because most SDL applications don't have menus, and some want to use the Alt
2004 * key for other purposes, SDL disables mnemonics (and the beeping) by default.
2005 *
2006 * Note: This also affects keyboard events: with mnemonics enabled, when a
2007 * menu is opened from the keyboard, you will not receive a KEYUP event for
2008 * the mnemonic key, and *might* not receive one for Alt.
2009 *
2010 * This variable can be set to the following values:
2011 * "0" - Alt+mnemonic does nothing, no beeping. (default)
2012 * "1" - Alt+mnemonic opens menus, invalid mnemonics produce a beep.
2013 */
2014#define SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"
2015
2016/**
2017 * \brief A variable controlling whether the windows message loop is processed by SDL
2018 *
2019 * This variable can be set to the following values:
2020 * "0" - The window message loop is not run
2021 * "1" - The window message loop is processed in SDL_PumpEvents()
2022 *
2023 * By default SDL will process the windows message loop
2024 */
2025#define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
2026
2027/**
2028 * \brief Force SDL to use Critical Sections for mutexes on Windows.
2029 * On Windows 7 and newer, Slim Reader/Writer Locks are available.
2030 * They offer better performance, allocate no kernel resources and
2031 * use less memory. SDL will fall back to Critical Sections on older
2032 * OS versions or if forced to by this hint.
2033 *
2034 * This variable can be set to the following values:
2035 * "0" - Use SRW Locks when available. If not, fall back to Critical Sections. (default)
2036 * "1" - Force the use of Critical Sections in all cases.
2037 *
2038 */
2039#define SDL_HINT_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS "SDL_WINDOWS_FORCE_MUTEX_CRITICAL_SECTIONS"
2040
2041/**
2042 * \brief Force SDL to use Kernel Semaphores on Windows.
2043 * Kernel Semaphores are inter-process and require a context
2044 * switch on every interaction. On Windows 8 and newer, the
2045 * WaitOnAddress API is available. Using that and atomics to
2046 * implement semaphores increases performance.
2047 * SDL will fall back to Kernel Objects on older OS versions
2048 * or if forced to by this hint.
2049 *
2050 * This variable can be set to the following values:
2051 * "0" - Use Atomics and WaitOnAddress API when available. If not, fall back to Kernel Objects. (default)
2052 * "1" - Force the use of Kernel Objects in all cases.
2053 *
2054 */
2055#define SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"
2056
2057/**
2058 * \brief A variable to specify custom icon resource id from RC file on Windows platform
2059 */
2060#define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
2061#define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
2062
2063/**
2064 * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
2065 *
2066 * The variable can be set to the following values:
2067 * "0" - SDL will generate a window-close event when it sees Alt+F4.
2068 * "1" - SDL will only do normal key handling for Alt+F4.
2069 */
2070#define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
2071
2072/**
2073 * \brief Use the D3D9Ex API introduced in Windows Vista, instead of normal D3D9.
2074 * Direct3D 9Ex contains changes to state management that can eliminate device
2075 * loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may require
2076 * some changes to your application to cope with the new behavior, so this
2077 * is disabled by default.
2078 *
2079 * This hint must be set before initializing the video subsystem.
2080 *
2081 * For more information on Direct3D 9Ex, see:
2082 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex
2083 * - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements
2084 *
2085 * This variable can be set to the following values:
2086 * "0" - Use the original Direct3D 9 API (default)
2087 * "1" - Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex is unavailable)
2088 *
2089 */
2090#define SDL_HINT_WINDOWS_USE_D3D9EX "SDL_WINDOWS_USE_D3D9EX"
2091
2092/**
2093 * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
2094 *
2095 * This variable can be set to the following values:
2096 * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
2097 * "1" - The window frame is interactive when the cursor is hidden
2098 *
2099 * By default SDL will allow interaction with the window frame when the cursor is hidden
2100 */
2101#define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
2102
2103/**
2104* \brief A variable controlling whether the window is activated when the SDL_ShowWindow function is called
2105*
2106* This variable can be set to the following values:
2107* "0" - The window is not activated when the SDL_ShowWindow function is called
2108* "1" - The window is activated when the SDL_ShowWindow function is called
2109*
2110* By default SDL will activate the window when the SDL_ShowWindow function is called
2111*/
2112#define SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"
2113
2114/** \brief Allows back-button-press events on Windows Phone to be marked as handled
2115 *
2116 * Windows Phone devices typically feature a Back button. When pressed,
2117 * the OS will emit back-button-press events, which apps are expected to
2118 * handle in an appropriate manner. If apps do not explicitly mark these
2119 * events as 'Handled', then the OS will invoke its default behavior for
2120 * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
2121 * terminate the app (and attempt to switch to the previous app, or to the
2122 * device's home screen).
2123 *
2124 * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
2125 * to mark back-button-press events as Handled, if and when one is sent to
2126 * the app.
2127 *
2128 * Internally, Windows Phone sends back button events as parameters to
2129 * special back-button-press callback functions. Apps that need to respond
2130 * to back-button-press events are expected to register one or more
2131 * callback functions for such, shortly after being launched (during the
2132 * app's initialization phase). After the back button is pressed, the OS
2133 * will invoke these callbacks. If the app's callback(s) do not explicitly
2134 * mark the event as handled by the time they return, or if the app never
2135 * registers one of these callback, the OS will consider the event
2136 * un-handled, and it will apply its default back button behavior (terminate
2137 * the app).
2138 *
2139 * SDL registers its own back-button-press callback with the Windows Phone
2140 * OS. This callback will emit a pair of SDL key-press events (SDL_EVENT_KEY_DOWN
2141 * and SDL_EVENT_KEY_UP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
2142 * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
2143 * If the hint's value is set to "1", the back button event's Handled
2144 * property will get set to 'true'. If the hint's value is set to something
2145 * else, or if it is unset, SDL will leave the event's Handled property
2146 * alone. (By default, the OS sets this property to 'false', to note.)
2147 *
2148 * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
2149 * back button is pressed, or can set it in direct-response to a back button
2150 * being pressed.
2151 *
2152 * In order to get notified when a back button is pressed, SDL apps should
2153 * register a callback function with SDL_AddEventWatch(), and have it listen
2154 * for SDL_EVENT_KEY_DOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
2155 * (Alternatively, SDL_EVENT_KEY_UP events can be listened-for. Listening for
2156 * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
2157 * set by such a callback, will be applied to the OS' current
2158 * back-button-press event.
2159 *
2160 * More details on back button behavior in Windows Phone apps can be found
2161 * at the following page, on Microsoft's developer site:
2162 * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
2163 */
2164#define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
2165
2166/** \brief Label text for a WinRT app's privacy policy link
2167 *
2168 * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
2169 * Microsoft mandates that this policy be available via the Windows Settings charm.
2170 * SDL provides code to add a link there, with its label text being set via the
2171 * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
2172 *
2173 * Please note that a privacy policy's contents are not set via this hint. A separate
2174 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
2175 * policy.
2176 *
2177 * The contents of this hint should be encoded as a UTF8 string.
2178 *
2179 * The default value is "Privacy Policy". This hint should only be set during app
2180 * initialization, preferably before any calls to SDL_Init().
2181 *
2182 * For additional information on linking to a privacy policy, see the documentation for
2183 * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
2184 */
2185#define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
2186
2187/**
2188 * \brief A URL to a WinRT app's privacy policy
2189 *
2190 * All network-enabled WinRT apps must make a privacy policy available to its
2191 * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
2192 * be available in the Windows Settings charm, as accessed from within the app.
2193 * SDL provides code to add a URL-based link there, which can point to the app's
2194 * privacy policy.
2195 *
2196 * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
2197 * before calling any SDL_Init() functions. The contents of the hint should
2198 * be a valid URL. For example, "http://www.example.com".
2199 *
2200 * The default value is "", which will prevent SDL from adding a privacy policy
2201 * link to the Settings charm. This hint should only be set during app init.
2202 *
2203 * The label text of an app's "Privacy Policy" link may be customized via another
2204 * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
2205 *
2206 * Please note that on Windows Phone, Microsoft does not provide standard UI
2207 * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
2208 * will not get used on that platform. Network-enabled phone apps should display
2209 * their privacy policy through some other, in-app means.
2210 */
2211#define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
2212
2213/**
2214 * \brief Mark X11 windows as override-redirect.
2215 *
2216 * If set, this _might_ increase framerate at the expense of the desktop
2217 * not working as expected. Override-redirect windows aren't noticed by the
2218 * window manager at all.
2219 *
2220 * You should probably only use this for fullscreen windows, and you probably
2221 * shouldn't even use it for that. But it's here if you want to try!
2222 */
2223#define SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT "SDL_X11_FORCE_OVERRIDE_REDIRECT"
2224
2225/**
2226 * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
2227 *
2228 * The variable can be set to the following values:
2229 * "0" - Disable XInput detection (only uses direct input)
2230 * "1" - Enable XInput detection (the default)
2231 */
2232#define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
2233
2234 /**
2235 * \brief A variable that lets you disable the detection and use of DirectInput gamepad devices
2236 *
2237 * The variable can be set to the following values:
2238 * "0" - Disable DirectInput detection (only uses XInput)
2239 * "1" - Enable DirectInput detection (the default)
2240 */
2241#define SDL_HINT_DIRECTINPUT_ENABLED "SDL_DIRECTINPUT_ENABLED"
2242
2243/**
2244 * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
2245 *
2246 * This hint is for backwards compatibility only and will be removed in SDL 2.1
2247 *
2248 * The default value is "0". This hint must be set before SDL_Init()
2249 */
2250#define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
2251
2252/**
2253 * \brief A variable that causes SDL to not ignore audio "monitors"
2254 *
2255 * This is currently only used for PulseAudio and ignored elsewhere.
2256 *
2257 * By default, SDL ignores audio devices that aren't associated with physical
2258 * hardware. Changing this hint to "1" will expose anything SDL sees that
2259 * appears to be an audio source or sink. This will add "devices" to the list
2260 * that the user probably doesn't want or need, but it can be useful in
2261 * scenarios where you want to hook up SDL to some sort of virtual device,
2262 * etc.
2263 *
2264 * The default value is "0". This hint must be set before SDL_Init().
2265 *
2266 * This hint is available since SDL 2.0.16. Before then, virtual devices are
2267 * always ignored.
2268 */
2269#define SDL_HINT_AUDIO_INCLUDE_MONITORS "SDL_AUDIO_INCLUDE_MONITORS"
2270
2271/**
2272 * \brief A variable that forces X11 windows to create as a custom type.
2273 *
2274 * This is currently only used for X11 and ignored elsewhere.
2275 *
2276 * During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property
2277 * to report to the window manager the type of window it wants to create.
2278 * This might be set to various things if SDL_WINDOW_TOOLTIP or
2279 * SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that
2280 * haven't set a specific type, this hint can be used to specify a custom
2281 * type. For example, a dock window might set this to
2282 * "_NET_WM_WINDOW_TYPE_DOCK".
2283 *
2284 * If not set or set to "", this hint is ignored. This hint must be set
2285 * before the SDL_CreateWindow() call that it is intended to affect.
2286 *
2287 * This hint is available since SDL 2.0.22.
2288 */
2289#define SDL_HINT_X11_WINDOW_TYPE "SDL_X11_WINDOW_TYPE"
2290
2291/**
2292 * \brief A variable that decides whether to send SDL_EVENT_QUIT when closing the final window.
2293 *
2294 * By default, SDL sends an SDL_EVENT_QUIT event when there is only one window
2295 * and it receives an SDL_EVENT_WINDOW_CLOSE_REQUESTED event, under the assumption most
2296 * apps would also take the loss of this window as a signal to terminate the
2297 * program.
2298 *
2299 * However, it's not unreasonable in some cases to have the program continue
2300 * to live on, perhaps to create new windows later.
2301 *
2302 * Changing this hint to "0" will cause SDL to not send an SDL_EVENT_QUIT event
2303 * when the final window is requesting to close. Note that in this case,
2304 * there are still other legitimate reasons one might get an SDL_EVENT_QUIT
2305 * event: choosing "Quit" from the macOS menu bar, sending a SIGINT (ctrl-c)
2306 * on Unix, etc.
2307 *
2308 * The default value is "1". This hint can be changed at any time.
2309 *
2310 * This hint is available since SDL 2.0.22. Before then, you always get
2311 * an SDL_EVENT_QUIT event when closing the final window.
2312 */
2313#define SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE "SDL_QUIT_ON_LAST_WINDOW_CLOSE"
2314
2315
2316/**
2317 * \brief A variable that decides what video backend to use.
2318 *
2319 * By default, SDL will try all available video backends in a reasonable
2320 * order until it finds one that can work, but this hint allows the app
2321 * or user to force a specific target, such as "x11" if, say, you are
2322 * on Wayland but want to try talking to the X server instead.
2323 *
2324 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2325 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2326 * it was upgraded to a full SDL hint, so you can set the environment
2327 * variable as usual or programmatically set the hint with SDL_SetHint,
2328 * which won't propagate to child processes.
2329 *
2330 * The default value is unset, in which case SDL will try to figure out
2331 * the best video backend on your behalf. This hint needs to be set
2332 * before SDL_Init() is called to be useful.
2333 *
2334 * This hint is available since SDL 2.0.22. Before then, you could set
2335 * the environment variable to get the same effect.
2336 */
2337#define SDL_HINT_VIDEO_DRIVER "SDL_VIDEO_DRIVER"
2338
2339/**
2340 * \brief A variable that decides what audio backend to use.
2341 *
2342 * By default, SDL will try all available audio backends in a reasonable
2343 * order until it finds one that can work, but this hint allows the app
2344 * or user to force a specific target, such as "alsa" if, say, you are
2345 * on PulseAudio but want to try talking to the lower level instead.
2346 *
2347 * This functionality has existed since SDL 2.0.0 (indeed, before that)
2348 * but before 2.0.22 this was an environment variable only. In 2.0.22,
2349 * it was upgraded to a full SDL hint, so you can set the environment
2350 * variable as usual or programmatically set the hint with SDL_SetHint,
2351 * which won't propagate to child processes.
2352 *
2353 * The default value is unset, in which case SDL will try to figure out
2354 * the best audio backend on your behalf. This hint needs to be set
2355 * before SDL_Init() is called to be useful.
2356 *
2357 * This hint is available since SDL 2.0.22. Before then, you could set
2358 * the environment variable to get the same effect.
2359 */
2360#define SDL_HINT_AUDIO_DRIVER "SDL_AUDIO_DRIVER"
2361
2362/**
2363 * \brief A variable that decides what KMSDRM device to use.
2364 *
2365 * Internally, SDL might open something like "/dev/dri/cardNN" to
2366 * access KMSDRM functionality, where "NN" is a device index number.
2367 *
2368 * SDL makes a guess at the best index to use (usually zero), but the
2369 * app or user can set this hint to a number between 0 and 99 to
2370 * force selection.
2371 *
2372 * This hint is available since SDL 2.24.0.
2373 */
2374#define SDL_HINT_KMSDRM_DEVICE_INDEX "SDL_KMSDRM_DEVICE_INDEX"
2375
2376
2377/**
2378 * \brief A variable that treats trackpads as touch devices.
2379 *
2380 * On macOS (and possibly other platforms in the future), SDL will report
2381 * touches on a trackpad as mouse input, which is generally what users
2382 * expect from this device; however, these are often actually full
2383 * multitouch-capable touch devices, so it might be preferable to some apps
2384 * to treat them as such.
2385 *
2386 * Setting this hint to true will make the trackpad input report as a
2387 * multitouch device instead of a mouse. The default is false.
2388 *
2389 * Note that most platforms don't support this hint. As of 2.24.0, it
2390 * only supports MacBooks' trackpads on macOS. Others may follow later.
2391 *
2392 * This hint is checked during SDL_Init and can not be changed after.
2393 *
2394 * This hint is available since SDL 2.24.0.
2395 */
2396#define SDL_HINT_TRACKPAD_IS_TOUCH_ONLY "SDL_TRACKPAD_IS_TOUCH_ONLY"
2397
2398
2399/**
2400 * \brief Sets the title of the TextInput window on GDK platforms.
2401 *
2402 * On GDK, if SDL_GDK_TEXTINPUT is defined, you can use the
2403 * standard SDL text input and virtual keyboard capabilities
2404 * to get text from the user.
2405 *
2406 * This hint allows you to customize the virtual keyboard
2407 * window that will be shown to the user.
2408 *
2409 * Set this hint to change the title of the window.
2410 *
2411 * This hint will not affect a window that is already being
2412 * shown to the user. It will only affect new input windows.
2413 *
2414 * This hint is available only if SDL_GDK_TEXTINPUT defined.
2415 */
2416#define SDL_HINT_GDK_TEXTINPUT_TITLE "SDL_GDK_TEXTINPUT_TITLE"
2417
2418/**
2419 * \brief Sets the description of the TextInput window on GDK platforms.
2420 *
2421 * On GDK, if SDL_GDK_TEXTINPUT is defined, you can use the
2422 * standard SDL text input and virtual keyboard capabilities
2423 * to get text from the user.
2424 *
2425 * This hint allows you to customize the virtual keyboard
2426 * window that will be shown to the user.
2427 *
2428 * Set this hint to change the description of the window.
2429 *
2430 * This hint will not affect a window that is already being
2431 * shown to the user. It will only affect new input windows.
2432 *
2433 * This hint is available only if SDL_GDK_TEXTINPUT defined.
2434 */
2435#define SDL_HINT_GDK_TEXTINPUT_DESCRIPTION "SDL_GDK_TEXTINPUT_DESCRIPTION"
2436
2437/**
2438 * \brief Sets the default text of the TextInput window on GDK platforms.
2439 *
2440 * On GDK, if SDL_GDK_TEXTINPUT is defined, you can use the
2441 * standard SDL text input and virtual keyboard capabilities
2442 * to get text from the user.
2443 *
2444 * This hint allows you to customize the virtual keyboard
2445 * window that will be shown to the user.
2446 *
2447 * Set this hint to change the default text value of the window.
2448 *
2449 * This hint will not affect a window that is already being
2450 * shown to the user. It will only affect new input windows.
2451 *
2452 * This hint is available only if SDL_GDK_TEXTINPUT defined.
2453 */
2454#define SDL_HINT_GDK_TEXTINPUT_DEFAULT "SDL_GDK_TEXTINPUT_DEFAULT"
2455
2456/**
2457 * \brief Sets the input scope of the TextInput window on GDK platforms.
2458 *
2459 * On GDK, if SDL_GDK_TEXTINPUT is defined, you can use the
2460 * standard SDL text input and virtual keyboard capabilities
2461 * to get text from the user.
2462 *
2463 * This hint allows you to customize the virtual keyboard
2464 * window that will be shown to the user.
2465 *
2466 * Set this hint to change the XGameUiTextEntryInputScope value
2467 * that will be passed to the window creation function.
2468 *
2469 * The value must be a stringified integer,
2470 * for example "0" for XGameUiTextEntryInputScope::Default.
2471 *
2472 * This hint will not affect a window that is already being
2473 * shown to the user. It will only affect new input windows.
2474 *
2475 * This hint is available only if SDL_GDK_TEXTINPUT defined.
2476 */
2477#define SDL_HINT_GDK_TEXTINPUT_SCOPE "SDL_GDK_TEXTINPUT_SCOPE"
2478
2479/**
2480 * \brief Sets the maximum input length of the TextInput window on GDK platforms.
2481 *
2482 * On GDK, if SDL_GDK_TEXTINPUT is defined, you can use the
2483 * standard SDL text input and virtual keyboard capabilities
2484 * to get text from the user.
2485 *
2486 * This hint allows you to customize the virtual keyboard
2487 * window that will be shown to the user.
2488 *
2489 * Set this hint to change the maximum allowed input
2490 * length of the text box in the virtual keyboard window.
2491 *
2492 * The value must be a stringified integer,
2493 * for example "10" to allow for up to 10 characters of text input.
2494 *
2495 * This hint will not affect a window that is already being
2496 * shown to the user. It will only affect new input windows.
2497 *
2498 * This hint is available only if SDL_GDK_TEXTINPUT defined.
2499 */
2500#define SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH "SDL_GDK_TEXTINPUT_MAX_LENGTH"
2501
2502
2503/**
2504 * \brief An enumeration of hint priorities
2505 */
2506typedef enum
2507{
2512
2513
2514/**
2515 * Set a hint with a specific priority.
2516 *
2517 * The priority controls the behavior when setting a hint that already has a
2518 * value. Hints will replace existing hints of their priority and lower.
2519 * Environment variables are considered to have override priority.
2520 *
2521 * \param name the hint to set
2522 * \param value the value of the hint variable
2523 * \param priority the SDL_HintPriority level for the hint
2524 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2525 *
2526 * \since This function is available since SDL 3.0.0.
2527 *
2528 * \sa SDL_GetHint
2529 * \sa SDL_SetHint
2530 */
2531extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
2532 const char *value,
2533 SDL_HintPriority priority);
2534
2535/**
2536 * Set a hint with normal priority.
2537 *
2538 * Hints will not be set if there is an existing override hint or environment
2539 * variable that takes precedence. You can use SDL_SetHintWithPriority() to
2540 * set the hint with override priority instead.
2541 *
2542 * \param name the hint to set
2543 * \param value the value of the hint variable
2544 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2545 *
2546 * \since This function is available since SDL 3.0.0.
2547 *
2548 * \sa SDL_GetHint
2549 * \sa SDL_SetHintWithPriority
2550 */
2551extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
2552 const char *value);
2553
2554/**
2555 * Reset a hint to the default value.
2556 *
2557 * This will reset a hint to the value of the environment variable, or NULL if
2558 * the environment isn't set. Callbacks will be called normally with this
2559 * change.
2560 *
2561 * \param name the hint to set
2562 * \returns SDL_TRUE if the hint was set, SDL_FALSE otherwise.
2563 *
2564 * \since This function is available since SDL 3.0.0.
2565 *
2566 * \sa SDL_GetHint
2567 * \sa SDL_SetHint
2568 */
2569extern DECLSPEC SDL_bool SDLCALL SDL_ResetHint(const char *name);
2570
2571/**
2572 * Reset all hints to the default values.
2573 *
2574 * This will reset all hints to the value of the associated environment
2575 * variable, or NULL if the environment isn't set. Callbacks will be called
2576 * normally with this change.
2577 *
2578 * \since This function is available since SDL 3.0.0.
2579 *
2580 * \sa SDL_GetHint
2581 * \sa SDL_SetHint
2582 * \sa SDL_ResetHint
2583 */
2584extern DECLSPEC void SDLCALL SDL_ResetHints(void);
2585
2586/**
2587 * Get the value of a hint.
2588 *
2589 * \param name the hint to query
2590 * \returns the string value of a hint or NULL if the hint isn't set.
2591 *
2592 * \since This function is available since SDL 3.0.0.
2593 *
2594 * \sa SDL_SetHint
2595 * \sa SDL_SetHintWithPriority
2596 */
2597extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
2598
2599/**
2600 * Get the boolean value of a hint variable.
2601 *
2602 * \param name the name of the hint to get the boolean value from
2603 * \param default_value the value to return if the hint does not exist
2604 * \returns the boolean value of a hint or the provided default value if the
2605 * hint does not exist.
2606 *
2607 * \since This function is available since SDL 3.0.0.
2608 *
2609 * \sa SDL_GetHint
2610 * \sa SDL_SetHint
2611 */
2612extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
2613
2614/**
2615 * Type definition of the hint callback function.
2616 *
2617 * \param userdata what was passed as `userdata` to SDL_AddHintCallback()
2618 * \param name what was passed as `name` to SDL_AddHintCallback()
2619 * \param oldValue the previous hint value
2620 * \param newValue the new value hint is to be set to
2621 */
2622typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
2623
2624/**
2625 * Add a function to watch a particular hint.
2626 *
2627 * \param name the hint to watch
2628 * \param callback An SDL_HintCallback function that will be called when the
2629 * hint value changes
2630 * \param userdata a pointer to pass to the callback function
2631 * \returns 0 on success or a negative error code on failure; call
2632 * SDL_GetError() for more information.
2633 *
2634 * \since This function is available since SDL 3.0.0.
2635 *
2636 * \sa SDL_DelHintCallback
2637 */
2638extern DECLSPEC int SDLCALL SDL_AddHintCallback(const char *name,
2639 SDL_HintCallback callback,
2640 void *userdata);
2641
2642/**
2643 * Remove a function watching a particular hint.
2644 *
2645 * \param name the hint being watched
2646 * \param callback An SDL_HintCallback function that will be called when the
2647 * hint value changes
2648 * \param userdata a pointer being passed to the callback function
2649 *
2650 * \since This function is available since SDL 3.0.0.
2651 *
2652 * \sa SDL_AddHintCallback
2653 */
2654extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
2655 SDL_HintCallback callback,
2656 void *userdata);
2657
2658/**
2659 * Clear all hints.
2660 *
2661 * This function is automatically called during SDL_Quit(), and deletes all
2662 * callbacks without calling them and frees all memory associated with hints.
2663 * If you're calling this from application code you probably want to call
2664 * SDL_ResetHints() instead.
2665 *
2666 * This function will be removed from the API the next time we rev the ABI.
2667 *
2668 * \since This function is available since SDL 3.0.0.
2669 *
2670 * \sa SDL_ResetHints
2671 */
2672extern DECLSPEC void SDLCALL SDL_ClearHints(void);
2673
2674
2675/* Ends C function definitions when using C++ */
2676#ifdef __cplusplus
2677}
2678#endif
2679#include <SDL3/SDL_close_code.h>
2680
2681#endif /* SDL_hints_h_ */
SDL_bool SDL_GetHintBoolean(const char *name, SDL_bool default_value)
void SDL_ResetHints(void)
void SDL_DelHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
void SDL_ClearHints(void)
SDL_bool SDL_SetHintWithPriority(const char *name, const char *value, SDL_HintPriority priority)
SDL_bool SDL_SetHint(const char *name, const char *value)
SDL_bool SDL_ResetHint(const char *name)
int SDL_AddHintCallback(const char *name, SDL_HintCallback callback, void *userdata)
SDL_HintPriority
An enumeration of hint priorities.
Definition: SDL_hints.h:2507
@ SDL_HINT_DEFAULT
Definition: SDL_hints.h:2508
@ SDL_HINT_OVERRIDE
Definition: SDL_hints.h:2510
@ SDL_HINT_NORMAL
Definition: SDL_hints.h:2509
const char * SDL_GetHint(const char *name)
void(* SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue)
Definition: SDL_hints.h:2622
This is a general header that includes C language support.
SDL_bool
Definition: SDL_stdinc.h:130