SDL_hints.h 137 KB

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