SDL_hints.h 131 KB

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