]> Dogcows Code - chaz/openbox/blob - render/theme.h
instead of passing things to the environment, substitute $pid and $window inline...
[chaz/openbox] / 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) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 (at your option) any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 See the COPYING file for a copy of the GNU General Public License.
18 */
19
20 #ifndef __theme_h
21 #define __theme_h
22
23 #include "render.h"
24
25 G_BEGIN_DECLS
26
27 typedef struct _RrTheme RrTheme;
28
29 struct _RrTheme {
30 const RrInstance *inst;
31
32 /* style settings - fonts */
33 RrFont *win_font_focused;
34 RrFont *win_font_unfocused;
35 RrFont *menu_title_font;
36 RrFont *menu_font;
37 RrFont *osd_font;
38
39 /* style settings - geometry */
40 gint paddingx;
41 gint paddingy;
42 gint handle_height;
43 gint fbwidth; /*!< frame border width */
44 gint mbwidth; /*!< menu border width */
45 gint obwidth; /*!< osd border width */
46 gint cbwidthx;
47 gint cbwidthy;
48 gint menu_overlap_x;
49 gint menu_overlap_y;
50 gint menu_sep_width;
51 gint menu_sep_paddingx;
52 gint menu_sep_paddingy;
53 /* these ones are calculated, not set directly by the theme file */
54 gint win_font_height;
55 gint menu_title_font_height;
56 gint menu_font_height;
57 gint label_height;
58 gint title_height;
59 gint button_size;
60 gint grip_width;
61 gint menu_title_label_height;
62 gint menu_title_height;
63
64 /* style settings - colors */
65 RrColor *menu_border_color;
66 RrColor *osd_border_color;
67 RrColor *frame_focused_border_color;
68 RrColor *frame_unfocused_border_color;
69 RrColor *title_separator_focused_color;
70 RrColor *title_separator_unfocused_color;
71 RrColor *cb_focused_color;
72 RrColor *cb_unfocused_color;
73 RrColor *title_focused_color;
74 RrColor *title_unfocused_color;
75 RrColor *titlebut_disabled_focused_color;
76 RrColor *titlebut_disabled_unfocused_color;
77 RrColor *titlebut_hover_focused_color;
78 RrColor *titlebut_hover_unfocused_color;
79 RrColor *titlebut_toggled_hover_focused_color;
80 RrColor *titlebut_toggled_hover_unfocused_color;
81 RrColor *titlebut_toggled_focused_pressed_color;
82 RrColor *titlebut_toggled_unfocused_pressed_color;
83 RrColor *titlebut_toggled_focused_unpressed_color;
84 RrColor *titlebut_toggled_unfocused_unpressed_color;
85 RrColor *titlebut_focused_pressed_color;
86 RrColor *titlebut_unfocused_pressed_color;
87 RrColor *titlebut_focused_unpressed_color;
88 RrColor *titlebut_unfocused_unpressed_color;
89 RrColor *menu_title_color;
90 RrColor *menu_sep_color;
91 RrColor *menu_color;
92 RrColor *menu_selected_color;
93 RrColor *menu_disabled_color;
94 RrColor *menu_disabled_selected_color;
95 RrColor *title_focused_shadow_color;
96 gchar title_focused_shadow_alpha;
97 RrColor *title_unfocused_shadow_color;
98 gchar title_unfocused_shadow_alpha;
99 RrColor *osd_color;
100 RrColor *osd_shadow_color;
101 gchar osd_shadow_alpha;
102 RrColor *menu_title_shadow_color;
103 gchar menu_title_shadow_alpha;
104 RrColor *menu_text_normal_shadow_color;
105 gchar menu_text_normal_shadow_alpha;
106 RrColor *menu_text_selected_shadow_color;
107 gchar menu_text_selected_shadow_alpha;
108 RrColor *menu_text_disabled_shadow_color;
109 gchar menu_text_disabled_shadow_alpha;
110 RrColor *menu_text_disabled_selected_shadow_color;
111 gchar menu_text_disabled_selected_shadow_alpha;
112
113 /* style settings - pics */
114 RrPixel32 *def_win_icon; /* RGBA */
115 gint def_win_icon_w;
116 gint def_win_icon_h;
117
118 /* style settings - masks */
119 RrPixmapMask *max_mask;
120 RrPixmapMask *max_hover_mask;
121 RrPixmapMask *max_pressed_mask;
122 RrPixmapMask *max_toggled_mask;
123 RrPixmapMask *max_toggled_hover_mask;
124 RrPixmapMask *max_toggled_pressed_mask;
125 RrPixmapMask *max_disabled_mask;
126 RrPixmapMask *iconify_mask;
127 RrPixmapMask *iconify_hover_mask;
128 RrPixmapMask *iconify_pressed_mask;
129 RrPixmapMask *iconify_disabled_mask;
130 RrPixmapMask *desk_mask;
131 RrPixmapMask *desk_hover_mask;
132 RrPixmapMask *desk_pressed_mask;
133 RrPixmapMask *desk_toggled_mask;
134 RrPixmapMask *desk_toggled_hover_mask;
135 RrPixmapMask *desk_toggled_pressed_mask;
136 RrPixmapMask *desk_disabled_mask;
137 RrPixmapMask *shade_mask;
138 RrPixmapMask *shade_hover_mask;
139 RrPixmapMask *shade_pressed_mask;
140 RrPixmapMask *shade_toggled_mask;
141 RrPixmapMask *shade_toggled_hover_mask;
142 RrPixmapMask *shade_toggled_pressed_mask;
143 RrPixmapMask *shade_disabled_mask;
144 RrPixmapMask *close_mask;
145 RrPixmapMask *close_hover_mask;
146 RrPixmapMask *close_disabled_mask;
147 RrPixmapMask *close_pressed_mask;
148
149 RrPixmapMask *menu_bullet_mask; /* submenu pointer */
150 #if 0
151 RrPixmapMask *menu_toggle_mask; /* menu boolean */
152 #endif
153
154 RrPixmapMask *down_arrow_mask;
155 RrPixmapMask *up_arrow_mask;
156
157 /* global appearances */
158 RrAppearance *a_disabled_focused_max;
159 RrAppearance *a_disabled_unfocused_max;
160 RrAppearance *a_hover_focused_max;
161 RrAppearance *a_hover_unfocused_max;
162 RrAppearance *a_focused_unpressed_max;
163 RrAppearance *a_focused_pressed_max;
164 RrAppearance *a_unfocused_unpressed_max;
165 RrAppearance *a_unfocused_pressed_max;
166 RrAppearance *a_toggled_hover_focused_max;
167 RrAppearance *a_toggled_hover_unfocused_max;
168 RrAppearance *a_toggled_focused_unpressed_max;
169 RrAppearance *a_toggled_focused_pressed_max;
170 RrAppearance *a_toggled_unfocused_unpressed_max;
171 RrAppearance *a_toggled_unfocused_pressed_max;
172 RrAppearance *a_disabled_focused_close;
173 RrAppearance *a_disabled_unfocused_close;
174 RrAppearance *a_hover_focused_close;
175 RrAppearance *a_hover_unfocused_close;
176 RrAppearance *a_focused_unpressed_close;
177 RrAppearance *a_focused_pressed_close;
178 RrAppearance *a_unfocused_unpressed_close;
179 RrAppearance *a_unfocused_pressed_close;
180 RrAppearance *a_disabled_focused_desk;
181 RrAppearance *a_disabled_unfocused_desk;
182 RrAppearance *a_hover_focused_desk;
183 RrAppearance *a_hover_unfocused_desk;
184 RrAppearance *a_focused_unpressed_desk;
185 RrAppearance *a_focused_pressed_desk;
186 RrAppearance *a_unfocused_unpressed_desk;
187 RrAppearance *a_unfocused_pressed_desk;
188 RrAppearance *a_toggled_hover_focused_desk;
189 RrAppearance *a_toggled_hover_unfocused_desk;
190 RrAppearance *a_toggled_focused_unpressed_desk;
191 RrAppearance *a_toggled_focused_pressed_desk;
192 RrAppearance *a_toggled_unfocused_unpressed_desk;
193 RrAppearance *a_toggled_unfocused_pressed_desk;
194 RrAppearance *a_disabled_focused_shade;
195 RrAppearance *a_disabled_unfocused_shade;
196 RrAppearance *a_hover_focused_shade;
197 RrAppearance *a_hover_unfocused_shade;
198 RrAppearance *a_focused_unpressed_shade;
199 RrAppearance *a_focused_pressed_shade;
200 RrAppearance *a_unfocused_unpressed_shade;
201 RrAppearance *a_unfocused_pressed_shade;
202 RrAppearance *a_toggled_hover_focused_shade;
203 RrAppearance *a_toggled_hover_unfocused_shade;
204 RrAppearance *a_toggled_focused_unpressed_shade;
205 RrAppearance *a_toggled_focused_pressed_shade;
206 RrAppearance *a_toggled_unfocused_unpressed_shade;
207 RrAppearance *a_toggled_unfocused_pressed_shade;
208 RrAppearance *a_disabled_focused_iconify;
209 RrAppearance *a_disabled_unfocused_iconify;
210 RrAppearance *a_hover_focused_iconify;
211 RrAppearance *a_hover_unfocused_iconify;
212 RrAppearance *a_focused_unpressed_iconify;
213 RrAppearance *a_focused_pressed_iconify;
214 RrAppearance *a_unfocused_unpressed_iconify;
215 RrAppearance *a_unfocused_pressed_iconify;
216 RrAppearance *a_focused_grip;
217 RrAppearance *a_unfocused_grip;
218 RrAppearance *a_focused_title;
219 RrAppearance *a_unfocused_title;
220 RrAppearance *a_focused_label;
221 RrAppearance *a_unfocused_label;
222 /* always parentrelative, so no focused/unfocused */
223 RrAppearance *a_icon;
224 RrAppearance *a_focused_handle;
225 RrAppearance *a_unfocused_handle;
226 RrAppearance *a_menu_text_title;
227 RrAppearance *a_menu_title;
228 RrAppearance *a_menu;
229 RrAppearance *a_menu_normal;
230 RrAppearance *a_menu_selected;
231 RrAppearance *a_menu_disabled;
232 RrAppearance *a_menu_disabled_selected;
233 RrAppearance *a_menu_text_normal;
234 RrAppearance *a_menu_text_disabled;
235 RrAppearance *a_menu_text_disabled_selected;
236 RrAppearance *a_menu_text_selected;
237 RrAppearance *a_menu_bullet_normal;
238 RrAppearance *a_menu_bullet_selected;
239 RrAppearance *a_clear; /* clear with no texture */
240 RrAppearance *a_clear_tex; /* clear with a texture */
241
242 RrAppearance *osd_hilite_bg; /* can never be parent relative */
243 RrAppearance *osd_hilite_fg; /* can never be parent relative */
244 RrAppearance *osd_hilite_label; /* can be parent relative */
245 RrAppearance *osd_unhilite_fg; /* can never be parent relative */
246
247 gchar *name;
248 };
249
250 /*! The font values are all optional. If a NULL is used for any of them, then
251 the default font will be used. */
252 RrTheme* RrThemeNew(const RrInstance *inst, const gchar *theme,
253 gboolean allow_fallback,
254 RrFont *active_window_font, RrFont *inactive_window_font,
255 RrFont *menu_title_font, RrFont *menu_item_font,
256 RrFont *osd_font);
257 void RrThemeFree(RrTheme *theme);
258
259 G_END_DECLS
260
261 #endif
This page took 0.042859 seconds and 4 git commands to generate.