Mercurial > audlegacy
annotate src/audacious/skin.h @ 4350:8071e599916d
renamed BmpCmdLineOpt to AudCmdLineOpt (greatest commit EVAR! ;-)
author | mf0102 <0102@gmx.at> |
---|---|
date | Sun, 16 Mar 2008 19:02:57 +0100 |
parents | 75d99359357b |
children | de33c83aa06f |
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> | |
3933
5a4ef76b1f42
beggining of better dealing with substandard winamp skins - if it doesn't break anything, why not commit this?
Tomasz Mon <desowin@gmail.com>
parents:
3251
diff
changeset
|
32 #include <gtk/gtk.h> |
2313 | 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 { | |
4195
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
176 GdkPixbuf *pixbuf; |
2313 | 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]; | |
4216
75d99359357b
doublesize -> custom scale:
Cristi Magherusan <majeru@atheme.org>
parents:
4197
diff
changeset
|
198 GdkBitmap *scaled_masks[SKIN_MASK_COUNT]; |
2313 | 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); | |
4195
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
221 void skin_draw_pixbuf(GtkWidget *widget, Skin * skin, GdkPixbuf * pix, |
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
222 SkinPixmapId pixmap_id, |
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
223 gint xsrc, gint ysrc, gint xdest, gint ydest, |
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
224 gint width, gint height); |
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
225 |
2313 | 226 void skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]); |
227 void skin_install_skin(const gchar * path); | |
228 | |
4195
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
229 void skin_draw_playlistwin_shaded(Skin * skin, GdkPixbuf * pix, |
2313 | 230 gint width, gboolean focus); |
4195
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
231 void skin_draw_playlistwin_frame(Skin * skin, GdkPixbuf * pix, |
2313 | 232 gint width, gint height, gboolean focus); |
233 | |
4195
2281da647da9
beggining of GdkPixbuf transition
Tomasz Mon <desowin@gmail.com>
parents:
3933
diff
changeset
|
234 void skin_draw_mainwin_titlebar(Skin * skin, GdkPixbuf * pix, |
2313 | 235 gboolean shaded, gboolean focus); |
236 | |
237 | |
238 void skin_parse_hints(Skin * skin, gchar *path_p); | |
239 | |
240 | |
2443
93686e8815a4
[svn] - Changed playback_set_random_skin() to skin_set_random_skin()
mf0102
parents:
2313
diff
changeset
|
241 void skin_set_random_skin(void); |
2313 | 242 |
243 #endif |