SDL_hints.h 131 KB

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