Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 
 
 

1136 rindas
46 KiB

  1. /*
  2. Simple DirectMedia Layer
  3. Copyright (C) 1997-2018 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 how 3D acceleration is used to accelerate the SDL screen surface.
  44. *
  45. * SDL can try to accelerate the SDL screen surface by using streaming
  46. * textures with a 3D rendering engine. This variable controls whether and
  47. * how this is done.
  48. *
  49. * This variable can be set to the following values:
  50. * "0" - Disable 3D acceleration
  51. * "1" - Enable 3D acceleration, using the default renderer.
  52. * "X" - Enable 3D acceleration, using X where X is one of the valid rendering drivers. (e.g. "direct3d", "opengl", etc.)
  53. *
  54. * By default SDL tries to make a best guess for each platform whether
  55. * to use acceleration or not.
  56. */
  57. #define SDL_HINT_FRAMEBUFFER_ACCELERATION "SDL_FRAMEBUFFER_ACCELERATION"
  58. /**
  59. * \brief A variable specifying which render driver to use.
  60. *
  61. * If the application doesn't pick a specific renderer to use, this variable
  62. * specifies the name of the preferred renderer. If the preferred renderer
  63. * can't be initialized, the normal default renderer is used.
  64. *
  65. * This variable is case insensitive and can be set to the following values:
  66. * "direct3d"
  67. * "opengl"
  68. * "opengles2"
  69. * "opengles"
  70. * "metal"
  71. * "software"
  72. *
  73. * The default varies by platform, but it's the first one in the list that
  74. * is available on the current platform.
  75. */
  76. #define SDL_HINT_RENDER_DRIVER "SDL_RENDER_DRIVER"
  77. /**
  78. * \brief A variable controlling whether the OpenGL render driver uses shaders if they are available.
  79. *
  80. * This variable can be set to the following values:
  81. * "0" - Disable shaders
  82. * "1" - Enable shaders
  83. *
  84. * By default shaders are used if OpenGL supports them.
  85. */
  86. #define SDL_HINT_RENDER_OPENGL_SHADERS "SDL_RENDER_OPENGL_SHADERS"
  87. /**
  88. * \brief A variable controlling whether the Direct3D device is initialized for thread-safe operations.
  89. *
  90. * This variable can be set to the following values:
  91. * "0" - Thread-safety is not enabled (faster)
  92. * "1" - Thread-safety is enabled
  93. *
  94. * By default the Direct3D device is created with thread-safety disabled.
  95. */
  96. #define SDL_HINT_RENDER_DIRECT3D_THREADSAFE "SDL_RENDER_DIRECT3D_THREADSAFE"
  97. /**
  98. * \brief A variable controlling whether to enable Direct3D 11+'s Debug Layer.
  99. *
  100. * This variable does not have any effect on the Direct3D 9 based renderer.
  101. *
  102. * This variable can be set to the following values:
  103. * "0" - Disable Debug Layer use
  104. * "1" - Enable Debug Layer use
  105. *
  106. * By default, SDL does not use Direct3D Debug Layer.
  107. */
  108. #define SDL_HINT_RENDER_DIRECT3D11_DEBUG "SDL_RENDER_DIRECT3D11_DEBUG"
  109. /**
  110. * \brief A variable controlling the scaling policy for SDL_RenderSetLogicalSize.
  111. *
  112. * This variable can be set to the following values:
  113. * "0" or "letterbox" - Uses letterbox/sidebars to fit the entire rendering on screen
  114. * "1" or "overscan" - Will zoom the rendering so it fills the entire screen, allowing edges to be drawn offscreen
  115. *
  116. * By default letterbox is used
  117. */
  118. #define SDL_HINT_RENDER_LOGICAL_SIZE_MODE "SDL_RENDER_LOGICAL_SIZE_MODE"
  119. /**
  120. * \brief A variable controlling the scaling quality
  121. *
  122. * This variable can be set to the following values:
  123. * "0" or "nearest" - Nearest pixel sampling
  124. * "1" or "linear" - Linear filtering (supported by OpenGL and Direct3D)
  125. * "2" or "best" - Currently this is the same as "linear"
  126. *
  127. * By default nearest pixel sampling is used
  128. */
  129. #define SDL_HINT_RENDER_SCALE_QUALITY "SDL_RENDER_SCALE_QUALITY"
  130. /**
  131. * \brief A variable controlling whether updates to the SDL screen surface should be synchronized with the vertical refresh, to avoid tearing.
  132. *
  133. * This variable can be set to the following values:
  134. * "0" - Disable vsync
  135. * "1" - Enable vsync
  136. *
  137. * By default SDL does not sync screen surface updates with vertical refresh.
  138. */
  139. #define SDL_HINT_RENDER_VSYNC "SDL_RENDER_VSYNC"
  140. /**
  141. * \brief A variable controlling whether the screensaver is enabled.
  142. *
  143. * This variable can be set to the following values:
  144. * "0" - Disable screensaver
  145. * "1" - Enable screensaver
  146. *
  147. * By default SDL will disable the screensaver.
  148. */
  149. #define SDL_HINT_VIDEO_ALLOW_SCREENSAVER "SDL_VIDEO_ALLOW_SCREENSAVER"
  150. /**
  151. * \brief A variable controlling whether the X11 VidMode extension should be used.
  152. *
  153. * This variable can be set to the following values:
  154. * "0" - Disable XVidMode
  155. * "1" - Enable XVidMode
  156. *
  157. * By default SDL will use XVidMode if it is available.
  158. */
  159. #define SDL_HINT_VIDEO_X11_XVIDMODE "SDL_VIDEO_X11_XVIDMODE"
  160. /**
  161. * \brief A variable controlling whether the X11 Xinerama extension should be used.
  162. *
  163. * This variable can be set to the following values:
  164. * "0" - Disable Xinerama
  165. * "1" - Enable Xinerama
  166. *
  167. * By default SDL will use Xinerama if it is available.
  168. */
  169. #define SDL_HINT_VIDEO_X11_XINERAMA "SDL_VIDEO_X11_XINERAMA"
  170. /**
  171. * \brief A variable controlling whether the X11 XRandR extension should be used.
  172. *
  173. * This variable can be set to the following values:
  174. * "0" - Disable XRandR
  175. * "1" - Enable XRandR
  176. *
  177. * By default SDL will not use XRandR because of window manager issues.
  178. */
  179. #define SDL_HINT_VIDEO_X11_XRANDR "SDL_VIDEO_X11_XRANDR"
  180. /**
  181. * \brief A variable controlling whether the X11 _NET_WM_PING protocol should be supported.
  182. *
  183. * This variable can be set to the following values:
  184. * "0" - Disable _NET_WM_PING
  185. * "1" - Enable _NET_WM_PING
  186. *
  187. * By default SDL will use _NET_WM_PING, but for applications that know they
  188. * will not always be able to respond to ping requests in a timely manner they can
  189. * turn it off to avoid the window manager thinking the app is hung.
  190. * The hint is checked in CreateWindow.
  191. */
  192. #define SDL_HINT_VIDEO_X11_NET_WM_PING "SDL_VIDEO_X11_NET_WM_PING"
  193. /**
  194. * \brief A variable controlling whether the X11 _NET_WM_BYPASS_COMPOSITOR hint should be used.
  195. *
  196. * This variable can be set to the following values:
  197. * "0" - Disable _NET_WM_BYPASS_COMPOSITOR
  198. * "1" - Enable _NET_WM_BYPASS_COMPOSITOR
  199. *
  200. * By default SDL will use _NET_WM_BYPASS_COMPOSITOR
  201. *
  202. */
  203. #define SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR "SDL_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR"
  204. /**
  205. * \brief A variable controlling whether the window frame and title bar are interactive when the cursor is hidden
  206. *
  207. * This variable can be set to the following values:
  208. * "0" - The window frame is not interactive when the cursor is hidden (no move, resize, etc)
  209. * "1" - The window frame is interactive when the cursor is hidden
  210. *
  211. * By default SDL will allow interaction with the window frame when the cursor is hidden
  212. */
  213. #define SDL_HINT_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN "SDL_WINDOW_FRAME_USABLE_WHILE_CURSOR_HIDDEN"
  214. /**
  215. * \brief A variable to specify custom icon resource id from RC file on Windows platform
  216. */
  217. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON "SDL_WINDOWS_INTRESOURCE_ICON"
  218. #define SDL_HINT_WINDOWS_INTRESOURCE_ICON_SMALL "SDL_WINDOWS_INTRESOURCE_ICON_SMALL"
  219. /**
  220. * \brief A variable controlling whether the windows message loop is processed by SDL
  221. *
  222. * This variable can be set to the following values:
  223. * "0" - The window message loop is not run
  224. * "1" - The window message loop is processed in SDL_PumpEvents()
  225. *
  226. * By default SDL will process the windows message loop
  227. */
  228. #define SDL_HINT_WINDOWS_ENABLE_MESSAGELOOP "SDL_WINDOWS_ENABLE_MESSAGELOOP"
  229. /**
  230. * \brief A variable controlling whether grabbing input grabs the keyboard
  231. *
  232. * This variable can be set to the following values:
  233. * "0" - Grab will affect only the mouse
  234. * "1" - Grab will affect mouse and keyboard
  235. *
  236. * By default SDL will not grab the keyboard so system shortcuts still work.
  237. */
  238. #define SDL_HINT_GRAB_KEYBOARD "SDL_GRAB_KEYBOARD"
  239. /**
  240. * \brief A variable setting the double click time, in milliseconds.
  241. */
  242. #define SDL_HINT_MOUSE_DOUBLE_CLICK_TIME "SDL_MOUSE_DOUBLE_CLICK_TIME"
  243. /**
  244. * \brief A variable setting the double click radius, in pixels.
  245. */
  246. #define SDL_HINT_MOUSE_DOUBLE_CLICK_RADIUS "SDL_MOUSE_DOUBLE_CLICK_RADIUS"
  247. /**
  248. * \brief A variable setting the speed scale for mouse motion, in floating point, when the mouse is not in relative mode
  249. */
  250. #define SDL_HINT_MOUSE_NORMAL_SPEED_SCALE "SDL_MOUSE_NORMAL_SPEED_SCALE"
  251. /**
  252. * \brief A variable setting the scale for mouse motion, in floating point, when the mouse is in relative mode
  253. */
  254. #define SDL_HINT_MOUSE_RELATIVE_SPEED_SCALE "SDL_MOUSE_RELATIVE_SPEED_SCALE"
  255. /**
  256. * \brief A variable controlling whether relative mouse mode is implemented using mouse warping
  257. *
  258. * This variable can be set to the following values:
  259. * "0" - Relative mouse mode uses raw input
  260. * "1" - Relative mouse mode uses mouse warping
  261. *
  262. * By default SDL will use raw input for relative mouse mode
  263. */
  264. #define SDL_HINT_MOUSE_RELATIVE_MODE_WARP "SDL_MOUSE_RELATIVE_MODE_WARP"
  265. /**
  266. * \brief Allow mouse click events when clicking to focus an SDL window
  267. *
  268. * This variable can be set to the following values:
  269. * "0" - Ignore mouse clicks that activate a window
  270. * "1" - Generate events for mouse clicks that activate a window
  271. *
  272. * By default SDL will ignore mouse clicks that activate a window
  273. */
  274. #define SDL_HINT_MOUSE_FOCUS_CLICKTHROUGH "SDL_MOUSE_FOCUS_CLICKTHROUGH"
  275. /**
  276. * \brief A variable controlling whether touch events should generate synthetic mouse events
  277. *
  278. * This variable can be set to the following values:
  279. * "0" - Touch events will not generate mouse events
  280. * "1" - Touch events will generate mouse events
  281. *
  282. * By default SDL will generate mouse events for touch events
  283. */
  284. #define SDL_HINT_TOUCH_MOUSE_EVENTS "SDL_TOUCH_MOUSE_EVENTS"
  285. /**
  286. * \brief Minimize your SDL_Window if it loses key focus when in fullscreen mode. Defaults to true.
  287. *
  288. */
  289. #define SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS "SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
  290. /**
  291. * \brief A variable controlling whether the idle timer is disabled on iOS.
  292. *
  293. * When an iOS app does not receive touches for some time, the screen is
  294. * dimmed automatically. For games where the accelerometer is the only input
  295. * this is problematic. This functionality can be disabled by setting this
  296. * hint.
  297. *
  298. * As of SDL 2.0.4, SDL_EnableScreenSaver() and SDL_DisableScreenSaver()
  299. * accomplish the same thing on iOS. They should be preferred over this hint.
  300. *
  301. * This variable can be set to the following values:
  302. * "0" - Enable idle timer
  303. * "1" - Disable idle timer
  304. */
  305. #define SDL_HINT_IDLE_TIMER_DISABLED "SDL_IOS_IDLE_TIMER_DISABLED"
  306. /**
  307. * \brief A variable controlling which orientations are allowed on iOS/Android.
  308. *
  309. * In some circumstances it is necessary to be able to explicitly control
  310. * which UI orientations are allowed.
  311. *
  312. * This variable is a space delimited list of the following values:
  313. * "LandscapeLeft", "LandscapeRight", "Portrait" "PortraitUpsideDown"
  314. */
  315. #define SDL_HINT_ORIENTATIONS "SDL_IOS_ORIENTATIONS"
  316. /**
  317. * \brief A variable controlling whether controllers used with the Apple TV
  318. * generate UI events.
  319. *
  320. * When UI events are generated by controller input, the app will be
  321. * backgrounded when the Apple TV remote's menu button is pressed, and when the
  322. * pause or B buttons on gamepads are pressed.
  323. *
  324. * More information about properly making use of controllers for the Apple TV
  325. * can be found here:
  326. * https://developer.apple.com/tvos/human-interface-guidelines/remote-and-controllers/
  327. *
  328. * This variable can be set to the following values:
  329. * "0" - Controller input does not generate UI events (the default).
  330. * "1" - Controller input generates UI events.
  331. */
  332. #define SDL_HINT_APPLE_TV_CONTROLLER_UI_EVENTS "SDL_APPLE_TV_CONTROLLER_UI_EVENTS"
  333. /**
  334. * \brief A variable controlling whether the Apple TV remote's joystick axes
  335. * will automatically match the rotation of the remote.
  336. *
  337. * This variable can be set to the following values:
  338. * "0" - Remote orientation does not affect joystick axes (the default).
  339. * "1" - Joystick axes are based on the orientation of the remote.
  340. */
  341. #define SDL_HINT_APPLE_TV_REMOTE_ALLOW_ROTATION "SDL_APPLE_TV_REMOTE_ALLOW_ROTATION"
  342. /**
  343. * \brief A variable controlling whether the home indicator bar on iPhone X
  344. * should be hidden.
  345. *
  346. * This variable can be set to the following values:
  347. * "0" - The indicator bar is not hidden (default for windowed applications)
  348. * "1" - The indicator bar is hidden and is shown when the screen is touched (useful for movie playback applications)
  349. * "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)
  350. */
  351. #define SDL_HINT_IOS_HIDE_HOME_INDICATOR "SDL_IOS_HIDE_HOME_INDICATOR"
  352. /**
  353. * \brief A variable controlling whether the Android / iOS built-in
  354. * accelerometer should be listed as a joystick device.
  355. *
  356. * This variable can be set to the following values:
  357. * "0" - The accelerometer is not listed as a joystick
  358. * "1" - The accelerometer is available as a 3 axis joystick (the default).
  359. */
  360. #define SDL_HINT_ACCELEROMETER_AS_JOYSTICK "SDL_ACCELEROMETER_AS_JOYSTICK"
  361. /**
  362. * \brief A variable controlling whether the Android / tvOS remotes
  363. * should be listed as joystick devices, instead of sending keyboard events.
  364. *
  365. * This variable can be set to the following values:
  366. * "0" - Remotes send enter/escape/arrow key events
  367. * "1" - Remotes are available as 2 axis, 2 button joysticks (the default).
  368. */
  369. #define SDL_HINT_TV_REMOTE_AS_JOYSTICK "SDL_TV_REMOTE_AS_JOYSTICK"
  370. /**
  371. * \brief A variable that lets you disable the detection and use of Xinput gamepad devices
  372. *
  373. * The variable can be set to the following values:
  374. * "0" - Disable XInput detection (only uses direct input)
  375. * "1" - Enable XInput detection (the default)
  376. */
  377. #define SDL_HINT_XINPUT_ENABLED "SDL_XINPUT_ENABLED"
  378. /**
  379. * \brief A variable that causes SDL to use the old axis and button mapping for XInput devices.
  380. *
  381. * This hint is for backwards compatibility only and will be removed in SDL 2.1
  382. *
  383. * The default value is "0". This hint must be set before SDL_Init()
  384. */
  385. #define SDL_HINT_XINPUT_USE_OLD_JOYSTICK_MAPPING "SDL_XINPUT_USE_OLD_JOYSTICK_MAPPING"
  386. /**
  387. * \brief A variable that lets you manually hint extra gamecontroller db entries.
  388. *
  389. * The variable should be newline delimited rows of gamecontroller config data, see SDL_gamecontroller.h
  390. *
  391. * This hint must be set before calling SDL_Init(SDL_INIT_GAMECONTROLLER)
  392. * You can update mappings after the system is initialized with SDL_GameControllerMappingForGUID() and SDL_GameControllerAddMapping()
  393. */
  394. #define SDL_HINT_GAMECONTROLLERCONFIG "SDL_GAMECONTROLLERCONFIG"
  395. /**
  396. * \brief A variable containing a list of devices to skip when scanning for game controllers.
  397. *
  398. * The format of the string is a comma separated list of USB VID/PID pairs
  399. * in hexadecimal form, e.g.
  400. *
  401. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  402. *
  403. * The variable can also take the form of @file, in which case the named
  404. * file will be loaded and interpreted as the value of the variable.
  405. */
  406. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES "SDL_GAMECONTROLLER_IGNORE_DEVICES"
  407. /**
  408. * \brief If set, all devices will be skipped when scanning for game controllers except for the ones listed in this variable.
  409. *
  410. * The format of the string is a comma separated list of USB VID/PID pairs
  411. * in hexadecimal form, e.g.
  412. *
  413. * 0xAAAA/0xBBBB,0xCCCC/0xDDDD
  414. *
  415. * The variable can also take the form of @file, in which case the named
  416. * file will be loaded and interpreted as the value of the variable.
  417. */
  418. #define SDL_HINT_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT "SDL_GAMECONTROLLER_IGNORE_DEVICES_EXCEPT"
  419. /**
  420. * \brief A variable that lets you enable joystick (and gamecontroller) events even when your app is in the background.
  421. *
  422. * The variable can be set to the following values:
  423. * "0" - Disable joystick & gamecontroller input events when the
  424. * application is in the background.
  425. * "1" - Enable joystick & gamecontroller input events when the
  426. * application is in the background.
  427. *
  428. * The default value is "0". This hint may be set at any time.
  429. */
  430. #define SDL_HINT_JOYSTICK_ALLOW_BACKGROUND_EVENTS "SDL_JOYSTICK_ALLOW_BACKGROUND_EVENTS"
  431. /**
  432. * \brief A variable controlling whether the HIDAPI joystick drivers should be used.
  433. *
  434. * This variable can be set to the following values:
  435. * "0" - HIDAPI drivers are not used
  436. * "1" - HIDAPI drivers are used (the default)
  437. *
  438. * This variable is the default for all drivers, but can be overridden by the hints for specific drivers below.
  439. */
  440. #define SDL_HINT_JOYSTICK_HIDAPI "SDL_JOYSTICK_HIDAPI"
  441. /**
  442. * \brief A variable controlling whether the HIDAPI driver for PS4 controllers should be used.
  443. *
  444. * This variable can be set to the following values:
  445. * "0" - HIDAPI driver is not used
  446. * "1" - HIDAPI driver is used
  447. *
  448. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  449. */
  450. #define SDL_HINT_JOYSTICK_HIDAPI_PS4 "SDL_JOYSTICK_HIDAPI_PS4"
  451. /**
  452. * \brief A variable controlling whether extended input reports should be used for PS4 controllers when using the HIDAPI driver.
  453. *
  454. * This variable can be set to the following values:
  455. * "0" - extended reports are not enabled (the default)
  456. * "1" - extended reports
  457. *
  458. * Extended input reports allow rumble on Bluetooth PS4 controllers, but
  459. * break DirectInput handling for applications that don't use SDL.
  460. *
  461. * Once extended reports are enabled, they can not be disabled without
  462. * power cycling the controller.
  463. */
  464. #define SDL_HINT_JOYSTICK_HIDAPI_PS4_RUMBLE "SDL_JOYSTICK_HIDAPI_PS4_RUMBLE"
  465. /**
  466. * \brief A variable controlling whether the HIDAPI driver for Steam Controllers should be used.
  467. *
  468. * This variable can be set to the following values:
  469. * "0" - HIDAPI driver is not used
  470. * "1" - HIDAPI driver is used
  471. *
  472. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  473. */
  474. #define SDL_HINT_JOYSTICK_HIDAPI_STEAM "SDL_JOYSTICK_HIDAPI_STEAM"
  475. /**
  476. * \brief A variable controlling whether the HIDAPI driver for Nintendo Switch controllers should be used.
  477. *
  478. * This variable can be set to the following values:
  479. * "0" - HIDAPI driver is not used
  480. * "1" - HIDAPI driver is used
  481. *
  482. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  483. */
  484. #define SDL_HINT_JOYSTICK_HIDAPI_SWITCH "SDL_JOYSTICK_HIDAPI_SWITCH"
  485. /**
  486. * \brief A variable controlling whether the HIDAPI driver for XBox controllers should be used.
  487. *
  488. * This variable can be set to the following values:
  489. * "0" - HIDAPI driver is not used
  490. * "1" - HIDAPI driver is used
  491. *
  492. * The default is the value of SDL_HINT_JOYSTICK_HIDAPI
  493. */
  494. #define SDL_HINT_JOYSTICK_HIDAPI_XBOX "SDL_JOYSTICK_HIDAPI_XBOX"
  495. /**
  496. * \brief A variable that controls whether Steam Controllers should be exposed using the SDL joystick and game controller APIs
  497. *
  498. * The variable can be set to the following values:
  499. * "0" - Do not scan for Steam Controllers
  500. * "1" - Scan for Steam Controllers (the default)
  501. *
  502. * The default value is "1". This hint must be set before initializing the joystick subsystem.
  503. */
  504. #define SDL_HINT_ENABLE_STEAM_CONTROLLERS "SDL_ENABLE_STEAM_CONTROLLERS"
  505. /**
  506. * \brief If set to "0" then never set the top most bit on a SDL Window, even if the video mode expects it.
  507. * This is a debugging aid for developers and not expected to be used by end users. The default is "1"
  508. *
  509. * This variable can be set to the following values:
  510. * "0" - don't allow topmost
  511. * "1" - allow topmost
  512. */
  513. #define SDL_HINT_ALLOW_TOPMOST "SDL_ALLOW_TOPMOST"
  514. /**
  515. * \brief A variable that controls the timer resolution, in milliseconds.
  516. *
  517. * The higher resolution the timer, the more frequently the CPU services
  518. * timer interrupts, and the more precise delays are, but this takes up
  519. * power and CPU time. This hint is only used on Windows 7 and earlier.
  520. *
  521. * See this blog post for more information:
  522. * http://randomascii.wordpress.com/2013/07/08/windows-timer-resolution-megawatts-wasted/
  523. *
  524. * If this variable is set to "0", the system timer resolution is not set.
  525. *
  526. * The default value is "1". This hint may be set at any time.
  527. */
  528. #define SDL_HINT_TIMER_RESOLUTION "SDL_TIMER_RESOLUTION"
  529. /**
  530. * \brief A variable describing the content orientation on QtWayland-based platforms.
  531. *
  532. * On QtWayland platforms, windows are rotated client-side to allow for custom
  533. * transitions. In order to correctly position overlays (e.g. volume bar) and
  534. * gestures (e.g. events view, close/minimize gestures), the system needs to
  535. * know in which orientation the application is currently drawing its contents.
  536. *
  537. * This does not cause the window to be rotated or resized, the application
  538. * needs to take care of drawing the content in the right orientation (the
  539. * framebuffer is always in portrait mode).
  540. *
  541. * This variable can be one of the following values:
  542. * "primary" (default), "portrait", "landscape", "inverted-portrait", "inverted-landscape"
  543. */
  544. #define SDL_HINT_QTWAYLAND_CONTENT_ORIENTATION "SDL_QTWAYLAND_CONTENT_ORIENTATION"
  545. /**
  546. * \brief Flags to set on QtWayland windows to integrate with the native window manager.
  547. *
  548. * On QtWayland platforms, this hint controls the flags to set on the windows.
  549. * For example, on Sailfish OS "OverridesSystemGestures" disables swipe gestures.
  550. *
  551. * This variable is a space-separated list of the following values (empty = no flags):
  552. * "OverridesSystemGestures", "StaysOnTop", "BypassWindowManager"
  553. */
  554. #define SDL_HINT_QTWAYLAND_WINDOW_FLAGS "SDL_QTWAYLAND_WINDOW_FLAGS"
  555. /**
  556. * \brief A string specifying SDL's threads stack size in bytes or "0" for the backend's default size
  557. *
  558. * Use this hint in case you need to set SDL's threads stack size to other than the default.
  559. * This is specially useful if you build SDL against a non glibc libc library (such as musl) which
  560. * provides a relatively small default thread stack size (a few kilobytes versus the default 8MB glibc uses).
  561. * Support for this hint is currently available only in the pthread, Windows, and PSP backend.
  562. *
  563. * Instead of this hint, in 2.0.9 and later, you can use
  564. * SDL_CreateThreadWithStackSize(). This hint only works with the classic
  565. * SDL_CreateThread().
  566. */
  567. #define SDL_HINT_THREAD_STACK_SIZE "SDL_THREAD_STACK_SIZE"
  568. /**
  569. * \brief If set to 1, then do not allow high-DPI windows. ("Retina" on Mac and iOS)
  570. */
  571. #define SDL_HINT_VIDEO_HIGHDPI_DISABLED "SDL_VIDEO_HIGHDPI_DISABLED"
  572. /**
  573. * \brief A variable that determines whether ctrl+click should generate a right-click event on Mac
  574. *
  575. * If present, holding ctrl while left clicking will generate a right click
  576. * event when on Mac.
  577. */
  578. #define SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK "SDL_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK"
  579. /**
  580. * \brief A variable specifying which shader compiler to preload when using the Chrome ANGLE binaries
  581. *
  582. * SDL has EGL and OpenGL ES2 support on Windows via the ANGLE project. It
  583. * can use two different sets of binaries, those compiled by the user from source
  584. * or those provided by the Chrome browser. In the later case, these binaries require
  585. * that SDL loads a DLL providing the shader compiler.
  586. *
  587. * This variable can be set to the following values:
  588. * "d3dcompiler_46.dll" - default, best for Vista or later.
  589. * "d3dcompiler_43.dll" - for XP support.
  590. * "none" - do not load any library, useful if you compiled ANGLE from source and included the compiler in your binaries.
  591. *
  592. */
  593. #define SDL_HINT_VIDEO_WIN_D3DCOMPILER "SDL_VIDEO_WIN_D3DCOMPILER"
  594. /**
  595. * \brief A variable that is the address of another SDL_Window* (as a hex string formatted with "%p").
  596. *
  597. * If this hint is set before SDL_CreateWindowFrom() and the SDL_Window* it is set to has
  598. * SDL_WINDOW_OPENGL set (and running on WGL only, currently), then two things will occur on the newly
  599. * created SDL_Window:
  600. *
  601. * 1. Its pixel format will be set to the same pixel format as this SDL_Window. This is
  602. * needed for example when sharing an OpenGL context across multiple windows.
  603. *
  604. * 2. The flag SDL_WINDOW_OPENGL will be set on the new window so it can be used for
  605. * OpenGL rendering.
  606. *
  607. * This variable can be set to the following values:
  608. * The address (as a string "%p") of the SDL_Window* that new windows created with SDL_CreateWindowFrom() should
  609. * share a pixel format with.
  610. */
  611. #define SDL_HINT_VIDEO_WINDOW_SHARE_PIXEL_FORMAT "SDL_VIDEO_WINDOW_SHARE_PIXEL_FORMAT"
  612. /**
  613. * \brief A URL to a WinRT app's privacy policy
  614. *
  615. * All network-enabled WinRT apps must make a privacy policy available to its
  616. * users. On Windows 8, 8.1, and RT, Microsoft mandates that this policy be
  617. * be available in the Windows Settings charm, as accessed from within the app.
  618. * SDL provides code to add a URL-based link there, which can point to the app's
  619. * privacy policy.
  620. *
  621. * To setup a URL to an app's privacy policy, set SDL_HINT_WINRT_PRIVACY_POLICY_URL
  622. * before calling any SDL_Init() functions. The contents of the hint should
  623. * be a valid URL. For example, "http://www.example.com".
  624. *
  625. * The default value is "", which will prevent SDL from adding a privacy policy
  626. * link to the Settings charm. This hint should only be set during app init.
  627. *
  628. * The label text of an app's "Privacy Policy" link may be customized via another
  629. * hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  630. *
  631. * Please note that on Windows Phone, Microsoft does not provide standard UI
  632. * for displaying a privacy policy link, and as such, SDL_HINT_WINRT_PRIVACY_POLICY_URL
  633. * will not get used on that platform. Network-enabled phone apps should display
  634. * their privacy policy through some other, in-app means.
  635. */
  636. #define SDL_HINT_WINRT_PRIVACY_POLICY_URL "SDL_WINRT_PRIVACY_POLICY_URL"
  637. /** \brief Label text for a WinRT app's privacy policy link
  638. *
  639. * Network-enabled WinRT apps must include a privacy policy. On Windows 8, 8.1, and RT,
  640. * Microsoft mandates that this policy be available via the Windows Settings charm.
  641. * SDL provides code to add a link there, with its label text being set via the
  642. * optional hint, SDL_HINT_WINRT_PRIVACY_POLICY_LABEL.
  643. *
  644. * Please note that a privacy policy's contents are not set via this hint. A separate
  645. * hint, SDL_HINT_WINRT_PRIVACY_POLICY_URL, is used to link to the actual text of the
  646. * policy.
  647. *
  648. * The contents of this hint should be encoded as a UTF8 string.
  649. *
  650. * The default value is "Privacy Policy". This hint should only be set during app
  651. * initialization, preferably before any calls to SDL_Init().
  652. *
  653. * For additional information on linking to a privacy policy, see the documentation for
  654. * SDL_HINT_WINRT_PRIVACY_POLICY_URL.
  655. */
  656. #define SDL_HINT_WINRT_PRIVACY_POLICY_LABEL "SDL_WINRT_PRIVACY_POLICY_LABEL"
  657. /** \brief Allows back-button-press events on Windows Phone to be marked as handled
  658. *
  659. * Windows Phone devices typically feature a Back button. When pressed,
  660. * the OS will emit back-button-press events, which apps are expected to
  661. * handle in an appropriate manner. If apps do not explicitly mark these
  662. * events as 'Handled', then the OS will invoke its default behavior for
  663. * unhandled back-button-press events, which on Windows Phone 8 and 8.1 is to
  664. * terminate the app (and attempt to switch to the previous app, or to the
  665. * device's home screen).
  666. *
  667. * Setting the SDL_HINT_WINRT_HANDLE_BACK_BUTTON hint to "1" will cause SDL
  668. * to mark back-button-press events as Handled, if and when one is sent to
  669. * the app.
  670. *
  671. * Internally, Windows Phone sends back button events as parameters to
  672. * special back-button-press callback functions. Apps that need to respond
  673. * to back-button-press events are expected to register one or more
  674. * callback functions for such, shortly after being launched (during the
  675. * app's initialization phase). After the back button is pressed, the OS
  676. * will invoke these callbacks. If the app's callback(s) do not explicitly
  677. * mark the event as handled by the time they return, or if the app never
  678. * registers one of these callback, the OS will consider the event
  679. * un-handled, and it will apply its default back button behavior (terminate
  680. * the app).
  681. *
  682. * SDL registers its own back-button-press callback with the Windows Phone
  683. * OS. This callback will emit a pair of SDL key-press events (SDL_KEYDOWN
  684. * and SDL_KEYUP), each with a scancode of SDL_SCANCODE_AC_BACK, after which
  685. * it will check the contents of the hint, SDL_HINT_WINRT_HANDLE_BACK_BUTTON.
  686. * If the hint's value is set to "1", the back button event's Handled
  687. * property will get set to 'true'. If the hint's value is set to something
  688. * else, or if it is unset, SDL will leave the event's Handled property
  689. * alone. (By default, the OS sets this property to 'false', to note.)
  690. *
  691. * SDL apps can either set SDL_HINT_WINRT_HANDLE_BACK_BUTTON well before a
  692. * back button is pressed, or can set it in direct-response to a back button
  693. * being pressed.
  694. *
  695. * In order to get notified when a back button is pressed, SDL apps should
  696. * register a callback function with SDL_AddEventWatch(), and have it listen
  697. * for SDL_KEYDOWN events that have a scancode of SDL_SCANCODE_AC_BACK.
  698. * (Alternatively, SDL_KEYUP events can be listened-for. Listening for
  699. * either event type is suitable.) Any value of SDL_HINT_WINRT_HANDLE_BACK_BUTTON
  700. * set by such a callback, will be applied to the OS' current
  701. * back-button-press event.
  702. *
  703. * More details on back button behavior in Windows Phone apps can be found
  704. * at the following page, on Microsoft's developer site:
  705. * http://msdn.microsoft.com/en-us/library/windowsphone/develop/jj247550(v=vs.105).aspx
  706. */
  707. #define SDL_HINT_WINRT_HANDLE_BACK_BUTTON "SDL_WINRT_HANDLE_BACK_BUTTON"
  708. /**
  709. * \brief A variable that dictates policy for fullscreen Spaces on Mac OS X.
  710. *
  711. * This hint only applies to Mac OS X.
  712. *
  713. * The variable can be set to the following values:
  714. * "0" - Disable Spaces support (FULLSCREEN_DESKTOP won't use them and
  715. * SDL_WINDOW_RESIZABLE windows won't offer the "fullscreen"
  716. * button on their titlebars).
  717. * "1" - Enable Spaces support (FULLSCREEN_DESKTOP will use them and
  718. * SDL_WINDOW_RESIZABLE windows will offer the "fullscreen"
  719. * button on their titlebars).
  720. *
  721. * The default value is "1". Spaces are disabled regardless of this hint if
  722. * the OS isn't at least Mac OS X Lion (10.7). This hint must be set before
  723. * any windows are created.
  724. */
  725. #define SDL_HINT_VIDEO_MAC_FULLSCREEN_SPACES "SDL_VIDEO_MAC_FULLSCREEN_SPACES"
  726. /**
  727. * \brief When set don't force the SDL app to become a foreground process
  728. *
  729. * This hint only applies to Mac OS X.
  730. *
  731. */
  732. #define SDL_HINT_MAC_BACKGROUND_APP "SDL_MAC_BACKGROUND_APP"
  733. /**
  734. * \brief Android APK expansion main file version. Should be a string number like "1", "2" etc.
  735. *
  736. * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION.
  737. *
  738. * If both hints were set then SDL_RWFromFile() will look into expansion files
  739. * after a given relative path was not found in the internal storage and assets.
  740. *
  741. * By default this hint is not set and the APK expansion files are not searched.
  742. */
  743. #define SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION"
  744. /**
  745. * \brief Android APK expansion patch file version. Should be a string number like "1", "2" etc.
  746. *
  747. * Must be set together with SDL_HINT_ANDROID_APK_EXPANSION_MAIN_FILE_VERSION.
  748. *
  749. * If both hints were set then SDL_RWFromFile() will look into expansion files
  750. * after a given relative path was not found in the internal storage and assets.
  751. *
  752. * By default this hint is not set and the APK expansion files are not searched.
  753. */
  754. #define SDL_HINT_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION "SDL_ANDROID_APK_EXPANSION_PATCH_FILE_VERSION"
  755. /**
  756. * \brief A variable to control whether certain IMEs should handle text editing internally instead of sending SDL_TEXTEDITING events.
  757. *
  758. * The variable can be set to the following values:
  759. * "0" - SDL_TEXTEDITING events are sent, and it is the application's
  760. * responsibility to render the text from these events and
  761. * differentiate it somehow from committed text. (default)
  762. * "1" - If supported by the IME then SDL_TEXTEDITING events are not sent,
  763. * and text that is being composed will be rendered in its own UI.
  764. */
  765. #define SDL_HINT_IME_INTERNAL_EDITING "SDL_IME_INTERNAL_EDITING"
  766. /**
  767. * \brief A variable to control whether mouse and touch events are to be treated together or separately
  768. *
  769. * The variable can be set to the following values:
  770. * "0" - Mouse events will be handled as touch events, and touch will raise fake mouse
  771. * events. This is the behaviour of SDL <= 2.0.3. (default)
  772. * "1" - Mouse events will be handled separately from pure touch events.
  773. *
  774. * The value of this hint is used at runtime, so it can be changed at any time.
  775. */
  776. #define SDL_HINT_ANDROID_SEPARATE_MOUSE_AND_TOUCH "SDL_ANDROID_SEPARATE_MOUSE_AND_TOUCH"
  777. /**
  778. * \brief A variable to control whether we trap the Android back button to handle it manually.
  779. * This is necessary for the right mouse button to work on some Android devices, or
  780. * to be able to trap the back button for use in your code reliably. If set to true,
  781. * the back button will show up as an SDL_KEYDOWN / SDL_KEYUP pair with a keycode of
  782. * SDL_SCANCODE_AC_BACK.
  783. *
  784. * The variable can be set to the following values:
  785. * "0" - Back button will be handled as usual for system. (default)
  786. * "1" - Back button will be trapped, allowing you to handle the key press
  787. * manually. (This will also let right mouse click work on systems
  788. * where the right mouse button functions as back.)
  789. *
  790. * The value of this hint is used at runtime, so it can be changed at any time.
  791. */
  792. #define SDL_HINT_ANDROID_TRAP_BACK_BUTTON "SDL_ANDROID_TRAP_BACK_BUTTON"
  793. /**
  794. * \brief A variable to control whether the return key on the soft keyboard
  795. * should hide the soft keyboard on Android and iOS.
  796. *
  797. * The variable can be set to the following values:
  798. * "0" - The return key will be handled as a key event. This is the behaviour of SDL <= 2.0.3. (default)
  799. * "1" - The return key will hide the keyboard.
  800. *
  801. * The value of this hint is used at runtime, so it can be changed at any time.
  802. */
  803. #define SDL_HINT_RETURN_KEY_HIDES_IME "SDL_RETURN_KEY_HIDES_IME"
  804. /**
  805. * \brief override the binding element for keyboard inputs for Emscripten builds
  806. *
  807. * This hint only applies to the emscripten platform
  808. *
  809. * The variable can be one of
  810. * "#window" - The javascript window object (this is the default)
  811. * "#document" - The javascript document object
  812. * "#screen" - the javascript window.screen object
  813. * "#canvas" - the WebGL canvas element
  814. * any other string without a leading # sign applies to the element on the page with that ID.
  815. */
  816. #define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
  817. /**
  818. * \brief Tell SDL not to catch the SIGINT or SIGTERM signals.
  819. *
  820. * This hint only applies to Unix-like platforms.
  821. *
  822. * The variable can be set to the following values:
  823. * "0" - SDL will install a SIGINT and SIGTERM handler, and when it
  824. * catches a signal, convert it into an SDL_QUIT event.
  825. * "1" - SDL will not install a signal handler at all.
  826. */
  827. #define SDL_HINT_NO_SIGNAL_HANDLERS "SDL_NO_SIGNAL_HANDLERS"
  828. /**
  829. * \brief Tell SDL not to generate window-close events for Alt+F4 on Windows.
  830. *
  831. * The variable can be set to the following values:
  832. * "0" - SDL will generate a window-close event when it sees Alt+F4.
  833. * "1" - SDL will only do normal key handling for Alt+F4.
  834. */
  835. #define SDL_HINT_WINDOWS_NO_CLOSE_ON_ALT_F4 "SDL_WINDOWS_NO_CLOSE_ON_ALT_F4"
  836. /**
  837. * \brief Prevent SDL from using version 4 of the bitmap header when saving BMPs.
  838. *
  839. * The bitmap header version 4 is required for proper alpha channel support and
  840. * SDL will use it when required. Should this not be desired, this hint can
  841. * force the use of the 40 byte header version which is supported everywhere.
  842. *
  843. * The variable can be set to the following values:
  844. * "0" - Surfaces with a colorkey or an alpha channel are saved to a
  845. * 32-bit BMP file with an alpha mask. SDL will use the bitmap
  846. * header version 4 and set the alpha mask accordingly.
  847. * "1" - Surfaces with a colorkey or an alpha channel are saved to a
  848. * 32-bit BMP file without an alpha mask. The alpha channel data
  849. * will be in the file, but applications are going to ignore it.
  850. *
  851. * The default value is "0".
  852. */
  853. #define SDL_HINT_BMP_SAVE_LEGACY_FORMAT "SDL_BMP_SAVE_LEGACY_FORMAT"
  854. /**
  855. * \brief Tell SDL not to name threads on Windows with the 0x406D1388 Exception.
  856. * The 0x406D1388 Exception is a trick used to inform Visual Studio of a
  857. * thread's name, but it tends to cause problems with other debuggers,
  858. * and the .NET runtime. Note that SDL 2.0.6 and later will still use
  859. * the (safer) SetThreadDescription API, introduced in the Windows 10
  860. * Creators Update, if available.
  861. *
  862. * The variable can be set to the following values:
  863. * "0" - SDL will raise the 0x406D1388 Exception to name threads.
  864. * This is the default behavior of SDL <= 2.0.4.
  865. * "1" - SDL will not raise this exception, and threads will be unnamed. (default)
  866. * This is necessary with .NET languages or debuggers that aren't Visual Studio.
  867. */
  868. #define SDL_HINT_WINDOWS_DISABLE_THREAD_NAMING "SDL_WINDOWS_DISABLE_THREAD_NAMING"
  869. /**
  870. * \brief Tell SDL which Dispmanx layer to use on a Raspberry PI
  871. *
  872. * Also known as Z-order. The variable can take a negative or positive value.
  873. * The default is 10000.
  874. */
  875. #define SDL_HINT_RPI_VIDEO_LAYER "SDL_RPI_VIDEO_LAYER"
  876. /**
  877. * \brief Tell the video driver that we only want a double buffer.
  878. *
  879. * By default, most lowlevel 2D APIs will use a triple buffer scheme that
  880. * wastes no CPU time on waiting for vsync after issuing a flip, but
  881. * introduces a frame of latency. On the other hand, using a double buffer
  882. * scheme instead is recommended for cases where low latency is an important
  883. * factor because we save a whole frame of latency.
  884. * We do so by waiting for vsync immediately after issuing a flip, usually just
  885. * after eglSwapBuffers call in the backend's *_SwapWindow function.
  886. *
  887. * Since it's driver-specific, it's only supported where possible and
  888. * implemented. Currently supported the following drivers:
  889. * - KMSDRM (kmsdrm)
  890. * - Raspberry Pi (raspberrypi)
  891. */
  892. #define SDL_HINT_VIDEO_DOUBLE_BUFFER "SDL_VIDEO_DOUBLE_BUFFER"
  893. /**
  894. * \brief A variable controlling what driver to use for OpenGL ES contexts.
  895. *
  896. * On some platforms, currently Windows and X11, OpenGL drivers may support
  897. * creating contexts with an OpenGL ES profile. By default SDL uses these
  898. * profiles, when available, otherwise it attempts to load an OpenGL ES
  899. * library, e.g. that provided by the ANGLE project. This variable controls
  900. * whether SDL follows this default behaviour or will always load an
  901. * OpenGL ES library.
  902. *
  903. * Circumstances where this is useful include
  904. * - Testing an app with a particular OpenGL ES implementation, e.g ANGLE,
  905. * or emulator, e.g. those from ARM, Imagination or Qualcomm.
  906. * - Resolving OpenGL ES function addresses at link time by linking with
  907. * the OpenGL ES library instead of querying them at run time with
  908. * SDL_GL_GetProcAddress().
  909. *
  910. * Caution: for an application to work with the default behaviour across
  911. * different OpenGL drivers it must query the OpenGL ES function
  912. * addresses at run time using SDL_GL_GetProcAddress().
  913. *
  914. * This variable is ignored on most platforms because OpenGL ES is native
  915. * or not supported.
  916. *
  917. * This variable can be set to the following values:
  918. * "0" - Use ES profile of OpenGL, if available. (Default when not set.)
  919. * "1" - Load OpenGL ES library using the default library names.
  920. *
  921. */
  922. #define SDL_HINT_OPENGL_ES_DRIVER "SDL_OPENGL_ES_DRIVER"
  923. /**
  924. * \brief A variable controlling speed/quality tradeoff of audio resampling.
  925. *
  926. * If available, SDL can use libsamplerate ( http://www.mega-nerd.com/SRC/ )
  927. * to handle audio resampling. There are different resampling modes available
  928. * that produce different levels of quality, using more CPU.
  929. *
  930. * If this hint isn't specified to a valid setting, or libsamplerate isn't
  931. * available, SDL will use the default, internal resampling algorithm.
  932. *
  933. * Note that this is currently only applicable to resampling audio that is
  934. * being written to a device for playback or audio being read from a device
  935. * for capture. SDL_AudioCVT always uses the default resampler (although this
  936. * might change for SDL 2.1).
  937. *
  938. * This hint is currently only checked at audio subsystem initialization.
  939. *
  940. * This variable can be set to the following values:
  941. *
  942. * "0" or "default" - Use SDL's internal resampling (Default when not set - low quality, fast)
  943. * "1" or "fast" - Use fast, slightly higher quality resampling, if available
  944. * "2" or "medium" - Use medium quality resampling, if available
  945. * "3" or "best" - Use high quality resampling, if available
  946. */
  947. #define SDL_HINT_AUDIO_RESAMPLING_MODE "SDL_AUDIO_RESAMPLING_MODE"
  948. /**
  949. * \brief A variable controlling the audio category on iOS and Mac OS X
  950. *
  951. * This variable can be set to the following values:
  952. *
  953. * "ambient" - Use the AVAudioSessionCategoryAmbient audio category, will be muted by the phone mute switch (default)
  954. * "playback" - Use the AVAudioSessionCategoryPlayback category
  955. *
  956. * For more information, see Apple's documentation:
  957. * https://developer.apple.com/library/content/documentation/Audio/Conceptual/AudioSessionProgrammingGuide/AudioSessionCategoriesandModes/AudioSessionCategoriesandModes.html
  958. */
  959. #define SDL_HINT_AUDIO_CATEGORY "SDL_AUDIO_CATEGORY"
  960. /**
  961. * \brief An enumeration of hint priorities
  962. */
  963. typedef enum
  964. {
  965. SDL_HINT_DEFAULT,
  966. SDL_HINT_NORMAL,
  967. SDL_HINT_OVERRIDE
  968. } SDL_HintPriority;
  969. /**
  970. * \brief Set a hint with a specific priority
  971. *
  972. * The priority controls the behavior when setting a hint that already
  973. * has a value. Hints will replace existing hints of their priority and
  974. * lower. Environment variables are considered to have override priority.
  975. *
  976. * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
  977. */
  978. extern DECLSPEC SDL_bool SDLCALL SDL_SetHintWithPriority(const char *name,
  979. const char *value,
  980. SDL_HintPriority priority);
  981. /**
  982. * \brief Set a hint with normal priority
  983. *
  984. * \return SDL_TRUE if the hint was set, SDL_FALSE otherwise
  985. */
  986. extern DECLSPEC SDL_bool SDLCALL SDL_SetHint(const char *name,
  987. const char *value);
  988. /**
  989. * \brief Get a hint
  990. *
  991. * \return The string value of a hint variable.
  992. */
  993. extern DECLSPEC const char * SDLCALL SDL_GetHint(const char *name);
  994. /**
  995. * \brief Get a hint
  996. *
  997. * \return The boolean value of a hint variable.
  998. */
  999. extern DECLSPEC SDL_bool SDLCALL SDL_GetHintBoolean(const char *name, SDL_bool default_value);
  1000. /**
  1001. * \brief type definition of the hint callback function.
  1002. */
  1003. typedef void (SDLCALL *SDL_HintCallback)(void *userdata, const char *name, const char *oldValue, const char *newValue);
  1004. /**
  1005. * \brief Add a function to watch a particular hint
  1006. *
  1007. * \param name The hint to watch
  1008. * \param callback The function to call when the hint value changes
  1009. * \param userdata A pointer to pass to the callback function
  1010. */
  1011. extern DECLSPEC void SDLCALL SDL_AddHintCallback(const char *name,
  1012. SDL_HintCallback callback,
  1013. void *userdata);
  1014. /**
  1015. * \brief Remove a function watching a particular hint
  1016. *
  1017. * \param name The hint being watched
  1018. * \param callback The function being called when the hint value changes
  1019. * \param userdata A pointer being passed to the callback function
  1020. */
  1021. extern DECLSPEC void SDLCALL SDL_DelHintCallback(const char *name,
  1022. SDL_HintCallback callback,
  1023. void *userdata);
  1024. /**
  1025. * \brief Clear all hints
  1026. *
  1027. * This function is called during SDL_Quit() to free stored hints.
  1028. */
  1029. extern DECLSPEC void SDLCALL SDL_ClearHints(void);
  1030. /* Ends C function definitions when using C++ */
  1031. #ifdef __cplusplus
  1032. }
  1033. #endif
  1034. #include "close_code.h"
  1035. #endif /* SDL_hints_h_ */
  1036. /* vi: set ts=4 sw=4 expandtab: */