@@ -570,6 +570,86 @@ extern SDL_DECLSPEC const char * SDLCALL SDL_GetCurrentVideoDriver(void);
570
570
*/
571
571
extern SDL_DECLSPEC SDL_SystemTheme SDLCALL SDL_GetSystemTheme (void );
572
572
573
+ /**
574
+ * An enumeration of various boolean system preferences.
575
+ *
576
+ * Some systems provide a variety of accessibility options that allow users to
577
+ * adapt their environment to various conditions.
578
+ *
579
+ * \since This enum is available since SDL 3.2.0.
580
+ *
581
+ * \sa SDL_GetSystemPreference
582
+ */
583
+ typedef enum SDL_SystemPreference
584
+ {
585
+ SDL_SYSTEM_PREFERENCE_REDUCED_MOTION , /**< Disable smooth graphical transitions */
586
+ SDL_SYSTEM_PREFERENCE_REDUCED_TRANSPARENCY , /**< Reduce usage of semi-transparent objects */
587
+ SDL_SYSTEM_PREFERENCE_HIGH_CONTRAST , /**< Use extreme color differences between different elements of the interface */
588
+ SDL_SYSTEM_PREFERENCE_COLORBLIND , /**< Add shape-based distinction between color-coded elements, for example "0" and "1" on switches */
589
+ SDL_SYSTEM_PREFERENCE_PERSIST_SCROLLBARS , /**< Always show scrollbars, don't hide them after a few seconds of inactivity */
590
+ SDL_SYSTEM_PREFERENCE_SCREEN_READER , /**< A screen reader is currently active */
591
+ } SDL_SystemPreference ;
592
+
593
+ /**
594
+ * Get whether or not a certain system preference was enabled by the user.
595
+ *
596
+ * \param preference the preference to be fetched.
597
+ * \returns true if the user enabled the system preference; false if the user
598
+ * disabled that setting, or the setting doesn't exist, or an error
599
+ * occured.
600
+ *
601
+ * \threadsafety This function should only be called on the main thread.
602
+ *
603
+ * \since This function is available since SDL 3.2.0.
604
+ *
605
+ * \sa SDL_SystemPreference
606
+ */
607
+ extern SDL_DECLSPEC bool SDLCALL SDL_GetSystemPreference (SDL_SystemPreference preference );
608
+
609
+ /**
610
+ * Get the system's accent color, as chosen by the user.
611
+ *
612
+ * If the current system does not have an accent color, false is returned and
613
+ * the struct is unaffected.
614
+ *
615
+ * \param color a pointer to a struct to be filled with the color info. The
616
+ * alpha channel is what the operating system returned and may or
617
+ * may not be opaque.
618
+ * \returns true on success or false on failure; call SDL_GetError() for more
619
+ * information.
620
+ *
621
+ * \threadsafety This function should only be called on the main thread.
622
+ *
623
+ * \since This function is available since SDL 3.2.0.
624
+ */
625
+ extern SDL_DECLSPEC bool SDLCALL SDL_GetSystemAccentColor (SDL_Color * color );
626
+
627
+ /**
628
+ * Get the scale factor for text, as set by the user for their system.
629
+ *
630
+ * If the system does not have a setting to scale the font, 1 is returned.
631
+ *
632
+ * \returns the preferred scale for text; a scale of 1 means no scaling.
633
+ *
634
+ * \threadsafety This function should only be called on the main thread.
635
+ *
636
+ * \since This function is available since SDL 3.2.0.
637
+ */
638
+ extern SDL_DECLSPEC float SDLCALL SDL_GetSystemTextScale (void );
639
+
640
+ /**
641
+ * Get the scale factor for the cursor, as set by the user for their system.
642
+ *
643
+ * If the system does not have a setting to scale the cursor, 1 is returned.
644
+ *
645
+ * \returns the preferred scale for the cursor; a scale of 1 means no scaling.
646
+ *
647
+ * \threadsafety This function should only be called on the main thread.
648
+ *
649
+ * \since This function is available since SDL 3.2.0.
650
+ */
651
+ extern SDL_DECLSPEC float SDLCALL SDL_GetSystemCursorScale (void );
652
+
573
653
/**
574
654
* Get a list of currently connected displays.
575
655
*
0 commit comments