]> icculus.org git repositories - dana/openbox.git/blob - render2/theme.h
the kernel is using th gl shit to render itself, but with the old style frame shit...
[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 *title;
66     struct RrSurface *title_f; /* focused */
67
68     struct RrSurface *label;
69     struct RrSurface *label_f; /* focused */
70
71     struct RrSurface *grip;
72     struct RrSurface *grip_f; /* focused */
73
74     struct RrSurface *handle;
75     struct RrSurface *handle_f; /* focused */
76
77     struct RrSurface *menu_title;
78     struct RrSurface *menu_item;
79     struct RrSurface *menu_disabled;
80     struct RrSurface *menu_hilite;
81
82     struct RrSurface *app_bg;
83     struct RrSurface *app_bg_h; /* hilited */
84     struct RrSurface *app_label;
85     struct RrSurface *app_label_h; /* hilited */
86     struct RrSurface *app_icon;
87 };
88
89 #define RrThemeLabelHeight(t) (RrFontHeight((t)->title_font) + 2)
90 #define RrThemeTitleHeight(t) (RrThemeLabelHeight(t) + \
91                                ((t)->bevel + (t)->bwidth) * 2)
92 #define RrThemeButtonSize(t)  (RrThemeLabelHeight(t) - \
93                                ((t)->bevel + (t)->bwidth) * 2)
94 #define RrThemeGripWidth(t)   (RrThemeButtonSize(t) * 2)
95
96 #endif