0
|
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
|
|
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 * You should have received a copy of the GNU General Public License
|
|
18 * along with this program; if not, write to the Free Software
|
|
19 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
20 */
|
|
21
|
|
22 #ifdef HAVE_CONFIG_H
|
|
23 # include "config.h"
|
|
24 #endif
|
|
25
|
|
26 /* TODO: enforce default sizes! */
|
|
27
|
|
28 #include <glib.h>
|
|
29 #include <stdio.h>
|
|
30 #include <stdlib.h>
|
|
31 #include <string.h>
|
|
32 #include <ctype.h>
|
|
33
|
|
34 #include "equalizer.h"
|
|
35 #include "main.h"
|
383
|
36 #include "ui_playlist.h"
|
0
|
37 #include "skin.h"
|
|
38 #include "skinwin.h"
|
|
39 #include "util.h"
|
|
40
|
|
41 #include "debug.h"
|
|
42
|
|
43 #include <gdk/gdkx.h>
|
|
44 #include <X11/Xlib.h>
|
|
45
|
|
46
|
|
47 struct _SkinPixmapIdMapping {
|
|
48 SkinPixmapId id;
|
|
49 const gchar *name;
|
|
50 const gchar *alt_name;
|
|
51 gint width, height;
|
|
52 };
|
|
53
|
|
54 struct _SkinMaskInfo {
|
|
55 gint width, height;
|
|
56 gchar *inistr;
|
|
57 };
|
|
58
|
|
59 typedef struct _SkinPixmapIdMapping SkinPixmapIdMapping;
|
|
60 typedef struct _SkinMaskInfo SkinMaskInfo;
|
|
61
|
|
62
|
|
63 Skin *bmp_active_skin = NULL;
|
|
64
|
|
65 static gint skin_current_num;
|
|
66
|
|
67 static SkinMaskInfo skin_mask_info[] = {
|
|
68 {275, 116, "Normal"},
|
|
69 {275, 16, "WindowShade"},
|
|
70 {275, 116, "Equalizer"},
|
|
71 {275, 16, "EqualizerWS"}
|
|
72 };
|
|
73
|
|
74 static SkinPixmapIdMapping skin_pixmap_id_map[] = {
|
|
75 {SKIN_MAIN, "main", NULL},
|
|
76 {SKIN_CBUTTONS, "cbuttons", NULL},
|
|
77 {SKIN_SHUFREP, "shufrep", NULL},
|
|
78 {SKIN_TEXT, "text", NULL},
|
|
79 {SKIN_TITLEBAR, "titlebar", NULL},
|
|
80 {SKIN_VOLUME, "volume", NULL},
|
|
81 {SKIN_BALANCE, "balance", "volume"},
|
|
82 {SKIN_MONOSTEREO, "monoster", NULL},
|
|
83 {SKIN_PLAYPAUSE, "playpaus", NULL},
|
|
84 {SKIN_NUMBERS, "nums_ex", "numbers"},
|
|
85 {SKIN_POSBAR, "posbar", NULL},
|
|
86 {SKIN_EQMAIN, "eqmain", NULL},
|
|
87 {SKIN_PLEDIT, "pledit", NULL},
|
|
88 {SKIN_EQ_EX, "eq_ex", NULL}
|
|
89 };
|
|
90
|
|
91 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map);
|
|
92
|
|
93 static const guchar skin_default_viscolor[24][3] = {
|
|
94 {9, 34, 53},
|
|
95 {10, 18, 26},
|
|
96 {0, 54, 108},
|
|
97 {0, 58, 116},
|
|
98 {0, 62, 124},
|
|
99 {0, 66, 132},
|
|
100 {0, 70, 140},
|
|
101 {0, 74, 148},
|
|
102 {0, 78, 156},
|
|
103 {0, 82, 164},
|
|
104 {0, 86, 172},
|
|
105 {0, 92, 184},
|
|
106 {0, 98, 196},
|
|
107 {0, 104, 208},
|
|
108 {0, 110, 220},
|
|
109 {0, 116, 232},
|
|
110 {0, 122, 244},
|
|
111 {0, 128, 255},
|
|
112 {0, 128, 255},
|
|
113 {0, 104, 208},
|
|
114 {0, 80, 160},
|
|
115 {0, 56, 112},
|
|
116 {0, 32, 64},
|
|
117 {200, 200, 200}
|
|
118 };
|
|
119
|
|
120 static GdkBitmap *
|
|
121 skin_create_transparent_mask(const gchar *,
|
|
122 const gchar *,
|
|
123 const gchar *,
|
|
124 GdkWindow *,
|
|
125 gint, gint);
|
|
126
|
|
127 static void
|
|
128 skin_setup_masks(Skin * skin);
|
|
129
|
|
130 static void
|
|
131 skin_set_default_vis_color(Skin * skin);
|
|
132
|
|
133
|
|
134 void
|
|
135 skin_lock(Skin * skin)
|
|
136 {
|
|
137 g_mutex_lock(skin->lock);
|
|
138 }
|
|
139
|
|
140 void
|
|
141 skin_unlock(Skin * skin)
|
|
142 {
|
|
143 g_mutex_unlock(skin->lock);
|
|
144 }
|
|
145
|
|
146 gboolean
|
|
147 bmp_active_skin_reload(void)
|
|
148 {
|
|
149 return bmp_active_skin_load(bmp_active_skin->path);
|
|
150 }
|
|
151
|
|
152 gboolean
|
|
153 bmp_active_skin_load(const gchar * path)
|
|
154 {
|
|
155 g_return_val_if_fail(bmp_active_skin != NULL, FALSE);
|
|
156
|
|
157 if (!skin_load(bmp_active_skin, path))
|
|
158 return FALSE;
|
|
159
|
|
160 skin_setup_masks(bmp_active_skin);
|
|
161 draw_main_window(TRUE);
|
|
162 draw_playlist_window(TRUE);
|
|
163 draw_equalizer_window(TRUE);
|
|
164
|
|
165 vis_set_window(mainwin_vis, mainwin->window);
|
|
166 playlistwin_update_list();
|
|
167
|
|
168 return TRUE;
|
|
169 }
|
|
170
|
|
171 void
|
|
172 skin_pixmap_free(SkinPixmap * p)
|
|
173 {
|
|
174 g_return_if_fail(p != NULL);
|
|
175 g_return_if_fail(p->pixmap != NULL);
|
|
176
|
|
177 g_object_unref(p->pixmap);
|
|
178 p->pixmap = NULL;
|
|
179 }
|
|
180
|
|
181 Skin *
|
|
182 skin_new(void)
|
|
183 {
|
|
184 Skin *skin;
|
|
185 skin = g_new0(Skin, 1);
|
|
186 skin->lock = g_mutex_new();
|
|
187 return skin;
|
|
188 }
|
|
189
|
|
190 void
|
|
191 skin_free(Skin * skin)
|
|
192 {
|
|
193 gint i;
|
|
194
|
|
195 g_return_if_fail(skin != NULL);
|
|
196
|
|
197 skin_lock(skin);
|
|
198
|
|
199 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
|
|
200 skin_pixmap_free(&skin->pixmaps[i]);
|
|
201
|
|
202 for (i = 0; i < SKIN_PIXMAP_COUNT; i++) {
|
|
203 if (skin->masks[i])
|
|
204 g_object_unref(skin->masks[i]);
|
|
205
|
|
206 skin->masks[i] = NULL;
|
|
207 }
|
|
208
|
|
209 skin_set_default_vis_color(skin);
|
|
210 skin_unlock(skin);
|
|
211 }
|
|
212
|
|
213 void
|
|
214 skin_destroy(Skin * skin)
|
|
215 {
|
|
216 g_return_if_fail(skin != NULL);
|
|
217 skin_free(skin);
|
|
218 g_mutex_free(skin->lock);
|
|
219 g_free(skin);
|
|
220 }
|
|
221
|
|
222 const SkinPixmapIdMapping *
|
|
223 skin_pixmap_id_lookup(gint id)
|
|
224 {
|
|
225 gint i;
|
|
226
|
|
227 for (i = 0; i < skin_pixmap_id_map_size; i++) {
|
|
228 if (id == skin_pixmap_id_map[i].id) {
|
|
229 return &skin_pixmap_id_map[i];
|
|
230 }
|
|
231 }
|
|
232
|
|
233 return NULL;
|
|
234 }
|
|
235
|
|
236 const gchar *
|
|
237 skin_pixmap_id_to_name(SkinPixmapId id)
|
|
238 {
|
|
239 gint i;
|
|
240
|
|
241 for (i = 0; i < skin_pixmap_id_map_size; i++) {
|
|
242 if (id == skin_pixmap_id_map[i].id)
|
|
243 return skin_pixmap_id_map[i].name;
|
|
244 }
|
|
245 return NULL;
|
|
246 }
|
|
247
|
|
248 static void
|
|
249 skin_set_default_vis_color(Skin * skin)
|
|
250 {
|
|
251 memcpy(skin->vis_color, skin_default_viscolor,
|
|
252 sizeof(skin_default_viscolor));
|
|
253 }
|
|
254
|
|
255 gchar *
|
|
256 skin_pixmap_locate(const gchar * dirname, const gchar * basename,
|
|
257 const gchar * alt_basename)
|
|
258 {
|
|
259 gchar *filename;
|
|
260
|
|
261 if (!(filename = find_file_recursively(dirname, basename))) {
|
|
262 g_warning(G_STRLOC ": couldn't locate %s in directory %s",
|
|
263 basename, dirname);
|
|
264 g_free(filename);
|
|
265
|
|
266 if (alt_basename) {
|
|
267 g_message(G_STRLOC ": trying %s instead", alt_basename);
|
|
268 return skin_pixmap_locate(dirname, alt_basename, NULL);
|
|
269 }
|
|
270 }
|
|
271
|
|
272 return filename;
|
|
273 }
|
|
274
|
|
275 /* FIXME: this function is temporary. It will be removed when the skinning system
|
|
276 uses GdkPixbuf in place of GdkPixmap */
|
|
277
|
|
278 static GdkPixmap *
|
|
279 pixmap_new_from_file(const gchar * filename)
|
|
280 {
|
|
281 GdkPixbuf *pixbuf;
|
|
282 GdkPixmap *pixmap;
|
|
283 gint width, height;
|
|
284
|
|
285 if (!(pixbuf = gdk_pixbuf_new_from_file(filename, NULL)))
|
|
286 return NULL;
|
|
287
|
|
288 width = gdk_pixbuf_get_width(pixbuf);
|
|
289 height = gdk_pixbuf_get_height(pixbuf);
|
|
290
|
|
291 if (!(pixmap = gdk_pixmap_new(mainwin->window, width, height,
|
|
292 gdk_rgb_get_visual()->depth))) {
|
|
293 g_object_unref(pixbuf);
|
|
294 return NULL;
|
|
295 }
|
|
296
|
|
297 gdk_pixbuf_render_to_drawable(pixbuf, pixmap, mainwin_gc, 0, 0, 0, 0,
|
|
298 width, height, GDK_RGB_DITHER_MAX, 0, 0);
|
|
299 g_object_unref(pixbuf);
|
|
300
|
|
301 return pixmap;
|
|
302 }
|
|
303
|
|
304 static gboolean
|
|
305 skin_load_pixmap_id(Skin * skin, SkinPixmapId id, const gchar * path_p)
|
|
306 {
|
|
307 const gchar *path;
|
|
308 gchar *basename = NULL, *alt_basename = NULL;
|
|
309 gchar *filename;
|
|
310 gint width, height;
|
|
311 const SkinPixmapIdMapping *pixmap_id_mapping;
|
|
312 GdkPixmap *gpm;
|
|
313 SkinPixmap *pm = NULL;
|
|
314
|
|
315 g_return_val_if_fail(skin != NULL, FALSE);
|
|
316 g_return_val_if_fail(id < SKIN_PIXMAP_COUNT, FALSE);
|
|
317
|
|
318 pixmap_id_mapping = skin_pixmap_id_lookup(id);
|
|
319 g_return_val_if_fail(pixmap_id_mapping != NULL, FALSE);
|
|
320
|
|
321 basename = g_strdup_printf("%s.bmp", pixmap_id_mapping->name);
|
|
322 if (pixmap_id_mapping->alt_name)
|
|
323 alt_basename = g_strdup_printf("%s.bmp", pixmap_id_mapping->alt_name);
|
|
324
|
|
325 path = path_p ? path_p : skin->path;
|
|
326 filename = skin_pixmap_locate(path, basename, alt_basename);
|
|
327 g_free(basename);
|
|
328 g_free(alt_basename);
|
|
329
|
|
330 if (!(gpm = pixmap_new_from_file(filename))) {
|
|
331 g_warning("loading of %s failed", filename);
|
|
332 g_free(filename);
|
|
333 return FALSE;
|
|
334 }
|
|
335
|
|
336 g_free(filename);
|
|
337
|
|
338 gdk_window_get_size(gpm, &width, &height);
|
|
339 pm = &skin->pixmaps[id];
|
|
340 pm->pixmap = gpm;
|
|
341 pm->width = width;
|
|
342 pm->height = height;
|
|
343 pm->current_width = width;
|
|
344 pm->current_height = height;
|
|
345
|
|
346 return TRUE;
|
|
347 }
|
|
348
|
|
349 void
|
|
350 skin_mask_create(Skin * skin,
|
|
351 const gchar * path,
|
|
352 gint id,
|
|
353 GdkWindow * window)
|
|
354 {
|
|
355 skin->masks[id] =
|
|
356 skin_create_transparent_mask(path, "region.txt",
|
|
357 skin_mask_info[id].inistr, window,
|
|
358 skin_mask_info[id].width,
|
|
359 skin_mask_info[id].height);
|
|
360 }
|
|
361
|
|
362 static void
|
|
363 skin_setup_masks(Skin * skin)
|
|
364 {
|
|
365 GdkBitmap *mask;
|
|
366
|
|
367 if (cfg.show_wm_decorations)
|
|
368 return;
|
|
369
|
|
370 if (cfg.player_visible) {
|
|
371 mask = skin_get_mask(skin, SKIN_MASK_MAIN + cfg.player_shaded);
|
|
372 gtk_widget_shape_combine_mask(mainwin, mask, 0, 0);
|
|
373 }
|
|
374
|
|
375 mask = skin_get_mask(skin, SKIN_MASK_EQ + cfg.equalizer_shaded);
|
|
376 gtk_widget_shape_combine_mask(equalizerwin, mask, 0, 0);
|
|
377 }
|
|
378
|
|
379 static GdkBitmap *
|
|
380 create_default_mask(GdkWindow * parent, gint w, gint h)
|
|
381 {
|
|
382 GdkBitmap *ret;
|
|
383 GdkGC *gc;
|
|
384 GdkColor pattern;
|
|
385
|
|
386 ret = gdk_pixmap_new(parent, w, h, 1);
|
|
387 gc = gdk_gc_new(ret);
|
|
388 pattern.pixel = 1;
|
|
389 gdk_gc_set_foreground(gc, &pattern);
|
|
390 gdk_draw_rectangle(ret, gc, TRUE, 0, 0, w, h);
|
|
391 gdk_gc_destroy(gc);
|
|
392
|
|
393 return ret;
|
|
394 }
|
|
395
|
|
396 static void
|
|
397 skin_query_color(GdkColormap * cm, GdkColor * c)
|
|
398 {
|
|
399 XColor xc = { 0 };
|
|
400
|
|
401 xc.pixel = c->pixel;
|
|
402 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc);
|
|
403 c->red = xc.red;
|
|
404 c->green = xc.green;
|
|
405 c->blue = xc.blue;
|
|
406 }
|
|
407
|
|
408 static glong
|
|
409 skin_calc_luminance(GdkColor * c)
|
|
410 {
|
|
411 return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue);
|
|
412 }
|
|
413
|
|
414 static void
|
|
415 skin_get_textcolors(GdkPixmap * text, GdkColor * bgc, GdkColor * fgc)
|
|
416 {
|
|
417 /*
|
|
418 * Try to extract reasonable background and foreground colors
|
|
419 * from the font pixmap
|
|
420 */
|
|
421
|
|
422 GdkImage *gi;
|
|
423 GdkColormap *cm;
|
|
424 gint i;
|
|
425
|
|
426 g_return_if_fail(text != NULL);
|
|
427
|
|
428 /* Get the first line of text */
|
|
429 gi = gdk_drawable_get_image(text, 0, 0, 152, 6);
|
|
430 cm = gdk_window_get_colormap(playlistwin->window);
|
|
431 g_return_if_fail(GDK_IS_WINDOW(playlistwin->window));
|
|
432
|
|
433 for (i = 0; i < 6; i++) {
|
|
434 GdkColor c;
|
|
435 gint x;
|
|
436 glong d, max_d;
|
|
437
|
|
438 /* Get a pixel from the middle of the space character */
|
|
439 bgc[i].pixel = gdk_image_get_pixel(gi, 151, i);
|
|
440 skin_query_color(cm, &bgc[i]);
|
|
441
|
|
442 max_d = 0;
|
|
443 for (x = 1; x < 150; x++) {
|
|
444 c.pixel = gdk_image_get_pixel(gi, x, i);
|
|
445 skin_query_color(cm, &c);
|
|
446
|
|
447 d = labs(skin_calc_luminance(&c) - skin_calc_luminance(&bgc[i]));
|
|
448 if (d > max_d) {
|
|
449 memcpy(&fgc[i], &c, sizeof(GdkColor));
|
|
450 max_d = d;
|
|
451 }
|
|
452 }
|
|
453 }
|
|
454 gdk_image_destroy(gi);
|
|
455 }
|
|
456
|
|
457 gboolean
|
|
458 init_skins(const gchar * path)
|
|
459 {
|
|
460 bmp_active_skin = skin_new();
|
|
461
|
|
462 if (!bmp_active_skin_load(path)) {
|
|
463 /* FIXME: Oddly, g_message() causes a crash if path is NULL on
|
|
464 * Solaris (see bug #165) */
|
|
465 if (path)
|
|
466 g_message("Unable to load skin (%s), trying default...", path);
|
|
467
|
|
468 /* can't load configured skin, retry with default */
|
|
469 if (!bmp_active_skin_load(BMP_DEFAULT_SKIN_PATH)) {
|
|
470 g_message("Unable to load default skin (%s)! Giving up.",
|
|
471 BMP_DEFAULT_SKIN_PATH);
|
|
472 return FALSE;
|
|
473 }
|
|
474 }
|
|
475
|
|
476 if (cfg.random_skin_on_play)
|
|
477 skinlist_update();
|
|
478
|
|
479 return TRUE;
|
|
480 }
|
|
481
|
|
482 static guint
|
|
483 hex_chars_to_int(gchar hi, gchar lo)
|
|
484 {
|
|
485 /*
|
|
486 * Converts a value in the range 0x00-0xFF
|
|
487 * to a integer in the range 0-65535
|
|
488 */
|
|
489 gchar str[3];
|
|
490
|
|
491 str[0] = hi;
|
|
492 str[1] = lo;
|
|
493 str[2] = 0;
|
|
494
|
|
495 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8);
|
|
496 }
|
|
497
|
|
498 GdkColor *
|
|
499 skin_load_color(const gchar * path, const gchar * file,
|
|
500 const gchar * section, const gchar * key)
|
|
501 {
|
|
502 gchar *filename, *value;
|
|
503 GdkColor *color = NULL;
|
|
504
|
|
505 filename = find_file_recursively(path, file);
|
|
506 if (filename) {
|
|
507 value = read_ini_string(filename, section, key);
|
|
508 if (value) {
|
|
509 gchar *ptr = value;
|
|
510 gint len;
|
|
511
|
|
512 color = g_new0(GdkColor, 1);
|
|
513 g_strstrip(value);
|
|
514
|
|
515 if (value[0] == '#')
|
|
516 ptr++;
|
|
517 len = strlen(ptr);
|
|
518
|
|
519 /*
|
|
520 * The handling of incomplete values is done this way
|
|
521 * to maximize winamp compatibility
|
|
522 */
|
|
523 if (len >= 6) {
|
|
524 color->red = hex_chars_to_int(*ptr, *(ptr + 1));
|
|
525 ptr += 2;
|
|
526 }
|
|
527 if (len >= 4) {
|
|
528 color->green = hex_chars_to_int(*ptr, *(ptr + 1));
|
|
529 ptr += 2;
|
|
530 }
|
|
531 if (len >= 2)
|
|
532 color->blue = hex_chars_to_int(*ptr, *(ptr + 1));
|
|
533
|
|
534
|
|
535 gdk_color_alloc(gdk_window_get_colormap(playlistwin->window),
|
|
536 color);
|
|
537 g_free(value);
|
|
538 }
|
|
539 g_free(filename);
|
|
540 }
|
|
541 return color;
|
|
542 }
|
|
543
|
|
544
|
|
545
|
|
546 GdkBitmap *
|
|
547 skin_create_transparent_mask(const gchar * path,
|
|
548 const gchar * file,
|
|
549 const gchar * section,
|
|
550 GdkWindow * window,
|
|
551 gint width,
|
|
552 gint height)
|
|
553 {
|
|
554 GdkBitmap *mask = NULL;
|
|
555 GdkGC *gc = NULL;
|
|
556 GdkColor pattern;
|
|
557 GdkPoint *gpoints;
|
|
558
|
|
559 gchar *filename = NULL;
|
|
560 gboolean created_mask = FALSE;
|
|
561 GArray *num, *point;
|
|
562 gint i, j, k;
|
|
563
|
|
564 if (path)
|
|
565 filename = find_file_recursively(path, file);
|
|
566
|
|
567 /* filename will be null if path wasn't set */
|
|
568 if (!filename) {
|
|
569 return create_default_mask(window, width, height);
|
|
570 }
|
|
571
|
|
572 if ((num = read_ini_array(filename, section, "NumPoints")) == NULL) {
|
|
573 g_free(filename);
|
|
574 return NULL;
|
|
575 }
|
|
576
|
|
577 if ((point = read_ini_array(filename, section, "PointList")) == NULL) {
|
|
578 g_array_free(num, TRUE);
|
|
579 g_free(filename);
|
|
580 return NULL;
|
|
581 }
|
|
582
|
|
583 mask = gdk_pixmap_new(window, width, height, 1);
|
|
584 gc = gdk_gc_new(mask);
|
|
585
|
|
586 pattern.pixel = 0;
|
|
587 gdk_gc_set_foreground(gc, &pattern);
|
|
588 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
|
|
589 pattern.pixel = 1;
|
|
590 gdk_gc_set_foreground(gc, &pattern);
|
|
591
|
|
592 j = 0;
|
|
593 for (i = 0; i < num->len; i++) {
|
|
594 if ((point->len - j) >= (g_array_index(num, gint, i) * 2)) {
|
|
595 created_mask = TRUE;
|
|
596 gpoints = g_new(GdkPoint, g_array_index(num, gint, i));
|
|
597 for (k = 0; k < g_array_index(num, gint, i); k++) {
|
|
598 gpoints[k].x = g_array_index(point, gint, j + k * 2);
|
|
599 gpoints[k].y = g_array_index(point, gint, j + k * 2 + 1);
|
|
600 }
|
|
601 j += k * 2;
|
|
602 gdk_draw_polygon(mask, gc, TRUE, gpoints,
|
|
603 g_array_index(num, gint, i));
|
|
604 g_free(gpoints);
|
|
605 }
|
|
606 }
|
|
607 g_array_free(num, TRUE);
|
|
608 g_array_free(point, TRUE);
|
|
609 g_free(filename);
|
|
610
|
|
611 if (!created_mask)
|
|
612 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
|
|
613
|
|
614 gdk_gc_destroy(gc);
|
|
615
|
|
616 return mask;
|
|
617 }
|
|
618
|
|
619 void
|
|
620 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename)
|
|
621 {
|
|
622 FILE *file;
|
|
623 gint i, c;
|
|
624 gchar line[256], *filename;
|
|
625 GArray *a;
|
|
626
|
|
627 g_return_if_fail(skin != NULL);
|
|
628 g_return_if_fail(path != NULL);
|
|
629 g_return_if_fail(basename != NULL);
|
|
630
|
|
631 skin_set_default_vis_color(skin);
|
|
632
|
|
633 filename = find_file_recursively(path, basename);
|
|
634 if (!filename)
|
|
635 return;
|
|
636
|
|
637 if (!(file = fopen(filename, "r"))) {
|
|
638 g_free(filename);
|
|
639 return;
|
|
640 }
|
|
641
|
|
642 g_free(filename);
|
|
643
|
|
644 for (i = 0; i < 24; i++) {
|
|
645 if (fgets(line, 255, file)) {
|
|
646 a = string_to_garray(line);
|
|
647 if (a->len > 2) {
|
|
648 for (c = 0; c < 3; c++)
|
|
649 skin->vis_color[i][c] = g_array_index(a, gint, c);
|
|
650 }
|
|
651 g_array_free(a, TRUE);
|
|
652 }
|
|
653 else
|
|
654 break;
|
|
655 }
|
|
656
|
|
657 fclose(file);
|
|
658 }
|
|
659
|
|
660 #if 0
|
|
661 static void
|
|
662 skin_numbers_generate_dash(Skin * skin)
|
|
663 {
|
|
664 GdkGC *gc;
|
|
665 GdkPixmap *pixmap;
|
|
666 SkinPixmap *numbers;
|
|
667
|
|
668 g_return_if_fail(skin != NULL);
|
|
669
|
|
670 numbers = &skin->pixmaps[SKIN_NUMBERS];
|
|
671 if (!numbers->pixmap || numbers->current_width < 99)
|
|
672 return;
|
|
673
|
|
674 gc = gdk_gc_new(numbers->pixmap);
|
|
675 pixmap = gdk_pixmap_new(mainwin->window, 108,
|
|
676 numbers->current_height,
|
|
677 -1);
|
|
678
|
|
679 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 0, 0, 0, 0, 99, 13);
|
|
680 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 90, 0, 99, 0, 9, 13);
|
|
681 skin_draw_pixmap(skin, pixmap, gc, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1);
|
|
682
|
|
683 g_object_unref(numbers->pixmap);
|
|
684 g_object_unref(gc);
|
|
685
|
|
686 numbers->pixmap = pixmap;
|
|
687 numbers->current_width = 108;
|
|
688 }
|
|
689 #endif
|
|
690
|
|
691 static void
|
|
692 skin_load_cursor(Skin * skin, const gchar * dirname)
|
|
693 {
|
|
694 const gchar * basename = "normal.cur";
|
|
695 gchar * filename = NULL;
|
|
696 GdkPixbuf * cursor_pixbuf = NULL;
|
|
697 GdkPixbufAnimation * cursor_animated = NULL;
|
|
698 GdkCursor * cursor_gdk = NULL;
|
|
699 GError * error = NULL;
|
|
700
|
|
701 filename = find_file_recursively(dirname, basename);
|
|
702
|
|
703 if (filename && cfg.custom_cursors) {
|
|
704 cursor_animated = gdk_pixbuf_animation_new_from_file(filename, &error);
|
|
705 cursor_pixbuf = gdk_pixbuf_animation_get_static_image(cursor_animated);
|
|
706 cursor_gdk = gdk_cursor_new_from_pixbuf(gdk_display_get_default(),
|
|
707 cursor_pixbuf, 0, 0);
|
|
708 } else {
|
|
709 cursor_gdk = gdk_cursor_new(GDK_LEFT_PTR);
|
|
710 }
|
|
711
|
|
712 gdk_window_set_cursor(mainwin->window, cursor_gdk);
|
|
713 gdk_window_set_cursor(playlistwin->window, cursor_gdk);
|
|
714 gdk_window_set_cursor(equalizerwin->window, cursor_gdk);
|
|
715 }
|
|
716
|
|
717 static void
|
|
718 skin_load_pixmaps(Skin * skin, const gchar * path)
|
|
719 {
|
|
720 GdkPixmap *text_pm;
|
|
721 guint i;
|
|
722
|
|
723 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
|
|
724 skin_load_pixmap_id(skin, i, path);
|
|
725
|
|
726 text_pm = skin->pixmaps[SKIN_TEXT].pixmap;
|
|
727
|
|
728 if (text_pm)
|
|
729 skin_get_textcolors(text_pm, skin->textbg, skin->textfg);
|
|
730
|
|
731 #if 0
|
|
732 if (skin->pixmaps[SKIN_NUMBERS].pixmap)
|
|
733 skin_numbers_generate_dash(skin);
|
|
734 #endif
|
|
735
|
|
736 skin->colors[SKIN_PLEDIT_NORMAL] =
|
|
737 skin_load_color(path, "pledit.txt", "text", "normal");
|
|
738 skin->colors[SKIN_PLEDIT_CURRENT] =
|
|
739 skin_load_color(path, "pledit.txt", "text", "current");
|
|
740 skin->colors[SKIN_PLEDIT_NORMALBG] =
|
|
741 skin_load_color(path, "pledit.txt", "text", "normalbg");
|
|
742 skin->colors[SKIN_PLEDIT_SELECTEDBG] =
|
|
743 skin_load_color(path, "pledit.txt", "text", "selectedbg");
|
|
744
|
|
745 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window);
|
|
746 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window);
|
|
747
|
|
748 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window);
|
|
749 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window);
|
|
750
|
|
751 skin_load_viscolor(skin, path, "viscolor.txt");
|
|
752 }
|
|
753
|
|
754 static gboolean
|
|
755 skin_load_nolock(Skin * skin, const gchar * path, gboolean force)
|
|
756 {
|
|
757 gchar *cpath;
|
|
758
|
|
759 g_return_val_if_fail(skin != NULL, FALSE);
|
|
760 g_return_val_if_fail(path != NULL, FALSE);
|
|
761 REQUIRE_LOCK(skin->lock);
|
|
762
|
|
763 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR))
|
|
764 return FALSE;
|
|
765
|
|
766 if (!force) {
|
|
767 if (skin->path)
|
|
768 if (!strcmp(skin->path, path))
|
|
769 return FALSE;
|
|
770 }
|
|
771
|
|
772 skin_current_num++;
|
|
773
|
|
774 skin->path = g_strdup(path);
|
|
775
|
|
776
|
|
777 if (!file_is_archive(path)) {
|
|
778 skin_load_pixmaps(skin, path);
|
|
779 skin_load_cursor(skin, path);
|
|
780 return TRUE;
|
|
781 }
|
|
782
|
|
783 if (!(cpath = archive_decompress(path))) {
|
|
784 g_message("Unable to extract skin archive (%s)", path);
|
|
785 return FALSE;
|
|
786 }
|
|
787
|
|
788 skin_load_pixmaps(skin, cpath);
|
|
789 skin_load_cursor(skin, cpath);
|
|
790 del_directory(cpath);
|
|
791 g_free(cpath);
|
|
792
|
|
793 return TRUE;
|
|
794 }
|
|
795
|
|
796 void
|
|
797 skin_install_skin(const gchar * path)
|
|
798 {
|
|
799 gchar *command;
|
|
800
|
|
801 g_return_if_fail(path != NULL);
|
|
802
|
|
803 command = g_strdup_printf("cp %s %s", path, bmp_paths[BMP_PATH_USER_SKIN_DIR]);
|
|
804 if (system(command)) {
|
|
805 g_message("Unable to install skin (%s) into user directory (%s)",
|
|
806 path, bmp_paths[BMP_PATH_USER_SKIN_DIR]);
|
|
807 }
|
|
808 g_free(command);
|
|
809 }
|
|
810
|
|
811
|
|
812 gboolean
|
|
813 skin_load(Skin * skin, const gchar * path)
|
|
814 {
|
|
815 gboolean error;
|
|
816
|
|
817 g_return_val_if_fail(skin != NULL, FALSE);
|
|
818 g_return_val_if_fail(path != NULL, FALSE);
|
|
819
|
|
820 skin_lock(skin);
|
|
821 error = skin_load_nolock(skin, path, FALSE);
|
|
822 skin_unlock(skin);
|
|
823
|
|
824 return error;
|
|
825 }
|
|
826
|
|
827 gboolean
|
|
828 skin_reload_forced(void)
|
|
829 {
|
|
830 gboolean error;
|
|
831
|
|
832 skin_lock(bmp_active_skin);
|
|
833 error = skin_load_nolock(bmp_active_skin, bmp_active_skin->path, TRUE);
|
|
834 skin_unlock(bmp_active_skin);
|
|
835
|
|
836 return error;
|
|
837 }
|
|
838
|
|
839 void
|
|
840 skin_reload(Skin * skin)
|
|
841 {
|
|
842 g_return_if_fail(skin != NULL);
|
|
843 skin_load_nolock(skin, skin->path, TRUE);
|
|
844 }
|
|
845
|
|
846
|
|
847 static SkinPixmap *
|
|
848 skin_get_pixmap(Skin * skin, SkinPixmapId map_id)
|
|
849 {
|
|
850 g_return_val_if_fail(skin != NULL, NULL);
|
|
851 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL);
|
|
852
|
|
853 return &skin->pixmaps[map_id];
|
|
854 }
|
|
855
|
|
856 GdkBitmap *
|
|
857 skin_get_mask(Skin * skin, SkinMaskId mi)
|
|
858 {
|
|
859 g_return_val_if_fail(skin != NULL, NULL);
|
|
860 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL);
|
|
861
|
|
862 return skin->masks[mi];
|
|
863 }
|
|
864
|
|
865 GdkColor *
|
|
866 skin_get_color(Skin * skin, SkinColorId color_id)
|
|
867 {
|
|
868 GdkColor *ret = NULL;
|
|
869
|
|
870 g_return_val_if_fail(skin != NULL, NULL);
|
|
871
|
|
872 switch (color_id) {
|
|
873 case SKIN_TEXTBG:
|
|
874 if (skin->pixmaps[SKIN_TEXT].pixmap)
|
|
875 ret = skin->textbg;
|
|
876 else
|
|
877 ret = skin->def_textbg;
|
|
878 break;
|
|
879 case SKIN_TEXTFG:
|
|
880 if (skin->pixmaps[SKIN_TEXT].pixmap)
|
|
881 ret = skin->textfg;
|
|
882 else
|
|
883 ret = skin->def_textfg;
|
|
884 break;
|
|
885 default:
|
|
886 if (color_id < SKIN_COLOR_COUNT)
|
|
887 ret = skin->colors[color_id];
|
|
888 break;
|
|
889 }
|
|
890 return ret;
|
|
891 }
|
|
892
|
|
893 void
|
|
894 skin_get_viscolor(Skin * skin, guchar vis_color[24][3])
|
|
895 {
|
|
896 gint i;
|
|
897
|
|
898 g_return_if_fail(skin != NULL);
|
|
899
|
|
900 for (i = 0; i < 24; i++) {
|
|
901 vis_color[i][0] = skin->vis_color[i][0];
|
|
902 vis_color[i][1] = skin->vis_color[i][1];
|
|
903 vis_color[i][2] = skin->vis_color[i][2];
|
|
904 }
|
|
905 }
|
|
906
|
|
907 gint
|
|
908 skin_get_id(void)
|
|
909 {
|
|
910 return skin_current_num;
|
|
911 }
|
|
912
|
|
913 void
|
|
914 skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc,
|
|
915 SkinPixmapId pixmap_id,
|
|
916 gint xsrc, gint ysrc, gint xdest, gint ydest,
|
|
917 gint width, gint height)
|
|
918 {
|
|
919 SkinPixmap *pixmap;
|
|
920
|
|
921 g_return_if_fail(skin != NULL);
|
|
922
|
|
923 pixmap = skin_get_pixmap(skin, pixmap_id);
|
|
924 g_return_if_fail(pixmap != NULL);
|
|
925 g_return_if_fail(pixmap->pixmap != NULL);
|
|
926
|
|
927 if (xsrc > pixmap->width || ysrc > pixmap->height)
|
|
928 return;
|
|
929
|
|
930 width = MIN(width, pixmap->width - xsrc);
|
|
931 height = MIN(height, pixmap->height - ysrc);
|
|
932 gdk_draw_pixmap(drawable, gc, pixmap->pixmap, xsrc, ysrc,
|
|
933 xdest, ydest, width, height);
|
|
934 }
|
|
935
|
|
936 void
|
|
937 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19])
|
|
938 {
|
|
939 gint i;
|
|
940 GdkPixmap *pixmap;
|
|
941 GdkImage *img;
|
|
942 SkinPixmap *eqmainpm;
|
|
943
|
|
944 g_return_if_fail(skin != NULL);
|
|
945
|
|
946 eqmainpm = &skin->pixmaps[SKIN_EQMAIN];
|
|
947 if (eqmainpm->pixmap &&
|
|
948 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313)
|
|
949 pixmap = eqmainpm->pixmap;
|
|
950 else
|
|
951 return;
|
|
952
|
|
953 if (!GDK_IS_DRAWABLE(pixmap))
|
|
954 return;
|
|
955
|
|
956 if (!(img = gdk_drawable_get_image(pixmap, 115, 294, 1, 19)))
|
|
957 return;
|
|
958
|
|
959 for (i = 0; i < 19; i++)
|
|
960 colors[i] = gdk_image_get_pixel(img, 0, i);
|
|
961
|
|
962 gdk_image_destroy(img);
|
|
963 }
|
|
964
|
|
965
|
|
966 static void
|
|
967 skin_draw_playlistwin_frame_top(Skin * skin,
|
|
968 GdkDrawable * drawable,
|
|
969 GdkGC * gc,
|
|
970 gint width, gint height, gboolean focus)
|
|
971 {
|
|
972 /* The title bar skin consists of 2 sets of 4 images, 1 set
|
|
973 * for focused state and the other for unfocused. The 4 images
|
|
974 * are:
|
|
975 *
|
|
976 * a. right corner (25,20)
|
|
977 * b. left corner (25,20)
|
|
978 * c. tiler (25,20)
|
|
979 * d. title (100,20)
|
|
980 *
|
|
981 * min allowed width = 100+25+25 = 150
|
|
982 */
|
|
983
|
|
984 gint i, y, c;
|
|
985
|
|
986 /* get y offset of the pixmap set to use */
|
|
987 if (focus)
|
|
988 y = 0;
|
|
989 else
|
|
990 y = 21;
|
|
991
|
|
992 /* left corner */
|
|
993 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, y, 0, 0, 25, 20);
|
|
994
|
|
995 /* titlebar title */
|
|
996 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 26, y,
|
|
997 (width - 100) / 2, 0, 100, 20);
|
|
998
|
|
999 /* titlebar right corner */
|
|
1000 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 153, y,
|
|
1001 width - 25, 0, 25, 20);
|
|
1002
|
|
1003 /* tile draw the remaining frame */
|
|
1004
|
|
1005 /* compute tile count */
|
|
1006 c = (width - (100 + 25 + 25)) / 25;
|
|
1007
|
|
1008 for (i = 0; i < c / 2; i++) {
|
|
1009 /* left of title */
|
|
1010 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
|
|
1011 25 + i * 25, 0, 25, 20);
|
|
1012
|
|
1013 /* right of title */
|
|
1014 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
|
|
1015 (width + 100) / 2 + i * 25, 0, 25, 20);
|
|
1016 }
|
|
1017
|
|
1018 if (c & 1) {
|
|
1019 /* Odd tile count, so one remaining to draw. Here we split
|
|
1020 * it into two and draw half on either side of the title */
|
|
1021 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
|
|
1022 ((c / 2) * 25) + 25, 0, 12, 20);
|
|
1023 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 127, y,
|
|
1024 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20);
|
|
1025 }
|
|
1026 }
|
|
1027
|
|
1028 static void
|
|
1029 skin_draw_playlistwin_frame_bottom(Skin * skin,
|
|
1030 GdkDrawable * drawable,
|
|
1031 GdkGC * gc,
|
|
1032 gint width, gint height, gboolean focus)
|
|
1033 {
|
|
1034 /* The bottom frame skin consists of 1 set of 4 images. The 4
|
|
1035 * images are:
|
|
1036 *
|
|
1037 * a. left corner with menu buttons (125,38)
|
|
1038 * b. visualization window (75,38)
|
|
1039 * c. right corner with play buttons (150,38)
|
|
1040 * d. frame tile (25,38)
|
|
1041 *
|
|
1042 * (min allowed width = 125+150+25=300
|
|
1043 */
|
|
1044
|
|
1045 gint i, c;
|
|
1046
|
|
1047 /* bottom left corner (menu buttons) */
|
|
1048 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 72,
|
|
1049 0, height - 38, 125, 38);
|
|
1050
|
|
1051 c = (width - 275) / 25;
|
|
1052
|
|
1053 /* draw visualization window, if width allows */
|
|
1054 if (c >= 3) {
|
|
1055 c -= 3;
|
|
1056 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 205, 0,
|
|
1057 width - (150 + 75), height - 38, 75, 38);
|
|
1058 }
|
|
1059
|
|
1060 /* Bottom right corner (playbuttons etc) */
|
|
1061 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT,
|
|
1062 126, 72, width - 150, height - 38, 150, 38);
|
|
1063
|
|
1064 /* Tile draw the remaining undrawn portions */
|
|
1065 for (i = 0; i < c; i++)
|
|
1066 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 179, 0,
|
|
1067 125 + i * 25, height - 38, 25, 38);
|
|
1068 }
|
|
1069
|
|
1070 static void
|
|
1071 skin_draw_playlistwin_frame_sides(Skin * skin,
|
|
1072 GdkDrawable * drawable,
|
|
1073 GdkGC * gc,
|
|
1074 gint width, gint height, gboolean focus)
|
|
1075 {
|
|
1076 /* The side frames consist of 2 tile images. 1 for the left, 1 for
|
|
1077 * the right.
|
|
1078 * a. left (12,29)
|
|
1079 * b. right (19,29)
|
|
1080 */
|
|
1081
|
|
1082 gint i;
|
|
1083
|
|
1084 /* frame sides */
|
|
1085 for (i = 0; i < (height - (20 + 38)) / 29; i++) {
|
|
1086 /* left */
|
|
1087 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 0, 42,
|
|
1088 0, 20 + i * 29, 12, 29);
|
|
1089
|
|
1090 /* right */
|
|
1091 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 32, 42,
|
|
1092 width - 19, 20 + i * 29, 19, 29);
|
|
1093 }
|
|
1094 }
|
|
1095
|
|
1096
|
|
1097 void
|
|
1098 skin_draw_playlistwin_frame(Skin * skin,
|
|
1099 GdkDrawable * drawable, GdkGC * gc,
|
|
1100 gint width, gint height, gboolean focus)
|
|
1101 {
|
|
1102 skin_draw_playlistwin_frame_top(skin, drawable, gc, width, height, focus);
|
|
1103 skin_draw_playlistwin_frame_bottom(skin, drawable, gc, width, height,
|
|
1104 focus);
|
|
1105 skin_draw_playlistwin_frame_sides(skin, drawable, gc, width, height,
|
|
1106 focus);
|
|
1107 }
|
|
1108
|
|
1109
|
|
1110 void
|
|
1111 skin_draw_playlistwin_shaded(Skin * skin,
|
|
1112 GdkDrawable * drawable, GdkGC * gc,
|
|
1113 gint width, gboolean focus)
|
|
1114 {
|
|
1115 /* The shade mode titlebar skin consists of 4 images:
|
|
1116 * a) left corner offset (72,42) size (25,14)
|
|
1117 * b) right corner, focused offset (99,57) size (50,14)
|
|
1118 * c) right corner, unfocused offset (99,42) size (50,14)
|
|
1119 * d) bar tile offset (72,57) size (25,14)
|
|
1120 */
|
|
1121
|
|
1122 gint i;
|
|
1123
|
|
1124 /* left corner */
|
|
1125 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14);
|
|
1126
|
|
1127 /* bar tile */
|
|
1128 for (i = 0; i < (width - 75) / 25; i++)
|
|
1129 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 72, 57,
|
|
1130 (i * 25) + 25, 0, 25, 14);
|
|
1131
|
|
1132 /* right corner */
|
|
1133 skin_draw_pixmap(skin, drawable, gc, SKIN_PLEDIT, 99, focus ? 57 : 42,
|
|
1134 width - 50, 0, 50, 14);
|
|
1135 }
|
|
1136
|
|
1137
|
|
1138 void
|
|
1139 skin_draw_mainwin_titlebar(Skin * skin,
|
|
1140 GdkDrawable * drawable, GdkGC * gc,
|
|
1141 gboolean shaded, gboolean focus)
|
|
1142 {
|
|
1143 /* The titlebar skin consists of 2 sets of 2 images, one for for
|
|
1144 * shaded and the other for unshaded mode, giving a total of 4.
|
|
1145 * The images are exactly 275x14 pixels, aligned and arranged
|
|
1146 * vertically on each other in the pixmap in the following order:
|
|
1147 *
|
|
1148 * a) unshaded, focused offset (27, 0)
|
|
1149 * b) unshaded, unfocused offset (27, 15)
|
|
1150 * c) shaded, focused offset (27, 29)
|
|
1151 * d) shaded, unfocused offset (27, 42)
|
|
1152 */
|
|
1153
|
|
1154 gint y_offset;
|
|
1155
|
|
1156 if (shaded) {
|
|
1157 if (focus)
|
|
1158 y_offset = 29;
|
|
1159 else
|
|
1160 y_offset = 42;
|
|
1161 }
|
|
1162 else {
|
|
1163 if (focus)
|
|
1164 y_offset = 0;
|
|
1165 else
|
|
1166 y_offset = 15;
|
|
1167 }
|
|
1168
|
|
1169 skin_draw_pixmap(skin, drawable, gc, SKIN_TITLEBAR, 27, y_offset,
|
|
1170 0, 0, MAINWIN_WIDTH, MAINWIN_TITLEBAR_HEIGHT);
|
|
1171 }
|
|
1172
|
|
1173 #if 0
|
|
1174 void
|
|
1175 skin_draw_mainwin(Skin * skin,
|
|
1176 GdkDrawable * drawable, GdkGC gc,
|
|
1177 gboolean doublesize, gboolean shaded, gboolean focus)
|
|
1178 {
|
|
1179
|
|
1180 }
|
|
1181 #endif
|