annotate src/skins/ui_skin.c @ 2579:8fba3fbf1a0f

add vis and svis
author Tomasz Mon <desowin@gmail.com>
date Mon, 19 May 2008 18:05:54 +0200
parents c0b08527b121
children c9e40418a74c
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1 /* Audacious
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2 * Copyright (C) 2005-2007 Audacious development team.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
3 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
4 * BMP - Cross-platform multimedia player
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
5 * Copyright (C) 2003-2004 BMP development team.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
6 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
7 * Based on XMMS:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
8 * Copyright (C) 1998-2003 XMMS development team.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
9 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
12 * the Free Software Foundation; under version 3 of the License.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
13 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
17 * GNU General Public License for more details.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
18 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
20 * along with this program. If not, see <http://www.gnu.org/licenses>.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
21 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
22 * The Audacious team does not consider modular code linking to
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
23 * Audacious or using our public API to be a derived work.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
24 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
25
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
26 /*#define AUD_DEBUG*/
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
27 #ifdef HAVE_CONFIG_H
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
28 # include "config.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
29 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
30
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
31 /* TODO: enforce default sizes! */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
32
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
33 #include <glib.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
34 #include <stdio.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
35 #include <stdlib.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
36 #include <string.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
37 #include <ctype.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
38 #include "plugin.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
39
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
40 #include <audacious/plugin.h>
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
41 #include "ui_skin.h"
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
42 #include "util.h"
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
43 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
44 #include "ui_equalizer.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
45 #include "ui_playlist.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
46 #include "ui_skinselector.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
47 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
48 #include "debug.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
49
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
50 #include "platform/smartinclude.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
51
2579
8fba3fbf1a0f add vis and svis
Tomasz Mon <desowin@gmail.com>
parents: 2573
diff changeset
52 #include "ui_skinned_window.h"
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
53 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
54 #include "ui_skinned_button.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
55 #include "ui_skinned_number.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
56 #include "ui_skinned_horizontal_slider.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
57 #include "ui_skinned_playstatus.h"
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
58 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
59 #define EXTENSION_TARGETS 7
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
60
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
61 static gchar *ext_targets[EXTENSION_TARGETS] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
62 { "bmp", "xpm", "png", "svg", "gif", "jpg", "jpeg" };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
63
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
64 struct _SkinPixmapIdMapping {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
65 SkinPixmapId id;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
66 const gchar *name;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
67 const gchar *alt_name;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
68 gint width, height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
69 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
70
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
71 struct _SkinMaskInfo {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
72 gint width, height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
73 gchar *inistr;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
74 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
75 /* I know, it's not nice to copy'n'paste stuff, but I wanted it to
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
76 be atleast parially working, before dealing with such things */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
77
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
78 typedef struct {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
79 const gchar *to_match;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
80 gchar *match;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
81 gboolean found;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
82 } FindFileContext;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
83
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
84 typedef struct _SkinPixmapIdMapping SkinPixmapIdMapping;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
85 typedef struct _SkinMaskInfo SkinMaskInfo;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
86
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
87
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
88 Skin *aud_active_skin = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
89
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
90 static gint skin_current_num;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
91
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
92 static SkinMaskInfo skin_mask_info[] = {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
93 {275, 116, "Normal"},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
94 {275, 16, "WindowShade"},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
95 {275, 116, "Equalizer"},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
96 {275, 16, "EqualizerWS"}
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
97 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
98
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
99 static SkinPixmapIdMapping skin_pixmap_id_map[] = {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
100 {SKIN_MAIN, "main", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
101 {SKIN_CBUTTONS, "cbuttons", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
102 {SKIN_SHUFREP, "shufrep", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
103 {SKIN_TEXT, "text", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
104 {SKIN_TITLEBAR, "titlebar", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
105 {SKIN_VOLUME, "volume", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
106 {SKIN_BALANCE, "balance", "volume", 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
107 {SKIN_MONOSTEREO, "monoster", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
108 {SKIN_PLAYPAUSE, "playpaus", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
109 {SKIN_NUMBERS, "nums_ex", "numbers", 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
110 {SKIN_POSBAR, "posbar", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
111 {SKIN_EQMAIN, "eqmain", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
112 {SKIN_PLEDIT, "pledit", NULL, 0, 0},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
113 {SKIN_EQ_EX, "eq_ex", NULL, 0, 0}
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
114 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
115
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
116 static guint skin_pixmap_id_map_size = G_N_ELEMENTS(skin_pixmap_id_map);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
117
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
118 static const guchar skin_default_viscolor[24][3] = {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
119 {9, 34, 53},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
120 {10, 18, 26},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
121 {0, 54, 108},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
122 {0, 58, 116},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
123 {0, 62, 124},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
124 {0, 66, 132},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
125 {0, 70, 140},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
126 {0, 74, 148},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
127 {0, 78, 156},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
128 {0, 82, 164},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
129 {0, 86, 172},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
130 {0, 92, 184},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
131 {0, 98, 196},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
132 {0, 104, 208},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
133 {0, 110, 220},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
134 {0, 116, 232},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
135 {0, 122, 244},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
136 {0, 128, 255},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
137 {0, 128, 255},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
138 {0, 104, 208},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
139 {0, 80, 160},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
140 {0, 56, 112},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
141 {0, 32, 64},
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
142 {200, 200, 200}
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
143 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
144
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
145 static gchar *original_gtk_theme = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
146
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
147 static GdkBitmap *skin_create_transparent_mask(const gchar *,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
148 const gchar *,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
149 const gchar *,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
150 GdkWindow *,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
151 gint, gint, gboolean);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
152
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
153 static void skin_set_default_vis_color(Skin * skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
154
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
155 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
156 skin_lock(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
157 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
158 g_mutex_lock(skin->lock);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
159 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
160
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
161 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
162 skin_unlock(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
163 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
164 g_mutex_unlock(skin->lock);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
165 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
166
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
167 gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
168 aud_active_skin_reload(void)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
169 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
170 AUDDBG("\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
171 return aud_active_skin_load(aud_active_skin->path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
172 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
173
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
174 gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
175 aud_active_skin_load(const gchar * path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
176 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
177 AUDDBG("%s\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
178 g_return_val_if_fail(aud_active_skin != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
179
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
180 if (!skin_load(aud_active_skin, path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
181 AUDDBG("loading failed\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
182 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
183 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
184
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
185 ui_skinned_window_draw_all(mainwin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
186 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
187 ui_skinned_window_draw_all(equalizerwin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
188 ui_skinned_window_draw_all(playlistwin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
189
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
190 playlistwin_update_list(playlist_get_active());
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
191
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
192 SkinPixmap *pixmap;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
193 pixmap = &aud_active_skin->pixmaps[SKIN_POSBAR];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
194 /* last 59 pixels of SKIN_POSBAR are knobs (normal and selected) */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
195 gtk_widget_set_size_request(mainwin_position, pixmap->width - 59, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
196 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
197 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
198 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
199
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
200 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
201 skin_pixmap_free(SkinPixmap * p)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
202 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
203 g_return_if_fail(p != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
204 g_return_if_fail(p->pixbuf != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
205
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
206 g_object_unref(p->pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
207 p->pixbuf = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
208 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
209
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
210 Skin *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
211 skin_new(void)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
212 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
213 Skin *skin;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
214 skin = g_new0(Skin, 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
215 skin->lock = g_mutex_new();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
216 return skin;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
217 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
218
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
219 /**
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
220 * Frees the data associated for skin.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
221 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
222 * Does not free skin itself or lock variable so that the skin can immediately
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
223 * populated with new skin data if needed.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
224 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
225 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
226 skin_free(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
227 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
228 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
229
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
230 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
231
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
232 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
233 skin_pixmap_free(&skin->pixmaps[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
234
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
235 for (i = 0; i < SKIN_MASK_COUNT; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
236 if (skin->masks[i])
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
237 g_object_unref(skin->masks[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
238 if (skin->scaled_masks[i])
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
239 g_object_unref(skin->scaled_masks[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
240
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
241 skin->masks[i] = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
242 skin->scaled_masks[i] = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
243 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
244
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
245 for (i = 0; i < SKIN_COLOR_COUNT; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
246 if (skin->colors[i])
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
247 g_free(skin->colors[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
248
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
249 skin->colors[i] = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
250 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
251
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
252 g_free(skin->path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
253 skin->path = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
254
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
255 skin_set_default_vis_color(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
256 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
257
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
258 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
259 skin_destroy(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
260 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
261 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
262 skin_free(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
263 g_mutex_free(skin->lock);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
264 g_free(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
265 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
266
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
267 const SkinPixmapIdMapping *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
268 skin_pixmap_id_lookup(guint id)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
269 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
270 guint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
271
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
272 for (i = 0; i < skin_pixmap_id_map_size; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
273 if (id == skin_pixmap_id_map[i].id) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
274 return &skin_pixmap_id_map[i];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
275 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
276 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
277
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
278 return NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
279 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
280
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
281 const gchar *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
282 skin_pixmap_id_to_name(SkinPixmapId id)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
283 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
284 guint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
285
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
286 for (i = 0; i < skin_pixmap_id_map_size; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
287 if (id == skin_pixmap_id_map[i].id)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
288 return skin_pixmap_id_map[i].name;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
289 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
290 return NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
291 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
292
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
293 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
294 skin_set_default_vis_color(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
295 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
296 memcpy(skin->vis_color, skin_default_viscolor,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
297 sizeof(skin_default_viscolor));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
298 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
299
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
300 /*
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
301 * I have rewritten this to take an array of possible targets,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
302 * once we find a matching target we now return, instead of loop
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
303 * recursively. This allows for us to support many possible format
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
304 * targets for our skinning engine than just the original winamp
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
305 * formats.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
306 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
307 * -- nenolod, 16 January 2006
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
308 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
309 gchar *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
310 skin_pixmap_locate(const gchar * dirname, gchar ** basenames)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
311 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
312 gchar *filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
313 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
314
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
315 for (i = 0; basenames[i]; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
316 if (!(filename = find_path_recursively(dirname, basenames[i])))
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
317 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
318 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
319 return filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
320
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
321 /* can't find any targets -- sorry */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
322 return NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
323 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
324
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
325 /**
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
326 * Creates possible file names for a pixmap.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
327 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
328 * Basically this makes list of all possible file names that pixmap data
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
329 * can be found from by using the static ext_targets variable to get all
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
330 * possible extensions that pixmap file might have.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
331 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
332 static gchar **
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
333 skin_pixmap_create_basenames(const SkinPixmapIdMapping * pixmap_id_mapping)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
334 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
335 gchar **basenames = g_malloc0(sizeof(gchar*) * (EXTENSION_TARGETS * 2 + 1));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
336 gint i, y;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
337
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
338 // Create list of all possible image formats that can be loaded
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
339 for (i = 0, y = 0; i < EXTENSION_TARGETS; i++, y++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
340 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
341 basenames[y] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
342 g_strdup_printf("%s.%s", pixmap_id_mapping->name, ext_targets[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
343
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
344 if (pixmap_id_mapping->alt_name)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
345 basenames[++y] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
346 g_strdup_printf("%s.%s", pixmap_id_mapping->alt_name,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
347 ext_targets[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
348 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
349
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
350 return basenames;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
351 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
352
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
353 /**
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
354 * Frees the data allocated by skin_pixmap_create_basenames
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
355 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
356 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
357 skin_pixmap_free_basenames(gchar ** basenames)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
358 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
359 int i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
360 for (i = 0; basenames[i] != NULL; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
361 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
362 g_free(basenames[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
363 basenames[i] = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
364 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
365 g_free(basenames);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
366 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
367
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
368 /**
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
369 * Locates a pixmap file for skin.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
370 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
371 static gchar *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
372 skin_pixmap_locate_basenames(const Skin * skin,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
373 const SkinPixmapIdMapping * pixmap_id_mapping,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
374 const gchar * path_p)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
375 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
376 gchar *filename = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
377 const gchar *path = path_p ? path_p : skin->path;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
378 gchar **basenames = skin_pixmap_create_basenames(pixmap_id_mapping);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
379
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
380 filename = skin_pixmap_locate(path, basenames);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
381
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
382 skin_pixmap_free_basenames(basenames);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
383
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
384 return filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
385 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
386
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
387
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
388 static gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
389 skin_load_pixmap_id(Skin * skin, SkinPixmapId id, const gchar * path_p)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
390 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
391 const SkinPixmapIdMapping *pixmap_id_mapping;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
392 gchar *filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
393 SkinPixmap *pm = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
394
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
395 g_return_val_if_fail(skin != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
396 g_return_val_if_fail(id < SKIN_PIXMAP_COUNT, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
397
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
398 pixmap_id_mapping = skin_pixmap_id_lookup(id);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
399 g_return_val_if_fail(pixmap_id_mapping != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
400
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
401 filename = skin_pixmap_locate_basenames(skin, pixmap_id_mapping, path_p);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
402
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
403 if (filename == NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
404 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
405
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
406 AUDDBG("loaded %s\n", filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
407
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
408 pm = &skin->pixmaps[id];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
409 GdkPixbuf *pix = gdk_pixbuf_new_from_file(filename, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
410 pm->pixbuf = audacious_create_colorized_pixbuf(pix, aud_cfg->colorize_r, aud_cfg->colorize_g, aud_cfg->colorize_b);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
411 g_object_unref(pix);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
412 pm->width = gdk_pixbuf_get_width(pm->pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
413 pm->height = gdk_pixbuf_get_height(pm->pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
414 pm->current_width = pm->width;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
415 pm->current_height = pm->height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
416
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
417 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
418
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
419 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
420 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
421
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
422 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
423 skin_mask_create(Skin * skin,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
424 const gchar * path,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
425 gint id,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
426 GdkWindow * window)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
427 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
428 skin->masks[id] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
429 skin_create_transparent_mask(path, "region.txt",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
430 skin_mask_info[id].inistr, window,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
431 skin_mask_info[id].width,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
432 skin_mask_info[id].height, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
433
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
434 skin->scaled_masks[id] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
435 skin_create_transparent_mask(path, "region.txt",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
436 skin_mask_info[id].inistr, window,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
437 skin_mask_info[id].width * 2,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
438 skin_mask_info[id].height * 2, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
439 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
440
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
441 static GdkBitmap *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
442 create_default_mask(GdkWindow * parent, gint w, gint h)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
443 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
444 GdkBitmap *ret;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
445 GdkGC *gc;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
446 GdkColor pattern;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
447
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
448 ret = gdk_pixmap_new(parent, w, h, 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
449 gc = gdk_gc_new(ret);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
450 pattern.pixel = 1;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
451 gdk_gc_set_foreground(gc, &pattern);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
452 gdk_draw_rectangle(ret, gc, TRUE, 0, 0, w, h);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
453 g_object_unref(gc);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
454
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
455 return ret;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
456 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
457
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
458 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
459 skin_query_color(GdkColormap * cm, GdkColor * c)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
460 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
461 #ifdef GDK_WINDOWING_X11
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
462 XColor xc = { 0,0,0,0,0,0 };
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
463
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
464 xc.pixel = c->pixel;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
465 XQueryColor(GDK_COLORMAP_XDISPLAY(cm), GDK_COLORMAP_XCOLORMAP(cm), &xc);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
466 c->red = xc.red;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
467 c->green = xc.green;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
468 c->blue = xc.blue;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
469 #else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
470 /* do nothing. see what breaks? */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
471 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
472 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
473
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
474 static glong
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
475 skin_calc_luminance(GdkColor * c)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
476 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
477 return (0.212671 * c->red + 0.715160 * c->green + 0.072169 * c->blue);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
478 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
479
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
480 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
481 skin_get_textcolors(GdkPixbuf * pix, GdkColor * bgc, GdkColor * fgc)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
482 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
483 /*
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
484 * Try to extract reasonable background and foreground colors
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
485 * from the font pixmap
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
486 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
487
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
488 GdkImage *gi;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
489 GdkColormap *cm;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
490 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
491
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
492 g_return_if_fail(pix != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
493
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
494 GdkPixmap *text = gdk_pixmap_new(NULL, gdk_pixbuf_get_width(pix), gdk_pixbuf_get_height(pix), gdk_rgb_get_visual()->depth);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
495 gdk_draw_pixbuf(text, NULL, pix, 0, 0, 0, 0, gdk_pixbuf_get_width(pix), gdk_pixbuf_get_height(pix),
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
496 GDK_RGB_DITHER_NONE, 0, 0);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
497 /* Get the first line of text */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
498 gi = gdk_drawable_get_image(text, 0, 0, 152, 6);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
499 cm = gdk_colormap_get_system();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
500
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
501 for (i = 0; i < 6; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
502 GdkColor c;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
503 gint x;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
504 glong d, max_d;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
505
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
506 /* Get a pixel from the middle of the space character */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
507 bgc[i].pixel = gdk_image_get_pixel(gi, 151, i);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
508 skin_query_color(cm, &bgc[i]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
509
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
510 max_d = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
511 for (x = 1; x < 150; x++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
512 c.pixel = gdk_image_get_pixel(gi, x, i);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
513 skin_query_color(cm, &c);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
514
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
515 d = labs(skin_calc_luminance(&c) - skin_calc_luminance(&bgc[i]));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
516 if (d > max_d) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
517 memcpy(&fgc[i], &c, sizeof(GdkColor));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
518 max_d = d;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
519 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
520 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
521 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
522 g_object_unref(gi);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
523 g_object_unref(text);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
524 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
525
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
526 gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
527 init_skins(const gchar * path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
528 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
529 aud_active_skin = skin_new();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
530
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
531 skin_parse_hints(aud_active_skin, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
532 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
533 /* create the windows if they haven't been created yet, needed for bootstrapping */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
534 if (mainwin == NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
535 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
536 mainwin_create();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
537 equalizerwin_create();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
538 playlistwin_create();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
539 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
540 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
541 if (!aud_active_skin_load(path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
542 if (path != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
543 AUDDBG("Unable to load skin (%s), trying default...\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
544 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
545 AUDDBG("Skin not defined: trying default...\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
546
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
547 /* can't load configured skin, retry with default */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
548 if (!aud_active_skin_load(BMP_DEFAULT_SKIN_PATH)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
549 AUDDBG("Unable to load default skin (%s)! Giving up.\n",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
550 BMP_DEFAULT_SKIN_PATH);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
551 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
552 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
553 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
554 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
555 if (aud_cfg->random_skin_on_play)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
556 skinlist_update();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
557 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
558 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
559 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
560
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
561 void cleanup_skins()
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
562 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
563 skin_destroy(aud_active_skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
564 aud_active_skin = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
565 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
566
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
567
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
568 /*
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
569 * Opens and parses a skin's hints file.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
570 * Hints files are somewhat like "scripts" in Winamp3/5.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
571 * We'll probably add scripts to it next.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
572 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
573 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
574 skin_parse_hints(Skin * skin, gchar *path_p)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
575 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
576 gchar *filename, *tmp;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
577 INIFile *inifile;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
578
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
579 path_p = path_p ? path_p : skin->path;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
580
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
581 skin->properties.mainwin_othertext = FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
582 skin->properties.mainwin_vis_x = 24;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
583 skin->properties.mainwin_vis_y = 43;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
584 skin->properties.mainwin_vis_width = 76;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
585 skin->properties.mainwin_text_x = 112;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
586 skin->properties.mainwin_text_y = 27;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
587 skin->properties.mainwin_text_width = 153;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
588 skin->properties.mainwin_infobar_x = 112;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
589 skin->properties.mainwin_infobar_y = 43;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
590 skin->properties.mainwin_number_0_x = 36;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
591 skin->properties.mainwin_number_0_y = 26;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
592 skin->properties.mainwin_number_1_x = 48;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
593 skin->properties.mainwin_number_1_y = 26;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
594 skin->properties.mainwin_number_2_x = 60;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
595 skin->properties.mainwin_number_2_y = 26;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
596 skin->properties.mainwin_number_3_x = 78;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
597 skin->properties.mainwin_number_3_y = 26;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
598 skin->properties.mainwin_number_4_x = 90;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
599 skin->properties.mainwin_number_4_y = 26;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
600 skin->properties.mainwin_playstatus_x = 24;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
601 skin->properties.mainwin_playstatus_y = 28;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
602 skin->properties.mainwin_menurow_visible = TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
603 skin->properties.mainwin_volume_x = 107;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
604 skin->properties.mainwin_volume_y = 57;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
605 skin->properties.mainwin_balance_x = 177;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
606 skin->properties.mainwin_balance_y = 57;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
607 skin->properties.mainwin_position_x = 16;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
608 skin->properties.mainwin_position_y = 72;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
609 skin->properties.mainwin_othertext_is_status = FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
610 skin->properties.mainwin_othertext_visible = skin->properties.mainwin_othertext;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
611 skin->properties.mainwin_text_visible = TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
612 skin->properties.mainwin_vis_visible = TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
613 skin->properties.mainwin_previous_x = 16;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
614 skin->properties.mainwin_previous_y = 88;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
615 skin->properties.mainwin_play_x = 39;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
616 skin->properties.mainwin_play_y = 88;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
617 skin->properties.mainwin_pause_x = 62;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
618 skin->properties.mainwin_pause_y = 88;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
619 skin->properties.mainwin_stop_x = 85;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
620 skin->properties.mainwin_stop_y = 88;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
621 skin->properties.mainwin_next_x = 108;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
622 skin->properties.mainwin_next_y = 88;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
623 skin->properties.mainwin_eject_x = 136;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
624 skin->properties.mainwin_eject_y = 89;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
625 skin->properties.mainwin_width = 275;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
626 skin_mask_info[0].width = skin->properties.mainwin_width;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
627 skin->properties.mainwin_height = 116;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
628 skin_mask_info[0].height = skin->properties.mainwin_height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
629 skin->properties.mainwin_about_x = 247;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
630 skin->properties.mainwin_about_y = 83;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
631 skin->properties.mainwin_shuffle_x = 164;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
632 skin->properties.mainwin_shuffle_y = 89;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
633 skin->properties.mainwin_repeat_x = 210;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
634 skin->properties.mainwin_repeat_y = 89;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
635 skin->properties.mainwin_eqbutton_x = 219;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
636 skin->properties.mainwin_eqbutton_y = 58;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
637 skin->properties.mainwin_plbutton_x = 242;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
638 skin->properties.mainwin_plbutton_y = 58;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
639 skin->properties.textbox_bitmap_font_width = 5;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
640 skin->properties.textbox_bitmap_font_height = 6;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
641 skin->properties.mainwin_minimize_x = 244;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
642 skin->properties.mainwin_minimize_y = 3;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
643 skin->properties.mainwin_shade_x = 254;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
644 skin->properties.mainwin_shade_y = 3;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
645 skin->properties.mainwin_close_x = 264;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
646 skin->properties.mainwin_close_y = 3;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
647
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
648 if (path_p == NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
649 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
650
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
651 filename = find_file_recursively(path_p, "skin.hints");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
652
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
653 if (filename == NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
654 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
655
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
656 inifile = aud_open_ini_file(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
657 if (!inifile)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
658 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
659
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
660 tmp = aud_read_ini_string(inifile, "skin", "mainwinOthertext");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
661
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
662 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
663 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
664 skin->properties.mainwin_othertext = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
665 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
666 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
667
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
668 tmp = aud_read_ini_string(inifile, "skin", "mainwinVisX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
669
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
670 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
671 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
672 skin->properties.mainwin_vis_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
673 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
674 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
675
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
676 tmp = aud_read_ini_string(inifile, "skin", "mainwinVisY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
677
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
678 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
679 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
680 skin->properties.mainwin_vis_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
681 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
682 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
683
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
684 tmp = aud_read_ini_string(inifile, "skin", "mainwinVisWidth");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
685
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
686 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
687 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
688 skin->properties.mainwin_vis_width = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
689 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
690 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
691
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
692 tmp = aud_read_ini_string(inifile, "skin", "mainwinTextX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
693
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
694 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
695 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
696 skin->properties.mainwin_text_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
697 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
698 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
699
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
700 tmp = aud_read_ini_string(inifile, "skin", "mainwinTextY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
701
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
702 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
703 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
704 skin->properties.mainwin_text_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
705 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
706 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
707
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
708 tmp = aud_read_ini_string(inifile, "skin", "mainwinTextWidth");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
709
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
710 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
711 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
712 skin->properties.mainwin_text_width = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
713 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
714 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
715
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
716 tmp = aud_read_ini_string(inifile, "skin", "mainwinInfoBarX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
717
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
718 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
719 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
720 skin->properties.mainwin_infobar_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
721 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
722 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
723
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
724 tmp = aud_read_ini_string(inifile, "skin", "mainwinInfoBarY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
725
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
726 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
727 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
728 skin->properties.mainwin_infobar_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
729 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
730 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
731
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
732 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber0X");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
733
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
734 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
735 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
736 skin->properties.mainwin_number_0_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
737 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
738 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
739
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
740 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber0Y");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
741
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
742 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
743 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
744 skin->properties.mainwin_number_0_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
745 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
746 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
747
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
748 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber1X");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
749
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
750 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
751 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
752 skin->properties.mainwin_number_1_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
753 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
754 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
755
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
756 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber1Y");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
757
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
758 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
759 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
760 skin->properties.mainwin_number_1_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
761 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
762 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
763
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
764 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber2X");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
765
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
766 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
767 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
768 skin->properties.mainwin_number_2_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
769 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
770 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
771
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
772 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber2Y");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
773
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
774 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
775 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
776 skin->properties.mainwin_number_2_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
777 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
778 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
779
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
780 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber3X");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
781
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
782 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
783 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
784 skin->properties.mainwin_number_3_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
785 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
786 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
787
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
788 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber3Y");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
789
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
790 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
791 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
792 skin->properties.mainwin_number_3_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
793 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
794 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
795
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
796 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber4X");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
797
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
798 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
799 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
800 skin->properties.mainwin_number_4_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
801 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
802 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
803
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
804 tmp = aud_read_ini_string(inifile, "skin", "mainwinNumber4Y");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
805
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
806 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
807 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
808 skin->properties.mainwin_number_4_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
809 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
810 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
811
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
812 tmp = aud_read_ini_string(inifile, "skin", "mainwinPlayStatusX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
813
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
814 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
815 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
816 skin->properties.mainwin_playstatus_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
817 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
818 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
819
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
820 tmp = aud_read_ini_string(inifile, "skin", "mainwinPlayStatusY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
821
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
822 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
823 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
824 skin->properties.mainwin_playstatus_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
825 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
826 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
827
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
828 tmp = aud_read_ini_string(inifile, "skin", "mainwinMenurowVisible");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
829
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
830 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
831 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
832 skin->properties.mainwin_menurow_visible = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
833 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
834 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
835
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
836 tmp = aud_read_ini_string(inifile, "skin", "mainwinVolumeX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
837
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
838 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
839 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
840 skin->properties.mainwin_volume_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
841 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
842 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
843
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
844 tmp = aud_read_ini_string(inifile, "skin", "mainwinVolumeY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
845
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
846 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
847 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
848 skin->properties.mainwin_volume_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
849 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
850 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
851
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
852 tmp = aud_read_ini_string(inifile, "skin", "mainwinBalanceX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
853
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
854 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
855 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
856 skin->properties.mainwin_balance_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
857 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
858 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
859
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
860 tmp = aud_read_ini_string(inifile, "skin", "mainwinBalanceY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
861
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
862 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
863 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
864 skin->properties.mainwin_balance_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
865 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
866 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
867
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
868 tmp = aud_read_ini_string(inifile, "skin", "mainwinPositionX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
869
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
870 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
871 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
872 skin->properties.mainwin_position_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
873 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
874 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
875
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
876 tmp = aud_read_ini_string(inifile, "skin", "mainwinPositionY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
877
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
878 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
879 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
880 skin->properties.mainwin_position_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
881 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
882 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
883
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
884 tmp = aud_read_ini_string(inifile, "skin", "mainwinOthertextIsStatus");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
885
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
886 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
887 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
888 skin->properties.mainwin_othertext_is_status = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
889 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
890 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
891
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
892 tmp = aud_read_ini_string(inifile, "skin", "mainwinOthertextVisible");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
893
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
894 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
895 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
896 skin->properties.mainwin_othertext_visible = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
897 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
898 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
899
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
900 tmp = aud_read_ini_string(inifile, "skin", "mainwinTextVisible");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
901
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
902 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
903 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
904 skin->properties.mainwin_text_visible = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
905 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
906 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
907
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
908 tmp = aud_read_ini_string(inifile, "skin", "mainwinVisVisible");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
909
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
910 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
911 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
912 skin->properties.mainwin_vis_visible = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
913 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
914 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
915
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
916 tmp = aud_read_ini_string(inifile, "skin", "mainwinPreviousX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
917
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
918 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
919 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
920 skin->properties.mainwin_previous_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
921 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
922 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
923
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
924 tmp = aud_read_ini_string(inifile, "skin", "mainwinPreviousY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
925
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
926 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
927 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
928 skin->properties.mainwin_previous_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
929 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
930 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
931
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
932 tmp = aud_read_ini_string(inifile, "skin", "mainwinPlayX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
933
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
934 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
935 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
936 skin->properties.mainwin_play_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
937 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
938 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
939
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
940 tmp = aud_read_ini_string(inifile, "skin", "mainwinPlayY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
941
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
942 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
943 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
944 skin->properties.mainwin_play_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
945 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
946 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
947
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
948 tmp = aud_read_ini_string(inifile, "skin", "mainwinPauseX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
949
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
950 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
951 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
952 skin->properties.mainwin_pause_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
953 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
954 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
955
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
956 tmp = aud_read_ini_string(inifile, "skin", "mainwinPauseY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
957
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
958 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
959 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
960 skin->properties.mainwin_pause_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
961 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
962 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
963
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
964 tmp = aud_read_ini_string(inifile, "skin", "mainwinStopX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
965
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
966 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
967 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
968 skin->properties.mainwin_stop_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
969 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
970 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
971
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
972 tmp = aud_read_ini_string(inifile, "skin", "mainwinStopY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
973
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
974 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
975 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
976 skin->properties.mainwin_stop_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
977 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
978 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
979
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
980 tmp = aud_read_ini_string(inifile, "skin", "mainwinNextX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
981
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
982 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
983 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
984 skin->properties.mainwin_next_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
985 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
986 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
987
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
988 tmp = aud_read_ini_string(inifile, "skin", "mainwinNextY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
989
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
990 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
991 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
992 skin->properties.mainwin_next_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
993 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
994 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
995
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
996 tmp = aud_read_ini_string(inifile, "skin", "mainwinEjectX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
997
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
998 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
999 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1000 skin->properties.mainwin_eject_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1001 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1002 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1003
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1004 tmp = aud_read_ini_string(inifile, "skin", "mainwinEjectY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1005
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1006 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1007 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1008 skin->properties.mainwin_eject_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1009 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1010 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1011
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1012 tmp = aud_read_ini_string(inifile, "skin", "mainwinWidth");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1013
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1014 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1015 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1016 skin->properties.mainwin_width = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1017 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1018 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1019
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1020 skin_mask_info[0].width = skin->properties.mainwin_width;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1021
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1022 tmp = aud_read_ini_string(inifile, "skin", "mainwinHeight");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1023
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1024 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1025 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1026 skin->properties.mainwin_height = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1027 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1028 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1029
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1030 skin_mask_info[0].height = skin->properties.mainwin_height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1031
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1032 tmp = aud_read_ini_string(inifile, "skin", "mainwinAboutX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1033
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1034 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1035 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1036 skin->properties.mainwin_about_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1037 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1038 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1039
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1040 tmp = aud_read_ini_string(inifile, "skin", "mainwinAboutY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1041
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1042 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1043 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1044 skin->properties.mainwin_about_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1045 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1046 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1047
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1048 tmp = aud_read_ini_string(inifile, "skin", "mainwinShuffleX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1049
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1050 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1051 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1052 skin->properties.mainwin_shuffle_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1053 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1054 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1055
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1056 tmp = aud_read_ini_string(inifile, "skin", "mainwinShuffleY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1057
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1058 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1059 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1060 skin->properties.mainwin_shuffle_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1061 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1062 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1063
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1064 tmp = aud_read_ini_string(inifile, "skin", "mainwinRepeatX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1065
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1066 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1067 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1068 skin->properties.mainwin_repeat_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1069 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1070 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1071
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1072 tmp = aud_read_ini_string(inifile, "skin", "mainwinRepeatY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1073
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1074 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1075 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1076 skin->properties.mainwin_repeat_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1077 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1078 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1079
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1080 tmp = aud_read_ini_string(inifile, "skin", "mainwinEQButtonX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1081
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1082 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1083 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1084 skin->properties.mainwin_eqbutton_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1085 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1086 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1087
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1088 tmp = aud_read_ini_string(inifile, "skin", "mainwinEQButtonY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1089
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1090 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1091 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1092 skin->properties.mainwin_eqbutton_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1093 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1094 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1095
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1096 tmp = aud_read_ini_string(inifile, "skin", "mainwinPLButtonX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1097
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1098 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1099 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1100 skin->properties.mainwin_plbutton_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1101 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1102 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1103
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1104 tmp = aud_read_ini_string(inifile, "skin", "mainwinPLButtonY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1105
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1106 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1107 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1108 skin->properties.mainwin_plbutton_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1109 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1110 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1111
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1112 tmp = aud_read_ini_string(inifile, "skin", "textboxBitmapFontWidth");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1113
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1114 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1115 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1116 skin->properties.textbox_bitmap_font_width = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1117 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1118 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1119
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1120 tmp = aud_read_ini_string(inifile, "skin", "textboxBitmapFontHeight");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1121
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1122 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1123 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1124 skin->properties.textbox_bitmap_font_height = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1125 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1126 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1127
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1128 tmp = aud_read_ini_string(inifile, "skin", "mainwinMinimizeX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1129
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1130 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1131 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1132 skin->properties.mainwin_minimize_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1133 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1134 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1135
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1136 tmp = aud_read_ini_string(inifile, "skin", "mainwinMinimizeY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1137
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1138 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1139 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1140 skin->properties.mainwin_minimize_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1141 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1142 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1143
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1144 tmp = aud_read_ini_string(inifile, "skin", "mainwinShadeX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1145
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1146 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1147 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1148 skin->properties.mainwin_shade_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1149 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1150 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1151
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1152 tmp = aud_read_ini_string(inifile, "skin", "mainwinShadeY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1153
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1154 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1155 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1156 skin->properties.mainwin_shade_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1157 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1158 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1159
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1160 tmp = aud_read_ini_string(inifile, "skin", "mainwinCloseX");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1161
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1162 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1163 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1164 skin->properties.mainwin_close_x = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1165 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1166 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1167
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1168 tmp = aud_read_ini_string(inifile, "skin", "mainwinCloseY");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1169
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1170 if (tmp != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1171 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1172 skin->properties.mainwin_close_y = atoi(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1173 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1174 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1175
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1176 if (filename != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1177 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1178
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1179 aud_close_ini_file(inifile);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1180 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1181
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1182 static guint
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1183 hex_chars_to_int(gchar hi, gchar lo)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1184 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1185 /*
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1186 * Converts a value in the range 0x00-0xFF
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1187 * to a integer in the range 0-65535
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1188 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1189 gchar str[3];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1190
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1191 str[0] = hi;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1192 str[1] = lo;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1193 str[2] = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1194
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1195 return (CLAMP(strtol(str, NULL, 16), 0, 0xFF) << 8);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1196 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1197
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1198 static GdkColor *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1199 skin_load_color(INIFile *inifile,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1200 const gchar * section, const gchar * key,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1201 gchar * default_hex)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1202 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1203 gchar *value;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1204 GdkColor *color = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1205
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1206 if (inifile || default_hex) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1207 if (inifile) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1208 value = aud_read_ini_string(inifile, section, key);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1209 if (value == NULL) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1210 value = g_strdup(default_hex);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1211 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1212 } else {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1213 value = g_strdup(default_hex);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1214 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1215 if (value) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1216 gchar *ptr = value;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1217 gint len;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1218
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1219 color = g_new0(GdkColor, 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1220 g_strstrip(value);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1221
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1222 if (value[0] == '#')
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1223 ptr++;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1224 len = strlen(ptr);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1225 /*
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1226 * The handling of incomplete values is done this way
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1227 * to maximize winamp compatibility
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1228 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1229 if (len >= 6) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1230 color->red = hex_chars_to_int(*ptr, *(ptr + 1));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1231 ptr += 2;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1232 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1233 if (len >= 4) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1234 color->green = hex_chars_to_int(*ptr, *(ptr + 1));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1235 ptr += 2;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1236 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1237 if (len >= 2)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1238 color->blue = hex_chars_to_int(*ptr, *(ptr + 1));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1239
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1240 g_free(value);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1241 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1242 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1243 return color;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1244 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1245
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1246
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1247
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1248 GdkBitmap *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1249 skin_create_transparent_mask(const gchar * path,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1250 const gchar * file,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1251 const gchar * section,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1252 GdkWindow * window,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1253 gint width,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1254 gint height, gboolean scale)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1255 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1256 GdkBitmap *mask = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1257 GdkGC *gc = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1258 GdkColor pattern;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1259 GdkPoint *gpoints;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1260
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1261 gchar *filename = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1262 INIFile *inifile = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1263 gboolean created_mask = FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1264 GArray *num, *point;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1265 guint i, j;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1266 gint k;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1267
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1268 if (path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1269 filename = find_file_recursively(path, file);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1270
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1271 /* filename will be null if path wasn't set */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1272 if (!filename)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1273 return create_default_mask(window, width, height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1274
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1275 inifile = aud_open_ini_file(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1276
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1277 if ((num = aud_read_ini_array(inifile, section, "NumPoints")) == NULL) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1278 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1279 aud_close_ini_file(inifile);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1280 return NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1281 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1282
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1283 if ((point = aud_read_ini_array(inifile, section, "PointList")) == NULL) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1284 g_array_free(num, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1285 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1286 aud_close_ini_file(inifile);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1287 return NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1288 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1289
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1290 aud_close_ini_file(inifile);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1291
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1292 mask = gdk_pixmap_new(window, width, height, 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1293 gc = gdk_gc_new(mask);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1294
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1295 pattern.pixel = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1296 gdk_gc_set_foreground(gc, &pattern);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1297 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1298 pattern.pixel = 1;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1299 gdk_gc_set_foreground(gc, &pattern);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1300
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1301 j = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1302 for (i = 0; i < num->len; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1303 if ((int)(point->len - j) >= (g_array_index(num, gint, i) * 2)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1304 created_mask = TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1305 gpoints = g_new(GdkPoint, g_array_index(num, gint, i));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1306 for (k = 0; k < g_array_index(num, gint, i); k++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1307 gpoints[k].x =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1308 g_array_index(point, gint, j + k * 2) * (scale ? aud_cfg->scale_factor : 1 );
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1309 gpoints[k].y =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1310 g_array_index(point, gint,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1311 j + k * 2 + 1) * (scale ? aud_cfg->scale_factor : 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1312 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1313 j += k * 2;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1314 gdk_draw_polygon(mask, gc, TRUE, gpoints,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1315 g_array_index(num, gint, i));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1316 g_free(gpoints);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1317 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1318 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1319 g_array_free(num, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1320 g_array_free(point, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1321 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1322
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1323 if (!created_mask)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1324 gdk_draw_rectangle(mask, gc, TRUE, 0, 0, width, height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1325
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1326 g_object_unref(gc);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1327
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1328 return mask;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1329 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1330
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1331 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1332 skin_load_viscolor(Skin * skin, const gchar * path, const gchar * basename)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1333 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1334 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1335 VFSFile *file;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1336 gint i, c;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1337 gchar line[256], *filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1338 GArray *a;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1339
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1340 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1341 g_return_if_fail(path != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1342 g_return_if_fail(basename != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1343
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1344 skin_set_default_vis_color(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1345
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1346 filename = find_file_recursively(path, basename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1347 if (!filename)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1348 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1349
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1350 if (!(file = vfs_fopen(filename, "r"))) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1351 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1352 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1353 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1354
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1355 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1356
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1357 for (i = 0; i < 24; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1358 if (vfs_fgets(line, 255, file)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1359 a = string_to_garray(line);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1360 if (a->len > 2) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1361 for (c = 0; c < 3; c++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1362 skin->vis_color[i][c] = g_array_index(a, gint, c);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1363 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1364 g_array_free(a, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1365 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1366 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1367 break;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1368 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1369
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1370 vfs_fclose(file);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1371 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1372 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1373
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1374 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1375 skin_numbers_generate_dash(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1376 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1377 GdkPixbuf *pixbuf;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1378 SkinPixmap *numbers;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1379
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1380 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1381
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1382 numbers = &skin->pixmaps[SKIN_NUMBERS];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1383 if (!numbers->pixbuf || numbers->current_width < 99)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1384 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1385
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1386 pixbuf = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1387 108, numbers->current_height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1388
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1389 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 0, 0, 0, 0, 99, numbers->current_height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1390 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 90, 0, 99, 0, 9, numbers->current_height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1391 skin_draw_pixbuf(NULL, skin, pixbuf, SKIN_NUMBERS, 20, 6, 101, 6, 5, 1);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1392
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1393 g_object_unref(numbers->pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1394
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1395 numbers->pixbuf = pixbuf;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1396 numbers->current_width = 108;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1397 numbers->width = 108;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1398 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1399
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1400 static gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1401 skin_load_pixmaps(Skin * skin, const gchar * path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1402 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1403 GdkPixbuf *text_pb;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1404 guint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1405 gchar *filename;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1406 INIFile *inifile;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1407
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1408 if(!skin) return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1409 if(!path) return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1410
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1411 AUDDBG("Loading pixmaps in %s\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1412
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1413 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1414 if (!skin_load_pixmap_id(skin, i, path) && !aud_cfg->allow_broken_skins)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1415 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1416
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1417 text_pb = skin->pixmaps[SKIN_TEXT].pixbuf;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1418
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1419 if (text_pb)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1420 skin_get_textcolors(text_pb, skin->textbg, skin->textfg);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1421
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1422 if (skin->pixmaps[SKIN_NUMBERS].pixbuf &&
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1423 skin->pixmaps[SKIN_NUMBERS].width < 108 )
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1424 skin_numbers_generate_dash(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1425
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1426 filename = find_file_recursively(path, "pledit.txt");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1427 inifile = aud_open_ini_file(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1428
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1429 skin->colors[SKIN_PLEDIT_NORMAL] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1430 skin_load_color(inifile, "Text", "Normal", "#2499ff");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1431 skin->colors[SKIN_PLEDIT_CURRENT] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1432 skin_load_color(inifile, "Text", "Current", "#ffeeff");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1433 skin->colors[SKIN_PLEDIT_NORMALBG] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1434 skin_load_color(inifile, "Text", "NormalBG", "#0a120a");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1435 skin->colors[SKIN_PLEDIT_SELECTEDBG] =
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1436 skin_load_color(inifile, "Text", "SelectedBG", "#0a124a");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1437
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1438 if (inifile)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1439 aud_close_ini_file(inifile);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1440
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1441 if (filename)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1442 g_free(filename);
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1443
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1444 skin_mask_create(skin, path, SKIN_MASK_MAIN, mainwin->window);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1445 skin_mask_create(skin, path, SKIN_MASK_MAIN_SHADE, mainwin->window);
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1446 #if 0
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1447 skin_mask_create(skin, path, SKIN_MASK_EQ, equalizerwin->window);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1448 skin_mask_create(skin, path, SKIN_MASK_EQ_SHADE, equalizerwin->window);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1449
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1450 skin_load_viscolor(skin, path, "viscolor.txt");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1451 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1452 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1453 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1454
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1455 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1456 skin_set_gtk_theme(GtkSettings * settings, Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1457 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1458 if (original_gtk_theme == NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1459 g_object_get(settings, "gtk-theme-name", &original_gtk_theme, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1460
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1461 /* the way GTK does things can be very broken. --nenolod */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1462
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1463 gchar *tmp = g_strdup_printf("%s/.themes/aud-%s", g_get_home_dir(),
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1464 basename(skin->path));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1465
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1466 gchar *troot = g_strdup_printf("%s/.themes", g_get_home_dir());
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1467 g_mkdir_with_parents(troot, 0755);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1468 g_free(troot);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1469
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1470 symlink(skin->path, tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1471 gtk_settings_set_string_property(settings, "gtk-theme-name",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1472 basename(tmp), "audacious");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1473 g_free(tmp);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1474 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1475
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1476 /**
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1477 * Checks if all pixmap files exist that skin needs.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1478 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1479 static gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1480 skin_check_pixmaps(const Skin * skin, const gchar * skin_path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1481 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1482 guint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1483 for (i = 0; i < SKIN_PIXMAP_COUNT; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1484 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1485 gchar *filename = skin_pixmap_locate_basenames(skin,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1486 skin_pixmap_id_lookup(i),
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1487 skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1488 if (!filename)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1489 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1490 g_free(filename);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1491 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1492 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1493 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1494
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1495 static gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1496 skin_load_nolock(Skin * skin, const gchar * path, gboolean force)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1497 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1498 GtkSettings *settings;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1499 gchar *gtkrcpath;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1500 gchar *newpath, *skin_path;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1501 int archive = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1502
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1503 AUDDBG("Attempt to load skin \"%s\"\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1504
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1505 g_return_val_if_fail(skin != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1506 g_return_val_if_fail(path != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1507 REQUIRE_LOCK(skin->lock);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1508
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1509 if (!g_file_test(path, G_FILE_TEST_IS_REGULAR | G_FILE_TEST_IS_DIR))
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1510 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1511
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1512 if(force) AUDDBG("reloading forced!\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1513 if (!force && skin->path && !strcmp(skin->path, path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1514 AUDDBG("skin %s already loaded\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1515 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1516 }
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1517
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1518 if (file_is_archive(path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1519 AUDDBG("Attempt to load archive\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1520 if (!(skin_path = archive_decompress(path))) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1521 AUDDBG("Unable to extract skin archive (%s)\n", path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1522 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1523 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1524 archive = 1;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1525 } else {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1526 skin_path = g_strdup(path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1527 }
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1528
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1529 // Check if skin path has all necessary files.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1530 if (!aud_cfg->allow_broken_skins && !skin_check_pixmaps(skin, skin_path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1531 if(archive) del_directory(skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1532 g_free(skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1533 AUDDBG("Skin path (%s) doesn't have all wanted pixmaps\n", skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1534 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1535 }
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1536
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1537 // skin_free() frees skin->path and variable path can actually be skin->path
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1538 // and we want to get the path before possibly freeing it.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1539 newpath = g_strdup(path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1540 skin_free(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1541 skin->path = newpath;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1542
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1543 memset(&(skin->properties), 0, sizeof(SkinProperties)); /* do it only if all tests above passed! --asphyx */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1544
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1545 skin_current_num++;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1546
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1547 /* Parse the hints for this skin. */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1548 skin_parse_hints(skin, skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1549
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1550 if (!skin_load_pixmaps(skin, skin_path)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1551 if(archive) del_directory(skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1552 g_free(skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1553 AUDDBG("Skin loading failed\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1554 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1555 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1556
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1557 /* restore gtk theme if changed by previous skin */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1558 settings = gtk_settings_get_default();
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1559
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1560 if (original_gtk_theme != NULL) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1561 gtk_settings_set_string_property(settings, "gtk-theme-name",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1562 original_gtk_theme, "audacious");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1563 g_free(original_gtk_theme);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1564 original_gtk_theme = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1565 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1566
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1567 #ifndef _WIN32
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1568 if (!aud_cfg->disable_inline_gtk && !archive) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1569 gtkrcpath = find_path_recursively(skin->path, "gtkrc");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1570 if (gtkrcpath != NULL)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1571 skin_set_gtk_theme(settings, skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1572 g_free(gtkrcpath);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1573 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1574 #endif
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1575
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1576 if(archive) del_directory(skin_path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1577 g_free(skin_path);
2573
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1578
c0b08527b121 allow loading compressed skins
Tomasz Mon <desowin@gmail.com>
parents: 2572
diff changeset
1579 gtk_widget_shape_combine_mask(mainwin, skin_get_mask(aud_active_skin, SKIN_MASK_MAIN + aud_cfg->player_shaded), 0, 0);
2572
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1580 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1581 gtk_widget_shape_combine_mask(equalizerwin, skin_get_mask(aud_active_skin, SKIN_MASK_EQ + aud_cfg->equalizer_shaded), 0, 0);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1582 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1583 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1584 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1585
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1586 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1587 skin_install_skin(const gchar * path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1588 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1589 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1590 gchar *command;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1591
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1592 g_return_if_fail(path != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1593
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1594 command = g_strdup_printf("cp %s %s",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1595 path, aud_paths[BMP_PATH_USER_SKIN_DIR]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1596 if (system(command)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1597 AUDDBG("Unable to install skin (%s) into user directory (%s)\n",
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1598 path, aud_paths[BMP_PATH_USER_SKIN_DIR]);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1599 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1600 g_free(command);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1601 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1602 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1603
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1604 static SkinPixmap *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1605 skin_get_pixmap(Skin * skin, SkinPixmapId map_id)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1606 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1607 g_return_val_if_fail(skin != NULL, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1608 g_return_val_if_fail(map_id < SKIN_PIXMAP_COUNT, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1609
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1610 return &skin->pixmaps[map_id];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1611 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1612
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1613 gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1614 skin_load(Skin * skin, const gchar * path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1615 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1616 gboolean ret;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1617
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1618 g_return_val_if_fail(skin != NULL, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1619
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1620 if (!path)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1621 return FALSE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1622
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1623 skin_lock(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1624 ret = skin_load_nolock(skin, path, FALSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1625 skin_unlock(skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1626
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1627 if(!ret) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1628 AUDDBG("loading failed\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1629 return FALSE; /* don't try to update anything if loading failed --asphyx */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1630 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1631 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1632 SkinPixmap *pixmap = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1633 pixmap = skin_get_pixmap(skin, SKIN_NUMBERS);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1634 if (pixmap) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1635 ui_skinned_number_set_size(mainwin_minus_num, 9, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1636 ui_skinned_number_set_size(mainwin_10min_num, 9, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1637 ui_skinned_number_set_size(mainwin_min_num, 9, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1638 ui_skinned_number_set_size(mainwin_10sec_num, 9, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1639 ui_skinned_number_set_size(mainwin_sec_num, 9, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1640 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1641
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1642 pixmap = skin_get_pixmap(skin, SKIN_MAIN);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1643 if (pixmap && skin->properties.mainwin_height > pixmap->height)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1644 skin->properties.mainwin_height = pixmap->height;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1645
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1646 pixmap = skin_get_pixmap(skin, SKIN_PLAYPAUSE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1647 if (pixmap)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1648 ui_skinned_playstatus_set_size(mainwin_playstatus, 11, pixmap->height);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1649
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1650 pixmap = skin_get_pixmap(skin, SKIN_EQMAIN);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1651 if (pixmap->height >= 313)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1652 gtk_widget_show(equalizerwin_graph);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1653 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1654 return TRUE;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1655 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1656
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1657 gboolean
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1658 skin_reload_forced(void)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1659 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1660 gboolean error;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1661 AUDDBG("\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1662
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1663 skin_lock(aud_active_skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1664 error = skin_load_nolock(aud_active_skin, aud_active_skin->path, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1665 skin_unlock(aud_active_skin);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1666
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1667 return error;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1668 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1669
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1670 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1671 skin_reload(Skin * skin)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1672 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1673 AUDDBG("\n");
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1674 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1675 skin_load_nolock(skin, skin->path, TRUE);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1676 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1677
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1678 GdkBitmap *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1679 skin_get_mask(Skin * skin, SkinMaskId mi)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1680 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1681 GdkBitmap **masks;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1682
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1683 g_return_val_if_fail(skin != NULL, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1684 g_return_val_if_fail(mi < SKIN_PIXMAP_COUNT, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1685
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1686 masks = aud_cfg->scaled ? skin->scaled_masks : skin->masks;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1687 return masks[mi];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1688 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1689
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1690 GdkColor *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1691 skin_get_color(Skin * skin, SkinColorId color_id)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1692 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1693 GdkColor *ret = NULL;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1694
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1695 g_return_val_if_fail(skin != NULL, NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1696
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1697 switch (color_id) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1698 case SKIN_TEXTBG:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1699 if (skin->pixmaps[SKIN_TEXT].pixbuf)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1700 ret = skin->textbg;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1701 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1702 ret = skin->def_textbg;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1703 break;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1704 case SKIN_TEXTFG:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1705 if (skin->pixmaps[SKIN_TEXT].pixbuf)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1706 ret = skin->textfg;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1707 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1708 ret = skin->def_textfg;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1709 break;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1710 default:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1711 if (color_id < SKIN_COLOR_COUNT)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1712 ret = skin->colors[color_id];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1713 break;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1714 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1715 return ret;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1716 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1717
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1718 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1719 skin_get_viscolor(Skin * skin, guchar vis_color[24][3])
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1720 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1721 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1722
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1723 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1724
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1725 for (i = 0; i < 24; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1726 vis_color[i][0] = skin->vis_color[i][0];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1727 vis_color[i][1] = skin->vis_color[i][1];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1728 vis_color[i][2] = skin->vis_color[i][2];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1729 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1730 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1731
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1732 gint
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1733 skin_get_id(void)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1734 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1735 return skin_current_num;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1736 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1737
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1738 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1739 skin_draw_pixbuf(GtkWidget *widget, Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1740 SkinPixmapId pixmap_id,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1741 gint xsrc, gint ysrc, gint xdest, gint ydest,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1742 gint width, gint height)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1743 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1744 SkinPixmap *pixmap;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1745
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1746 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1747
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1748 pixmap = skin_get_pixmap(skin, pixmap_id);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1749 g_return_if_fail(pixmap != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1750 g_return_if_fail(pixmap->pixbuf != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1751 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1752 /* perhaps we should use transparency or resize widget? */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1753 if (xsrc+width > pixmap->width || ysrc+height > pixmap->height) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1754 if (widget) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1755 /* it's better to hide widget using SKIN_PLAYPAUSE/SKIN_POSBAR than display mess */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1756 if ((pixmap_id == SKIN_PLAYPAUSE && pixmap->width != 42) || pixmap_id == SKIN_POSBAR) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1757 gtk_widget_hide(widget);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1758 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1759 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1760 gint x, y;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1761 x = -1;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1762 y = -1;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1763
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1764 if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(mainwin)->fixed) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1765 GList *iter;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1766 for (iter = GTK_FIXED (SKINNED_WINDOW(mainwin)->fixed)->children; iter; iter = g_list_next (iter)) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1767 GtkFixedChild *child_data = (GtkFixedChild *) iter->data;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1768 if (child_data->widget == widget) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1769 x = child_data->x;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1770 y = child_data->y;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1771 break;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1772 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1773 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1774
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1775 if (x != -1 && y != -1) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1776 /* Some skins include SKIN_VOLUME and/or SKIN_BALANCE
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1777 without knobs */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1778 if (pixmap_id == SKIN_VOLUME || pixmap_id == SKIN_BALANCE) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1779 if (ysrc+height > 421 && xsrc+width <= pixmap->width)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1780 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1781 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1782 /* let's copy what's under widget */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1783 gdk_pixbuf_copy_area(skin_get_pixmap(aud_active_skin, SKIN_MAIN)->pixbuf,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1784 x, y, width, height, pix, xdest, ydest);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1785
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1786 /* XMMS skins seems to have SKIN_MONOSTEREO with size 58x20 instead of 58x24 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1787 if (pixmap_id == SKIN_MONOSTEREO)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1788 height = pixmap->height/2;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1789 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1790 } else if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(equalizerwin)->fixed) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1791 if (!(pixmap_id == SKIN_EQMAIN && ysrc == 314)) /* equalizer preamp on equalizer graph */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1792 gtk_widget_hide(widget);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1793 } else if (gtk_widget_get_parent(widget) == SKINNED_WINDOW(playlistwin)->fixed) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1794 /* I haven't seen any skin with substandard playlist */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1795 gtk_widget_hide(widget);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1796 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1797 } else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1798 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1799 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1800 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1801 width = MIN(width, pixmap->width - xsrc);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1802 height = MIN(height, pixmap->height - ysrc);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1803 gdk_pixbuf_copy_area(pixmap->pixbuf, xsrc, ysrc, width, height,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1804 pix, xdest, ydest);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1805 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1806
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1807 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1808 skin_get_eq_spline_colors(Skin * skin, guint32 colors[19])
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1809 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1810 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1811 GdkPixbuf *pixbuf;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1812 SkinPixmap *eqmainpm;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1813 guchar* pixels,*p;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1814 guint rowstride, n_channels;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1815 g_return_if_fail(skin != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1816
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1817 eqmainpm = &skin->pixmaps[SKIN_EQMAIN];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1818 if (eqmainpm->pixbuf &&
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1819 eqmainpm->current_width >= 116 && eqmainpm->current_height >= 313)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1820 pixbuf = eqmainpm->pixbuf;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1821 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1822 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1823
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1824 if (!GDK_IS_PIXBUF(pixbuf))
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1825 return;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1826
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1827 pixels = gdk_pixbuf_get_pixels (pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1828 rowstride = gdk_pixbuf_get_rowstride (pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1829 n_channels = gdk_pixbuf_get_n_channels (pixbuf);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1830 for (i = 0; i < 19; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1831 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1832 p = pixels + rowstride * (i + 294) + 115 * n_channels;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1833 colors[i] = (p[0] << 16) | (p[1] << 8) | p[2];
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1834 /* should we really treat the Alpha channel? */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1835 /*if (n_channels == 4)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1836 colors[i] = (colors[i] << 8) | p[3];*/
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1837 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1838 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1839
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1840
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1841 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1842 skin_draw_playlistwin_frame_top(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1843 gint width, gint height, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1844 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1845 /* The title bar skin consists of 2 sets of 4 images, 1 set
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1846 * for focused state and the other for unfocused. The 4 images
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1847 * are:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1848 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1849 * a. right corner (25,20)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1850 * b. left corner (25,20)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1851 * c. tiler (25,20)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1852 * d. title (100,20)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1853 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1854 * min allowed width = 100+25+25 = 150
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1855 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1856
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1857 gint i, y, c;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1858
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1859 /* get y offset of the pixmap set to use */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1860 if (focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1861 y = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1862 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1863 y = 21;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1864
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1865 /* left corner */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1866 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, y, 0, 0, 25, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1867
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1868 /* titlebar title */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1869 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 26, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1870 (width - 100) / 2, 0, 100, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1871
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1872 /* titlebar right corner */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1873 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 153, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1874 width - 25, 0, 25, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1875
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1876 /* tile draw the remaining frame */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1877
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1878 /* compute tile count */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1879 c = (width - (100 + 25 + 25)) / 25;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1880
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1881 for (i = 0; i < c / 2; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1882 /* left of title */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1883 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1884 25 + i * 25, 0, 25, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1885
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1886 /* right of title */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1887 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1888 (width + 100) / 2 + i * 25, 0, 25, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1889 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1890
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1891 if (c & 1) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1892 /* Odd tile count, so one remaining to draw. Here we split
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1893 * it into two and draw half on either side of the title */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1894 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1895 ((c / 2) * 25) + 25, 0, 12, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1896 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 127, y,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1897 (width / 2) + ((c / 2) * 25) + 50, 0, 13, 20);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1898 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1899 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1900
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1901 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1902 skin_draw_playlistwin_frame_bottom(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1903 gint width, gint height, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1904 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1905 /* The bottom frame skin consists of 1 set of 4 images. The 4
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1906 * images are:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1907 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1908 * a. left corner with menu buttons (125,38)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1909 * b. visualization window (75,38)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1910 * c. right corner with play buttons (150,38)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1911 * d. frame tile (25,38)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1912 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1913 * (min allowed width = 125+150+25=300
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1914 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1915
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1916 gint i, c;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1917
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1918 /* bottom left corner (menu buttons) */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1919 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, 72,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1920 0, height - 38, 125, 38);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1921
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1922 c = (width - 275) / 25;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1923
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1924 /* draw visualization window, if width allows */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1925 if (c >= 3) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1926 c -= 3;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1927 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 205, 0,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1928 width - (150 + 75), height - 38, 75, 38);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1929 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1930
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1931 /* Bottom right corner (playbuttons etc) */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1932 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1933 126, 72, width - 150, height - 38, 150, 38);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1934
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1935 /* Tile draw the remaining undrawn portions */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1936 for (i = 0; i < c; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1937 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 179, 0,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1938 125 + i * 25, height - 38, 25, 38);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1939 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1940
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1941 static void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1942 skin_draw_playlistwin_frame_sides(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1943 gint width, gint height, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1944 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1945 /* The side frames consist of 2 tile images. 1 for the left, 1 for
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1946 * the right.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1947 * a. left (12,29)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1948 * b. right (19,29)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1949 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1950
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1951 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1952
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1953 /* frame sides */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1954 for (i = 0; i < (height - (20 + 38)) / 29; i++) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1955 /* left */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1956 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 0, 42,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1957 0, 20 + i * 29, 12, 29);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1958
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1959 /* right */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1960 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 32, 42,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1961 width - 19, 20 + i * 29, 19, 29);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1962 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1963 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1964
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1965
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1966 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1967 skin_draw_playlistwin_frame(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1968 gint width, gint height, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1969 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1970 skin_draw_playlistwin_frame_top(skin, pix, width, height, focus);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1971 skin_draw_playlistwin_frame_bottom(skin, pix, width, height, focus);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1972 skin_draw_playlistwin_frame_sides(skin, pix, width, height, focus);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1973 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1974
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1975
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1976 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1977 skin_draw_playlistwin_shaded(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1978 gint width, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1979 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1980 /* The shade mode titlebar skin consists of 4 images:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1981 * a) left corner offset (72,42) size (25,14)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1982 * b) right corner, focused offset (99,57) size (50,14)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1983 * c) right corner, unfocused offset (99,42) size (50,14)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1984 * d) bar tile offset (72,57) size (25,14)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1985 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1986
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1987 gint i;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1988
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1989 /* left corner */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1990 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 72, 42, 0, 0, 25, 14);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1991
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1992 /* bar tile */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1993 for (i = 0; i < (width - 75) / 25; i++)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1994 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 72, 57,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1995 (i * 25) + 25, 0, 25, 14);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1996
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1997 /* right corner */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1998 skin_draw_pixbuf(NULL, skin, pix, SKIN_PLEDIT, 99, focus ? 42 : 57,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
1999 width - 50, 0, 50, 14);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2000 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2001
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2002
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2003 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2004 skin_draw_mainwin_titlebar(Skin * skin, GdkPixbuf * pix,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2005 gboolean shaded, gboolean focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2006 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2007 /* The titlebar skin consists of 2 sets of 2 images, one for for
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2008 * shaded and the other for unshaded mode, giving a total of 4.
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2009 * The images are exactly 275x14 pixels, aligned and arranged
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2010 * vertically on each other in the pixmap in the following order:
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2011 *
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2012 * a) unshaded, focused offset (27, 0)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2013 * b) unshaded, unfocused offset (27, 15)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2014 * c) shaded, focused offset (27, 29)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2015 * d) shaded, unfocused offset (27, 42)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2016 */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2017
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2018 gint y_offset;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2019
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2020 if (shaded) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2021 if (focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2022 y_offset = 29;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2023 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2024 y_offset = 42;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2025 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2026 else {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2027 if (focus)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2028 y_offset = 0;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2029 else
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2030 y_offset = 15;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2031 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2032 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2033 skin_draw_pixbuf(NULL, skin, pix, SKIN_TITLEBAR, 27, y_offset,
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2034 0, 0, aud_active_skin->properties.mainwin_width, MAINWIN_TITLEBAR_HEIGHT);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2035 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2036 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2037
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2038
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2039 void
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2040 skin_set_random_skin(void)
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2041 {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2042 #if 0
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2043 SkinNode *node;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2044 guint32 randval;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2045
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2046 /* Get a random value to select the skin to use */
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2047 randval = g_random_int_range(0, g_list_length(skinlist));
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2048 node = g_list_nth(skinlist, randval)->data;
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2049 aud_active_skin_load(node->path);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2050 #endif
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2051 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2052
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2053
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2054 void ui_skinned_widget_draw(GtkWidget *widget, GdkPixbuf *obj, gint width, gint height, gboolean scale) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2055 g_return_if_fail(widget != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2056 g_return_if_fail(obj != NULL);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2057
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2058 if (scale) {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2059 GdkPixbuf *image = gdk_pixbuf_scale_simple(obj, width * aud_cfg->scale_factor, height* aud_cfg->scale_factor, GDK_INTERP_NEAREST);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2060 gdk_draw_pixbuf(widget->window, NULL, image, 0, 0, 0, 0, width * aud_cfg->scale_factor , height * aud_cfg->scale_factor, GDK_RGB_DITHER_NONE, 0, 0);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2061 g_object_unref(image);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2062 } else {
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2063 gdk_draw_pixbuf(widget->window, NULL, obj, 0, 0, 0, 0, width, height, GDK_RGB_DITHER_NONE, 0, 0);
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2064 }
d0daee216c8d stub (really incomplete) for skin engine plugin
Tomasz Mon <desowin@gmail.com>
parents:
diff changeset
2065 }