1 /* -*- indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4; -*-
3 theme.h for the Openbox window manager
4 Copyright (c) 2006 Mikael Magnusson
5 Copyright (c) 2003-2007 Dana Jansens
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.
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.
17 See the COPYING file for a copy of the GNU General Public License.
27 typedef struct _RrTheme RrTheme
;
30 const RrInstance
*inst
;
32 /* style settings - fonts */
33 RrFont
*win_font_focused
;
34 RrFont
*win_font_unfocused
;
35 RrFont
*menu_title_font
;
38 /* style settings - geometry */
42 gint fbwidth
; /*!< frame border width */
43 gint mbwidth
; /*!< menu border width */
47 /* these ones are calculated, not set directly by the theme file */
49 gint menu_title_font_height
;
50 gint menu_font_height
;
53 gint menu_title_height
;
57 /* style settings - colors */
58 RrColor
*menu_b_color
;
59 RrColor
*frame_b_color
;
60 RrColor
*cb_focused_color
;
61 RrColor
*cb_unfocused_color
;
62 RrColor
*title_focused_color
;
63 RrColor
*title_unfocused_color
;
64 RrColor
*titlebut_disabled_focused_color
;
65 RrColor
*titlebut_disabled_unfocused_color
;
66 RrColor
*titlebut_hover_focused_color
;
67 RrColor
*titlebut_hover_unfocused_color
;
68 RrColor
*titlebut_toggled_focused_color
;
69 RrColor
*titlebut_toggled_unfocused_color
;
70 RrColor
*titlebut_focused_pressed_color
;
71 RrColor
*titlebut_unfocused_pressed_color
;
72 RrColor
*titlebut_focused_unpressed_color
;
73 RrColor
*titlebut_unfocused_unpressed_color
;
74 RrColor
*menu_title_color
;
76 RrColor
*menu_disabled_color
;
77 RrColor
*menu_selected_color
;
78 RrColor
*title_focused_shadow_color
;
79 gchar title_focused_shadow_alpha
;
80 RrColor
*title_unfocused_shadow_color
;
81 gchar title_unfocused_shadow_alpha
;
83 RrColor
*osd_shadow_color
;
84 gchar osd_shadow_alpha
;
85 RrColor
*menu_title_shadow_color
;
86 gchar menu_title_shadow_alpha
;
87 RrColor
*menu_text_normal_shadow_color
;
88 gchar menu_text_normal_shadow_alpha
;
89 RrColor
*menu_text_selected_shadow_color
;
90 gchar menu_text_selected_shadow_alpha
;
91 RrColor
*menu_text_disabled_shadow_color
;
92 gchar menu_text_disabled_shadow_alpha
;
94 /* style settings - pics */
95 RrPixel32
*def_win_icon
; /* 48x48 RGBA */
97 /* style settings - masks */
98 RrPixmapMask
*max_mask
;
99 RrPixmapMask
*max_toggled_mask
;
100 RrPixmapMask
*max_hover_mask
;
101 RrPixmapMask
*max_disabled_mask
;
102 RrPixmapMask
*max_pressed_mask
;
103 RrPixmapMask
*iconify_mask
;
104 RrPixmapMask
*iconify_hover_mask
;
105 RrPixmapMask
*iconify_disabled_mask
;
106 RrPixmapMask
*iconify_pressed_mask
;
107 RrPixmapMask
*desk_mask
;
108 RrPixmapMask
*desk_toggled_mask
;
109 RrPixmapMask
*desk_hover_mask
;
110 RrPixmapMask
*desk_disabled_mask
;
111 RrPixmapMask
*desk_pressed_mask
;
112 RrPixmapMask
*shade_mask
;
113 RrPixmapMask
*shade_toggled_mask
;
114 RrPixmapMask
*shade_hover_mask
;
115 RrPixmapMask
*shade_disabled_mask
;
116 RrPixmapMask
*shade_pressed_mask
;
117 RrPixmapMask
*close_mask
;
118 RrPixmapMask
*close_hover_mask
;
119 RrPixmapMask
*close_disabled_mask
;
120 RrPixmapMask
*close_pressed_mask
;
122 RrPixmapMask
*menu_bullet_mask
; /* submenu pointer */
123 RrPixmapMask
*menu_toggle_mask
; /* menu boolean */
125 /* global appearances */
126 RrAppearance
*a_disabled_focused_max
;
127 RrAppearance
*a_disabled_unfocused_max
;
128 RrAppearance
*a_hover_focused_max
;
129 RrAppearance
*a_hover_unfocused_max
;
130 RrAppearance
*a_toggled_focused_max
;
131 RrAppearance
*a_toggled_unfocused_max
;
132 RrAppearance
*a_focused_unpressed_max
;
133 RrAppearance
*a_focused_pressed_max
;
134 RrAppearance
*a_unfocused_unpressed_max
;
135 RrAppearance
*a_unfocused_pressed_max
;
136 RrAppearance
*a_disabled_focused_close
;
137 RrAppearance
*a_disabled_unfocused_close
;
138 RrAppearance
*a_hover_focused_close
;
139 RrAppearance
*a_hover_unfocused_close
;
140 RrAppearance
*a_focused_unpressed_close
;
141 RrAppearance
*a_focused_pressed_close
;
142 RrAppearance
*a_unfocused_unpressed_close
;
143 RrAppearance
*a_unfocused_pressed_close
;
144 RrAppearance
*a_disabled_focused_desk
;
145 RrAppearance
*a_disabled_unfocused_desk
;
146 RrAppearance
*a_hover_focused_desk
;
147 RrAppearance
*a_hover_unfocused_desk
;
148 RrAppearance
*a_toggled_focused_desk
;
149 RrAppearance
*a_toggled_unfocused_desk
;
150 RrAppearance
*a_focused_unpressed_desk
;
151 RrAppearance
*a_focused_pressed_desk
;
152 RrAppearance
*a_unfocused_unpressed_desk
;
153 RrAppearance
*a_unfocused_pressed_desk
;
154 RrAppearance
*a_disabled_focused_shade
;
155 RrAppearance
*a_disabled_unfocused_shade
;
156 RrAppearance
*a_hover_focused_shade
;
157 RrAppearance
*a_hover_unfocused_shade
;
158 RrAppearance
*a_toggled_focused_shade
;
159 RrAppearance
*a_toggled_unfocused_shade
;
160 RrAppearance
*a_focused_unpressed_shade
;
161 RrAppearance
*a_focused_pressed_shade
;
162 RrAppearance
*a_unfocused_unpressed_shade
;
163 RrAppearance
*a_unfocused_pressed_shade
;
164 RrAppearance
*a_disabled_focused_iconify
;
165 RrAppearance
*a_disabled_unfocused_iconify
;
166 RrAppearance
*a_hover_focused_iconify
;
167 RrAppearance
*a_hover_unfocused_iconify
;
168 RrAppearance
*a_focused_unpressed_iconify
;
169 RrAppearance
*a_focused_pressed_iconify
;
170 RrAppearance
*a_unfocused_unpressed_iconify
;
171 RrAppearance
*a_unfocused_pressed_iconify
;
172 RrAppearance
*a_focused_grip
;
173 RrAppearance
*a_unfocused_grip
;
174 RrAppearance
*a_focused_title
;
175 RrAppearance
*a_unfocused_title
;
176 RrAppearance
*a_focused_label
;
177 RrAppearance
*a_unfocused_label
;
178 /* always parentrelative, so no focused/unfocused */
179 RrAppearance
*a_icon
;
180 RrAppearance
*a_focused_handle
;
181 RrAppearance
*a_unfocused_handle
;
182 RrAppearance
*a_menu_title
;
183 RrAppearance
*a_menu
;
184 RrAppearance
*a_menu_normal
;
185 RrAppearance
*a_menu_disabled
;
186 RrAppearance
*a_menu_selected
;
187 RrAppearance
*a_menu_text_normal
;
188 RrAppearance
*a_menu_text_disabled
;
189 RrAppearance
*a_menu_text_selected
;
190 RrAppearance
*a_menu_bullet_normal
;
191 RrAppearance
*a_menu_bullet_selected
;
192 RrAppearance
*a_clear
; /* clear with no texture */
193 RrAppearance
*a_clear_tex
; /* clear with a texture */
195 RrAppearance
*osd_hilite_bg
; /* can never be parent relative */
196 RrAppearance
*osd_hilite_fg
; /* can never be parent relative */
197 RrAppearance
*osd_hilite_label
; /* can be parent relative */
198 RrAppearance
*osd_unhilite_fg
; /* can never be parent relative */
202 /*! The font values are all optional. If a NULL is used for any of them, then
203 the default font will be used. */
204 RrTheme
* RrThemeNew(const RrInstance
*inst
, gchar
*theme
,
205 RrFont
*active_window_font
, RrFont
*inactive_window_font
,
206 RrFont
*menu_title_font
, RrFont
*menu_item_font
);
207 void RrThemeFree(RrTheme
*theme
);