1 /* 2 DSDL 3 Copyright (C) 2025 Inochi2D Project <luna@foxgirls.gay> 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 SDL Hints 24 25 See_Also: 26 $(LINK2 https://wiki.libsdl.org/SDL3/CategoryHints, SDL3 Hints Documentation) 27 28 Copyright: © 2025 Inochi2D Project, © 1997-2025 Sam Lantinga 29 License: Subject to the terms of the Zlib License, as written in the LICENSE file. 30 Authors: 31 Luna Nielsen 32 */ 33 module sdl.hints; 34 35 extern (C) nothrow @nogc: 36 37 38 /** 39 Specify the behavior of Alt+Tab while the keyboard is grabbed. 40 41 By default, SDL emulates Alt+Tab functionality while the keyboard is 42 grabbed and your window is full-screen. This prevents the user from getting 43 stuck in your application if you've enabled keyboard grab. 44 45 The variable can be set to the following values: 46 47 - $(D "0"): SDL will not handle Alt+Tab. Your application is responsible for 48 handling Alt+Tab while the keyboard is grabbed. 49 - $(D "1"): SDL will minimize your window when Alt+Tab is pressed (default) 50 51 This hint can be set anytime. 52 */ 53 enum SDL_HINT_ALLOW_ALT_TAB_WHILE_GRABBED = "SDL_ALLOW_ALT_TAB_WHILE_GRABBED"; 54 55 /** 56 A variable to control whether the SDL activity is allowed to be re-created. 57 58 If this hint is true, the activity can be recreated on demand by the OS, 59 and Java static data and C++ static data remain with their current values. 60 If this hint is false, then SDL will call exit() when you return from your 61 main function and the application will be terminated and then started fresh 62 each time. 63 64 The variable can be set to the following values: 65 - $(D "0"): The application starts fresh at each launch. (default) 66 - $(D "1"): The application activity can be recreated by the OS. 67 68 This hint can be set anytime. 69 */ 70 enum SDL_HINT_ANDROID_ALLOW_RECREATE_ACTIVITY = "SDL_ANDROID_ALLOW_RECREATE_ACTIVITY"; 71 72 /** 73 A variable to control whether the event loop will block itself when the app 74 is paused. 75 76 The variable can be set to the following values: 77 - $(D "0"): Non blocking. 78 - $(D "1"): Blocking. (default) 79 80 This hint should be set before SDL is initialized. 81 */ 82 enum SDL_HINT_ANDROID_BLOCK_ON_PAUSE = "SDL_ANDROID_BLOCK_ON_PAUSE"; 83 84 /** 85 A variable to control whether low latency audio should be enabled. 86 87 Some devices have poor quality output when this is enabled, but this is 88 usually an improvement in audio latency. 89 90 The variable can be set to the following values: 91 - $(D "0"): Low latency audio is not enabled. 92 - $(D "1"): Low latency audio is enabled. (default) 93 94 This hint should be set before SDL audio is initialized. 95 */ 96 enum SDL_HINT_ANDROID_LOW_LATENCY_AUDIO = "SDL_ANDROID_LOW_LATENCY_AUDIO"; 97 98 /** 99 A variable to control whether we trap the Android back button to handle it 100 manually. 101 102 This is necessary for the right mouse button to work on some Android 103 devices, or to be able to trap the back button for use in your code 104 reliably. If this hint is true, the back button will show up as an 105 SDL_EVENT_KEY_DOWN / SDL_EVENT_KEY_UP pair with a keycode of 106 SDL_SCANCODE_AC_BACK. 107 108 The variable can be set to the following values: 109 - $(D "0"): Back button will be handled as usual for system. (default) 110 - $(D "1"): Back button will be trapped, allowing you to handle the key press 111 manually. (This will also let right mouse click work on systems where the 112 right mouse button functions as back.) 113 114 This hint can be set anytime. 115 */ 116 enum SDL_HINT_ANDROID_TRAP_BACK_BUTTON = "SDL_ANDROID_TRAP_BACK_BUTTON"; 117 118 /** 119 A variable setting the app ID string. 120 121 This string is used by desktop compositors to identify and group windows 122 together, as well as match applications with associated desktop settings 123 and icons. 124 125 This will override SDL_PROP_APP_METADATA_IDENTIFIER_STRING, if set by the 126 application. 127 128 This hint should be set before SDL is initialized. 129 */ 130 enum SDL_HINT_APP_ID = "SDL_APP_ID"; 131 132 /** 133 A variable setting the application name. 134 135 This hint lets you specify the application name sent to the OS when 136 required. For example, this will often appear in volume control applets for 137 audio streams, and in lists of applications which are inhibiting the 138 screensaver. You should use a string that describes your program ("My Game 139 2: The Revenge") 140 141 This will override SDL_PROP_APP_METADATA_NAME_STRING, if set by the 142 application. 143 144 This hint should be set before SDL is initialized. 145 */ 146 enum SDL_HINT_APP_NAME = "SDL_APP_NAME"; 147 148 /** 149 A variable controlling whether controllers used with the Apple TV generate 150 UI events. 151 152 When UI events are generated by controller input, the app will be 153 backgrounded when the Apple TV remote's menu button is pressed, and when 154 the pause or B buttons on gamepads are pressed. 155 156 More information about properly making use of controllers for the Apple TV 157 can be found here: 158 https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/ 159 160 The variable can be set to the following values: 161 - $(D "0"): Controller input does not generate UI events. (default) 162 - $(D "1"): Controller input generates UI events. 163 164 This hint can be set anytime. 165 */ 166 enum SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS = "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"; 167 168 /** 169 A variable controlling whether the Apple TV remote's joystick axes will 170 automatically match the rotation of the remote. 171 172 The variable can be set to the following values: 173 - $(D "0"): Remote orientation does not affect joystick axes. (default) 174 - $(D "1"): Joystick axes are based on the orientation of the remote. 175 176 This hint can be set anytime. 177 */ 178 enum SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION = "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"; 179 180 /** 181 Specify the default ALSA audio device name. 182 183 This variable is a specific audio device to open when the "default" audio 184 device is used. 185 186 This hint will be ignored when opening the default playback device if 187 SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE is set, or when opening the 188 default recording device if SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE is 189 set. 190 191 This hint should be set before an audio device is opened. 192 193 See_Also: 194 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE) 195 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE) 196 */ 197 enum SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_DEVICE"; 198 199 /** 200 Specify the default ALSA audio playback device name. 201 202 This variable is a specific audio device to open for playback, when the 203 "default" audio device is used. 204 205 If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE 206 before choosing a reasonable default. 207 208 This hint should be set before an audio device is opened. 209 210 See_Also: 211 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE) 212 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE) 213 */ 214 enum SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE"; 215 216 /** 217 Specify the default ALSA audio recording device name. 218 219 This variable is a specific audio device to open for recording, when the 220 "default" audio device is used. 221 222 If this hint isn't set, SDL will check SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE 223 before choosing a reasonable default. 224 225 This hint should be set before an audio device is opened. 226 227 See_Also: 228 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_PLAYBACK_DEVICE) 229 $(D SDL_HINT_AUDIO_ALSA_DEFAULT_DEVICE) 230 */ 231 enum SDL_HINT_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE = "SDL_AUDIO_ALSA_DEFAULT_RECORDING_DEVICE"; 232 233 /** 234 A variable controlling the audio category on iOS and macOS. 235 236 The variable can be set to the following values: 237 238 - $(D "ambient"): Use the AVAudioSessionCategoryAmbient audio category, will be 239 muted by the phone mute switch (default) 240 - $(D "playback"): Use the AVAudioSessionCategoryPlayback category. 241 242 For more information, see Apple's documentation: 243 https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html 244 245 This hint should be set before an audio device is opened. 246 */ 247 enum SDL_HINT_AUDIO_CATEGORY = "SDL_AUDIO_CATEGORY"; 248 249 /** 250 A variable controlling the default audio channel count. 251 252 If the application doesn't specify the audio channel count when opening the 253 device, this hint can be used to specify a default channel count that will 254 be used. This defaults to "1" for recording and "2" for playback devices. 255 256 This hint should be set before an audio device is opened. 257 */ 258 enum SDL_HINT_AUDIO_CHANNELS = "SDL_AUDIO_CHANNELS"; 259 260 /** 261 Specify an application icon name for an audio device. 262 263 Some audio backends (such as Pulseaudio and Pipewire) allow you to set an 264 XDG icon name for your application. Among other things, this icon might 265 show up in a system control panel that lets the user adjust the volume on 266 specific audio streams instead of using one giant master volume slider. 267 Note that this is unrelated to the icon used by the windowing system, which 268 may be set with SDL_SetWindowIcon (or via desktop file on Wayland). 269 270 Setting this to "" or leaving it unset will have SDL use a reasonable 271 default, "applications-games", which is likely to be installed. See 272 https://specifications.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html 273 and 274 https://specifications.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html 275 for the relevant XDG icon specs. 276 277 This hint should be set before an audio device is opened. 278 */ 279 enum SDL_HINT_AUDIO_DEVICE_APP_ICON_NAME = "SDL_AUDIO_DEVICE_APP_ICON_NAME"; 280 281 /** 282 A variable controlling device buffer size. 283 284 This hint is an integer > 0, that represents the size of the device's 285 buffer in sample frames (stereo audio data in 16-bit format is 4 bytes per 286 sample frame, for example). 287 288 SDL3 generally decides this value on behalf of the app, but if for some 289 reason the app needs to dictate this (because they want either lower 290 latency or higher throughput AND ARE WILLING TO DEAL WITH what that might 291 require of the app), they can specify it. 292 293 SDL will try to accommodate this value, but there is no promise you'll get 294 the buffer size requested. Many platforms won't honor this request at all, 295 or might adjust it. 296 297 This hint should be set before an audio device is opened. 298 */ 299 enum SDL_HINT_AUDIO_DEVICE_SAMPLE_FRAMES = "SDL_AUDIO_DEVICE_SAMPLE_FRAMES"; 300 301 /** 302 Specify an audio stream name for an audio device. 303 304 Some audio backends (such as PulseAudio) allow you to describe your audio 305 stream. Among other things, this description might show up in a system 306 control panel that lets the user adjust the volume on specific audio 307 streams instead of using one giant master volume slider. 308 309 This hints lets you transmit that information to the OS. The contents of 310 this hint are used while opening an audio device. You should use a string 311 that describes your what your program is playing ("audio stream" is 312 probably sufficient in many cases, but this could be useful for something 313 like "team chat" if you have a headset playing VoIP audio separately). 314 315 Setting this to "" or leaving it unset will have SDL use a reasonable 316 default: "audio stream" or something similar. 317 318 Note that while this talks about audio streams, this is an OS-level 319 concept, so it applies to a physical audio device in this case, and not an 320 SDL_AudioStream, nor an SDL logical audio device. 321 322 This hint should be set before an audio device is opened. 323 */ 324 enum SDL_HINT_AUDIO_DEVICE_STREAM_NAME = "SDL_AUDIO_DEVICE_STREAM_NAME"; 325 326 /** 327 Specify an application role for an audio device. 328 329 Some audio backends (such as Pipewire) allow you to describe the role of 330 your audio stream. Among other things, this description might show up in a 331 system control panel or software for displaying and manipulating media 332 playback/recording graphs. 333 334 This hints lets you transmit that information to the OS. The contents of 335 this hint are used while opening an audio device. You should use a string 336 that describes your what your program is playing (Game, Music, Movie, 337 etc...). 338 339 Setting this to "" or leaving it unset will have SDL use a reasonable 340 default: "Game" or something similar. 341 342 Note that while this talks about audio streams, this is an OS-level 343 concept, so it applies to a physical audio device in this case, and not an 344 SDL_AudioStream, nor an SDL logical audio device. 345 346 This hint should be set before an audio device is opened. 347 */ 348 enum SDL_HINT_AUDIO_DEVICE_STREAM_ROLE = "SDL_AUDIO_DEVICE_STREAM_ROLE"; 349 350 /** 351 Specify the input file when recording audio using the disk audio driver. 352 353 This defaults to "sdlaudio-in.raw" 354 355 This hint should be set before an audio device is opened. 356 */ 357 enum SDL_HINT_AUDIO_DISK_INPUT_FILE = "SDL_AUDIO_DISK_INPUT_FILE"; 358 359 /** 360 Specify the output file when playing audio using the disk audio driver. 361 362 This defaults to "sdlaudio.raw" 363 364 This hint should be set before an audio device is opened. 365 */ 366 enum SDL_HINT_AUDIO_DISK_OUTPUT_FILE = "SDL_AUDIO_DISK_OUTPUT_FILE"; 367 368 /** 369 A variable controlling the audio rate when using the disk audio driver. 370 371 The disk audio driver normally simulates real-time for the audio rate that 372 was specified, but you can use this variable to adjust this rate higher or 373 lower down to 0. The default value is "1.0". 374 375 This hint should be set before an audio device is opened. 376 */ 377 enum SDL_HINT_AUDIO_DISK_TIMESCALE = "SDL_AUDIO_DISK_TIMESCALE"; 378 379 /** 380 A variable that specifies an audio backend to use. 381 382 By default, SDL will try all available audio backends in a reasonable order 383 until it finds one that can work, but this hint allows the app or user to 384 force a specific driver, such as "pipewire" if, say, you are on PulseAudio 385 but want to try talking to the lower level instead. 386 387 This hint should be set before SDL is initialized. 388 */ 389 enum SDL_HINT_AUDIO_DRIVER = "SDL_AUDIO_DRIVER"; 390 391 /** 392 A variable controlling the audio rate when using the dummy audio driver. 393 394 The dummy audio driver normally simulates real-time for the audio rate that 395 was specified, but you can use this variable to adjust this rate higher or 396 lower down to 0. The default value is "1.0". 397 398 This hint should be set before an audio device is opened. 399 */ 400 enum SDL_HINT_AUDIO_DUMMY_TIMESCALE = "SDL_AUDIO_DUMMY_TIMESCALE"; 401 402 /** 403 A variable controlling the default audio format. 404 405 If the application doesn't specify the audio format when opening the 406 device, this hint can be used to specify a default format that will be 407 used. 408 409 The variable can be set to the following values: 410 - $(D "U8"): Unsigned 8-bit audio 411 - $(D "S8"): Signed 8-bit audio 412 - $(D "S16LE"): Signed 16-bit little-endian audio 413 - $(D "S16BE"): Signed 16-bit big-endian audio 414 - $(D "S16"): Signed 16-bit native-endian audio (default) 415 - $(D "S32LE"): Signed 32-bit little-endian audio 416 - $(D "S32BE"): Signed 32-bit big-endian audio 417 - $(D "S32"): Signed 32-bit native-endian audio 418 - $(D "F32LE"): Floating point little-endian audio 419 - $(D "F32BE"): Floating point big-endian audio 420 - $(D "F32"): Floating point native-endian audio 421 422 This hint should be set before an audio device is opened. 423 */ 424 enum SDL_HINT_AUDIO_FORMAT = "SDL_AUDIO_FORMAT"; 425 426 /** 427 A variable controlling the default audio frequency. 428 429 If the application doesn't specify the audio frequency when opening the 430 device, this hint can be used to specify a default frequency that will be 431 used. This defaults to "44100". 432 433 This hint should be set before an audio device is opened. 434 */ 435 enum SDL_HINT_AUDIO_FREQUENCY = "SDL_AUDIO_FREQUENCY"; 436 437 /** 438 A variable that causes SDL to not ignore audio "monitors". 439 440 This is currently only used by the PulseAudio driver. 441 442 By default, SDL ignores audio devices that aren't associated with physical 443 hardware. Changing this hint to "1" will expose anything SDL sees that 444 appears to be an audio source or sink. This will add "devices" to the list 445 that the user probably doesn't want or need, but it can be useful in 446 scenarios where you want to hook up SDL to some sort of virtual device, 447 etc. 448 449 The variable can be set to the following values: 450 - $(D "0"): Audio monitor devices will be ignored. (default) 451 - $(D "1"): Audio monitor devices will show up in the device list. 452 453 This hint should be set before SDL is initialized. 454 */ 455 enum SDL_HINT_AUDIO_INCLUDE_MONITORS = "SDL_AUDIO_INCLUDE_MONITORS"; 456 457 /** 458 A variable controlling whether SDL updates joystick state when getting 459 input events. 460 461 The variable can be set to the following values: 462 - $(D "0"): You'll call SDL_UpdateJoysticks() manually. 463 - $(D "1"): SDL will automatically call SDL_UpdateJoysticks(). (default) 464 465 This hint can be set anytime. 466 */ 467 enum SDL_HINT_AUTO_UPDATE_JOYSTICKS = "SDL_AUTO_UPDATE_JOYSTICKS"; 468 469 /** 470 A variable controlling whether SDL updates sensor state when getting input 471 events. 472 473 The variable can be set to the following values: 474 - $(D "0"): You'll call SDL_UpdateSensors() manually. 475 - $(D "1"): SDL will automatically call SDL_UpdateSensors(). (default) 476 477 This hint can be set anytime. 478 */ 479 enum SDL_HINT_AUTO_UPDATE_SENSORS = "SDL_AUTO_UPDATE_SENSORS"; 480 481 /** 482 Prevent SDL from using version 4 of the bitmap header when saving BMPs. 483 484 The bitmap header version 4 is required for proper alpha channel support 485 and SDL will use it when required. Should this not be desired, this hint 486 can force the use of the 40 byte header version which is supported 487 everywhere. 488 489 The variable can be set to the following values: 490 - $(D "0"): Surfaces with a colorkey or an alpha channel are saved to a 32-bit 491 BMP file with an alpha mask. SDL will use the bitmap header version 4 and 492 set the alpha mask accordingly. (default) 493 - $(D "1"): Surfaces with a colorkey or an alpha channel are saved to a 32-bit 494 BMP file without an alpha mask. The alpha channel data will be in the 495 file, but applications are going to ignore it. 496 497 This hint can be set anytime. 498 */ 499 enum SDL_HINT_BMP_SAVE_LEGACY_FORMAT = "SDL_BMP_SAVE_LEGACY_FORMAT"; 500 501 /** 502 A variable that decides what camera backend to use. 503 504 By default, SDL will try all available camera backends in a reasonable 505 order until it finds one that can work, but this hint allows the app or 506 user to force a specific target, such as "directshow" if, say, you are on 507 Windows Media Foundations but want to try DirectShow instead. 508 509 The default value is unset, in which case SDL will try to figure out the 510 best camera backend on your behalf. This hint needs to be set before 511 SDL_Init() is called to be useful. 512 */ 513 enum SDL_HINT_CAMERA_DRIVER = "SDL_CAMERA_DRIVER"; 514 515 /** 516 A variable that limits what CPU features are available. 517 518 By default, SDL marks all features the current CPU supports as available. 519 This hint allows to limit these to a subset. 520 521 When the hint is unset, or empty, SDL will enable all detected CPU 522 features. 523 524 The variable can be set to a comma separated list containing the following 525 items: 526 - "all" 527 - "altivec" 528 - "sse" 529 - "sse2" 530 - "sse3" 531 - "sse41" 532 - "sse42" 533 - "avx" 534 - "avx2" 535 - "avx512f" 536 - "arm-simd" 537 - "neon" 538 - "lsx" 539 - "lasx" 540 541 The items can be prefixed by '+'/'-' to add/remove features. 542 */ 543 enum SDL_HINT_CPU_FEATURE_MASK = "SDL_CPU_FEATURE_MASK"; 544 545 /** 546 A variable controlling whether DirectInput should be used for controllers. 547 548 The variable can be set to the following values: 549 - $(D "0"): Disable DirectInput detection. 550 - $(D "1"): Enable DirectInput detection. (default) 551 552 This hint should be set before SDL is initialized. 553 */ 554 enum SDL_HINT_JOYSTICK_DIRECTINPUT = "SDL_JOYSTICK_DIRECTINPUT"; 555 556 /** 557 A variable that specifies a dialog backend to use. 558 559 By default, SDL will try all available dialog backends in a reasonable 560 order until it finds one that can work, but this hint allows the app or 561 user to force a specific target. 562 563 If the specified target does not exist or is not available, the 564 dialog-related function calls will fail. 565 566 This hint currently only applies to platforms using the generic "Unix" 567 dialog implementation, but may be extended to more platforms in the future. 568 Note that some Unix and Unix-like platforms have their own implementation, 569 such as macOS and Haiku. 570 571 The variable can be set to the following values: 572 - $(D null): Select automatically (default, all platforms) 573 - $(D "portal"): Use XDG Portals through DBus (Unix only) 574 - $(D "zenity"): Use the Zenity program (Unix only) 575 576 More options may be added in the future. 577 578 This hint can be set anytime. 579 */ 580 enum SDL_HINT_FILE_DIALOG_DRIVER = "SDL_FILE_DIALOG_DRIVER"; 581 582 /** 583 Override for SDL_GetDisplayUsableBounds(). 584 585 If set, this hint will override the expected results for 586 SDL_GetDisplayUsableBounds() for display index 0. Generally you don't want 587 to do this, but this allows an embedded system to request that some of the 588 screen be reserved for other uses when paired with a well-behaved 589 application. 590 591 The contents of this hint must be 4 comma-separated integers, the first is 592 the bounds x, then y, width and height, in that order. 593 594 This hint can be set anytime. 595 */ 596 enum SDL_HINT_DISPLAY_USABLE_BOUNDS = "SDL_DISPLAY_USABLE_BOUNDS"; 597 598 /** 599 Disable giving back control to the browser automatically when running with 600 asyncify. 601 602 With -s ASYNCIFY, SDL calls emscripten_sleep during operations such as 603 refreshing the screen or polling events. 604 605 This hint only applies to the emscripten platform. 606 607 The variable can be set to the following values: 608 - $(D "0"): Disable emscripten_sleep calls (if you give back browser control 609 manually or use asyncify for other purposes). 610 - $(D "1"): Enable emscripten_sleep calls. (default) 611 612 This hint can be set anytime. 613 */ 614 enum SDL_HINT_EMSCRIPTEN_ASYNCIFY = "SDL_EMSCRIPTEN_ASYNCIFY"; 615 616 /** 617 Specify the CSS selector used for the "default" window/canvas. 618 619 This hint only applies to the emscripten platform. 620 621 This hint should be set before creating a window. 622 */ 623 enum SDL_HINT_EMSCRIPTEN_CANVAS_SELECTOR = "SDL_EMSCRIPTEN_CANVAS_SELECTOR"; 624 625 /** 626 Override the binding element for keyboard inputs for Emscripten builds. 627 628 This hint only applies to the emscripten platform. 629 630 The variable can be one of: 631 - $(D "#window"): The javascript window object 632 - $(D "#document"): The javascript document object 633 - $(D "#screen"): The javascript window.screen object 634 - $(D "#canvas"): The WebGL canvas element 635 - $(D "#none"): Don't bind anything at all 636 - Any other string without a leading # sign applies to the element on the 637 page with that ID. 638 639 This hint should be set before creating a window. 640 */ 641 enum SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT = "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"; 642 643 /** 644 A variable that controls whether the on-screen keyboard should be shown 645 when text input is active. 646 647 The variable can be set to the following values: 648 - $(D "auto"): The on-screen keyboard will be shown if there is no physical 649 keyboard attached. (default) 650 - $(D "0"): Do not show the on-screen keyboard. 651 - $(D "1"): Show the on-screen keyboard, if available. 652 653 This hint must be set before SDL_StartTextInput() is called 654 */ 655 enum SDL_HINT_ENABLE_SCREEN_KEYBOARD = "SDL_ENABLE_SCREEN_KEYBOARD"; 656 657 /** 658 A variable containing a list of evdev devices to use if udev is not 659 available. 660 661 The list of devices is in the form: 662 663 deviceclass:path[,deviceclass:path[,...]] 664 665 where device class is an integer representing the SDL_UDEV_deviceclass and 666 path is the full path to the event device. 667 668 This hint should be set before SDL is initialized. 669 */ 670 enum SDL_HINT_EVDEV_DEVICES = "SDL_EVDEV_DEVICES"; 671 672 /** 673 A variable controlling verbosity of the logging of SDL events pushed onto 674 the internal queue. 675 676 The variable can be set to the following values, from least to most 677 verbose: 678 - $(D "0"): Don't log any events. (default) 679 - $(D "1"): Log most events (other than the really spammy ones). 680 - $(D "2"): Include mouse and finger motion events. 681 682 This is generally meant to be used to debug SDL itself, but can be useful 683 for application developers that need better visibility into what is going 684 on in the event queue. Logged events are sent through SDL_Log(), which 685 means by default they appear on stdout on most platforms or maybe 686 OutputDebugString() on Windows, and can be funneled by the app with 687 SDL_SetLogOutputFunction(), etc. 688 689 This hint can be set anytime. 690 */ 691 enum SDL_HINT_EVENT_LOGGING = "SDL_EVENT_LOGGING"; 692 693 /** 694 A variable controlling whether raising the window should be done more 695 forcefully. 696 697 The variable can be set to the following values: 698 - $(D "0"): Honor the OS policy for raising windows. (default) 699 - $(D "1"): Force the window to be raised, overriding any OS policy. 700 701 At present, this is only an issue under MS Windows, which makes it nearly 702 impossible to programmatically move a window to the foreground, for 703 "security" reasons. See http://stackoverflow.com/a/34414846 for a 704 discussion. 705 706 This hint can be set anytime. 707 */ 708 enum SDL_HINT_FORCE_RAISEWINDOW = "SDL_FORCE_RAISEWINDOW"; 709 710 /** 711 A variable controlling how 3D acceleration is used to accelerate the SDL 712 screen surface. 713 714 SDL can try to accelerate the SDL screen surface by using streaming 715 textures with a 3D rendering engine. This variable controls whether and how 716 this is done. 717 718 The variable can be set to the following values: 719 - $(D "0"): Disable 3D acceleration 720 - $(D "1"): Enable 3D acceleration, using the default renderer. (default) 721 - $(D "X"): Enable 3D acceleration, using X where X is one of the valid 722 rendering drivers. (e.g. "direct3d", "opengl", etc.) 723 724 This hint should be set before calling SDL_GetWindowSurface() 725 */ 726 enum SDL_HINT_FRAMEBUFFER_ACCELERATION = "SDL_FRAMEBUFFER_ACCELERATION"; 727 728 /** 729 A variable that lets you manually hint extra gamecontroller db entries. 730 731 The variable should be newline delimited rows of gamecontroller config 732 data, see SDL_gamepad.h 733 734 You can update mappings after SDL is initialized with 735 SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping() 736 737 This hint should be set before SDL is initialized. 738 */ 739 enum SDL_HINT_GAMECONTROLLERCONFIG = "SDL_GAMECONTROLLERCONFIG"; 740 741 /** 742 A variable that lets you provide a file with extra gamecontroller db 743 entries. 744 745 The file should contain lines of gamecontroller config data, see 746 SDL_gamepad.h 747 748 You can update mappings after SDL is initialized with 749 SDL_GetGamepadMappingForGUID() and SDL_AddGamepadMapping() 750 751 This hint should be set before SDL is initialized. 752 */ 753 enum SDL_HINT_GAMECONTROLLERCONFIG_FILE = "SDL_GAMECONTROLLERCONFIG_FILE"; 754 755 /** 756 A variable that overrides the automatic controller type detection. 757 758 The variable should be comma separated entries, in the form: VID/PID=type 759 760 The VID and PID should be hexadecimal with exactly 4 digits, e.g. 0x00fd 761 762 This hint affects what low level protocol is used with the HIDAPI driver. 763 764 The variable can be set to the following values: 765 - "Xbox360" 766 - "XboxOne" 767 - "PS3" 768 - "PS4" 769 - "PS5" 770 - "SwitchPro" 771 772 This hint should be set before SDL is initialized. 773 */ 774 enum SDL_HINT_GAMECONTROLLERTYPE = "SDL_GAMECONTROLLERTYPE"; 775 776 /** 777 A variable containing a list of devices to skip when scanning for game 778 controllers. 779 780 The format of the string is a comma separated list of USB VID/PID pairs in 781 hexadecimal form, e.g. 782 783 0xAAAA/0xBBBB,0xCCCC/0xDDDD 784 785 The variable can also take the form of "@file", in which case the named 786 file will be loaded and interpreted as the value of the variable. 787 788 This hint can be set anytime. 789 */ 790 enum SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES = "SDL_GAMECONTROLLER_IGNORE_DEVICES"; 791 792 /** 793 If set, all devices will be skipped when scanning for game controllers 794 except for the ones listed in this variable. 795 796 The format of the string is a comma separated list of USB VID/PID pairs in 797 hexadecimal form, e.g. 798 799 0xAAAA/0xBBBB,0xCCCC/0xDDDD 800 801 The variable can also take the form of "@file", in which case the named 802 file will be loaded and interpreted as the value of the variable. 803 804 This hint can be set anytime. 805 */ 806 enum SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT = "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"; 807 808 /** 809 A variable that controls whether the device's built-in accelerometer and 810 gyro should be used as sensors for gamepads. 811 812 The variable can be set to the following values: 813 - $(D "0"): Sensor fusion is disabled 814 - $(D "1"): Sensor fusion is enabled for all controllers that lack sensors 815 816 Or the variable can be a comma separated list of USB VID/PID pairs in 817 hexadecimal form, e.g. 818 819 0xAAAA/0xBBBB,0xCCCC/0xDDDD 820 821 The variable can also take the form of "@file", in which case the named 822 file will be loaded and interpreted as the value of the variable. 823 824 This hint should be set before a gamepad is opened. 825 */ 826 enum SDL_HINT_GAMECONTROLLER_SENSOR_FUSION = "SDL_GAMECONTROLLER_SENSOR_FUSION"; 827 828 /** 829 This variable sets the default text of the TextInput window on GDK 830 platforms. 831 832 This hint is available only if SDL_GDK_TEXTINPUT defined. 833 834 This hint should be set before calling SDL_StartTextInput() 835 */ 836 enum SDL_HINT_GDK_TEXTINPUT_DEFAULT_TEXT = "SDL_GDK_TEXTINPUT_DEFAULT_TEXT"; 837 838 /** 839 This variable sets the description of the TextInput window on GDK 840 platforms. 841 842 This hint is available only if SDL_GDK_TEXTINPUT defined. 843 844 This hint should be set before calling SDL_StartTextInput() 845 */ 846 enum SDL_HINT_GDK_TEXTINPUT_DESCRIPTION = "SDL_GDK_TEXTINPUT_DESCRIPTION"; 847 848 /** 849 This variable sets the maximum input length of the TextInput window on GDK 850 platforms. 851 852 The value must be a stringified integer, for example "10" to allow for up 853 to 10 characters of text input. 854 855 This hint is available only if SDL_GDK_TEXTINPUT defined. 856 857 This hint should be set before calling SDL_StartTextInput() 858 */ 859 enum SDL_HINT_GDK_TEXTINPUT_MAX_LENGTH = "SDL_GDK_TEXTINPUT_MAX_LENGTH"; 860 861 /** 862 This variable sets the input scope of the TextInput window on GDK 863 platforms. 864 865 Set this hint to change the XGameUiTextEntryInputScope value that will be 866 passed to the window creation function. The value must be a stringified 867 integer, for example "0" for XGameUiTextEntryInputScope::Default. 868 869 This hint is available only if SDL_GDK_TEXTINPUT defined. 870 871 This hint should be set before calling SDL_StartTextInput() 872 */ 873 enum SDL_HINT_GDK_TEXTINPUT_SCOPE = "SDL_GDK_TEXTINPUT_SCOPE"; 874 875 /** 876 This variable sets the title of the TextInput window on GDK platforms. 877 878 This hint is available only if SDL_GDK_TEXTINPUT defined. 879 880 This hint should be set before calling SDL_StartTextInput() 881 */ 882 enum SDL_HINT_GDK_TEXTINPUT_TITLE = "SDL_GDK_TEXTINPUT_TITLE"; 883 884 /** 885 A variable to control whether HIDAPI uses libusb for device access. 886 887 By default libusb will only be used for a few devices that require direct 888 USB access, and this can be controlled with 889 SDL_HINT_HIDAPI_LIBUSB_WHITELIST. 890 891 The variable can be set to the following values: 892 - $(D "0"): HIDAPI will not use libusb for device access. 893 - $(D "1"): HIDAPI will use libusb for device access if available. (default) 894 895 This hint should be set before SDL is initialized. 896 */ 897 enum SDL_HINT_HIDAPI_LIBUSB = "SDL_HIDAPI_LIBUSB"; 898 899 /** 900 A variable to control whether HIDAPI uses libusb only for whitelisted 901 devices. 902 903 By default libusb will only be used for a few devices that require direct 904 USB access. 905 906 The variable can be set to the following values: 907 - $(D "0"): HIDAPI will use libusb for all device access. 908 - $(D "1"): HIDAPI will use libusb only for whitelisted devices. (default) 909 910 This hint should be set before SDL is initialized. 911 */ 912 enum SDL_HINT_HIDAPI_LIBUSB_WHITELIST = "SDL_HIDAPI_LIBUSB_WHITELIST"; 913 914 /** 915 A variable to control whether HIDAPI uses udev for device detection. 916 917 The variable can be set to the following values: 918 - $(D "0"): HIDAPI will poll for device changes. 919 - $(D "1"): HIDAPI will use udev for device detection. (default) 920 921 This hint should be set before SDL is initialized. 922 */ 923 enum SDL_HINT_HIDAPI_UDEV = "SDL_HIDAPI_UDEV"; 924 925 /** 926 A variable that specifies a GPU backend to use. 927 928 By default, SDL will try all available GPU backends in a reasonable order 929 until it finds one that can work, but this hint allows the app or user to 930 force a specific target, such as "direct3d12" if, say, your hardware 931 supports Vulkan but you want to try using D3D12 instead. 932 933 This hint should be set before any GPU functions are called. 934 */ 935 enum SDL_HINT_GPU_DRIVER = "SDL_GPU_DRIVER"; 936 937 /** 938 A variable to control whether SDL_hid_enumerate() enumerates all HID 939 devices or only controllers. 940 941 The variable can be set to the following values: 942 - $(D "0"): SDL_hid_enumerate() will enumerate all HID devices. 943 - $(D "1"): SDL_hid_enumerate() will only enumerate controllers. (default) 944 945 By default SDL will only enumerate controllers, to reduce risk of hanging 946 or crashing on devices with bad drivers and avoiding macOS keyboard capture 947 permission prompts. 948 949 This hint can be set anytime. 950 */ 951 enum SDL_HINT_HIDAPI_ENUMERATE_ONLY_CONTROLLERS = "SDL_HIDAPI_ENUMERATE_ONLY_CONTROLLERS"; 952 953 /** 954 A variable containing a list of devices to ignore in SDL_hid_enumerate(). 955 956 The format of the string is a comma separated list of USB VID/PID pairs in 957 hexadecimal form, e.g. 958 959 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 960 961 For example, to ignore the Shanwan DS3 controller and any Valve controller, 962 you might use the string "0x2563/0x0523,0x28de/0x0000" 963 964 This hint can be set anytime. 965 */ 966 enum SDL_HINT_HIDAPI_IGNORE_DEVICES = "SDL_HIDAPI_IGNORE_DEVICES"; 967 968 /** 969 A variable describing what IME UI elements the application can display. 970 971 By default IME UI is handled using native components by the OS where 972 possible, however this can interfere with or not be visible when exclusive 973 fullscreen mode is used. 974 975 The variable can be set to a comma separated list containing the following 976 items: 977 - "none" or "0": The application can't render any IME elements, and native 978 UI should be used. (default) 979 - $(D "composition"): The application handles SDL_EVENT_TEXT_EDITING events and 980 can render the composition text. 981 - $(D "candidates"): The application handles SDL_EVENT_TEXT_EDITING_CANDIDATES 982 and can render the candidate list. 983 984 This hint should be set before SDL is initialized. 985 */ 986 enum SDL_HINT_IME_IMPLEMENTED_UI = "SDL_IME_IMPLEMENTED_UI"; 987 988 /** 989 A variable controlling whether the home indicator bar on iPhone X should be 990 hidden. 991 992 The variable can be set to the following values: 993 - $(D "0"): The indicator bar is not hidden. (default for windowed applications) 994 - $(D "1"): The indicator bar is hidden and is shown when the screen is touched 995 (useful for movie playback applications). 996 - $(D "2"): The indicator bar is dim and the first swipe makes it visible and 997 the second swipe performs the "home" action. (default for fullscreen 998 applications) 999 1000 This hint can be set anytime. 1001 */ 1002 enum SDL_HINT_IOS_HIDE_HOME_INDICATOR = "SDL_IOS_HIDE_HOME_INDICATOR"; 1003 1004 /** 1005 A variable that lets you enable joystick (and gamecontroller) events even 1006 when your app is in the background. 1007 1008 The variable can be set to the following values: 1009 - $(D "0"): Disable joystick & gamecontroller input events when the application 1010 is in the background. (default) 1011 - $(D "1"): Enable joystick & gamecontroller input events when the application 1012 is in the background. 1013 1014 This hint can be set anytime. 1015 */ 1016 enum SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS = "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"; 1017 1018 /** 1019 A variable containing a list of arcade stick style controllers. 1020 1021 The format of the string is a comma separated list of USB VID/PID pairs in 1022 hexadecimal form, e.g. 1023 1024 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1025 1026 The variable can also take the form of "@file", in which case the named 1027 file will be loaded and interpreted as the value of the variable. 1028 1029 This hint can be set anytime. 1030 */ 1031 enum SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES = "SDL_JOYSTICK_ARCADESTICK_DEVICES"; 1032 1033 /** 1034 A variable containing a list of devices that are not arcade stick style 1035 controllers. 1036 1037 This will override SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES and the built in 1038 device list. 1039 1040 The format of the string is a comma separated list of USB VID/PID pairs in 1041 hexadecimal form, e.g. 1042 1043 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1044 1045 The variable can also take the form of "@file", in which case the named 1046 file will be loaded and interpreted as the value of the variable. 1047 1048 This hint can be set anytime. 1049 */ 1050 enum SDL_HINT_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_ARCADESTICK_DEVICES_EXCLUDED"; 1051 1052 /** 1053 A variable containing a list of devices that should not be considered 1054 joysticks. 1055 1056 The format of the string is a comma separated list of USB VID/PID pairs in 1057 hexadecimal form, e.g. 1058 1059 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1060 1061 The variable can also take the form of "@file", in which case the named 1062 file will be loaded and interpreted as the value of the variable. 1063 1064 This hint can be set anytime. 1065 */ 1066 enum SDL_HINT_JOYSTICK_BLACKLIST_DEVICES = "SDL_JOYSTICK_BLACKLIST_DEVICES"; 1067 1068 /** 1069 A variable containing a list of devices that should be considered 1070 joysticks. 1071 1072 This will override SDL_HINT_JOYSTICK_BLACKLIST_DEVICES and the built in 1073 device list. 1074 1075 The format of the string is a comma separated list of USB VID/PID pairs in 1076 hexadecimal form, e.g. 1077 1078 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1079 1080 The variable can also take the form of "@file", in which case the named 1081 file will be loaded and interpreted as the value of the variable. 1082 1083 This hint can be set anytime. 1084 */ 1085 enum SDL_HINT_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED = "SDL_JOYSTICK_BLACKLIST_DEVICES_EXCLUDED"; 1086 1087 /** 1088 A variable containing a comma separated list of devices to open as 1089 joysticks. 1090 1091 This variable is currently only used by the Linux joystick driver. 1092 */ 1093 enum SDL_HINT_JOYSTICK_DEVICE = "SDL_JOYSTICK_DEVICE"; 1094 1095 /** 1096 A variable controlling whether enhanced reports should be used for 1097 controllers when using the HIDAPI driver. 1098 1099 Enhanced reports allow rumble and effects on Bluetooth PlayStation 1100 controllers and gyro on Nintendo Switch controllers, but break Windows 1101 DirectInput for other applications that don't use SDL. 1102 1103 Once enhanced reports are enabled, they can't be disabled on PlayStation 1104 controllers without power cycling the controller. 1105 1106 The variable can be set to the following values: 1107 - $(D "0"): enhanced reports are not enabled. 1108 - $(D "1"): enhanced reports are enabled. (default) 1109 - $(D "auto"): enhanced features are advertised to the application, but SDL 1110 doesn't change the controller report mode unless the application uses 1111 them. 1112 1113 This hint can be enabled anytime. 1114 */ 1115 enum SDL_HINT_JOYSTICK_ENHANCED_REPORTS = "SDL_JOYSTICK_ENHANCED_REPORTS"; 1116 1117 /** 1118 A variable containing a list of flightstick style controllers. 1119 1120 The format of the string is a comma separated list of USB VID/PID pairs in 1121 hexadecimal form, e.g. 1122 1123 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1124 1125 The variable can also take the form of @file, in which case the named file 1126 will be loaded and interpreted as the value of the variable. 1127 1128 This hint can be set anytime. 1129 */ 1130 enum SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES"; 1131 1132 /** 1133 A variable containing a list of devices that are not flightstick style 1134 controllers. 1135 1136 This will override SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES and the built in 1137 device list. 1138 1139 The format of the string is a comma separated list of USB VID/PID pairs in 1140 hexadecimal form, e.g. 1141 1142 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1143 1144 The variable can also take the form of "@file", in which case the named 1145 file will be loaded and interpreted as the value of the variable. 1146 1147 This hint can be set anytime. 1148 */ 1149 enum SDL_HINT_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED = "SDL_JOYSTICK_FLIGHTSTICK_DEVICES_EXCLUDED"; 1150 1151 /** 1152 A variable controlling whether GameInput should be used for controller 1153 handling on Windows. 1154 1155 The variable can be set to the following values: 1156 - $(D "0"): GameInput is not used. 1157 - $(D "1"): GameInput is used. 1158 1159 The default is "1" on GDK platforms, and "0" otherwise. 1160 1161 This hint should be set before SDL is initialized. 1162 */ 1163 enum SDL_HINT_JOYSTICK_GAMEINPUT = "SDL_JOYSTICK_GAMEINPUT"; 1164 1165 /** 1166 A variable containing a list of devices known to have a GameCube form 1167 factor. 1168 1169 The format of the string is a comma separated list of USB VID/PID pairs in 1170 hexadecimal form, e.g. 1171 1172 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1173 1174 The variable can also take the form of "@file", in which case the named 1175 file will be loaded and interpreted as the value of the variable. 1176 1177 This hint can be set anytime. 1178 */ 1179 enum SDL_HINT_JOYSTICK_GAMECUBE_DEVICES = "SDL_JOYSTICK_GAMECUBE_DEVICES"; 1180 1181 /** 1182 A variable containing a list of devices known not to have a GameCube form 1183 factor. 1184 1185 This will override SDL_HINT_JOYSTICK_GAMECUBE_DEVICES and the built in 1186 device list. 1187 1188 The format of the string is a comma separated list of USB VID/PID pairs in 1189 hexadecimal form, e.g. 1190 1191 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1192 1193 The variable can also take the form of "@file", in which case the named 1194 file will be loaded and interpreted as the value of the variable. 1195 1196 This hint can be set anytime. 1197 */ 1198 enum SDL_HINT_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED = "SDL_JOYSTICK_GAMECUBE_DEVICES_EXCLUDED"; 1199 1200 /** 1201 A variable controlling whether the HIDAPI joystick drivers should be used. 1202 1203 The variable can be set to the following values: 1204 - $(D "0"): HIDAPI drivers are not used. 1205 - $(D "1"): HIDAPI drivers are used. (default) 1206 1207 This variable is the default for all drivers, but can be overridden by the 1208 hints for specific drivers below. 1209 1210 This hint should be set before initializing joysticks and gamepads. 1211 */ 1212 enum SDL_HINT_JOYSTICK_HIDAPI = "SDL_JOYSTICK_HIDAPI"; 1213 1214 /** 1215 A variable controlling whether Nintendo Switch Joy-Con controllers will be 1216 combined into a single Pro-like controller when using the HIDAPI driver. 1217 1218 The variable can be set to the following values: 1219 - $(D "0"): Left and right Joy-Con controllers will not be combined and each 1220 will be a mini-gamepad. 1221 - $(D "1"): Left and right Joy-Con controllers will be combined into a single 1222 controller. (default) 1223 1224 This hint should be set before initializing joysticks and gamepads. 1225 */ 1226 enum SDL_HINT_JOYSTICK_HIDAPI_COMBINE_JOY_CONS = "SDL_JOYSTICK_HIDAPI_COMBINE_JOY_CONS"; 1227 1228 /** 1229 A variable controlling whether the HIDAPI driver for Nintendo GameCube 1230 controllers should be used. 1231 1232 The variable can be set to the following values: 1233 - $(D "0"): HIDAPI driver is not used. 1234 - $(D "1"): HIDAPI driver is used. 1235 1236 The default is the value of SDL_HINT_JOYSTICK_HIDAPI 1237 1238 This hint should be set before initializing joysticks and gamepads. 1239 */ 1240 enum SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE = "SDL_JOYSTICK_HIDAPI_GAMECUBE"; 1241 1242 /** 1243 A variable controlling whether rumble is used to implement the GameCube 1244 controller's 3 rumble modes, Stop(0), Rumble(1), and StopHard(2). 1245 1246 This is useful for applications that need full compatibility for things 1247 like ADSR envelopes. - Stop is implemented by setting low_frequency_rumble 1248 to 0 and high_frequency_rumble >0 - Rumble is both at any arbitrary value - 1249 StopHard is implemented by setting both low_frequency_rumble and 1250 high_frequency_rumble to 0 1251 1252 The variable can be set to the following values: 1253 - $(D "0"): Normal rumble behavior is behavior is used. (default) 1254 - $(D "1"): Proper GameCube controller rumble behavior is used. 1255 1256 This hint can be set anytime. 1257 */ 1258 enum SDL_HINT_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE = "SDL_JOYSTICK_HIDAPI_GAMECUBE_RUMBLE_BRAKE"; 1259 1260 /** 1261 A variable controlling whether the HIDAPI driver for Nintendo Switch 1262 Joy-Cons should be used. 1263 1264 The variable can be set to the following values: 1265 - $(D "0"): HIDAPI driver is not used. 1266 - $(D "1"): HIDAPI driver is used. 1267 1268 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1269 1270 This hint should be set before initializing joysticks and gamepads. 1271 */ 1272 enum SDL_HINT_JOYSTICK_HIDAPI_JOY_CONS = "SDL_JOYSTICK_HIDAPI_JOY_CONS"; 1273 1274 /** 1275 A variable controlling whether the Home button LED should be turned on when 1276 a Nintendo Switch Joy-Con controller is opened. 1277 1278 The variable can be set to the following values: 1279 - $(D "0"): home button LED is turned off 1280 - $(D "1"): home button LED is turned on 1281 1282 By default the Home button LED state is not changed. This hint can also be 1283 set to a floating point value between 0.0 and 1.0 which controls the 1284 brightness of the Home button LED. 1285 1286 This hint can be set anytime. 1287 */ 1288 enum SDL_HINT_JOYSTICK_HIDAPI_JOYCON_HOME_LED = "SDL_JOYSTICK_HIDAPI_JOYCON_HOME_LED"; 1289 1290 /** 1291 A variable controlling whether the HIDAPI driver for Amazon Luna 1292 controllers connected via Bluetooth should be used. 1293 1294 The variable can be set to the following values: 1295 - $(D "0"): HIDAPI driver is not used. 1296 - $(D "1"): HIDAPI driver is used. 1297 1298 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1299 1300 This hint should be set before initializing joysticks and gamepads. 1301 */ 1302 enum SDL_HINT_JOYSTICK_HIDAPI_LUNA = "SDL_JOYSTICK_HIDAPI_LUNA"; 1303 1304 /** 1305 A variable controlling whether the HIDAPI driver for Nintendo Online 1306 classic controllers should be used. 1307 1308 The variable can be set to the following values: 1309 - $(D "0"): HIDAPI driver is not used. 1310 - $(D "1"): HIDAPI driver is used. 1311 1312 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1313 1314 This hint should be set before initializing joysticks and gamepads. 1315 */ 1316 enum SDL_HINT_JOYSTICK_HIDAPI_NINTENDO_CLASSIC = "SDL_JOYSTICK_HIDAPI_NINTENDO_CLASSIC"; 1317 1318 /** 1319 A variable controlling whether the HIDAPI driver for PS3 controllers should 1320 be used. 1321 1322 The variable can be set to the following values: 1323 - $(D "0"): HIDAPI driver is not used. 1324 - $(D "1"): HIDAPI driver is used. 1325 1326 The default is the value of SDL_HINT_JOYSTICK_HIDAPI on macOS, and "0" on 1327 other platforms. 1328 1329 For official Sony driver (sixaxis.sys) use 1330 SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER. See 1331 https://github.com/ViGEm/DsHidMini for an alternative driver on Windows. 1332 1333 This hint should be set before initializing joysticks and gamepads. 1334 */ 1335 enum SDL_HINT_JOYSTICK_HIDAPI_PS3 = "SDL_JOYSTICK_HIDAPI_PS3"; 1336 1337 /** 1338 A variable controlling whether the Sony driver (sixaxis.sys) for PS3 1339 controllers (Sixaxis/DualShock 3) should be used. 1340 1341 The variable can be set to the following values: 1342 - $(D "0"): Sony driver (sixaxis.sys) is not used. 1343 - $(D "1"): Sony driver (sixaxis.sys) is used. 1344 1345 The default value is 0. 1346 1347 This hint should be set before initializing joysticks and gamepads. 1348 */ 1349 enum SDL_HINT_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER = "SDL_JOYSTICK_HIDAPI_PS3_SIXAXIS_DRIVER"; 1350 1351 /** 1352 A variable controlling whether the HIDAPI driver for PS4 controllers should 1353 be used. 1354 1355 The variable can be set to the following values: 1356 - $(D "0"): HIDAPI driver is not used. 1357 - $(D "1"): HIDAPI driver is used. 1358 1359 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1360 1361 This hint should be set before initializing joysticks and gamepads. 1362 */ 1363 enum SDL_HINT_JOYSTICK_HIDAPI_PS4 = "SDL_JOYSTICK_HIDAPI_PS4"; 1364 1365 /** 1366 A variable controlling the update rate of the PS4 controller over Bluetooth 1367 when using the HIDAPI driver. 1368 1369 This defaults to 4 ms, to match the behavior over USB, and to be more 1370 friendly to other Bluetooth devices and older Bluetooth hardware on the 1371 computer. It can be set to "1" (1000Hz), "2" (500Hz) and "4" (250Hz) 1372 1373 This hint can be set anytime, but only takes effect when extended input 1374 reports are enabled. 1375 */ 1376 enum SDL_HINT_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL = "SDL_JOYSTICK_HIDAPI_PS4_REPORT_INTERVAL"; 1377 1378 /** 1379 A variable controlling whether the HIDAPI driver for PS5 controllers should 1380 be used. 1381 1382 The variable can be set to the following values: 1383 - $(D "0"): HIDAPI driver is not used. 1384 - $(D "1"): HIDAPI driver is used. 1385 1386 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1387 1388 This hint should be set before initializing joysticks and gamepads. 1389 */ 1390 enum SDL_HINT_JOYSTICK_HIDAPI_PS5 = "SDL_JOYSTICK_HIDAPI_PS5"; 1391 1392 /** 1393 A variable controlling whether the player LEDs should be lit to indicate 1394 which player is associated with a PS5 controller. 1395 1396 The variable can be set to the following values: 1397 - $(D "0"): player LEDs are not enabled. 1398 - $(D "1"): player LEDs are enabled. (default) 1399 */ 1400 enum SDL_HINT_JOYSTICK_HIDAPI_PS5_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_PS5_PLAYER_LED"; 1401 1402 /** 1403 A variable controlling whether the HIDAPI driver for NVIDIA SHIELD 1404 controllers should be used. 1405 1406 The variable can be set to the following values: 1407 1408 - $(D "0"): HIDAPI driver is not used. 1409 - $(D "1"): HIDAPI driver is used. 1410 1411 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1412 1413 This hint should be set before initializing joysticks and gamepads. 1414 */ 1415 enum SDL_HINT_JOYSTICK_HIDAPI_SHIELD = "SDL_JOYSTICK_HIDAPI_SHIELD"; 1416 1417 /** 1418 A variable controlling whether the HIDAPI driver for Google Stadia 1419 controllers should be used. 1420 1421 The variable can be set to the following values: 1422 - $(D "0"): HIDAPI driver is not used. 1423 - $(D "1"): HIDAPI driver is used. 1424 1425 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1426 */ 1427 enum SDL_HINT_JOYSTICK_HIDAPI_STADIA = "SDL_JOYSTICK_HIDAPI_STADIA"; 1428 1429 /** 1430 A variable controlling whether the HIDAPI driver for Bluetooth Steam 1431 Controllers should be used. 1432 1433 The variable can be set to the following values: 1434 1435 - $(D "0"): HIDAPI driver is not used. (default) 1436 - $(D "1"): HIDAPI driver is used for Steam Controllers, which requires 1437 Bluetooth access and may prompt the user for permission on iOS and 1438 Android. 1439 1440 This hint should be set before initializing joysticks and gamepads. 1441 */ 1442 enum SDL_HINT_JOYSTICK_HIDAPI_STEAM = "SDL_JOYSTICK_HIDAPI_STEAM"; 1443 1444 /** 1445 A variable controlling whether the Steam button LED should be turned on 1446 when a Steam controller is opened. 1447 1448 The variable can be set to the following values: 1449 - $(D "0"): Steam button LED is turned off. 1450 - $(D "1"): Steam button LED is turned on. 1451 1452 By default the Steam button LED state is not changed. This hint can also be 1453 set to a floating point value between 0.0 and 1.0 which controls the 1454 brightness of the Steam button LED. 1455 1456 This hint can be set anytime. 1457 */ 1458 enum SDL_HINT_JOYSTICK_HIDAPI_STEAM_HOME_LED = "SDL_JOYSTICK_HIDAPI_STEAM_HOME_LED"; 1459 1460 /** 1461 A variable controlling whether the HIDAPI driver for the Steam Deck builtin 1462 controller should be used. 1463 1464 The variable can be set to the following values: 1465 - $(D "0"): HIDAPI driver is not used. 1466 - $(D "1"): HIDAPI driver is used. 1467 1468 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1469 1470 This hint should be set before initializing joysticks and gamepads. 1471 */ 1472 enum SDL_HINT_JOYSTICK_HIDAPI_STEAMDECK = "SDL_JOYSTICK_HIDAPI_STEAMDECK"; 1473 1474 /** 1475 A variable controlling whether the HIDAPI driver for HORI licensed Steam 1476 controllers should be used. 1477 1478 This variable can be set to the following values: "0" - HIDAPI driver is 1479 not used "1" - HIDAPI driver is used 1480 1481 The default is the value of SDL_HINT_JOYSTICK_HIDAPI 1482 */ 1483 enum SDL_HINT_JOYSTICK_HIDAPI_STEAM_HORI = "SDL_JOYSTICK_HIDAPI_STEAM_HORI"; 1484 1485 /** 1486 A variable controlling whether the HIDAPI driver for some Logitech wheels 1487 should be used. 1488 1489 This variable can be set to the following values: 1490 - $(D "0"): HIDAPI driver is not used 1491 - $(D "1"): HIDAPI driver is used 1492 1493 The default is the value of SDL_HINT_JOYSTICK_HIDAPI 1494 */ 1495 enum SDL_HINT_JOYSTICK_HIDAPI_LG4FF = "SDL_JOYSTICK_HIDAPI_LG4FF"; 1496 1497 /** 1498 A variable controlling whether the HIDAPI driver for 8BitDo controllers 1499 should be used. 1500 1501 This variable can be set to the following values: 1502 - $(D "0"): HIDAPI driver is not used 1503 - $(D "1"): HIDAPI driver is used 1504 1505 The default is the value of SDL_HINT_JOYSTICK_HIDAPI 1506 */ 1507 enum SDL_HINT_JOYSTICK_HIDAPI_8BITDO = "SDL_JOYSTICK_HIDAPI_8BITDO"; 1508 1509 /** 1510 A variable controlling whether the HIDAPI driver for Flydigi controllers 1511 should be used. 1512 1513 This variable can be set to the following values: 1514 - $(D "0"): HIDAPI driver is not used 1515 - $(D "1"): HIDAPI driver is used 1516 1517 The default is the value of SDL_HINT_JOYSTICK_HIDAPI 1518 */ 1519 enum SDL_HINT_JOYSTICK_HIDAPI_FLYDIGI = "SDL_JOYSTICK_HIDAPI_FLYDIGI"; 1520 1521 /** 1522 A variable controlling whether the HIDAPI driver for Nintendo Switch 1523 controllers should be used. 1524 1525 The variable can be set to the following values: 1526 - $(D "0"): HIDAPI driver is not used. 1527 - $(D "1"): HIDAPI driver is used. 1528 1529 The default is the value of SDL_HINT_JOYSTICK_HIDAPI. 1530 1531 This hint should be set before initializing joysticks and gamepads. 1532 */ 1533 enum SDL_HINT_JOYSTICK_HIDAPI_SWITCH = "SDL_JOYSTICK_HIDAPI_SWITCH"; 1534 1535 /** 1536 A variable controlling whether the Home button LED should be turned on when 1537 a Nintendo Switch Pro controller is opened. 1538 1539 The variable can be set to the following values: 1540 - $(D "0"): Home button LED is turned off. 1541 - $(D "1"): Home button LED is turned on. 1542 1543 By default the Home button LED state is not changed. This hint can also be 1544 set to a floating point value between 0.0 and 1.0 which controls the 1545 brightness of the Home button LED. 1546 1547 This hint can be set anytime. 1548 */ 1549 enum SDL_HINT_JOYSTICK_HIDAPI_SWITCH_HOME_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_HOME_LED"; 1550 1551 /** 1552 A variable controlling whether the player LEDs should be lit to indicate 1553 which player is associated with a Nintendo Switch controller. 1554 1555 The variable can be set to the following values: 1556 - $(D "0"): Player LEDs are not enabled. 1557 - $(D "1"): Player LEDs are enabled. (default) 1558 1559 This hint can be set anytime. 1560 */ 1561 enum SDL_HINT_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_SWITCH_PLAYER_LED"; 1562 1563 /** 1564 A variable controlling whether Nintendo Switch Joy-Con controllers will be 1565 in vertical mode when using the HIDAPI driver. 1566 1567 The variable can be set to the following values: 1568 - $(D "0"): Left and right Joy-Con controllers will not be in vertical mode. 1569 (default) 1570 - $(D "1"): Left and right Joy-Con controllers will be in vertical mode. 1571 1572 This hint should be set before opening a Joy-Con controller. 1573 */ 1574 enum SDL_HINT_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS = "SDL_JOYSTICK_HIDAPI_VERTICAL_JOY_CONS"; 1575 1576 /** 1577 A variable controlling whether the HIDAPI driver for Nintendo Wii and Wii U 1578 controllers should be used. 1579 1580 The variable can be set to the following values: 1581 - $(D "0"): HIDAPI driver is not used. 1582 - $(D "1"): HIDAPI driver is used. 1583 1584 This driver doesn't work with the dolphinbar, so the default is false for 1585 now. 1586 1587 This hint should be set before initializing joysticks and gamepads. 1588 */ 1589 enum SDL_HINT_JOYSTICK_HIDAPI_WII = "SDL_JOYSTICK_HIDAPI_WII"; 1590 1591 /** 1592 A variable controlling whether the player LEDs should be lit to indicate 1593 which player is associated with a Wii controller. 1594 1595 The variable can be set to the following values: 1596 - $(D "0"): Player LEDs are not enabled. 1597 - $(D "1"): Player LEDs are enabled. (default) 1598 1599 This hint can be set anytime. 1600 */ 1601 enum SDL_HINT_JOYSTICK_HIDAPI_WII_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_WII_PLAYER_LED"; 1602 1603 /** 1604 A variable controlling whether the HIDAPI driver for XBox controllers 1605 should be used. 1606 1607 The variable can be set to the following values: 1608 - $(D "0"): HIDAPI driver is not used. 1609 - $(D "1"): HIDAPI driver is used. 1610 1611 The default is "0" on Windows, otherwise the value of 1612 SDL_HINT_JOYSTICK_HIDAPI 1613 1614 This hint should be set before initializing joysticks and gamepads. 1615 */ 1616 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX = "SDL_JOYSTICK_HIDAPI_XBOX"; 1617 1618 /** 1619 A variable controlling whether the HIDAPI driver for XBox 360 controllers 1620 should be used. 1621 1622 The variable can be set to the following values: 1623 - $(D "0"): HIDAPI driver is not used. 1624 - $(D "1"): HIDAPI driver is used. 1625 1626 The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX 1627 1628 This hint should be set before initializing joysticks and gamepads. 1629 */ 1630 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 = "SDL_JOYSTICK_HIDAPI_XBOX_360"; 1631 1632 /** 1633 A variable controlling whether the player LEDs should be lit to indicate 1634 which player is associated with an Xbox 360 controller. 1635 1636 The variable can be set to the following values: 1637 - $(D "0"): Player LEDs are not enabled. 1638 - $(D "1"): Player LEDs are enabled. (default) 1639 1640 This hint can be set anytime. 1641 */ 1642 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED = "SDL_JOYSTICK_HIDAPI_XBOX_360_PLAYER_LED"; 1643 1644 /** 1645 A variable controlling whether the HIDAPI driver for XBox 360 wireless 1646 controllers should be used. 1647 1648 The variable can be set to the following values: 1649 - $(D "0"): HIDAPI driver is not used. 1650 - $(D "1"): HIDAPI driver is used. 1651 1652 The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_360 1653 1654 This hint should be set before initializing joysticks and gamepads. 1655 */ 1656 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX_360_WIRELESS = "SDL_JOYSTICK_HIDAPI_XBOX_360_WIRELESS"; 1657 1658 /** 1659 A variable controlling whether the HIDAPI driver for XBox One controllers 1660 should be used. 1661 1662 The variable can be set to the following values: 1663 - $(D "0"): HIDAPI driver is not used. 1664 - $(D "1"): HIDAPI driver is used. 1665 1666 The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX. 1667 1668 This hint should be set before initializing joysticks and gamepads. 1669 */ 1670 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE = "SDL_JOYSTICK_HIDAPI_XBOX_ONE"; 1671 1672 /** 1673 A variable controlling whether the Home button LED should be turned on when 1674 an Xbox One controller is opened. 1675 1676 The variable can be set to the following values: 1677 - $(D "0"): Home button LED is turned off. 1678 - $(D "1"): Home button LED is turned on. 1679 1680 By default the Home button LED state is not changed. This hint can also be 1681 set to a floating point value between 0.0 and 1.0 which controls the 1682 brightness of the Home button LED. The default brightness is 0.4. 1683 1684 This hint can be set anytime. 1685 */ 1686 enum SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED = "SDL_JOYSTICK_HIDAPI_XBOX_ONE_HOME_LED"; 1687 1688 /** 1689 A variable controlling whether the new HIDAPI driver for wired Xbox One 1690 (GIP) controllers should be used. 1691 1692 The variable can be set to the following values: 1693 - $(D "0"): HIDAPI driver is not used. 1694 - $(D "1"): HIDAPI driver is used. 1695 1696 The default is the value of SDL_HINT_JOYSTICK_HIDAPI_XBOX_ONE. 1697 1698 This hint should be set before initializing joysticks and gamepads. 1699 1700 \since This hint is available since SDL 3.4.0. 1701 */ 1702 enum SDL_HINT_JOYSTICK_HIDAPI_GIP = "SDL_JOYSTICK_HIDAPI_GIP"; 1703 1704 /** 1705 A variable controlling whether the new HIDAPI driver for wired Xbox One 1706 (GIP) controllers should reset the controller if it can't get the metadata 1707 from the controller. 1708 1709 The variable can be set to the following values: 1710 - $(D "0"): Assume this is a generic controller. 1711 - $(D "1"): Reset the controller to get metadata. 1712 1713 By default the controller is not reset. 1714 1715 This hint should be set before initializing joysticks and gamepads. 1716 1717 \since This hint is available since SDL 3.4.0. 1718 */ 1719 enum SDL_HINT_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA = "SDL_JOYSTICK_HIDAPI_GIP_RESET_FOR_METADATA"; 1720 1721 /** 1722 A variable controlling whether IOKit should be used for controller 1723 handling. 1724 1725 The variable can be set to the following values: 1726 - $(D "0"): IOKit is not used. 1727 - $(D "1"): IOKit is used. (default) 1728 1729 This hint should be set before SDL is initialized. 1730 */ 1731 enum SDL_HINT_JOYSTICK_IOKIT = "SDL_JOYSTICK_IOKIT"; 1732 1733 /** 1734 A variable controlling whether to use the classic /dev/input/js* joystick 1735 interface or the newer /dev/input/event* joystick interface on Linux. 1736 1737 The variable can be set to the following values: 1738 - $(D "0"): Use /dev/input/event* (default) 1739 - $(D "1"): Use /dev/input/js* 1740 1741 This hint should be set before SDL is initialized. 1742 */ 1743 enum SDL_HINT_JOYSTICK_LINUX_CLASSIC = "SDL_JOYSTICK_LINUX_CLASSIC"; 1744 1745 /** 1746 A variable controlling whether joysticks on Linux adhere to their 1747 HID-defined deadzones or return unfiltered values. 1748 1749 The variable can be set to the following values: 1750 - $(D "0"): Return unfiltered joystick axis values. (default) 1751 - $(D "1"): Return axis values with deadzones taken into account. 1752 1753 This hint should be set before a controller is opened. 1754 */ 1755 enum SDL_HINT_JOYSTICK_LINUX_DEADZONES = "SDL_JOYSTICK_LINUX_DEADZONES"; 1756 1757 /** 1758 A variable controlling whether joysticks on Linux will always treat 'hat' 1759 axis inputs (ABS_HAT0X - ABS_HAT3Y) as 8-way digital hats without checking 1760 whether they may be analog. 1761 1762 The variable can be set to the following values: 1763 - $(D "0"): Only map hat axis inputs to digital hat outputs if the input axes 1764 appear to actually be digital. (default) 1765 - $(D "1"): Always handle the input axes numbered ABS_HAT0X to ABS_HAT3Y as 1766 digital hats. 1767 1768 This hint should be set before a controller is opened. 1769 */ 1770 enum SDL_HINT_JOYSTICK_LINUX_DIGITAL_HATS = "SDL_JOYSTICK_LINUX_DIGITAL_HATS"; 1771 1772 /** 1773 A variable controlling whether digital hats on Linux will apply deadzones 1774 to their underlying input axes or use unfiltered values. 1775 1776 The variable can be set to the following values: 1777 - $(D "0"): Return digital hat values based on unfiltered input axis values. 1778 - $(D "1"): Return digital hat values with deadzones on the input axes taken 1779 into account. (default) 1780 1781 This hint should be set before a controller is opened. 1782 */ 1783 enum SDL_HINT_JOYSTICK_LINUX_HAT_DEADZONES = "SDL_JOYSTICK_LINUX_HAT_DEADZONES"; 1784 1785 /** 1786 A variable controlling whether GCController should be used for controller 1787 handling. 1788 1789 The variable can be set to the following values: 1790 - $(D "0"): GCController is not used. 1791 - $(D "1"): GCController is used. (default) 1792 1793 This hint should be set before SDL is initialized. 1794 */ 1795 enum SDL_HINT_JOYSTICK_MFI = "SDL_JOYSTICK_MFI"; 1796 1797 /** 1798 A variable controlling whether the RAWINPUT joystick drivers should be used 1799 for better handling XInput-capable devices. 1800 1801 The variable can be set to the following values: 1802 - $(D "0"): RAWINPUT drivers are not used. (default) 1803 - $(D "1"): RAWINPUT drivers are used. 1804 1805 This hint should be set before SDL is initialized. 1806 */ 1807 enum SDL_HINT_JOYSTICK_RAWINPUT = "SDL_JOYSTICK_RAWINPUT"; 1808 1809 /** 1810 A variable controlling whether the RAWINPUT driver should pull correlated 1811 data from XInput. 1812 1813 The variable can be set to the following values: 1814 - $(D "0"): RAWINPUT driver will only use data from raw input APIs. 1815 - $(D "1"): RAWINPUT driver will also pull data from XInput and 1816 Windows.Gaming.Input, providing better trigger axes, guide button 1817 presses, and rumble support for Xbox controllers. (default) 1818 1819 This hint should be set before a gamepad is opened. 1820 */ 1821 enum SDL_HINT_JOYSTICK_RAWINPUT_CORRELATE_XINPUT = "SDL_JOYSTICK_RAWINPUT_CORRELATE_XINPUT"; 1822 1823 /** 1824 A variable controlling whether the ROG Chakram mice should show up as 1825 joysticks. 1826 1827 The variable can be set to the following values: 1828 - $(D "0"): ROG Chakram mice do not show up as joysticks. (default) 1829 - $(D "1"): ROG Chakram mice show up as joysticks. 1830 1831 This hint should be set before SDL is initialized. 1832 */ 1833 enum SDL_HINT_JOYSTICK_ROG_CHAKRAM = "SDL_JOYSTICK_ROG_CHAKRAM"; 1834 1835 /** 1836 A variable controlling whether a separate thread should be used for 1837 handling joystick detection and raw input messages on Windows. 1838 1839 The variable can be set to the following values: 1840 - $(D "0"): A separate thread is not used. 1841 - $(D "1"): A separate thread is used for handling raw input messages. (default) 1842 1843 This hint should be set before SDL is initialized. 1844 */ 1845 enum SDL_HINT_JOYSTICK_THREAD = "SDL_JOYSTICK_THREAD"; 1846 1847 /** 1848 A variable containing a list of throttle style controllers. 1849 1850 The format of the string is a comma separated list of USB VID/PID pairs in 1851 hexadecimal form, e.g. 1852 1853 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1854 1855 The variable can also take the form of "@file", in which case the named 1856 file will be loaded and interpreted as the value of the variable. 1857 1858 This hint can be set anytime. 1859 */ 1860 enum SDL_HINT_JOYSTICK_THROTTLE_DEVICES = "SDL_JOYSTICK_THROTTLE_DEVICES"; 1861 1862 /** 1863 A variable containing a list of devices that are not throttle style 1864 controllers. 1865 1866 This will override SDL_HINT_JOYSTICK_THROTTLE_DEVICES and the built in 1867 device list. 1868 1869 The format of the string is a comma separated list of USB VID/PID pairs in 1870 hexadecimal form, e.g. 1871 1872 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1873 1874 The variable can also take the form of "@file", in which case the named 1875 file will be loaded and interpreted as the value of the variable. 1876 1877 This hint can be set anytime. 1878 */ 1879 enum SDL_HINT_JOYSTICK_THROTTLE_DEVICES_EXCLUDED = "SDL_JOYSTICK_THROTTLE_DEVICES_EXCLUDED"; 1880 1881 /** 1882 A variable controlling whether Windows.Gaming.Input should be used for 1883 controller handling. 1884 1885 The variable can be set to the following values: 1886 - $(D "0"): WGI is not used. 1887 - $(D "1"): WGI is used. (default) 1888 1889 This hint should be set before SDL is initialized. 1890 */ 1891 enum SDL_HINT_JOYSTICK_WGI = "SDL_JOYSTICK_WGI"; 1892 1893 /** 1894 A variable containing a list of wheel style controllers. 1895 1896 The format of the string is a comma separated list of USB VID/PID pairs in 1897 hexadecimal form, e.g. 1898 1899 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1900 1901 The variable can also take the form of "@file", in which case the named 1902 file will be loaded and interpreted as the value of the variable. 1903 1904 This hint can be set anytime. 1905 */ 1906 enum SDL_HINT_JOYSTICK_WHEEL_DEVICES = "SDL_JOYSTICK_WHEEL_DEVICES"; 1907 1908 /** 1909 A variable containing a list of devices that are not wheel style 1910 controllers. 1911 1912 This will override SDL_HINT_JOYSTICK_WHEEL_DEVICES and the built in device 1913 list. 1914 1915 The format of the string is a comma separated list of USB VID/PID pairs in 1916 hexadecimal form, e.g. 1917 1918 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1919 1920 The variable can also take the form of "@file", in which case the named 1921 file will be loaded and interpreted as the value of the variable. 1922 1923 This hint can be set anytime. 1924 */ 1925 enum SDL_HINT_JOYSTICK_WHEEL_DEVICES_EXCLUDED = "SDL_JOYSTICK_WHEEL_DEVICES_EXCLUDED"; 1926 1927 /** 1928 A variable containing a list of devices known to have all axes centered at 1929 zero. 1930 1931 The format of the string is a comma separated list of USB VID/PID pairs in 1932 hexadecimal form, e.g. 1933 1934 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 1935 1936 The variable can also take the form of "@file", in which case the named 1937 file will be loaded and interpreted as the value of the variable. 1938 1939 This hint should be set before a controller is opened. 1940 */ 1941 enum SDL_HINT_JOYSTICK_ZERO_CENTERED_DEVICES = "SDL_JOYSTICK_ZERO_CENTERED_DEVICES"; 1942 1943 /** 1944 A variable containing a list of devices and their desired number of haptic 1945 (force feedback) enabled axis. 1946 1947 The format of the string is a comma separated list of USB VID/PID pairs in 1948 hexadecimal form plus the number of desired axes, e.g. 1949 1950 `0xAAAA/0xBBBB/1,0xCCCC/0xDDDD/3` 1951 1952 This hint supports a "wildcard" device that will set the number of haptic 1953 axes on all initialized haptic devices which were not defined explicitly in 1954 this hint. 1955 1956 `0xFFFF/0xFFFF/1` 1957 1958 This hint should be set before a controller is opened. The number of haptic 1959 axes won't exceed the number of real axes found on the device. 1960 1961 \since This hint is available since SDL 3.2.5. 1962 */ 1963 enum SDL_HINT_JOYSTICK_HAPTIC_AXES = "SDL_JOYSTICK_HAPTIC_AXES"; 1964 1965 /** 1966 A variable that controls keycode representation in keyboard events. 1967 1968 This variable is a comma separated set of options for translating keycodes 1969 in events: 1970 1971 - $(D "none"): Keycode options are cleared, this overrides other options. 1972 - $(D "hide_numpad"): The numpad keysyms will be translated into their 1973 non-numpad versions based on the current NumLock state. For example, 1974 SDLK_KP_4 would become SDLK_4 if SDL_KMOD_NUM is set in the event 1975 modifiers, and SDLK_LEFT if it is unset. 1976 - $(D "french_numbers"): The number row on French keyboards is inverted, so 1977 pressing the 1 key would yield the keycode SDLK_1, or '1', instead of 1978 SDLK_AMPERSAND, or '&' 1979 - $(D "latin_letters"): For keyboards using non-Latin letters, such as Russian 1980 or Thai, the letter keys generate keycodes as though it had an en_US 1981 layout. e.g. pressing the key associated with SDL_SCANCODE_A on a Russian 1982 keyboard would yield 'a' instead of a Cyrillic letter. 1983 1984 The default value for this hint is "french_numbers,latin_letters" 1985 1986 Some platforms like Emscripten only provide modified keycodes and the 1987 options are not used. 1988 1989 These options do not affect the return value of SDL_GetKeyFromScancode() or 1990 SDL_GetScancodeFromKey(), they just apply to the keycode included in key 1991 events. 1992 1993 This hint can be set anytime. 1994 */ 1995 enum SDL_HINT_KEYCODE_OPTIONS = "SDL_KEYCODE_OPTIONS"; 1996 1997 /** 1998 A variable that controls what KMSDRM device to use. 1999 2000 SDL might open something like "/dev/dri/cardNN" to access KMSDRM 2001 functionality, where "NN" is a device index number. SDL makes a guess at 2002 the best index to use (usually zero), but the app or user can set this hint 2003 to a number between 0 and 99 to force selection. 2004 2005 This hint should be set before SDL is initialized. 2006 */ 2007 enum SDL_HINT_KMSDRM_DEVICE_INDEX = "SDL_KMSDRM_DEVICE_INDEX"; 2008 2009 /** 2010 A variable that controls whether SDL requires DRM master access in order to 2011 initialize the KMSDRM video backend. 2012 2013 The DRM subsystem has a concept of a "DRM master" which is a DRM client 2014 that has the ability to set planes, set cursor, etc. When SDL is DRM 2015 master, it can draw to the screen using the SDL rendering APIs. Without DRM 2016 master, SDL is still able to process input and query attributes of attached 2017 displays, but it cannot change display state or draw to the screen 2018 directly. 2019 2020 In some cases, it can be useful to have the KMSDRM backend even if it 2021 cannot be used for rendering. An app may want to use SDL for input 2022 processing while using another rendering API (such as an MMAL overlay on 2023 Raspberry Pi) or using its own code to render to DRM overlays that SDL 2024 doesn't support. 2025 2026 The variable can be set to the following values: 2027 - $(D "0"): SDL will allow usage of the KMSDRM backend without DRM master. 2028 - $(D "1"): SDL Will require DRM master to use the KMSDRM backend. (default) 2029 2030 This hint should be set before SDL is initialized. 2031 */ 2032 enum SDL_HINT_KMSDRM_REQUIRE_DRM_MASTER = "SDL_KMSDRM_REQUIRE_DRM_MASTER"; 2033 2034 /** 2035 A variable controlling the default SDL log levels. 2036 2037 This variable is a comma separated set of category=level tokens that define 2038 the default logging levels for SDL applications. 2039 2040 The category can be a numeric category, one of "app", "error", "assert", 2041 "system", "audio", "video", "render", "input", "test", or `*` for any 2042 unspecified category. 2043 2044 The level can be a numeric level, one of "verbose", "debug", "info", 2045 "warn", "error", "critical", or "quiet" to disable that category. 2046 2047 You can omit the category if you want to set the logging level for all 2048 categories. 2049 2050 If this hint isn't set, the default log levels are equivalent to: 2051 2052 `app=info,assert=warn,test=verbose,*=error` 2053 2054 This hint can be set anytime. 2055 */ 2056 enum SDL_HINT_LOGGING = "SDL_LOGGING"; 2057 2058 /** 2059 A variable controlling whether to force the application to become the 2060 foreground process when launched on macOS. 2061 2062 The variable can be set to the following values: 2063 - $(D "0"): The application is brought to the foreground when launched. 2064 (default) 2065 - $(D "1"): The application may remain in the background when launched. 2066 2067 This hint needs to be set before SDL_Init(). 2068 */ 2069 enum SDL_HINT_MAC_BACKGROUND_APP = "SDL_MAC_BACKGROUND_APP"; 2070 2071 /** 2072 A variable that determines whether Ctrl+Click should generate a right-click 2073 event on macOS. 2074 2075 The variable can be set to the following values: 2076 - $(D "0"): Ctrl+Click does not generate a right mouse button click event. 2077 (default) 2078 - $(D "1"): Ctrl+Click generated a right mouse button click event. 2079 2080 This hint can be set anytime. 2081 */ 2082 enum SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK = "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"; 2083 2084 /** 2085 A variable controlling whether dispatching OpenGL context updates should 2086 block the dispatching thread until the main thread finishes processing on 2087 macOS. 2088 2089 The variable can be set to the following values: 2090 - $(D "0"): Dispatching OpenGL context updates will block the dispatching thread 2091 until the main thread finishes processing. (default) 2092 - $(D "1"): Dispatching OpenGL context updates will allow the dispatching thread 2093 to continue execution. 2094 2095 Generally you want the default, but if you have OpenGL code in a background 2096 thread on a Mac, and the main thread hangs because it's waiting for that 2097 background thread, but that background thread is also hanging because it's 2098 waiting for the main thread to do an update, this might fix your issue. 2099 2100 This hint can be set anytime. 2101 */ 2102 enum SDL_HINT_MAC_OPENGL_ASYNC_DISPATCH = "SDL_MAC_OPENGL_ASYNC_DISPATCH"; 2103 2104 /** 2105 A variable controlling whether the Option key on macOS should be remapped 2106 to act as the Alt key. 2107 2108 The variable can be set to the following values: 2109 - $(D "none"): The Option key is not remapped to Alt. (default) 2110 - $(D "only_left"): Only the left Option key is remapped to Alt. 2111 - $(D "only_right"): Only the right Option key is remapped to Alt. 2112 - $(D "both"): Both Option keys are remapped to Alt. 2113 2114 This will prevent the triggering of key compositions that rely on the 2115 Option key, but will still send the Alt modifier for keyboard events. In 2116 the case that both Alt and Option are pressed, the Option key will be 2117 ignored. This is particularly useful for applications like terminal 2118 emulators and graphical user interfaces (GUIs) that rely on Alt key 2119 functionality for shortcuts or navigation. This does not apply to 2120 SDL_GetKeyFromScancode and only has an effect if IME is enabled. 2121 2122 This hint can be set anytime. 2123 */ 2124 enum SDL_HINT_MAC_OPTION_AS_ALT = "SDL_MAC_OPTION_AS_ALT"; 2125 2126 /** 2127 A variable controlling whether SDL_EVENT_MOUSE_WHEEL event values will have 2128 momentum on macOS. 2129 2130 The variable can be set to the following values: 2131 - $(D "0"): The mouse wheel events will have no momentum. (default) 2132 - $(D "1"): The mouse wheel events will have momentum. 2133 2134 This hint needs to be set before SDL_Init(). 2135 */ 2136 enum SDL_HINT_MAC_SCROLL_MOMENTUM = "SDL_MAC_SCROLL_MOMENTUM"; 2137 2138 /** 2139 Request SDL_AppIterate() be called at a specific rate. 2140 2141 If this is set to a number, it represents Hz, so "60" means try to iterate 2142 60 times per second. "0" means to iterate as fast as possible. Negative 2143 values are illegal, but reserved, in case they are useful in a future 2144 revision of SDL. 2145 2146 There are other strings that have special meaning. If set to "waitevent", 2147 SDL_AppIterate will not be called until new event(s) have arrived (and been 2148 processed by SDL_AppEvent). This can be useful for apps that are completely 2149 idle except in response to input. 2150 2151 On some platforms, or if you are using SDL_main instead of SDL_AppIterate, 2152 this hint is ignored. When the hint can be used, it is allowed to be 2153 changed at any time. 2154 2155 This defaults to 0, and specifying NULL for the hint's value will restore 2156 the default. 2157 2158 This hint can be set anytime. 2159 */ 2160 enum SDL_HINT_MAIN_CALLBACK_RATE = "SDL_MAIN_CALLBACK_RATE"; 2161 2162 /** 2163 A variable controlling whether the mouse is captured while mouse buttons 2164 are pressed. 2165 2166 The variable can be set to the following values: 2167 - $(D "0"): The mouse is not captured while mouse buttons are pressed. 2168 - $(D "1"): The mouse is captured while mouse buttons are pressed. 2169 2170 By default the mouse is captured while mouse buttons are pressed so if the 2171 mouse is dragged outside the window, the application continues to receive 2172 mouse events until the button is released. 2173 2174 This hint can be set anytime. 2175 */ 2176 enum SDL_HINT_MOUSE_AUTO_CAPTURE = "SDL_MOUSE_AUTO_CAPTURE"; 2177 2178 /** 2179 A variable setting the double click radius, in pixels. 2180 2181 This hint can be set anytime. 2182 */ 2183 enum SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS = "SDL_MOUSE_DOUBLE_CLICK_RADIUS"; 2184 2185 /** 2186 A variable setting the double click time, in milliseconds. 2187 2188 This hint can be set anytime. 2189 */ 2190 enum SDL_HINT_MOUSE_DOUBLE_CLICK_TIME = "SDL_MOUSE_DOUBLE_CLICK_TIME"; 2191 2192 /** 2193 A variable setting which system cursor to use as the default cursor. 2194 2195 This should be an integer corresponding to the SDL_SystemCursor enum. The 2196 default value is zero (SDL_SYSTEM_CURSOR_DEFAULT). 2197 2198 This hint needs to be set before SDL_Init(). 2199 */ 2200 enum SDL_HINT_MOUSE_DEFAULT_SYSTEM_CURSOR = "SDL_MOUSE_DEFAULT_SYSTEM_CURSOR"; 2201 2202 /** 2203 A variable controlling whether warping a hidden mouse cursor will activate 2204 relative mouse mode. 2205 2206 When this hint is set, the mouse cursor is hidden, and multiple warps to 2207 the window center occur within a short time period, SDL will emulate mouse 2208 warps using relative mouse mode. This can provide smoother and more 2209 reliable mouse motion for some older games, which continuously calculate 2210 the distance travelled by the mouse pointer and warp it back to the center 2211 of the window, rather than using relative mouse motion. 2212 2213 Note that relative mouse mode may have different mouse acceleration 2214 behavior than pointer warps. 2215 2216 If your application needs to repeatedly warp the hidden mouse cursor at a 2217 high-frequency for other purposes, it should disable this hint. 2218 2219 The variable can be set to the following values: 2220 - $(D "0"): Attempts to warp the mouse will always be made. 2221 - $(D "1"): Some mouse warps will be emulated by forcing relative mouse mode. 2222 (default) 2223 2224 If not set, this is automatically enabled unless an application uses 2225 relative mouse mode directly. 2226 2227 This hint can be set anytime. 2228 */ 2229 enum SDL_HINT_MOUSE_EMULATE_WARP_WITH_RELATIVE = "SDL_MOUSE_EMULATE_WARP_WITH_RELATIVE"; 2230 2231 /** 2232 Allow mouse click events when clicking to focus an SDL window. 2233 2234 The variable can be set to the following values: 2235 - $(D "0"): Ignore mouse clicks that activate a window. (default) 2236 - $(D "1"): Generate events for mouse clicks that activate a window. 2237 2238 This hint can be set anytime. 2239 */ 2240 enum SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH = "SDL_MOUSE_FOCUS_CLICKTHROUGH"; 2241 2242 /** 2243 A variable setting the speed scale for mouse motion, in floating point, 2244 when the mouse is not in relative mode. 2245 2246 This hint can be set anytime. 2247 */ 2248 enum SDL_HINT_MOUSE_NORMAL_SPEED_SCALE = "SDL_MOUSE_NORMAL_SPEED_SCALE"; 2249 2250 /** 2251 A variable controlling whether relative mouse mode constrains the mouse to 2252 the center of the window. 2253 2254 Constraining to the center of the window works better for FPS games and 2255 when the application is running over RDP. Constraining to the whole window 2256 works better for 2D games and increases the chance that the mouse will be 2257 in the correct position when using high DPI mice. 2258 2259 The variable can be set to the following values: 2260 - $(D "0"): Relative mouse mode constrains the mouse to the window. 2261 - $(D "1"): Relative mouse mode constrains the mouse to the center of the 2262 window. (default) 2263 2264 This hint can be set anytime. 2265 */ 2266 enum SDL_HINT_MOUSE_RELATIVE_MODE_CENTER = "SDL_MOUSE_RELATIVE_MODE_CENTER"; 2267 2268 /** 2269 A variable setting the scale for mouse motion, in floating point, when the 2270 mouse is in relative mode. 2271 2272 This hint can be set anytime. 2273 */ 2274 enum SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE = "SDL_MOUSE_RELATIVE_SPEED_SCALE"; 2275 2276 /** 2277 A variable controlling whether the system mouse acceleration curve is used 2278 for relative mouse motion. 2279 2280 The variable can be set to the following values: 2281 - $(D "0"): Relative mouse motion will be unscaled. (default) 2282 - $(D "1"): Relative mouse motion will be scaled using the system mouse 2283 acceleration curve. 2284 2285 If SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE is set, that will be applied after 2286 system speed scale. 2287 2288 This hint can be set anytime. 2289 */ 2290 enum SDL_HINT_MOUSE_RELATIVE_SYSTEM_SCALE = "SDL_MOUSE_RELATIVE_SYSTEM_SCALE"; 2291 2292 /** 2293 A variable controlling whether a motion event should be generated for mouse 2294 warping in relative mode. 2295 2296 The variable can be set to the following values: 2297 - $(D "0"): Warping the mouse will not generate a motion event in relative mode 2298 - $(D "1"): Warping the mouse will generate a motion event in relative mode 2299 2300 By default warping the mouse will not generate motion events in relative 2301 mode. This avoids the application having to filter out large relative 2302 motion due to warping. 2303 2304 This hint can be set anytime. 2305 */ 2306 enum SDL_HINT_MOUSE_RELATIVE_WARP_MOTION = "SDL_MOUSE_RELATIVE_WARP_MOTION"; 2307 2308 /** 2309 A variable controlling whether the hardware cursor stays visible when 2310 relative mode is active. 2311 2312 This variable can be set to the following values: 2313 - $(D "0"): The cursor will be hidden while relative mode is active (default) 2314 - $(D "1"): The cursor will remain visible while relative mode is active 2315 2316 Note that for systems without raw hardware inputs, relative mode is 2317 implemented using warping, so the hardware cursor will visibly warp between 2318 frames if this is enabled on those systems. 2319 2320 This hint can be set anytime. 2321 */ 2322 enum SDL_HINT_MOUSE_RELATIVE_CURSOR_VISIBLE = "SDL_MOUSE_RELATIVE_CURSOR_VISIBLE"; 2323 2324 /** 2325 A variable controlling whether mouse events should generate synthetic touch 2326 events. 2327 2328 The variable can be set to the following values: 2329 - $(D "0"): Mouse events will not generate touch events. 2330 (default for desktop platforms) 2331 - $(D "1"): Mouse events will generate touch events. 2332 (default for mobile platforms, such as Android and iOS) 2333 2334 This hint can be set anytime. 2335 */ 2336 enum SDL_HINT_MOUSE_TOUCH_EVENTS = "SDL_MOUSE_TOUCH_EVENTS"; 2337 2338 /** 2339 A variable controlling whether the keyboard should be muted on the console. 2340 2341 Normally the keyboard is muted while SDL applications are running so that 2342 keyboard input doesn't show up as key strokes on the console. This hint 2343 allows you to turn that off for debugging purposes. 2344 2345 The variable can be set to the following values: 2346 - $(D "0"): Allow keystrokes to go through to the console. 2347 - $(D "1"): Mute keyboard input so it doesn't show up on the console. (default) 2348 2349 This hint should be set before SDL is initialized. 2350 */ 2351 enum SDL_HINT_MUTE_CONSOLE_KEYBOARD = "SDL_MUTE_CONSOLE_KEYBOARD"; 2352 2353 /** 2354 Tell SDL not to catch the SIGINT or SIGTERM signals on POSIX platforms. 2355 2356 The variable can be set to the following values: 2357 - $(D "0"): SDL will install a SIGINT and SIGTERM handler, and when it catches a 2358 signal, convert it into an SDL_EVENT_QUIT event. (default) 2359 - $(D "1"): SDL will not install a signal handler at all. 2360 2361 This hint should be set before SDL is initialized. 2362 */ 2363 enum SDL_HINT_NO_SIGNAL_HANDLERS = "SDL_NO_SIGNAL_HANDLERS"; 2364 2365 /** 2366 Specify the OpenGL library to load. 2367 2368 This hint should be set before creating an OpenGL window or creating an 2369 OpenGL context. If this hint isn't set, SDL will choose a reasonable 2370 default. 2371 */ 2372 enum SDL_HINT_OPENGL_LIBRARY = "SDL_OPENGL_LIBRARY"; 2373 2374 /** 2375 Specify the EGL library to load. 2376 2377 This hint should be set before creating an OpenGL window or creating an 2378 OpenGL context. This hint is only considered if SDL is using EGL to manage 2379 OpenGL contexts. If this hint isn't set, SDL will choose a reasonable 2380 default. 2381 */ 2382 enum SDL_HINT_EGL_LIBRARY = "SDL_EGL_LIBRARY"; 2383 2384 /** 2385 A variable controlling what driver to use for OpenGL ES contexts. 2386 2387 On some platforms, currently Windows and X11, OpenGL drivers may support 2388 creating contexts with an OpenGL ES profile. By default SDL uses these 2389 profiles, when available, otherwise it attempts to load an OpenGL ES 2390 library, e.g. that provided by the ANGLE project. This variable controls 2391 whether SDL follows this default behaviour or will always load an OpenGL ES 2392 library. 2393 2394 Circumstances where this is useful include - Testing an app with a 2395 particular OpenGL ES implementation, e.g ANGLE, or emulator, e.g. those 2396 from ARM, Imagination or Qualcomm. - Resolving OpenGL ES function addresses 2397 at link time by linking with the OpenGL ES library instead of querying them 2398 at run time with SDL_GL_GetProcAddress(). 2399 2400 Caution: for an application to work with the default behaviour across 2401 different OpenGL drivers it must query the OpenGL ES function addresses at 2402 run time using SDL_GL_GetProcAddress(). 2403 2404 This variable is ignored on most platforms because OpenGL ES is native or 2405 not supported. 2406 2407 The variable can be set to the following values: 2408 - $(D "0"): Use ES profile of OpenGL, if available. (default) 2409 - $(D "1"): Load OpenGL ES library using the default library names. 2410 2411 This hint should be set before SDL is initialized. 2412 */ 2413 enum SDL_HINT_OPENGL_ES_DRIVER = "SDL_OPENGL_ES_DRIVER"; 2414 2415 /** 2416 Mechanism to specify openvr_api library location 2417 2418 By default, when using the OpenVR driver, it will search for the API 2419 library in the current folder. But, if you wish to use a system API you can 2420 specify that by using this hint. This should be the full or relative path 2421 to a .dll on Windows or .so on Linux. 2422 */ 2423 enum SDL_HINT_OPENVR_LIBRARY = "SDL_OPENVR_LIBRARY"; 2424 2425 /** 2426 A variable controlling which orientations are allowed on iOS/Android. 2427 2428 In some circumstances it is necessary to be able to explicitly control 2429 which UI orientations are allowed. 2430 2431 This variable is a space delimited list of the following values: 2432 - "LandscapeLeft" 2433 - "LandscapeRight" 2434 - "Portrait" 2435 - "PortraitUpsideDown" 2436 2437 This hint should be set before SDL is initialized. 2438 */ 2439 enum SDL_HINT_ORIENTATIONS = "SDL_ORIENTATIONS"; 2440 2441 /** 2442 A variable controlling the use of a sentinel event when polling the event 2443 queue. 2444 2445 When polling for events, SDL_PumpEvents is used to gather new events from 2446 devices. If a device keeps producing new events between calls to 2447 SDL_PumpEvents, a poll loop will become stuck until the new events stop. 2448 This is most noticeable when moving a high frequency mouse. 2449 2450 The variable can be set to the following values: 2451 - $(D "0"): Disable poll sentinels. 2452 - $(D "1"): Enable poll sentinels. (default) 2453 2454 This hint can be set anytime. 2455 */ 2456 enum SDL_HINT_POLL_SENTINEL = "SDL_POLL_SENTINEL"; 2457 2458 /** 2459 Override for SDL_GetPreferredLocales(). 2460 2461 If set, this will be favored over anything the OS might report for the 2462 user's preferred locales. Changing this hint at runtime will not generate a 2463 SDL_EVENT_LOCALE_CHANGED event (but if you can change the hint, you can 2464 push your own event, if you want). 2465 2466 The format of this hint is a comma-separated list of language and locale, 2467 combined with an underscore, as is a common format: "en_GB". Locale is 2468 optional: "en". So you might have a list like this: "en_GB,jp,es_PT" 2469 2470 This hint can be set anytime. 2471 */ 2472 enum SDL_HINT_PREFERRED_LOCALES = "SDL_PREFERRED_LOCALES"; 2473 2474 /** 2475 A variable that decides whether to send SDL_EVENT_QUIT when closing the 2476 last window. 2477 2478 The variable can be set to the following values: 2479 - $(D "0"): SDL will not send an SDL_EVENT_QUIT event when the last window is 2480 requesting to close. Note that in this case, there are still other 2481 legitimate reasons one might get an SDL_EVENT_QUIT event: choosing "Quit" 2482 from the macOS menu bar, sending a SIGINT (ctrl-c) on Unix, etc. 2483 - $(D "1"): SDL will send a quit event when the last window is requesting to 2484 close. (default) 2485 2486 If there is at least one active system tray icon, SDL_EVENT_QUIT will 2487 instead be sent when both the last window will be closed and the last tray 2488 icon will be destroyed. 2489 2490 This hint can be set anytime. 2491 */ 2492 enum SDL_HINT_QUIT_ON_LAST_WINDOW_CLOSE = "SDL_QUIT_ON_LAST_WINDOW_CLOSE"; 2493 2494 /** 2495 A variable controlling whether the Direct3D device is initialized for 2496 thread-safe operations. 2497 2498 The variable can be set to the following values: 2499 - $(D "0"): Thread-safety is not enabled. (default) 2500 - $(D "1"): Thread-safety is enabled. 2501 2502 This hint should be set before creating a renderer. 2503 */ 2504 enum SDL_HINT_RENDER_DIRECT3D_THREADSAFE = "SDL_RENDER_DIRECT3D_THREADSAFE"; 2505 2506 /** 2507 A variable controlling whether to enable Direct3D 11+'s Debug Layer. 2508 2509 This variable does not have any effect on the Direct3D 9 based renderer. 2510 2511 The variable can be set to the following values: 2512 - $(D "0"): Disable Debug Layer use. (default) 2513 - $(D "1"): Enable Debug Layer use. 2514 2515 This hint should be set before creating a renderer. 2516 */ 2517 enum SDL_HINT_RENDER_DIRECT3D11_DEBUG = "SDL_RENDER_DIRECT3D11_DEBUG"; 2518 2519 /** 2520 A variable controlling whether to enable Vulkan Validation Layers. 2521 2522 This variable can be set to the following values: 2523 - $(D "0"): Disable Validation Layer use 2524 - $(D "1"): Enable Validation Layer use 2525 2526 By default, SDL does not use Vulkan Validation Layers. 2527 */ 2528 enum SDL_HINT_RENDER_VULKAN_DEBUG = "SDL_RENDER_VULKAN_DEBUG"; 2529 2530 /** 2531 A variable controlling whether to create the GPU device in debug mode. 2532 2533 This variable can be set to the following values: 2534 - $(D "0"): Disable debug mode use (default) 2535 - $(D "1"): Enable debug mode use 2536 2537 This hint should be set before creating a renderer. 2538 */ 2539 enum SDL_HINT_RENDER_GPU_DEBUG = "SDL_RENDER_GPU_DEBUG"; 2540 2541 /** 2542 A variable controlling whether to prefer a low-power GPU on multi-GPU 2543 systems. 2544 2545 This variable can be set to the following values: 2546 - $(D "0"): Prefer high-performance GPU (default) 2547 - $(D "1"): Prefer low-power GPU 2548 2549 This hint should be set before creating a renderer. 2550 */ 2551 enum SDL_HINT_RENDER_GPU_LOW_POWER = "SDL_RENDER_GPU_LOW_POWER"; 2552 2553 /** 2554 A variable specifying which render driver to use. 2555 2556 If the application doesn't pick a specific renderer to use, this variable 2557 specifies the name of the preferred renderer. If the preferred renderer 2558 can't be initialized, creating a renderer will fail. 2559 2560 This variable is case insensitive and can be set to the following values: 2561 - "direct3d" 2562 - "direct3d11" 2563 - "direct3d12" 2564 - "opengl" 2565 - "opengles2" 2566 - "opengles" 2567 - "metal" 2568 - "vulkan" 2569 - "gpu" 2570 - "software" 2571 2572 This hint accepts a comma-separated list of driver names, and each will be 2573 tried in the order listed when creating a renderer until one succeeds or 2574 all of them fail. 2575 2576 The default varies by platform, but it's the first one in the list that is 2577 available on the current platform. 2578 2579 This hint should be set before creating a renderer. 2580 */ 2581 enum SDL_HINT_RENDER_DRIVER = "SDL_RENDER_DRIVER"; 2582 2583 /** 2584 A variable controlling how the 2D render API renders lines. 2585 2586 The variable can be set to the following values: 2587 - $(D "0"): Use the default line drawing method (Bresenham's line algorithm) 2588 - $(D "1"): Use the driver point API using Bresenham's line algorithm (correct, 2589 draws many points) 2590 - $(D "2"): Use the driver line API (occasionally misses line endpoints based on 2591 hardware driver quirks 2592 - $(D "3"): Use the driver geometry API (correct, draws thicker diagonal lines) 2593 2594 This hint should be set before creating a renderer. 2595 */ 2596 enum SDL_HINT_RENDER_LINE_METHOD = "SDL_RENDER_LINE_METHOD"; 2597 2598 /** 2599 A variable controlling whether the Metal render driver select low power 2600 device over default one. 2601 2602 The variable can be set to the following values: 2603 - $(D "0"): Use the preferred OS device. (default) 2604 - $(D "1"): Select a low power device. 2605 2606 This hint should be set before creating a renderer. 2607 */ 2608 enum SDL_HINT_RENDER_METAL_PREFER_LOW_POWER_DEVICE = "SDL_RENDER_METAL_PREFER_LOW_POWER_DEVICE"; 2609 2610 /** 2611 A variable controlling whether updates to the SDL screen surface should be 2612 synchronized with the vertical refresh, to avoid tearing. 2613 2614 This hint overrides the application preference when creating a renderer. 2615 2616 The variable can be set to the following values: 2617 - $(D "0"): Disable vsync. (default) 2618 - $(D "1"): Enable vsync. 2619 2620 This hint should be set before creating a renderer. 2621 */ 2622 enum SDL_HINT_RENDER_VSYNC = "SDL_RENDER_VSYNC"; 2623 2624 /** 2625 A variable to control whether the return key on the soft keyboard should 2626 hide the soft keyboard on Android and iOS. 2627 2628 This hint sets the default value of SDL_PROP_TEXTINPUT_MULTILINE_BOOLEAN. 2629 2630 The variable can be set to the following values: 2631 - $(D "0"): The return key will be handled as a key event. (default) 2632 - $(D "1"): The return key will hide the keyboard. 2633 2634 This hint can be set anytime. 2635 */ 2636 enum SDL_HINT_RETURN_KEY_HIDES_IME = "SDL_RETURN_KEY_HIDES_IME"; 2637 2638 /** 2639 A variable containing a list of ROG gamepad capable mice. 2640 2641 The format of the string is a comma separated list of USB VID/PID pairs in 2642 hexadecimal form, e.g. 2643 2644 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 2645 2646 The variable can also take the form of "@file", in which case the named 2647 file will be loaded and interpreted as the value of the variable. 2648 2649 This hint should be set before SDL is initialized. 2650 2651 See_Also: 2652 $(D SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED) 2653 */ 2654 enum SDL_HINT_ROG_GAMEPAD_MICE = "SDL_ROG_GAMEPAD_MICE"; 2655 2656 /** 2657 A variable containing a list of devices that are not ROG gamepad capable 2658 mice. 2659 2660 This will override SDL_HINT_ROG_GAMEPAD_MICE and the built in device list. 2661 2662 The format of the string is a comma separated list of USB VID/PID pairs in 2663 hexadecimal form, e.g. 2664 2665 `0xAAAA/0xBBBB,0xCCCC/0xDDDD` 2666 2667 The variable can also take the form of "@file", in which case the named 2668 file will be loaded and interpreted as the value of the variable. 2669 2670 This hint should be set before SDL is initialized. 2671 */ 2672 enum SDL_HINT_ROG_GAMEPAD_MICE_EXCLUDED = "SDL_ROG_GAMEPAD_MICE_EXCLUDED"; 2673 2674 /** 2675 A variable controlling which Dispmanx layer to use on a Raspberry PI. 2676 2677 Also known as Z-order. The variable can take a negative or positive value. 2678 The default is 10000. 2679 2680 This hint should be set before SDL is initialized. 2681 */ 2682 enum SDL_HINT_RPI_VIDEO_LAYER = "SDL_RPI_VIDEO_LAYER"; 2683 2684 /** 2685 Specify an "activity name" for screensaver inhibition. 2686 2687 Some platforms, notably Linux desktops, list the applications which are 2688 inhibiting the screensaver or other power-saving features. 2689 2690 This hint lets you specify the "activity name" sent to the OS when 2691 SDL_DisableScreenSaver() is used (or the screensaver is automatically 2692 disabled). The contents of this hint are used when the screensaver is 2693 disabled. You should use a string that describes what your program is doing 2694 (and, therefore, why the screensaver is disabled). For example, "Playing a 2695 game" or "Watching a video". 2696 2697 Setting this to "" or leaving it unset will have SDL use a reasonable 2698 default: "Playing a game" or something similar. 2699 2700 This hint should be set before calling SDL_DisableScreenSaver() 2701 */ 2702 enum SDL_HINT_SCREENSAVER_INHIBIT_ACTIVITY_NAME = "SDL_SCREENSAVER_INHIBIT_ACTIVITY_NAME"; 2703 2704 /** 2705 A variable controlling whether SDL calls dbus_shutdown() on quit. 2706 2707 This is useful as a debug tool to validate memory leaks, but shouldn't ever 2708 be set in production applications, as other libraries used by the 2709 application might use dbus under the hood and this can cause crashes if 2710 they continue after SDL_Quit(). 2711 2712 The variable can be set to the following values: 2713 - $(D "0"): SDL will not call dbus_shutdown() on quit. (default) 2714 - $(D "1"): SDL will call dbus_shutdown() on quit. 2715 2716 This hint can be set anytime. 2717 */ 2718 enum SDL_HINT_SHUTDOWN_DBUS_ON_QUIT = "SDL_SHUTDOWN_DBUS_ON_QUIT"; 2719 2720 /** 2721 A variable that specifies a backend to use for title storage. 2722 2723 By default, SDL will try all available storage backends in a reasonable 2724 order until it finds one that can work, but this hint allows the app or 2725 user to force a specific target, such as "pc" if, say, you are on Steam but 2726 want to avoid SteamRemoteStorage for title data. 2727 2728 This hint should be set before SDL is initialized. 2729 */ 2730 enum SDL_HINT_STORAGE_TITLE_DRIVER = "SDL_STORAGE_TITLE_DRIVER"; 2731 2732 /** 2733 A variable that specifies a backend to use for user storage. 2734 2735 By default, SDL will try all available storage backends in a reasonable 2736 order until it finds one that can work, but this hint allows the app or 2737 user to force a specific target, such as "pc" if, say, you are on Steam but 2738 want to avoid SteamRemoteStorage for user data. 2739 2740 This hint should be set before SDL is initialized. 2741 */ 2742 enum SDL_HINT_STORAGE_USER_DRIVER = "SDL_STORAGE_USER_DRIVER"; 2743 2744 /** 2745 Specifies whether SDL_THREAD_PRIORITY_TIME_CRITICAL should be treated as 2746 realtime. 2747 2748 On some platforms, like Linux, a realtime priority thread may be subject to 2749 restrictions that require special handling by the application. This hint 2750 exists to let SDL know that the app is prepared to handle said 2751 restrictions. 2752 2753 On Linux, SDL will apply the following configuration to any thread that 2754 becomes realtime: 2755 - The SCHED_RESET_ON_FORK bit will be set on the scheduling policy, 2756 - An RLIMIT_RTTIME budget will be configured to the rtkit specified limit. 2757 - Exceeding this limit will result in the kernel sending SIGKILL to the 2758 app, refer to the man pages for more information. 2759 2760 The variable can be set to the following values: 2761 - $(D "0"): default platform specific behaviour 2762 - $(D "1"): Force SDL_THREAD_PRIORITY_TIME_CRITICAL to a realtime scheduling 2763 policy 2764 2765 This hint should be set before calling SDL_SetCurrentThreadPriority() 2766 */ 2767 enum SDL_HINT_THREAD_FORCE_REALTIME_TIME_CRITICAL = "SDL_THREAD_FORCE_REALTIME_TIME_CRITICAL"; 2768 2769 /** 2770 A string specifying additional information to use with 2771 SDL_SetCurrentThreadPriority. 2772 2773 By default SDL_SetCurrentThreadPriority will make appropriate system 2774 changes in order to apply a thread priority. For example on systems using 2775 pthreads the scheduler policy is changed automatically to a policy that 2776 works well with a given priority. Code which has specific requirements can 2777 override SDL's default behavior with this hint. 2778 2779 pthread hint values are "current", "other", "fifo" and "rr". Currently no 2780 other platform hint values are defined but may be in the future. 2781 2782 On Linux, the kernel may send SIGKILL to realtime tasks which exceed the 2783 distro configured execution budget for rtkit. This budget can be queried 2784 through RLIMIT_RTTIME after calling SDL_SetCurrentThreadPriority(). 2785 2786 This hint should be set before calling SDL_SetCurrentThreadPriority() 2787 */ 2788 enum SDL_HINT_THREAD_PRIORITY_POLICY = "SDL_THREAD_PRIORITY_POLICY"; 2789 2790 /** 2791 A variable that controls the timer resolution, in milliseconds. 2792 2793 The higher resolution the timer, the more frequently the CPU services timer 2794 interrupts, and the more precise delays are, but this takes up power and 2795 CPU time. This hint is only used on Windows. 2796 2797 See this blog post for more information: 2798 http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/ 2799 2800 The default value is "1". 2801 2802 If this variable is set to "0", the system timer resolution is not set. 2803 2804 This hint can be set anytime. 2805 */ 2806 enum SDL_HINT_TIMER_RESOLUTION = "SDL_TIMER_RESOLUTION"; 2807 2808 /** 2809 A variable controlling whether touch events should generate synthetic mouse 2810 events. 2811 2812 The variable can be set to the following values: 2813 - $(D "0"): Touch events will not generate mouse events. 2814 - $(D "1"): Touch events will generate mouse events. (default) 2815 2816 This hint can be set anytime. 2817 */ 2818 enum SDL_HINT_TOUCH_MOUSE_EVENTS = "SDL_TOUCH_MOUSE_EVENTS"; 2819 2820 /** 2821 A variable controlling whether trackpads should be treated as touch 2822 devices. 2823 2824 On macOS (and possibly other platforms in the future), SDL will report 2825 touches on a trackpad as mouse input, which is generally what users expect 2826 from this device; however, these are often actually full multitouch-capable 2827 touch devices, so it might be preferable to some apps to treat them as 2828 such. 2829 2830 The variable can be set to the following values: 2831 - $(D "0"): Trackpad will send mouse events. (default) 2832 - $(D "1"): Trackpad will send touch events. 2833 2834 This hint should be set before SDL is initialized. 2835 */ 2836 enum SDL_HINT_TRACKPAD_IS_TOUCH_ONLY = "SDL_TRACKPAD_IS_TOUCH_ONLY"; 2837 2838 /** 2839 A variable controlling whether the Android / tvOS remotes should be listed 2840 as joystick devices, instead of sending keyboard events. 2841 2842 The variable can be set to the following values: 2843 - $(D "0"): Remotes send enter/escape/arrow key events. 2844 - $(D "1"): Remotes are available as 2 axis, 2 button joysticks. (default) 2845 2846 This hint should be set before SDL is initialized. 2847 */ 2848 enum SDL_HINT_TV_REMOTE_AS_JOYSTICK = "SDL_TV_REMOTE_AS_JOYSTICK"; 2849 2850 /** 2851 A variable controlling whether the screensaver is enabled. 2852 2853 The variable can be set to the following values: 2854 - $(D "0"): Disable screensaver. (default) 2855 - $(D "1"): Enable screensaver. 2856 2857 This hint should be set before SDL is initialized. 2858 */ 2859 enum SDL_HINT_VIDEO_ALLOW_SCREENSAVER = "SDL_VIDEO_ALLOW_SCREENSAVER"; 2860 2861 /** 2862 A comma separated list containing the names of the displays that SDL should 2863 sort to the front of the display list. 2864 2865 When this hint is set, displays with matching name strings will be 2866 prioritized in the list of displays, as exposed by calling 2867 SDL_GetDisplays(), with the first listed becoming the primary display. The 2868 naming convention can vary depending on the environment, but it is usually 2869 a connector name (e.g. 'DP-1', 'DP-2', 'HDMI-A-1',etc...). 2870 2871 On Wayland and X11 desktops, the connector names associated with displays 2872 can typically be found by using the `xrandr` utility. 2873 2874 This hint is currently supported on the following drivers: 2875 - KMSDRM (kmsdrm) 2876 - Wayland (wayland) 2877 - X11 (x11) 2878 2879 This hint should be set before SDL is initialized. 2880 */ 2881 enum SDL_HINT_VIDEO_DISPLAY_PRIORITY = "SDL_VIDEO_DISPLAY_PRIORITY"; 2882 2883 /** 2884 Tell the video driver that we only want a double buffer. 2885 2886 By default, most lowlevel 2D APIs will use a triple buffer scheme that 2887 wastes no CPU time on waiting for vsync after issuing a flip, but 2888 introduces a frame of latency. On the other hand, using a double buffer 2889 scheme instead is recommended for cases where low latency is an important 2890 factor because we save a whole frame of latency. 2891 2892 We do so by waiting for vsync immediately after issuing a flip, usually 2893 just after eglSwapBuffers call in the backend's _SwapWindow function. 2894 2895 This hint is currently supported on the following drivers: 2896 - Raspberry Pi (raspberrypi) 2897 - Wayland (wayland) 2898 2899 This hint should be set before SDL is initialized. 2900 */ 2901 enum SDL_HINT_VIDEO_DOUBLE_BUFFER = "SDL_VIDEO_DOUBLE_BUFFER"; 2902 2903 /** 2904 A variable that specifies a video backend to use. 2905 2906 By default, SDL will try all available video backends in a reasonable order 2907 until it finds one that can work, but this hint allows the app or user to 2908 force a specific target, such as "x11" if, say, you are on Wayland but want 2909 to try talking to the X server instead. 2910 2911 This hint accepts a comma-separated list of driver names, and each will be 2912 tried in the order listed during init, until one succeeds or all of them 2913 fail. 2914 2915 This hint should be set before SDL is initialized. 2916 */ 2917 enum SDL_HINT_VIDEO_DRIVER = "SDL_VIDEO_DRIVER"; 2918 2919 /** 2920 A variable controlling whether the dummy video driver saves output frames. 2921 - $(D "0"): Video frames are not saved to disk. (default) 2922 - $(D "1"): Video frames are saved to files in the format "SDL_windowX-Y.bmp", 2923 where X is the window ID, and Y is the frame number. 2924 2925 This hint can be set anytime. 2926 */ 2927 enum SDL_HINT_VIDEO_DUMMY_SAVE_FRAMES = "SDL_VIDEO_DUMMY_SAVE_FRAMES"; 2928 2929 /** 2930 If eglGetPlatformDisplay fails, fall back to calling eglGetDisplay. 2931 2932 The variable can be set to one of the following values: 2933 - $(D "0"): Do not fall back to eglGetDisplay. 2934 - $(D "1"): Fall back to eglGetDisplay if eglGetPlatformDisplay fails. (default) 2935 2936 This hint should be set before SDL is initialized. 2937 */ 2938 enum SDL_HINT_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK = "SDL_VIDEO_EGL_ALLOW_GETDISPLAY_FALLBACK"; 2939 2940 /** 2941 A variable controlling whether the OpenGL context should be created with 2942 EGL. 2943 2944 The variable can be set to the following values: 2945 - $(D "0"): Use platform-specific GL context creation API (GLX, WGL, CGL, etc). 2946 (default) 2947 - $(D "1"): Use EGL 2948 2949 This hint should be set before SDL is initialized. 2950 */ 2951 enum SDL_HINT_VIDEO_FORCE_EGL = "SDL_VIDEO_FORCE_EGL"; 2952 2953 /** 2954 A variable that specifies the policy for fullscreen Spaces on macOS. 2955 2956 The variable can be set to the following values: 2957 2958 - $(D "0"): Disable Spaces support (FULLSCREEN_DESKTOP won't use them and 2959 SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen" button on their 2960 titlebars). 2961 - $(D "1"): Enable Spaces support (FULLSCREEN_DESKTOP will use them and 2962 SDL_WINDOW_RESIZABLE windows will offer the "fullscreen" button on their 2963 titlebars). (default) 2964 2965 This hint should be set before creating a window. 2966 */ 2967 enum SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES = "SDL_VIDEO_MAC_FULLSCREEN_SPACES"; 2968 2969 /** 2970 A variable that specifies the menu visibility when a window is fullscreen 2971 in Spaces on macOS. 2972 2973 The variable can be set to the following values: 2974 2975 - $(D "0"): The menu will be hidden when the window is in a fullscreen space, 2976 and not accessible by moving the mouse to the top of the screen. 2977 - $(D "1"): The menu will be accessible when the window is in a fullscreen 2978 space. 2979 - $(D "auto"): The menu will be hidden if fullscreen mode was toggled on 2980 programmatically via `SDL_SetWindowFullscreen()`, and accessible if 2981 fullscreen was entered via the "fullscreen" button on the window title 2982 bar. (default) 2983 2984 This hint can be set anytime. 2985 */ 2986 enum SDL_HINT_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY = "SDL_VIDEO_MAC_FULLSCREEN_MENU_VISIBILITY"; 2987 2988 /** 2989 A variable controlling whether SDL will attempt to automatically set the 2990 destination display to a mode most closely matching that of the previous 2991 display if an exclusive fullscreen window is moved onto it. 2992 2993 The variable can be set to the following values: 2994 2995 - $(D "0"): SDL will not attempt to automatically set a matching mode on the 2996 destination display. If an exclusive fullscreen window is moved to a new 2997 display, the window will become fullscreen desktop. 2998 - $(D "1"): SDL will attempt to automatically set a mode on the destination 2999 display that most closely matches the mode of the display that the 3000 exclusive fullscreen window was previously on. (default) 3001 3002 This hint can be set anytime. 3003 3004 \since This hint is available since SDL 3.4.0. 3005 */ 3006 enum SDL_HINT_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE = "SDL_VIDEO_MATCH_EXCLUSIVE_MODE_ON_MOVE"; 3007 3008 /** 3009 A variable controlling whether fullscreen windows are minimized when they 3010 lose focus. 3011 3012 The variable can be set to the following values: 3013 3014 - $(D "0"): Fullscreen windows will not be minimized when they lose focus. 3015 (default) 3016 - $(D "1"): Fullscreen windows are minimized when they lose focus. 3017 3018 This hint can be set anytime. 3019 */ 3020 enum SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"; 3021 3022 /** 3023 A variable controlling whether the offscreen video driver saves output 3024 frames. 3025 3026 This only saves frames that are generated using software rendering, not 3027 accelerated OpenGL rendering. 3028 3029 - $(D "0"): Video frames are not saved to disk. (default) 3030 - $(D "1"): Video frames are saved to files in the format "SDL_windowX-Y.bmp", 3031 where X is the window ID, and Y is the frame number. 3032 3033 This hint can be set anytime. 3034 */ 3035 enum SDL_HINT_VIDEO_OFFSCREEN_SAVE_FRAMES = "SDL_VIDEO_OFFSCREEN_SAVE_FRAMES"; 3036 3037 /** 3038 A variable controlling whether all window operations will block until 3039 complete. 3040 3041 Window systems that run asynchronously may not have the results of window 3042 operations that resize or move the window applied immediately upon the 3043 return of the requesting function. Setting this hint will cause such 3044 operations to block after every call until the pending operation has 3045 completed. Setting this to '1' is the equivalent of calling 3046 SDL_SyncWindow() after every function call. 3047 3048 Be aware that amount of time spent blocking while waiting for window 3049 operations to complete can be quite lengthy, as animations may have to 3050 complete, which can take upwards of multiple seconds in some cases. 3051 3052 The variable can be set to the following values: 3053 - $(D "0"): Window operations are non-blocking. (default) 3054 - $(D "1"): Window operations will block until completed. 3055 3056 This hint can be set anytime. 3057 */ 3058 enum SDL_HINT_VIDEO_SYNC_WINDOW_OPERATIONS = "SDL_VIDEO_SYNC_WINDOW_OPERATIONS"; 3059 3060 /** 3061 A variable controlling whether the libdecor Wayland backend is allowed to 3062 be used. 3063 3064 libdecor is used over xdg-shell when xdg-decoration protocol is 3065 unavailable. 3066 3067 The variable can be set to the following values: 3068 - $(D "0"): libdecor use is disabled. 3069 - $(D "1"): libdecor use is enabled. (default) 3070 3071 This hint should be set before SDL is initialized. 3072 */ 3073 enum SDL_HINT_VIDEO_WAYLAND_ALLOW_LIBDECOR = "SDL_VIDEO_WAYLAND_ALLOW_LIBDECOR"; 3074 3075 /** 3076 A variable controlling whether video mode emulation is enabled under 3077 Wayland. 3078 3079 When this hint is set, a standard set of emulated CVT video modes will be 3080 exposed for use by the application. If it is disabled, the only modes 3081 exposed will be the logical desktop size and, in the case of a scaled 3082 desktop, the native display resolution. 3083 3084 The variable can be set to the following values: 3085 - $(D "0"): Video mode emulation is disabled. 3086 - $(D "1"): Video mode emulation is enabled. (default) 3087 3088 This hint should be set before SDL is initialized. 3089 */ 3090 enum SDL_HINT_VIDEO_WAYLAND_MODE_EMULATION = "SDL_VIDEO_WAYLAND_MODE_EMULATION"; 3091 3092 /** 3093 A variable controlling how modes with a non-native aspect ratio are 3094 displayed under Wayland. 3095 3096 When this hint is set, the requested scaling will be used when displaying 3097 fullscreen video modes that don't match the display's native aspect ratio. 3098 This is contingent on compositor viewport support. 3099 3100 The variable can be set to the following values: 3101 - $(D "aspect"): Video modes will be displayed scaled, in their proper aspect 3102 ratio, with black bars. 3103 - $(D "stretch"): Video modes will be scaled to fill the entire display. 3104 (default) 3105 - $(D "none"): Video modes will be displayed as 1:1 with no scaling. 3106 3107 This hint should be set before creating a window. 3108 */ 3109 enum SDL_HINT_VIDEO_WAYLAND_MODE_SCALING = "SDL_VIDEO_WAYLAND_MODE_SCALING"; 3110 3111 /** 3112 A variable controlling whether the libdecor Wayland backend is preferred 3113 over native decorations. 3114 3115 When this hint is set, libdecor will be used to provide window decorations, 3116 even if xdg-decoration is available. (Note that, by default, libdecor will 3117 use xdg-decoration itself if available). 3118 3119 The variable can be set to the following values: 3120 - $(D "0"): libdecor is enabled only if server-side decorations are unavailable. 3121 (default) 3122 - $(D "1"): libdecor is always enabled if available. 3123 3124 This hint should be set before SDL is initialized. 3125 */ 3126 enum SDL_HINT_VIDEO_WAYLAND_PREFER_LIBDECOR = "SDL_VIDEO_WAYLAND_PREFER_LIBDECOR"; 3127 3128 /** 3129 A variable forcing non-DPI-aware Wayland windows to output at 1:1 scaling. 3130 3131 This must be set before initializing the video subsystem. 3132 3133 When this hint is set, Wayland windows that are not flagged as being 3134 DPI-aware will be output with scaling designed to force 1:1 pixel mapping. 3135 3136 This is intended to allow legacy applications to be displayed without 3137 desktop scaling being applied, and has issues with certain display 3138 configurations, as this forces the window to behave in a way that Wayland 3139 desktops were not designed to accommodate: 3140 - Rounding errors can result with odd window sizes and/or desktop scales, 3141 which can cause the window contents to appear slightly blurry. 3142 - Positioning the window may be imprecise due to unit conversions and 3143 rounding. 3144 - The window may be unusably small on scaled desktops. 3145 - The window may jump in size when moving between displays of different 3146 scale factors. 3147 - Displays may appear to overlap when using a multi-monitor setup with 3148 scaling enabled. 3149 - Possible loss of cursor precision due to the logical size of the window 3150 being reduced. 3151 3152 New applications should be designed with proper DPI awareness handling 3153 instead of enabling this. 3154 3155 The variable can be set to the following values: 3156 - $(D "0"): Windows will be scaled normally. 3157 - $(D "1"): Windows will be forced to scale to achieve 1:1 output. 3158 3159 This hint should be set before creating a window. 3160 */ 3161 enum SDL_HINT_VIDEO_WAYLAND_SCALE_TO_DISPLAY = "SDL_VIDEO_WAYLAND_SCALE_TO_DISPLAY"; 3162 3163 /** 3164 A variable specifying which shader compiler to preload when using the 3165 Chrome ANGLE binaries. 3166 3167 SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It can 3168 use two different sets of binaries, those compiled by the user from source 3169 or those provided by the Chrome browser. In the later case, these binaries 3170 require that SDL loads a DLL providing the shader compiler. 3171 3172 The variable can be set to the following values: 3173 3174 - "d3dcompiler_46.dll": best for Vista or later. (default) 3175 - "d3dcompiler_43.dll": for XP support. 3176 - $(D "none"): do not load any library, useful if you compiled 3177 ANGLE from source and included the compiler in 3178 your binaries. 3179 3180 This hint should be set before SDL is initialized. 3181 */ 3182 enum SDL_HINT_VIDEO_WIN_D3DCOMPILER = "SDL_VIDEO_WIN_D3DCOMPILER"; 3183 3184 /** 3185 A variable controlling whether SDL should call XSelectInput() to enable 3186 input events on X11 windows wrapped by SDL windows. 3187 3188 The variable can be set to the following values: 3189 3190 - $(D "0"): Don't call XSelectInput(), assuming the native window code has done 3191 it already. 3192 - $(D "1"): Call XSelectInput() to enable input events. (default) 3193 3194 This hint should be set before creating a window. 3195 3196 \since This hint is available since SDL 3.2.10. 3197 */ 3198 enum SDL_HINT_VIDEO_X11_EXTERNAL_WINDOW_INPUT = "SDL_VIDEO_X11_EXTERNAL_WINDOW_INPUT"; 3199 3200 /** 3201 A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint 3202 should be used. 3203 3204 The variable can be set to the following values: 3205 - $(D "0"): Disable _NET_WM_BYPASS_COMPOSITOR. 3206 - $(D "1"): Enable _NET_WM_BYPASS_COMPOSITOR. (default) 3207 3208 This hint should be set before creating a window. 3209 */ 3210 enum SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR = "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"; 3211 3212 /** 3213 A variable controlling whether the X11 _NET_WM_PING protocol should be 3214 supported. 3215 3216 By default SDL will use _NET_WM_PING, but for applications that know they 3217 will not always be able to respond to ping requests in a timely manner they 3218 can turn it off to avoid the window manager thinking the app is hung. 3219 3220 The variable can be set to the following values: 3221 - $(D "0"): Disable _NET_WM_PING. 3222 - $(D "1"): Enable _NET_WM_PING. (default) 3223 3224 This hint should be set before creating a window. 3225 */ 3226 enum SDL_HINT_VIDEO_X11_NET_WM_PING = "SDL_VIDEO_X11_NET_WM_PING"; 3227 3228 /** 3229 A variable controlling whether SDL uses DirectColor visuals. 3230 3231 The variable can be set to the following values: 3232 - $(D "0"): Disable DirectColor visuals. 3233 - $(D "1"): Enable DirectColor visuals. (default) 3234 3235 This hint should be set before initializing the video subsystem. 3236 */ 3237 enum SDL_HINT_VIDEO_X11_NODIRECTCOLOR = "SDL_VIDEO_X11_NODIRECTCOLOR"; 3238 3239 /** 3240 A variable forcing the content scaling factor for X11 displays. 3241 3242 The variable can be set to a floating point value in the range 1.0-10.0f 3243 3244 This hint should be set before SDL is initialized. 3245 */ 3246 enum SDL_HINT_VIDEO_X11_SCALING_FACTOR = "SDL_VIDEO_X11_SCALING_FACTOR"; 3247 3248 /** 3249 A variable forcing the visual ID used for X11 display modes. 3250 3251 This hint should be set before initializing the video subsystem. 3252 */ 3253 enum SDL_HINT_VIDEO_X11_VISUALID = "SDL_VIDEO_X11_VISUALID"; 3254 3255 /** 3256 A variable forcing the visual ID chosen for new X11 windows. 3257 3258 This hint should be set before creating a window. 3259 */ 3260 enum SDL_HINT_VIDEO_X11_WINDOW_VISUALID = "SDL_VIDEO_X11_WINDOW_VISUALID"; 3261 3262 /** 3263 A variable controlling whether the X11 XRandR extension should be used. 3264 3265 The variable can be set to the following values: 3266 - $(D "0"): Disable XRandR. 3267 - $(D "1"): Enable XRandR. (default) 3268 3269 This hint should be set before SDL is initialized. 3270 */ 3271 enum SDL_HINT_VIDEO_X11_XRANDR = "SDL_VIDEO_X11_XRANDR"; 3272 3273 /** 3274 A variable controlling whether touch should be enabled on the back panel of 3275 the PlayStation Vita. 3276 3277 The variable can be set to the following values: 3278 - $(D "0"): Disable touch on the back panel. 3279 - $(D "1"): Enable touch on the back panel. (default) 3280 3281 This hint should be set before SDL is initialized. 3282 */ 3283 enum SDL_HINT_VITA_ENABLE_BACK_TOUCH = "SDL_VITA_ENABLE_BACK_TOUCH"; 3284 3285 /** 3286 A variable controlling whether touch should be enabled on the front panel 3287 of the PlayStation Vita. 3288 3289 The variable can be set to the following values: 3290 - $(D "0"): Disable touch on the front panel. 3291 - $(D "1"): Enable touch on the front panel. (default) 3292 3293 This hint should be set before SDL is initialized. 3294 */ 3295 enum SDL_HINT_VITA_ENABLE_FRONT_TOUCH = "SDL_VITA_ENABLE_FRONT_TOUCH"; 3296 3297 /** 3298 A variable controlling the module path on the PlayStation Vita. 3299 3300 This hint defaults to "app0:module" 3301 3302 This hint should be set before SDL is initialized. 3303 */ 3304 enum SDL_HINT_VITA_MODULE_PATH = "SDL_VITA_MODULE_PATH"; 3305 3306 /** 3307 A variable controlling whether to perform PVR initialization on the 3308 PlayStation Vita. 3309 - $(D "0"): Skip PVR initialization. 3310 - $(D "1"): Perform the normal PVR initialization. (default) 3311 3312 This hint should be set before SDL is initialized. 3313 */ 3314 enum SDL_HINT_VITA_PVR_INIT = "SDL_VITA_PVR_INIT"; 3315 3316 /** 3317 A variable overriding the resolution reported on the PlayStation Vita. 3318 3319 The variable can be set to the following values: 3320 - $(D "544"): 544p (default) 3321 - $(D "720"): 725p for PSTV 3322 - $(D "1080"): 1088i for PSTV 3323 3324 This hint should be set before SDL is initialized. 3325 */ 3326 enum SDL_HINT_VITA_RESOLUTION = "SDL_VITA_RESOLUTION"; 3327 3328 /** 3329 A variable controlling whether OpenGL should be used instead of OpenGL ES 3330 on the PlayStation Vita. 3331 3332 The variable can be set to the following values: 3333 - $(D "0"): Use OpenGL ES. (default) 3334 - $(D "1"): Use OpenGL. 3335 3336 This hint should be set before SDL is initialized. 3337 */ 3338 enum SDL_HINT_VITA_PVR_OPENGL = "SDL_VITA_PVR_OPENGL"; 3339 3340 /** 3341 A variable controlling which touchpad should generate synthetic mouse 3342 events. 3343 3344 The variable can be set to the following values: 3345 - $(D "0"): Only front touchpad should generate mouse events. (default) 3346 - $(D "1"): Only back touchpad should generate mouse events. 3347 - $(D "2"): Both touchpads should generate mouse events. 3348 3349 This hint can be set anytime. 3350 */ 3351 enum SDL_HINT_VITA_TOUCH_MOUSE_DEVICE = "SDL_VITA_TOUCH_MOUSE_DEVICE"; 3352 3353 /** 3354 A variable overriding the display index used in SDL_Vulkan_CreateSurface() 3355 3356 The display index starts at 0, which is the default. 3357 3358 This hint should be set before calling SDL_Vulkan_CreateSurface() 3359 */ 3360 enum SDL_HINT_VULKAN_DISPLAY = "SDL_VULKAN_DISPLAY"; 3361 3362 /** 3363 Specify the Vulkan library to load. 3364 3365 This hint should be set before creating a Vulkan window or calling 3366 SDL_Vulkan_LoadLibrary(). 3367 */ 3368 enum SDL_HINT_VULKAN_LIBRARY = "SDL_VULKAN_LIBRARY"; 3369 3370 /** 3371 A variable controlling how the fact chunk affects the loading of a WAVE 3372 file. 3373 3374 The fact chunk stores information about the number of samples of a WAVE 3375 file. The Standards Update from Microsoft notes that this value can be used 3376 to 'determine the length of the data in seconds'. This is especially useful 3377 for compressed formats (for which this is a mandatory chunk) if they 3378 produce multiple sample frames per block and truncating the block is not 3379 allowed. The fact chunk can exactly specify how many sample frames there 3380 should be in this case. 3381 3382 Unfortunately, most application seem to ignore the fact chunk and so SDL 3383 ignores it by default as well. 3384 3385 The variable can be set to the following values: 3386 - $(D "truncate"): Use the number of samples to truncate the wave data if the 3387 fact chunk is present and valid. 3388 - $(D "strict"): Like "truncate", but raise an error if the fact chunk is 3389 invalid, not present for non-PCM formats, or if the data 3390 chunk doesn't have that many samples. 3391 - $(D "ignorezero"): Like "truncate", but ignore fact chunk if the number of 3392 samples is zero. 3393 - $(D "ignore"): Ignore fact chunk entirely. (default) 3394 3395 This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() 3396 */ 3397 enum SDL_HINT_WAVE_FACT_CHUNK = "SDL_WAVE_FACT_CHUNK"; 3398 3399 /** 3400 A variable controlling the maximum number of chunks in a WAVE file. 3401 3402 This sets an upper bound on the number of chunks in a WAVE file to avoid 3403 wasting time on malformed or corrupt WAVE files. This defaults to "10000". 3404 3405 This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() 3406 */ 3407 enum SDL_HINT_WAVE_CHUNK_LIMIT = "SDL_WAVE_CHUNK_LIMIT"; 3408 3409 /** 3410 A variable controlling how the size of the RIFF chunk affects the loading 3411 of a WAVE file. 3412 3413 The size of the RIFF chunk (which includes all the sub-chunks of the WAVE 3414 file) is not always reliable. In case the size is wrong, it's possible to 3415 just ignore it and step through the chunks until a fixed limit is reached. 3416 3417 Note that files that have trailing data unrelated to the WAVE file or 3418 corrupt files may slow down the loading process without a reliable 3419 boundary. By default, SDL stops after 10000 chunks to prevent wasting time. 3420 Use SDL_HINT_WAVE_CHUNK_LIMIT to adjust this value. 3421 3422 The variable can be set to the following values: 3423 - $(D "force"): Always use the RIFF chunk size as a boundary for the chunk 3424 search. 3425 - $(D "ignorezero"): Like "force", but a zero size searches up to 4 GiB. 3426 (default) 3427 - $(D "ignore"): Ignore the RIFF chunk size and always search up to 4 GiB. 3428 - $(D "maximum"): Search for chunks until the end of file. (not recommended) 3429 3430 This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() 3431 */ 3432 enum SDL_HINT_WAVE_RIFF_CHUNK_SIZE = "SDL_WAVE_RIFF_CHUNK_SIZE"; 3433 3434 /** 3435 A variable controlling how a truncated WAVE file is handled. 3436 3437 A WAVE file is considered truncated if any of the chunks are incomplete or 3438 the data chunk size is not a multiple of the block size. By default, SDL 3439 decodes until the first incomplete block, as most applications seem to do. 3440 3441 The variable can be set to the following values: 3442 - $(D "verystrict"): Raise an error if the file is truncated. 3443 - $(D "strict"): Like "verystrict", but the size of the RIFF chunk is ignored. 3444 - $(D "dropframe"): Decode until the first incomplete sample frame. 3445 - $(D "dropblock"): Decode until the first incomplete block. (default) 3446 3447 This hint should be set before calling SDL_LoadWAV() or SDL_LoadWAV_IO() 3448 */ 3449 enum SDL_HINT_WAVE_TRUNCATION = "SDL_WAVE_TRUNCATION"; 3450 3451 /** 3452 A variable controlling whether the window is activated when the 3453 SDL_RaiseWindow function is called. 3454 3455 The variable can be set to the following values: 3456 - $(D "0"): The window is not activated when the SDL_RaiseWindow function is 3457 called. 3458 - $(D "1"): The window is activated when the SDL_RaiseWindow function is called. 3459 (default) 3460 3461 This hint can be set anytime. 3462 */ 3463 enum SDL_HINT_WINDOW_ACTIVATE_WHEN_RAISED = "SDL_WINDOW_ACTIVATE_WHEN_RAISED"; 3464 3465 /** 3466 A variable controlling whether the window is activated when the 3467 SDL_ShowWindow function is called. 3468 3469 The variable can be set to the following values: 3470 - $(D "0"): The window is not activated when the SDL_ShowWindow function is 3471 called. 3472 - $(D "1"): The window is activated when the SDL_ShowWindow function is called. 3473 (default) 3474 3475 This hint can be set anytime. 3476 */ 3477 enum SDL_HINT_WINDOW_ACTIVATE_WHEN_SHOWN = "SDL_WINDOW_ACTIVATE_WHEN_SHOWN"; 3478 3479 /** 3480 If set to "0" then never set the top-most flag on an SDL Window even if the 3481 application requests it. 3482 3483 This is a debugging aid for developers and not expected to be used by end 3484 users. 3485 3486 The variable can be set to the following values: 3487 - $(D "0"): Don't allow topmost 3488 - $(D "1"): Allow topmost (default) 3489 3490 This hint can be set anytime. 3491 */ 3492 enum SDL_HINT_WINDOW_ALLOW_TOPMOST = "SDL_WINDOW_ALLOW_TOPMOST"; 3493 3494 /** 3495 A variable controlling whether the window frame and title bar are 3496 interactive when the cursor is hidden. 3497 3498 The variable can be set to the following values: 3499 - $(D "0"): The window frame is not interactive when the cursor is hidden 3500 (no move, resize, etc). 3501 - $(D "1"): The window frame is interactive when the cursor is hidden. 3502 (default) 3503 3504 This hint can be set anytime. 3505 */ 3506 enum SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN = "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"; 3507 3508 /** 3509 A variable controlling whether SDL generates window-close events for Alt+F4 3510 on Windows. 3511 3512 The variable can be set to the following values: 3513 - $(D "0"): SDL will only do normal key handling for Alt+F4. 3514 - $(D "1"): SDL will generate a window-close event when it sees Alt+F4. 3515 (default) 3516 3517 This hint can be set anytime. 3518 */ 3519 enum SDL_HINT_WINDOWS_CLOSE_ON_ALT_F4 = "SDL_WINDOWS_CLOSE_ON_ALT_F4"; 3520 3521 /** 3522 A variable controlling whether menus can be opened with their keyboard 3523 shortcut (Alt+mnemonic). 3524 3525 If the mnemonics are enabled, then menus can be opened by pressing the Alt 3526 key and the corresponding mnemonic (for example, Alt+F opens the File 3527 menu). However, in case an invalid mnemonic is pressed, Windows makes an 3528 audible beep to convey that nothing happened. This is true even if the 3529 window has no menu at all! 3530 3531 Because most SDL applications don't have menus, and some want to use the 3532 Alt key for other purposes, SDL disables mnemonics (and the beeping) by 3533 default. 3534 3535 Note: This also affects keyboard events: with mnemonics enabled, when a 3536 menu is opened from the keyboard, you will not receive a KEYUP event for 3537 the mnemonic key, and might* not receive one for Alt. 3538 3539 The variable can be set to the following values: 3540 - $(D "0"): Alt+mnemonic does nothing, no beeping. (default) 3541 - $(D "1"): Alt+mnemonic opens menus, invalid mnemonics produce a beep. 3542 3543 This hint can be set anytime. 3544 */ 3545 enum SDL_HINT_WINDOWS_ENABLE_MENU_MNEMONICS = "SDL_WINDOWS_ENABLE_MENU_MNEMONICS"; 3546 3547 /** 3548 A variable controlling whether the windows message loop is processed by 3549 SDL. 3550 3551 The variable can be set to the following values: 3552 - $(D "0"): The window message loop is not run. 3553 - $(D "1"): The window message loop is processed in SDL_PumpEvents(). 3554 (default) 3555 3556 This hint can be set anytime. 3557 */ 3558 enum SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP = "SDL_WINDOWS_ENABLE_MESSAGELOOP"; 3559 3560 /** 3561 A variable controlling whether GameInput is used for raw keyboard and mouse 3562 on Windows. 3563 3564 The variable can be set to the following values: 3565 - $(D "0"): GameInput is not used for raw keyboard and mouse events. 3566 - $(D "1"): GameInput is used for raw keyboard and mouse events, 3567 if available. (default) 3568 3569 This hint should be set before SDL is initialized. 3570 */ 3571 enum SDL_HINT_WINDOWS_GAMEINPUT = "SDL_WINDOWS_GAMEINPUT"; 3572 3573 /** 3574 A variable controlling whether raw keyboard events are used on Windows. 3575 3576 The variable can be set to the following values: 3577 - $(D "0"): The Windows message loop is used for keyboard events. 3578 (default) 3579 - $(D "1"): Low latency raw keyboard events are used. 3580 3581 This hint can be set anytime. 3582 */ 3583 enum SDL_HINT_WINDOWS_RAW_KEYBOARD = "SDL_WINDOWS_RAW_KEYBOARD"; 3584 3585 /** 3586 A variable controlling whether SDL uses Kernel Semaphores on Windows. 3587 3588 Kernel Semaphores are inter-process and require a context switch on every 3589 interaction. On Windows 8 and newer, the WaitOnAddress API is available. 3590 Using that and atomics to implement semaphores increases performance. SDL 3591 will fall back to Kernel Objects on older OS versions or if forced to by 3592 this hint. 3593 3594 The variable can be set to the following values: 3595 - $(D "0"): Use Atomics and WaitOnAddress API when available, otherwise 3596 fall back to Kernel Objects. (default) 3597 - $(D "1"): Force the use of Kernel Objects in all cases. 3598 3599 This hint should be set before SDL is initialized. 3600 */ 3601 enum SDL_HINT_WINDOWS_FORCE_SEMAPHORE_KERNEL = "SDL_WINDOWS_FORCE_SEMAPHORE_KERNEL"; 3602 3603 /** 3604 A variable to specify custom icon resource id from RC file on Windows 3605 platform. 3606 3607 This hint should be set before SDL is initialized. 3608 */ 3609 enum SDL_HINT_WINDOWS_INTRESOURCE_ICON = "SDL_WINDOWS_INTRESOURCE_ICON"; 3610 3611 /** 3612 A variable to specify custom icon resource id from RC file on Windows 3613 platform. 3614 3615 This hint should be set before SDL is initialized. 3616 */ 3617 enum SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL = "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"; 3618 3619 /** 3620 A variable controlling whether SDL uses the D3D9Ex API introduced in 3621 Windows Vista, instead of normal D3D9. 3622 3623 Direct3D 9Ex contains changes to state management that can eliminate device 3624 loss errors during scenarios like Alt+Tab or UAC prompts. D3D9Ex may 3625 require some changes to your application to cope with the new behavior, so 3626 this is disabled by default. 3627 3628 For more information on Direct3D 9Ex, see: 3629 - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/graphics-apis-in-windows-vista#direct3d-9ex 3630 - https://docs.microsoft.com/en-us/windows/win32/direct3darticles/direct3d-9ex-improvements 3631 3632 The variable can be set to the following values: 3633 - $(D "0"): Use the original Direct3D 9 API. (default) 3634 - $(D "1"): Use the Direct3D 9Ex API on Vista and later (and fall back if D3D9Ex 3635 is unavailable) 3636 3637 This hint should be set before SDL is initialized. 3638 */ 3639 enum SDL_HINT_WINDOWS_USE_D3D9EX = "SDL_WINDOWS_USE_D3D9EX"; 3640 3641 /** 3642 A variable controlling whether SDL will clear the window contents when the 3643 WM_ERASEBKGND message is received. 3644 3645 The variable can be set to the following values: 3646 - "0"/"never": Never clear the window. 3647 - "1"/"initial": Clear the window when the first WM_ERASEBKGND event fires. 3648 (default) 3649 - "2"/"always": Clear the window on every WM_ERASEBKGND event. 3650 3651 This hint should be set before creating a window. 3652 */ 3653 enum SDL_HINT_WINDOWS_ERASE_BACKGROUND_MODE = "SDL_WINDOWS_ERASE_BACKGROUND_MODE"; 3654 3655 /** 3656 A variable controlling whether X11 windows are marked as override-redirect. 3657 3658 If set, this _might_ increase framerate at the expense of the desktop not 3659 working as expected. Override-redirect windows aren't noticed by the window 3660 manager at all. 3661 3662 You should probably only use this for fullscreen windows, and you probably 3663 shouldn't even use it for that. But it's here if you want to try! 3664 3665 The variable can be set to the following values: 3666 - $(D "0"): Do not mark the window as override-redirect. (default) 3667 - $(D "1"): Mark the window as override-redirect. 3668 3669 This hint should be set before creating a window. 3670 */ 3671 enum SDL_HINT_X11_FORCE_OVERRIDE_REDIRECT = "SDL_X11_FORCE_OVERRIDE_REDIRECT"; 3672 3673 /** 3674 A variable specifying the type of an X11 window. 3675 3676 During SDL_CreateWindow, SDL uses the _NET_WM_WINDOW_TYPE X11 property to 3677 report to the window manager the type of window it wants to create. This 3678 might be set to various things if SDL_WINDOW_TOOLTIP or 3679 SDL_WINDOW_POPUP_MENU, etc, were specified. For "normal" windows that 3680 haven't set a specific type, this hint can be used to specify a custom 3681 type. For example, a dock window might set this to 3682 "_NET_WM_WINDOW_TYPE_DOCK". 3683 3684 This hint should be set before creating a window. 3685 */ 3686 enum SDL_HINT_X11_WINDOW_TYPE = "SDL_X11_WINDOW_TYPE"; 3687 3688 /** 3689 Specify the XCB library to load for the X11 driver. 3690 3691 The default is platform-specific, often "libX11-xcb.so.1". 3692 3693 This hint should be set before initializing the video subsystem. 3694 */ 3695 enum SDL_HINT_X11_XCB_LIBRARY = "SDL_X11_XCB_LIBRARY"; 3696 3697 /** 3698 A variable controlling whether XInput should be used for controller 3699 handling. 3700 3701 The variable can be set to the following values: 3702 - $(D "0"): XInput is not enabled. 3703 - $(D "1"): XInput is enabled. (default) 3704 3705 This hint should be set before SDL is initialized. 3706 */ 3707 enum SDL_HINT_XINPUT_ENABLED = "SDL_XINPUT_ENABLED"; 3708 3709 /** 3710 A variable controlling response to SDL_assert failures. 3711 3712 The variable can be set to the following case-sensitive values: 3713 - $(D "abort"): Program terminates immediately. 3714 - $(D "break"): Program triggers a debugger breakpoint. 3715 - $(D "retry"): Program reruns the SDL_assert's test again. 3716 - $(D "ignore"): Program continues on, ignoring this assertion failure 3717 this time. 3718 - $(D "always_ignore"): Program continues on, ignoring this assertion failure 3719 for the rest of the run. 3720 3721 Note that SDL_SetAssertionHandler offers a programmatic means to deal with 3722 assertion failures through a callback, and this hint is largely intended to 3723 be used via environment variables by end users and automated tools. 3724 3725 This hint should be set before an assertion failure is triggered and can be 3726 changed at any time. 3727 */ 3728 enum SDL_HINT_ASSERT = "SDL_ASSERT"; 3729 3730 /** 3731 A variable controlling whether pen events should generate synthetic mouse 3732 events. 3733 3734 The variable can be set to the following values: 3735 - $(D "0"): Pen events will not generate mouse events. 3736 - $(D "1"): Pen events will generate mouse events. (default) 3737 3738 This hint can be set anytime. 3739 */ 3740 enum SDL_HINT_PEN_MOUSE_EVENTS = "SDL_PEN_MOUSE_EVENTS"; 3741 3742 /** 3743 A variable controlling whether pen events should generate synthetic touch 3744 events. 3745 3746 The variable can be set to the following values: 3747 - $(D "0"): Pen events will not generate touch events. 3748 - $(D "1"): Pen events will generate touch events. (default) 3749 3750 This hint can be set anytime. 3751 */ 3752 enum SDL_HINT_PEN_TOUCH_EVENTS = "SDL_PEN_TOUCH_EVENTS"; 3753 3754 3755 /** 3756 An enumeration of hint priorities. 3757 */ 3758 enum SDL_HintPriority { 3759 SDL_HINT_DEFAULT, 3760 SDL_HINT_NORMAL, 3761 SDL_HINT_OVERRIDE 3762 } 3763 3764 /** 3765 Set a hint with a specific priority. 3766 3767 The priority controls the behavior when setting a hint that already has a 3768 value. Hints will replace existing hints of their priority and lower. 3769 Environment variables are considered to have override priority. 3770 3771 Params: 3772 name = The hint to set. 3773 value = The value of the hint variable. 3774 priority = The SDL_HintPriority level for the hint. 3775 3776 Returns: 3777 $(D true) on success or $(D false) on failure; 3778 call SDL_GetError() for more information. 3779 3780 Threadsafety: 3781 It is safe to call this function from any thread. 3782 3783 See_Also: 3784 $(D SDL_GetHint) 3785 $(D SDL_ResetHint) 3786 $(D SDL_SetHint) 3787 */ 3788 extern bool SDL_SetHintWithPriority(const(char)* name, const(char)* value, SDL_HintPriority priority); 3789 3790 /** 3791 Set a hint with normal priority. 3792 3793 Hints will not be set if there is an existing override hint or environment 3794 variable that takes precedence. You can use SDL_SetHintWithPriority() to 3795 set the hint with override priority instead. 3796 3797 Params: 3798 name = the hint to set. 3799 value = the value of the hint variable. 3800 3801 Returns: 3802 $(D true) on success or $(D false) on failure; call SDL_GetError() for more 3803 information. 3804 3805 Threadsafety: 3806 It is safe to call this function from any thread. 3807 3808 See_Also: 3809 $(D SDL_GetHint) 3810 $(D SDL_ResetHint) 3811 $(D SDL_SetHintWithPriority) 3812 */ 3813 extern bool SDL_SetHint(const(char)* name, const(char)* value); 3814 3815 /** 3816 Reset a hint to the default value. 3817 3818 This will reset a hint to the value of the environment variable, or NULL if 3819 the environment isn't set. Callbacks will be called normally with this 3820 change. 3821 3822 Params: 3823 name = The hint to set. 3824 3825 Returns: 3826 $(D true) on success or $(D false) on failure; 3827 call SDL_GetError() for more information. 3828 3829 Threadsafety: 3830 It is safe to call this function from any thread. 3831 3832 See_Also: 3833 $(D SDL_SetHint) 3834 $(D SDL_ResetHints) 3835 */ 3836 extern bool SDL_ResetHint(const(char)* name); 3837 3838 /** 3839 Reset all hints to the default values. 3840 3841 This will reset all hints to the value of the associated environment 3842 variable, or $(D null) if the environment isn't set. 3843 Callbacks will be called normally with this change. 3844 3845 Threadsafety: 3846 It is safe to call this function from any thread. 3847 3848 See_Also: 3849 $(D SDL_ResetHint) 3850 */ 3851 extern void SDL_ResetHints(); 3852 3853 /** 3854 Get the value of a hint. 3855 3856 Params: 3857 name = The hint to query. 3858 3859 Returns: 3860 The string value of a hint or $(D null) if the hint isn't set. 3861 3862 Threadsafety: 3863 It is safe to call this function from any thread, however the 3864 return value only remains valid until the hint is changed; if 3865 another thread might do so, the app should supply locks 3866 and/or make a copy of the string. Note that using a hint 3867 callback instead is always thread-safe, as SDL holds a lock 3868 on the thread subsystem during the callback. 3869 3870 See_Also: 3871 $(D SDL_SetHint) 3872 $(D SDL_SetHintWithPriority) 3873 */ 3874 extern const(char)* SDL_GetHint(const(char)* name); 3875 3876 /** 3877 Get the boolean value of a hint variable. 3878 3879 Params: 3880 name = The name of the hint to get the boolean value from. 3881 default_value = The value to return if the hint does not exist. 3882 3883 Returns: 3884 The boolean value of a hint or the provided default value if the 3885 hint does not exist. 3886 3887 Threadsafety: 3888 It is safe to call this function from any thread. 3889 3890 See_Also: 3891 $(D SDL_GetHint) 3892 $(D SDL_SetHint) 3893 */ 3894 extern bool SDL_GetHintBoolean(const(char)* name, bool default_value); 3895 3896 /** 3897 A callback used to send notifications of hint value changes. 3898 3899 This is called an initial time during SDL_AddHintCallback with the hint's 3900 current value, and then again each time the hint's value changes. 3901 3902 Params: 3903 userdata = What was passed as `userdata` to SDL_AddHintCallback(). 3904 name = What was passed as `name` to SDL_AddHintCallback(). 3905 oldValue = The previous hint value. 3906 newValue = The new value hint is to be set to. 3907 3908 Threadsafety: 3909 This callback is fired from whatever thread is setting a new 3910 hint value. SDL holds a lock on the hint subsystem when 3911 calling this callback. 3912 3913 See_Also: 3914 $(D SDL_AddHintCallback) 3915 */ 3916 alias SDL_HintCallback = void function(void* userdata, const(char)* name, const(char)* oldValue, const(char)* newValue); 3917 3918 /** 3919 Add a function to watch a particular hint. 3920 3921 The callback function is called _during_ this function, to provide it an 3922 initial value, and again each time the hint's value changes. 3923 3924 Params: 3925 name = The hint to watch. 3926 callback = An SDL_HintCallback function that will be called when the 3927 hint value changes. 3928 userdata = A pointer to pass to the callback function. 3929 3930 Returns: 3931 $(D true) on success or $(D false) on failure; 3932 call SDL_GetError() for more information. 3933 3934 Threadsafety: 3935 It is safe to call this function from any thread. 3936 3937 See_Also: 3938 $(D SDL_RemoveHintCallback) 3939 */ 3940 extern bool SDL_AddHintCallback(const(char)* name, SDL_HintCallback callback, void* userdata); 3941 3942 /** 3943 Remove a function watching a particular hint. 3944 3945 Params: 3946 name = The hint being watched. 3947 callback = An SDL_HintCallback function that will be called when the 3948 hint value changes. 3949 userdata = A pointer being passed to the callback function. 3950 3951 Threadsafety: 3952 It is safe to call this function from any thread. 3953 3954 See_Also: 3955 $(D SDL_AddHintCallback) 3956 */ 3957 extern void SDL_RemoveHintCallback(const(char)* name, SDL_HintCallback callback, void* userdata);