SDL_hints.h 134 KB

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