🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2569 lines
108 KiB

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