]> icculus.org git repositories - dana/openbox.git/blob - render2/theme.h
rendering fixes for gl
[dana/openbox.git] / render2 / theme.h
1 #ifndef __render_theme_h
2 #define __render_theme_h
3
4 #include "render.h"
5
6 struct RrTheme;
7
8 struct RrTheme *RrThemeLoad(struct RrInstance *inst, const char *name);
9 void RrThemeDestroy(struct RrTheme *theme);
10
11 struct RrTheme {
12     struct RrInstance *inst;
13
14     int bevel;
15     int bwidth;
16     int cbwidth;
17     int handle_height;
18
19     char *title_layout;
20
21     struct RrFont *title_font;
22     enum RrLayout title_justify;
23
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;
35
36     struct RrSurface *max;
37     struct RrSurface *max_f;     /* focused */
38     struct RrSurface *max_p;     /* pressed */
39     struct RrSurface *max_p_f;   /* pressed-focused */
40
41     struct RrSurface *iconify;
42     struct RrSurface *iconify_f;   /* focused */
43     struct RrSurface *iconify_p;   /* pressed */
44     struct RrSurface *iconify_p_f; /* pressed-focused */
45
46     struct RrSurface *close;
47     struct RrSurface *close_f;     /* focused */
48     struct RrSurface *close_p;     /* pressed */
49     struct RrSurface *close_p_f;   /* pressed-focused */
50
51     struct RrSurface *desk;
52     struct RrSurface *desk_f;     /* focused */
53     struct RrSurface *desk_p;     /* pressed */
54     struct RrSurface *desk_p_f;   /* pressed-focused */
55
56     struct RrSurface *shade;
57     struct RrSurface *shade_f;     /* focused */
58     struct RrSurface *shade_p;     /* pressed */
59     struct RrSurface *shade_p_f;   /* pressed-focused */
60
61     struct RrSurface *icon;
62
63     struct RrSurface *frame;
64
65     struct RrSurface *plate;
66     struct RrSurface *plate_f; /* focused */
67
68     struct RrSurface *title;
69     struct RrSurface *title_f; /* focused */
70
71     struct RrSurface *label;
72     struct RrSurface *label_f; /* focused */
73
74     struct RrSurface *grip;
75     struct RrSurface *grip_f; /* focused */
76
77     struct RrSurface *handle;
78     struct RrSurface *handle_f; /* focused */
79
80     struct RrSurface *menu_title;
81     struct RrSurface *menu_item;
82     struct RrSurface *menu_disabled;
83     struct RrSurface *menu_hilite;
84
85     struct RrColor app_label_color;
86     struct RrColor app_label_color_h; /* hilited */
87
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;
93 };
94
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)
100
101 #endif