Mercurial > audlegacy
annotate src/audacious/widgets/skin.h @ 3076:7f1f6688c32c
little fix
author | Tomasz Mon <desowin@gmail.com> |
---|---|
date | Sat, 14 Jul 2007 00:01:14 +0200 |
parents | 41d3854f3625 |
children | 3b6d316f8b09 |
rev | line source |
---|---|
2313 | 1 /* BMP - Cross-platform multimedia player |
2 * Copyright (C) 2003-2004 BMP development team. | |
3 * | |
4 * Based on XMMS: | |
5 * Copyright (C) 1998-2003 XMMS development team. | |
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 | |
3056
41d3854f3625
Set the license explicitly to GPL v2
Tomasz Mon <desowin@gmail.com>
parents:
2443
diff
changeset
|
9 * the Free Software Foundation; under version 2 of the License. |
2313 | 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 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
19 */ | |
20 | |
21 #ifndef _WIDGETCORE_H_ | |
22 #error Please do not include me directly! Use widgetcore.h instead! | |
23 #endif | |
24 | |
25 #ifndef SKIN_H | |
26 #define SKIN_H | |
27 | |
28 | |
29 #include <glib.h> | |
30 #include <gdk/gdk.h> | |
31 | |
32 | |
33 #define BMP_DEFAULT_SKIN_PATH \ | |
34 DATA_DIR G_DIR_SEPARATOR_S "Skins" G_DIR_SEPARATOR_S "Default" | |
35 | |
36 | |
37 typedef enum { | |
38 SKIN_MAIN = 0, | |
39 SKIN_CBUTTONS, | |
40 SKIN_TITLEBAR, | |
41 SKIN_SHUFREP, | |
42 SKIN_TEXT, | |
43 SKIN_VOLUME, | |
44 SKIN_BALANCE, | |
45 SKIN_MONOSTEREO, | |
46 SKIN_PLAYPAUSE, | |
47 SKIN_NUMBERS, | |
48 SKIN_POSBAR, | |
49 SKIN_PLEDIT, | |
50 SKIN_EQMAIN, | |
51 SKIN_EQ_EX, | |
52 SKIN_PIXMAP_COUNT | |
53 } SkinPixmapId; | |
54 | |
55 typedef enum { | |
56 SKIN_MASK_MAIN = 0, | |
57 SKIN_MASK_MAIN_SHADE, | |
58 SKIN_MASK_EQ, | |
59 SKIN_MASK_EQ_SHADE, | |
60 SKIN_MASK_COUNT | |
61 } SkinMaskId; | |
62 | |
63 typedef enum { | |
64 SKIN_PLEDIT_NORMAL = 0, | |
65 SKIN_PLEDIT_CURRENT, | |
66 SKIN_PLEDIT_NORMALBG, | |
67 SKIN_PLEDIT_SELECTEDBG, | |
68 SKIN_TEXTBG, | |
69 SKIN_TEXTFG, | |
70 SKIN_COLOR_COUNT | |
71 } SkinColorId; | |
72 | |
73 typedef struct _SkinProperties { | |
74 /* this enables the othertext engine, not it's visibility -nenolod */ | |
75 gboolean mainwin_othertext; | |
76 | |
77 /* Vis properties */ | |
78 gint mainwin_vis_x; | |
79 gint mainwin_vis_y; | |
80 gint mainwin_vis_width; | |
81 gboolean mainwin_vis_visible; | |
82 | |
83 /* Text properties */ | |
84 gint mainwin_text_x; | |
85 gint mainwin_text_y; | |
86 gint mainwin_text_width; | |
87 gboolean mainwin_text_visible; | |
88 | |
89 /* Infobar properties */ | |
90 gint mainwin_infobar_x; | |
91 gint mainwin_infobar_y; | |
92 gboolean mainwin_othertext_visible; | |
93 | |
94 gint mainwin_number_0_x; | |
95 gint mainwin_number_0_y; | |
96 | |
97 gint mainwin_number_1_x; | |
98 gint mainwin_number_1_y; | |
99 | |
100 gint mainwin_number_2_x; | |
101 gint mainwin_number_2_y; | |
102 | |
103 gint mainwin_number_3_x; | |
104 gint mainwin_number_3_y; | |
105 | |
106 gint mainwin_number_4_x; | |
107 gint mainwin_number_4_y; | |
108 | |
109 gint mainwin_playstatus_x; | |
110 gint mainwin_playstatus_y; | |
111 | |
112 gint mainwin_volume_x; | |
113 gint mainwin_volume_y; | |
114 | |
115 gint mainwin_balance_x; | |
116 gint mainwin_balance_y; | |
117 | |
118 gint mainwin_position_x; | |
119 gint mainwin_position_y; | |
120 | |
121 gint mainwin_previous_x; | |
122 gint mainwin_previous_y; | |
123 | |
124 gint mainwin_play_x; | |
125 gint mainwin_play_y; | |
126 | |
127 gint mainwin_pause_x; | |
128 gint mainwin_pause_y; | |
129 | |
130 gint mainwin_stop_x; | |
131 gint mainwin_stop_y; | |
132 | |
133 gint mainwin_next_x; | |
134 gint mainwin_next_y; | |
135 | |
136 gint mainwin_eject_x; | |
137 gint mainwin_eject_y; | |
138 | |
139 gint mainwin_eqbutton_x; | |
140 gint mainwin_eqbutton_y; | |
141 | |
142 gint mainwin_plbutton_x; | |
143 gint mainwin_plbutton_y; | |
144 | |
145 gint mainwin_shuffle_x; | |
146 gint mainwin_shuffle_y; | |
147 | |
148 gint mainwin_repeat_x; | |
149 gint mainwin_repeat_y; | |
150 | |
151 gint mainwin_about_x; | |
152 gint mainwin_about_y; | |
153 | |
154 gint mainwin_minimize_x; | |
155 gint mainwin_minimize_y; | |
156 | |
157 gint mainwin_shade_x; | |
158 gint mainwin_shade_y; | |
159 | |
160 gint mainwin_close_x; | |
161 gint mainwin_close_y; | |
162 | |
163 gint mainwin_width; | |
164 gint mainwin_height; | |
165 | |
166 gboolean mainwin_menurow_visible; | |
167 gboolean mainwin_othertext_is_status; | |
168 | |
169 gint textbox_bitmap_font_width; | |
170 gint textbox_bitmap_font_height; | |
171 } SkinProperties; | |
172 | |
173 #define SKIN_PIXMAP(x) ((SkinPixmap *)(x)) | |
174 typedef struct _SkinPixmap { | |
175 GdkPixmap *pixmap; | |
176 /* GdkPixmap *def_pixmap; */ | |
177 | |
178 /* The real size of the pixmap */ | |
179 gint width, height; | |
180 | |
181 /* The size of the pixmap from the current skin, | |
182 which might be smaller */ | |
183 gint current_width, current_height; | |
184 } SkinPixmap; | |
185 | |
186 | |
187 #define SKIN(x) ((Skin *)(x)) | |
188 typedef struct _Skin { | |
189 GMutex *lock; | |
190 gchar *path; | |
191 gchar *def_path; | |
192 SkinPixmap pixmaps[SKIN_PIXMAP_COUNT]; | |
193 GdkColor textbg[6], def_textbg[6]; | |
194 GdkColor textfg[6], def_textfg[6]; | |
195 GdkColor *colors[SKIN_COLOR_COUNT]; | |
196 guchar vis_color[24][3]; | |
197 GdkBitmap *masks[SKIN_MASK_COUNT]; | |
198 GdkBitmap *ds_masks[SKIN_MASK_COUNT]; | |
199 SkinProperties properties; | |
200 } Skin; | |
201 | |
202 extern Skin *bmp_active_skin; | |
203 | |
204 gboolean init_skins(const gchar * path); | |
205 void cleanup_skins(void); | |
206 | |
207 gboolean bmp_active_skin_load(const gchar * path); | |
208 gboolean bmp_active_skin_reload(void); | |
209 | |
210 Skin *skin_new(void); | |
211 gboolean skin_load(Skin * skin, const gchar * path); | |
2443
93686e8815a4
[svn] - Changed playback_set_random_skin() to skin_set_random_skin()
mf0102
parents:
2313
diff
changeset
|
212 gboolean skin_reload_forced(void); |
2313 | 213 void skin_reload(Skin * skin); |
214 void skin_free(Skin * skin); | |
215 | |
216 GdkBitmap *skin_get_mask(Skin * skin, SkinMaskId mi); | |
217 GdkColor *skin_get_color(Skin * skin, SkinColorId color_id); | |
218 | |
219 void skin_get_viscolor(Skin * skin, guchar vis_color[24][3]); | |
220 gint skin_get_id(void); | |
221 void skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc, | |
222 SkinPixmapId pixmap_id, | |
223 gint xsrc, gint ysrc, gint xdest, gint ydest, | |
224 gint width, gint height); | |
225 void skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]); | |
226 void skin_install_skin(const gchar * path); | |
227 | |
228 void skin_draw_playlistwin_shaded(Skin * skin, | |
229 GdkDrawable * drawable, GdkGC * gc, | |
230 gint width, gboolean focus); | |
231 void skin_draw_playlistwin_frame(Skin * skin, | |
232 GdkDrawable * drawable, GdkGC * gc, | |
233 gint width, gint height, gboolean focus); | |
234 | |
235 void skin_draw_mainwin_titlebar(Skin * skin, | |
236 GdkDrawable * drawable, GdkGC * gc, | |
237 gboolean shaded, gboolean focus); | |
238 | |
239 | |
240 void skin_parse_hints(Skin * skin, gchar *path_p); | |
241 | |
242 | |
2443
93686e8815a4
[svn] - Changed playback_set_random_skin() to skin_set_random_skin()
mf0102
parents:
2313
diff
changeset
|
243 void skin_set_random_skin(void); |
2313 | 244 |
245 #endif |