#include <modkit/preferences.h>2 functions · 1 structs · 2 enums · 3 typedefs · 1 macros
Functions
mk_get_system_preferencesfunction
mk_result mk_get_system_preferences(mk_system_preferences_t *preferences)
Read the current available system preferences.
| Parameter | Type | Description |
|---|
preferences | mk_system_preferences_t * | Initialized destination structure. |
Returns MK_SUCCESS or an error result.
mk_system_preferences_initfunction
void mk_system_preferences_init(mk_system_preferences_t *preferences)
Initialize a system-preferences structure.
| Parameter | Type | Description |
|---|
preferences | mk_system_preferences_t * | Structure to initialize. |
Structs
mk_system_preferencesstruct
Versioned snapshot of platform appearance and accessibility preferences.
| Field | Type | Description |
|---|
struct_size | uint32_t | Structure size in bytes. |
struct_version | uint32_t | MK_SYSTEM_PREFERENCES_VERSION. |
available | uint32_t | ORed mk_system_preference_availability bits. |
theme | mk_system_theme | Requested appearance theme. |
high_contrast | bool | Whether increased contrast is requested. |
reduced_motion | bool | Whether reduced motion is requested. |
reduced_transparency | bool | Whether reduced transparency is requested. |
accent_color | mk_color | Platform accent color. |
text_scale | float | Preferred text scale multiplier. |
Enums
mk_system_preference_availabilityenum
Bits indicating which system-preference fields are available.
| Value | Description |
|---|
MK_SYSTEM_PREFERENCE_THEME | theme is available. |
MK_SYSTEM_PREFERENCE_HIGH_CONTRAST | high_contrast is available. |
MK_SYSTEM_PREFERENCE_REDUCED_MOTION | reduced_motion is available. |
MK_SYSTEM_PREFERENCE_REDUCED_TRANSPARENCY | reduced_transparency is available. |
MK_SYSTEM_PREFERENCE_ACCENT_COLOR | accent_color is available. |
MK_SYSTEM_PREFERENCE_TEXT_SCALE | text_scale is available. |
mk_system_themeenum
Operating-system appearance theme.
| Value | Description |
|---|
MK_SYSTEM_THEME_UNKNOWN | The platform provided no theme signal. |
MK_SYSTEM_THEME_LIGHT | The platform requests a light theme. |
MK_SYSTEM_THEME_DARK | The platform requests a dark theme. |
Typedefs
mk_system_preference_availability_ttypedef
typedef enum mk_system_preference_availability mk_system_preference_availability_t
Bits indicating which system-preference fields are available.
mk_system_preferences_ttypedef
typedef struct mk_system_preferences mk_system_preferences_t
Versioned snapshot of platform appearance and accessibility preferences.
mk_system_themetypedef
typedef enum mk_system_theme mk_system_theme
Operating-system appearance theme.
Macros
MK_SYSTEM_PREFERENCES_VERSIONdefine
MK_SYSTEM_PREFERENCES_VERSION
ABI version for mk_system_preferences_t.