1 #ifndef __render_theme_h
2 #define __render_theme_h
8 struct RrTheme *RrThemeLoad(struct RrInstance *inst, const char *name);
9 void RrThemeDestroy(struct RrTheme *theme);
12 struct RrInstance *inst;
21 struct RrFont *title_font;
22 enum RrLayout title_justify;
24 struct RrColor b_color;
25 struct RrColor cb_color;
26 struct RrColor cb_color_f; /* focused */
27 struct RrColor title_color;
28 struct RrColor title_color_f; /* focused */
29 struct RrColor button_color;
30 struct RrColor button_color_f; /* focused */
31 struct RrColor menu_title_color;
32 struct RrColor menu_item_color;
33 struct RrColor menu_disabled_color;
34 struct RrColor menu_hilite_color;
36 struct RrSurface *max;
37 struct RrSurface *max_f; /* focused */
38 struct RrSurface *max_p; /* pressed */
39 struct RrSurface *max_p_f; /* pressed-focused */
41 struct RrSurface *iconify;
42 struct RrSurface *iconify_f; /* focused */
43 struct RrSurface *iconify_p; /* pressed */
44 struct RrSurface *iconify_p_f; /* pressed-focused */
46 struct RrSurface *close;
47 struct RrSurface *close_f; /* focused */
48 struct RrSurface *close_p; /* pressed */
49 struct RrSurface *close_p_f; /* pressed-focused */
51 struct RrSurface *desk;
52 struct RrSurface *desk_f; /* focused */
53 struct RrSurface *desk_p; /* pressed */
54 struct RrSurface *desk_p_f; /* pressed-focused */
56 struct RrSurface *shade;
57 struct RrSurface *shade_f; /* focused */
58 struct RrSurface *shade_p; /* pressed */
59 struct RrSurface *shade_p_f; /* pressed-focused */
61 struct RrSurface *icon;
63 struct RrSurface *frame;
65 struct RrSurface *plate;
66 struct RrSurface *plate_f; /* focused */
68 struct RrSurface *title;
69 struct RrSurface *title_f; /* focused */
71 struct RrSurface *label;
72 struct RrSurface *label_f; /* focused */
74 struct RrSurface *grip;
75 struct RrSurface *grip_f; /* focused */
77 struct RrSurface *handle;
78 struct RrSurface *handle_f; /* focused */
80 struct RrSurface *menu_title;
81 struct RrSurface *menu_item;
82 struct RrSurface *menu_disabled;
83 struct RrSurface *menu_hilite;
85 struct RrColor app_label_color;
86 struct RrColor app_label_color_h; /* hilited */
88 struct RrSurface *app_bg;
89 struct RrSurface *app_bg_h; /* hilited */
90 struct RrSurface *app_label;
91 struct RrSurface *app_label_h; /* hilited */
92 struct RrSurface *app_icon;
95 #define RrThemeLabelHeight(t) (RrFontHeight((t)->title_font))
96 #define RrThemeTitleHeight(t) (RrThemeLabelHeight(t) + \
97 ((t)->bevel + (t)->bwidth) * 2)
98 #define RrThemeButtonSize(t) (RrThemeLabelHeight(t) - (t)->bevel * 2)
99 #define RrThemeGripWidth(t) (RrThemeButtonSize(t) * 2)