SDL_hints.h 130 KB

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