make grips always 25 pixels
[mikachu/openbox.git] / render / theme.h
1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
2
3    theme.h for the Openbox window manager
4    Copyright (c) 2003        Ben Jansens
5
6    This program is free software; you can redistribute it and/or modify
7    it under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License, or
9    (at your option) any later version.
10
11    This program is distributed in the hope that it will be useful,
12    but WITHOUT ANY WARRANTY; without even the implied warranty of
13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14    GNU General Public License for more details.
15
16    See the COPYING file for a copy of the GNU General Public License.
17 */
18
19 #ifndef __theme_h
20 #define __theme_h
21
22 #include "render.h"
23
24 G_BEGIN_DECLS
25
26 typedef struct _RrTheme RrTheme;
27
28 struct _RrTheme {
29     gchar *path;
30     gchar *name;
31
32     const RrInstance *inst;
33
34     /* style settings - optional decor */
35     gboolean show_handle;
36
37     /* style settings - geometry */
38     gint padding;
39     gint handle_height;
40     gint bwidth;
41     gint cbwidth;
42     gint label_height;
43     gint title_height;
44     gint menu_title_height;
45     gint button_size;
46     gint grip_width;
47     gint menu_overlap;
48
49     /* style settings - colors */
50     RrColor *b_color;
51     RrColor *cb_focused_color;
52     RrColor *cb_unfocused_color;
53     RrColor *title_focused_color;
54     RrColor *title_unfocused_color;
55     RrColor *titlebut_disabled_focused_color;
56     RrColor *titlebut_disabled_unfocused_color;
57     RrColor *titlebut_hover_focused_color;
58     RrColor *titlebut_hover_unfocused_color;
59     RrColor *titlebut_toggled_focused_color;
60     RrColor *titlebut_toggled_unfocused_color;
61     RrColor *titlebut_focused_pressed_color;
62     RrColor *titlebut_unfocused_pressed_color;
63     RrColor *titlebut_focused_unpressed_color;
64     RrColor *titlebut_unfocused_unpressed_color;
65     RrColor *menu_title_color;
66     RrColor *menu_color;
67     RrColor *menu_disabled_color;
68     RrColor *menu_selected_color;
69
70     /* style settings - fonts */
71     gint win_font_height;
72     RrFont *win_font_focused;
73     RrFont *win_font_unfocused;
74     gint menu_title_font_height;
75     RrFont *menu_title_font;
76     gint menu_font_height;
77     RrFont *menu_font;
78
79     /* style settings - pics */
80     RrPixel32 *def_win_icon; /* 48x48 RGBA */
81
82     /* style settings - masks */
83     RrPixmapMask *max_mask;
84     RrPixmapMask *max_toggled_mask;
85     RrPixmapMask *max_hover_mask;
86     RrPixmapMask *max_disabled_mask;
87     RrPixmapMask *max_pressed_mask;
88     RrPixmapMask *iconify_mask;
89     RrPixmapMask *iconify_hover_mask;
90     RrPixmapMask *iconify_disabled_mask;
91     RrPixmapMask *iconify_pressed_mask;
92     RrPixmapMask *desk_mask;
93     RrPixmapMask *desk_toggled_mask;
94     RrPixmapMask *desk_hover_mask;
95     RrPixmapMask *desk_disabled_mask;
96     RrPixmapMask *desk_pressed_mask;
97     RrPixmapMask *shade_mask;
98     RrPixmapMask *shade_toggled_mask;
99     RrPixmapMask *shade_hover_mask;
100     RrPixmapMask *shade_disabled_mask;
101     RrPixmapMask *shade_pressed_mask;
102     RrPixmapMask *close_mask;
103     RrPixmapMask *close_hover_mask;
104     RrPixmapMask *close_disabled_mask;
105     RrPixmapMask *close_pressed_mask;
106
107     RrPixmapMask *menu_bullet_mask; /* submenu pointer */
108     RrPixmapMask *menu_toggle_mask; /* menu boolean */
109
110     /* global appearances */
111     RrAppearance *a_disabled_focused_max;
112     RrAppearance *a_disabled_unfocused_max;
113     RrAppearance *a_hover_focused_max;
114     RrAppearance *a_hover_unfocused_max;
115     RrAppearance *a_toggled_focused_max;
116     RrAppearance *a_toggled_unfocused_max;
117     RrAppearance *a_focused_unpressed_max;
118     RrAppearance *a_focused_pressed_max;
119     RrAppearance *a_unfocused_unpressed_max;
120     RrAppearance *a_unfocused_pressed_max;
121     RrAppearance *a_disabled_focused_close;
122     RrAppearance *a_disabled_unfocused_close;
123     RrAppearance *a_hover_focused_close;
124     RrAppearance *a_hover_unfocused_close;
125     RrAppearance *a_focused_unpressed_close;
126     RrAppearance *a_focused_pressed_close;
127     RrAppearance *a_unfocused_unpressed_close;
128     RrAppearance *a_unfocused_pressed_close;
129     RrAppearance *a_disabled_focused_desk;
130     RrAppearance *a_disabled_unfocused_desk;
131     RrAppearance *a_hover_focused_desk;
132     RrAppearance *a_hover_unfocused_desk;
133     RrAppearance *a_toggled_focused_desk;
134     RrAppearance *a_toggled_unfocused_desk;
135     RrAppearance *a_focused_unpressed_desk;
136     RrAppearance *a_focused_pressed_desk;
137     RrAppearance *a_unfocused_unpressed_desk;
138     RrAppearance *a_unfocused_pressed_desk;
139     RrAppearance *a_disabled_focused_shade;
140     RrAppearance *a_disabled_unfocused_shade;
141     RrAppearance *a_hover_focused_shade;
142     RrAppearance *a_hover_unfocused_shade;
143     RrAppearance *a_toggled_focused_shade;
144     RrAppearance *a_toggled_unfocused_shade;
145     RrAppearance *a_focused_unpressed_shade;
146     RrAppearance *a_focused_pressed_shade;
147     RrAppearance *a_unfocused_unpressed_shade;
148     RrAppearance *a_unfocused_pressed_shade;
149     RrAppearance *a_disabled_focused_iconify;
150     RrAppearance *a_disabled_unfocused_iconify;
151     RrAppearance *a_hover_focused_iconify;
152     RrAppearance *a_hover_unfocused_iconify;
153     RrAppearance *a_focused_unpressed_iconify;
154     RrAppearance *a_focused_pressed_iconify;
155     RrAppearance *a_unfocused_unpressed_iconify;
156     RrAppearance *a_unfocused_pressed_iconify;
157     RrAppearance *a_focused_grip;
158     RrAppearance *a_unfocused_grip;
159     RrAppearance *a_focused_title;
160     RrAppearance *a_unfocused_title;
161     RrAppearance *a_focused_label;
162     RrAppearance *a_unfocused_label;
163     /* always parentrelative, so no focused/unfocused */
164     RrAppearance *a_icon;
165     RrAppearance *a_focused_handle;
166     RrAppearance *a_unfocused_handle;
167     RrAppearance *a_menu_title;
168     RrAppearance *a_menu;
169     RrAppearance *a_menu_normal;
170     RrAppearance *a_menu_disabled;
171     RrAppearance *a_menu_selected;
172     RrAppearance *a_menu_text_normal;
173     RrAppearance *a_menu_text_disabled;
174     RrAppearance *a_menu_text_selected;
175     RrAppearance *a_menu_bullet_normal;
176     RrAppearance *a_menu_bullet_selected;
177     RrAppearance *a_clear;     /* clear with no texture */
178     RrAppearance *a_clear_tex; /* clear with a texture */
179
180     RrAppearance *app_hilite_bg;
181     RrAppearance *app_unhilite_bg;
182     RrAppearance *app_hilite_fg; /* never parent relative */
183     RrAppearance *app_unhilite_fg; /* never parent relative */
184     RrAppearance *app_hilite_label; /* can be parent relative */
185     RrAppearance *app_unhilite_label; /* can be parent relative */
186
187 };
188
189 RrTheme* RrThemeNew(const RrInstance *inst, gchar *theme);
190 void RrThemeFree(RrTheme *theme);
191
192 G_END_DECLS
193
194 #endif