LDKUIThemeFile
A resolved UI theme and its display name. Contains no owned resources.
typedef struct LDKUIThemeFile{
LDKUITheme theme;
char name[128];
}LDKUIThemeFile;
A resolved UI theme and its display name. Contains no owned resources.
typedef struct LDKUIThemeFile{
LDKUITheme theme;
char name[128];
}LDKUIThemeFile;
typedef enum LDKUIThemeIconSlot{
LDK_UI_THEME_ICON_TREE_NODE_COLLAPSED,
LDK_UI_THEME_ICON_TREE_NODE_EXPANDED,
LDK_UI_THEME_ICON_TOGGLE_UNCHECKED,
LDK_UI_THEME_ICON_TOGGLE_CHECKED,
LDK_UI_THEME_ICON_MORE_HORIZ,
LDK_UI_THEME_ICON_MORE_VERT,
LDK_UI_THEME_ICON_EJECT,
LDK_UI_THEME_ICON_COUNT,
}LDKUIThemeIconSlot;
typedef enum LDKUIThemeType{
LDK_UI_THEME_CUSTOM=0,
LDK_UI_THEME_DEFAULT_LIGHT=1,
LDK_UI_THEME_DEFAULT_DARK=2,
}LDKUIThemeType;
Get the UI theme.
LDK_API bool ldk_ui_theme_get(
LDKUIThemeType type,
LDKUITheme *theme
);
LDKUIThemeType typeLDKUITheme *themeTrue if the operation succeeds; false otherwise.
Set the UI theme.
LDK_API bool ldk_ui_theme_set(
LDKUIContext *ctx,
LDKUITheme *theme
);
LDKUIContext *ctxLDKUITheme *themeTrue if the operation succeeds; false otherwise.
Read and parse a UTF-8 TML theme file. The path is an ordinary filesystem path; discovery and application of the theme are separate responsibilities. The output is unchanged on failure.
LDK_API bool ldk_ui_theme_tml_load(
char const *path,
LDKUIThemeFile *out_theme,
char *error,
size_t error_size
);
char const *pathLDKUIThemeFile *out_themechar *errorsize_t error_sizeTrue if the operation succeeds; false otherwise.
Parse an LDK theme from a null-terminated TML string. The output is replaced only on success. The theme inherits the selected built-in palette, and its icon handles are not loaded from the document. On failure, error receives a diagnostic when a buffer is provided.
LDK_API bool ldk_ui_theme_tml_parse(
char const *source,
LDKUIThemeFile *out_theme,
char *error,
size_t error_size
);
char const *sourceLDKUIThemeFile *out_themechar *errorsize_t error_sizeTrue if the operation succeeds; false otherwise.