]> Dogcows Code - chaz/openbox/blob - obrender/theme.h
Merge branch 'master' into chaz
[chaz/openbox] / obrender / 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_hilite;
38 RrFont *osd_font_unhilite;
39
40 /* style settings - geometry */
41 gint paddingx;
42 gint paddingy;
43 gint handle_height;
44 gint fbwidth; /*!< frame border width */
45 gint mbwidth; /*!< menu border width */
46 gint obwidth; /*!< osd border width */
47 gint ubwidth; /*!< undecorated frame border width */
48 gint cbwidthx;
49 gint cbwidthy;
50 gint menu_overlap_x;
51 gint menu_overlap_y;
52 gint menu_sep_width;
53 gint menu_sep_paddingx;
54 gint menu_sep_paddingy;
55 /* these ones are calculated, not set directly by the theme file */
56 gint win_font_height;
57 gint menu_title_font_height;
58 gint menu_font_height;
59 gint label_height;
60 gint title_height;
61 gint button_size;
62 gint grip_width;
63 gint menu_title_label_height;
64 gint menu_title_height;
65
66 /* style settings - colors */
67 RrColor *menu_border_color;
68 RrColor *osd_border_color;
69 RrColor *frame_focused_border_color;
70 RrColor *frame_undecorated_focused_border_color;
71 RrColor *frame_unfocused_border_color;
72 RrColor *frame_undecorated_unfocused_border_color;
73 RrColor *title_separator_focused_color;
74 RrColor *title_separator_unfocused_color;
75 RrColor *cb_focused_color;
76 RrColor *cb_unfocused_color;
77 RrColor *title_focused_color;
78 RrColor *title_unfocused_color;
79 RrColor *titlebut_disabled_focused_color;
80 RrColor *titlebut_disabled_unfocused_color;
81 RrColor *titlebut_hover_focused_color;
82 RrColor *titlebut_hover_unfocused_color;
83 RrColor *titlebut_toggled_hover_focused_color;
84 RrColor *titlebut_toggled_hover_unfocused_color;
85 RrColor *titlebut_toggled_focused_pressed_color;
86 RrColor *titlebut_toggled_unfocused_pressed_color;
87 RrColor *titlebut_toggled_focused_unpressed_color;
88 RrColor *titlebut_toggled_unfocused_unpressed_color;
89 RrColor *titlebut_focused_pressed_color;
90 RrColor *titlebut_unfocused_pressed_color;
91 RrColor *titlebut_focused_unpressed_color;
92 RrColor *titlebut_unfocused_unpressed_color;
93 RrColor *menu_title_color;
94 RrColor *menu_sep_color;
95 RrColor *menu_color;
96 RrColor *menu_bullet_color;
97 RrColor *menu_bullet_selected_color;
98 RrColor *menu_selected_color;
99 RrColor *menu_disabled_color;
100 RrColor *menu_disabled_selected_color;
101 RrColor *title_focused_shadow_color;
102 gchar title_focused_shadow_alpha;
103 RrColor *title_unfocused_shadow_color;
104 gchar title_unfocused_shadow_alpha;
105 RrColor *osd_text_active_color;
106 RrColor *osd_text_inactive_color;
107 RrColor *osd_text_active_shadow_color;
108 RrColor *osd_text_inactive_shadow_color;
109 gchar osd_text_active_shadow_alpha;
110 gchar osd_text_inactive_shadow_alpha;
111 RrColor *osd_pressed_color;
112 RrColor *osd_unpressed_color;
113 RrColor *osd_focused_color;
114 RrColor *osd_pressed_lineart;
115 RrColor *osd_focused_lineart;
116 RrColor *menu_title_shadow_color;
117 gchar menu_title_shadow_alpha;
118 RrColor *menu_text_normal_shadow_color;
119 gchar menu_text_normal_shadow_alpha;
120 RrColor *menu_text_selected_shadow_color;
121 gchar menu_text_selected_shadow_alpha;
122 RrColor *menu_text_disabled_shadow_color;
123 gchar menu_text_disabled_shadow_alpha;
124 RrColor *menu_text_disabled_selected_shadow_color;
125 gchar menu_text_disabled_selected_shadow_alpha;
126
127 /* style settings - pics */
128 RrPixel32 *def_win_icon; /* RGBA */
129 gint def_win_icon_w;
130 gint def_win_icon_h;
131
132 /* style settings - masks */
133 RrPixmapMask *menu_bullet_mask; /* submenu pointer */
134 #if 0
135 RrPixmapMask *menu_toggle_mask; /* menu boolean */
136 #endif
137
138 RrPixmapMask *down_arrow_mask;
139 RrPixmapMask *up_arrow_mask;
140
141 /* buttons */
142 RrButton *btn_max;
143 RrButton *btn_close;
144 RrButton *btn_desk;
145 RrButton *btn_shade;
146 RrButton *btn_iconify;
147
148 /* global appearances */
149 RrAppearance *a_focused_grip;
150 RrAppearance *a_unfocused_grip;
151 RrAppearance *a_focused_title;
152 RrAppearance *a_unfocused_title;
153 RrAppearance *a_focused_label;
154 RrAppearance *a_unfocused_label;
155 /* always parentrelative, so no focused/unfocused */
156 RrAppearance *a_icon;
157 RrAppearance *a_focused_handle;
158 RrAppearance *a_unfocused_handle;
159 RrAppearance *a_menu_text_title;
160 RrAppearance *a_menu_title;
161 RrAppearance *a_menu;
162 RrAppearance *a_menu_normal;
163 RrAppearance *a_menu_selected;
164 RrAppearance *a_menu_disabled;
165 RrAppearance *a_menu_disabled_selected;
166 RrAppearance *a_menu_text_normal;
167 RrAppearance *a_menu_text_disabled;
168 RrAppearance *a_menu_text_disabled_selected;
169 RrAppearance *a_menu_text_selected;
170 RrAppearance *a_menu_bullet_normal;
171 RrAppearance *a_menu_bullet_selected;
172 RrAppearance *a_clear; /* clear with no texture */
173 RrAppearance *a_clear_tex; /* clear with a texture */
174
175 RrAppearance *osd_bg; /* can never be parent relative */
176 RrAppearance *osd_hilite_bg; /* can never be parent relative */
177 RrAppearance *osd_hilite_label; /* can be parent relative */
178 RrAppearance *osd_unhilite_bg; /* can never be parent relative */
179 RrAppearance *osd_unhilite_label; /* can be parent relative */
180 RrAppearance *osd_pressed_button;
181 RrAppearance *osd_unpressed_button;
182 RrAppearance *osd_focused_button;
183
184 gchar *name;
185 };
186
187 /*! The font values are all optional. If a NULL is used for any of them, then
188 the default font will be used. */
189 RrTheme* RrThemeNew(const RrInstance *inst, const gchar *theme,
190 gboolean allow_fallback,
191 RrFont *active_window_font, RrFont *inactive_window_font,
192 RrFont *menu_title_font, RrFont *menu_item_font,
193 RrFont *active_osd_font, RrFont *inactive_osd_font);
194 void RrThemeFree(RrTheme *theme);
195
196 G_END_DECLS
197
198 #endif
This page took 0.03679 seconds and 4 git commands to generate.