SDL_hints.h 142 KB

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