From f33c09aa1332d469cde42144b54436d7111d6a44 Mon Sep 17 00:00:00 2001 From: Matthias Kruk Date: Wed, 19 May 2021 08:27:12 +0900 Subject: [PATCH] theme: Add definitions for colors, palettes, and themes Common definitions for colors, palettes, and themes are necessary to make the style of mwm easily-customizable. This commit adds a set of style-related types. --- theme.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 theme.h diff --git a/theme.h b/theme.h new file mode 100644 index 0000000..ef98864 --- /dev/null +++ b/theme.h @@ -0,0 +1,42 @@ +#ifndef MWM_THEME_H +#define MWM_THEME_H + +typedef enum { + MWM_PALETTE_ACTIVE = 0, + MWM_PALETTE_INACTIVE, + MWM_PALETTE_MAX +} mwm_palette_t; + +typedef enum { + MWM_COLOR_FOCUSED = 0, + MWM_COLOR_VISIBLE, + MWM_COLOR_TEXT, + MWM_COLOR_BACKGROUND, + MWM_COLOR_INDICATOR_FILL, + MWM_COLOR_INDICATOR_BORDER, + MWM_COLOR_CLIENT_INDICATOR, + MWM_COLOR_MAX +} mwm_color_t; + +union colorset { + struct { + const char *focused; + const char *visible; + const char *text; + const char *background; + const char *indicator_fill; + const char *indicator_border; + const char *client_indicator; + } named; + + const char *indexed[MWM_COLOR_MAX]; +}; + +struct theme { + union colorset active; + union colorset inactive; + + const char *statusbar_font; +}; + +#endif /* MWM_THEME_H */ -- 2.47.3