1
0

SDL_hints.h 140 KB

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