42 lines
974 B
C
42 lines
974 B
C
#pragma once
|
|
|
|
#include <stdint.h>
|
|
#include "../util/region.h"
|
|
|
|
enum ax_color_cat {
|
|
AX_COLOR_BACKGROUND = 0,
|
|
AX_COLOR_SURFACE,
|
|
AX_COLOR_PRIMARY,
|
|
AX_COLOR_PRIMARY_ALT,
|
|
AX_COLOR_SECONDARY,
|
|
AX_COLOR_SECONDARY_ALT,
|
|
AX_COLOR_ON_BACKGROUND,
|
|
AX_COLOR_ON_SURFACE,
|
|
AX_COLOR_ON_PRIMARY,
|
|
AX_COLOR_ON_SECONDARY,
|
|
AX_COLOR__COUNT,
|
|
};
|
|
|
|
struct ax_theme {
|
|
int64_t colors[AX_COLOR__COUNT];
|
|
};
|
|
|
|
struct ax_theme_builder {
|
|
struct ax_theme thm;
|
|
};
|
|
|
|
int ax__string_to_color_cat(const char* str, enum ax_color_cat* out_cat);
|
|
void ax__color_cat_to_string(enum ax_color_cat cat, const char** out_str);
|
|
|
|
void ax__theme_builder_init(struct ax_theme_builder* thmb);
|
|
void ax__theme_builder_cleanup(struct ax_theme_builder* thmb);
|
|
|
|
void ax__theme_set_color(
|
|
struct ax_theme_builder* thmb,
|
|
enum ax_color_cat cat, int64_t val);
|
|
|
|
void ax__theme_builder_finish(
|
|
struct ax_theme_builder* thmb,
|
|
struct rgn* rgn,
|
|
struct ax_theme** out_thm);
|