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