annotate audacious/widgets/skin.h @ 1603:0f2ca8c7cd98 trunk

[svn] - version update
author nenolod
date Sun, 27 Aug 2006 07:39:25 -0700
parents 7c7195221c0b
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1541
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
1 /* BMP - Cross-platform multimedia player
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
2 * Copyright (C) 2003-2004 BMP development team.
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
3 *
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
4 * Based on XMMS:
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
5 * Copyright (C) 1998-2003 XMMS development team.
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
6 *
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
10 * (at your option) any later version.
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
11 *
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
15 * GNU General Public License for more details.
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
16 *
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
20 */
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
21
1544
7c7195221c0b [svn] Do not allow widgetcore private includes to be referenced directly.
nenolod
parents: 1541
diff changeset
22 #ifndef _WIDGETCORE_H_
7c7195221c0b [svn] Do not allow widgetcore private includes to be referenced directly.
nenolod
parents: 1541
diff changeset
23 #error Please do not include me directly! Use widgetcore.h instead!
7c7195221c0b [svn] Do not allow widgetcore private includes to be referenced directly.
nenolod
parents: 1541
diff changeset
24 #endif
7c7195221c0b [svn] Do not allow widgetcore private includes to be referenced directly.
nenolod
parents: 1541
diff changeset
25
1541
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
26 #ifndef SKIN_H
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
27 #define SKIN_H
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
28
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
29
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
30 #include <glib.h>
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
31 #include <gdk/gdk.h>
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
32
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
33
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
34 #define BMP_DEFAULT_SKIN_PATH \
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
35 DATA_DIR G_DIR_SEPARATOR_S "Skins" G_DIR_SEPARATOR_S "Default"
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
36
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
37
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
38 typedef enum {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
39 SKIN_MAIN = 0,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
40 SKIN_CBUTTONS,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
41 SKIN_TITLEBAR,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
42 SKIN_SHUFREP,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
43 SKIN_TEXT,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
44 SKIN_VOLUME,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
45 SKIN_BALANCE,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
46 SKIN_MONOSTEREO,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
47 SKIN_PLAYPAUSE,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
48 SKIN_NUMBERS,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
49 SKIN_POSBAR,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
50 SKIN_PLEDIT,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
51 SKIN_EQMAIN,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
52 SKIN_EQ_EX,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
53 SKIN_PIXMAP_COUNT
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
54 } SkinPixmapId;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
55
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
56 typedef enum {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
57 SKIN_MASK_MAIN = 0,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
58 SKIN_MASK_MAIN_SHADE,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
59 SKIN_MASK_EQ,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
60 SKIN_MASK_EQ_SHADE,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
61 SKIN_MASK_COUNT
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
62 } SkinMaskId;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
63
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
64 typedef enum {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
65 SKIN_PLEDIT_NORMAL = 0,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
66 SKIN_PLEDIT_CURRENT,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
67 SKIN_PLEDIT_NORMALBG,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
68 SKIN_PLEDIT_SELECTEDBG,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
69 SKIN_TEXTBG,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
70 SKIN_TEXTFG,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
71 SKIN_COLOR_COUNT
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
72 } SkinColorId;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
73
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
74 typedef struct _SkinProperties {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
75 gboolean mainwin_othertext;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
76 } SkinProperties;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
77
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
78 #define SKIN_PIXMAP(x) ((SkinPixmap *)(x))
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
79 typedef struct _SkinPixmap {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
80 GdkPixmap *pixmap;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
81 /* GdkPixmap *def_pixmap; */
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
82
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
83 /* The real size of the pixmap */
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
84 gint width, height;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
85
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
86 /* The size of the pixmap from the current skin,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
87 which might be smaller */
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
88 gint current_width, current_height;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
89 } SkinPixmap;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
90
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
91
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
92 #define SKIN(x) ((Skin *)(x))
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
93 typedef struct _Skin {
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
94 GMutex *lock;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
95 gchar *path;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
96 gchar *def_path;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
97 SkinPixmap pixmaps[SKIN_PIXMAP_COUNT];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
98 GdkColor textbg[6], def_textbg[6];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
99 GdkColor textfg[6], def_textfg[6];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
100 GdkColor *colors[SKIN_COLOR_COUNT];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
101 guchar vis_color[24][3];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
102 GdkBitmap *masks[SKIN_MASK_COUNT];
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
103 SkinProperties properties;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
104 } Skin;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
105
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
106 extern Skin *bmp_active_skin;
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
107
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
108 gboolean init_skins(const gchar * path);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
109 void cleanup_skins(void);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
110
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
111 gboolean bmp_active_skin_load(const gchar * path);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
112 gboolean bmp_active_skin_reload(void);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
113
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
114 Skin *skin_new(void);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
115 gboolean skin_load(Skin * skin, const gchar * path);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
116 void skin_reload(Skin * skin);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
117 void skin_free(Skin * skin);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
118
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
119 GdkBitmap *skin_get_mask(Skin * skin, SkinMaskId mi);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
120 GdkColor *skin_get_color(Skin * skin, SkinColorId color_id);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
121
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
122 void skin_get_viscolor(Skin * skin, guchar vis_color[24][3]);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
123 gint skin_get_id(void);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
124 void skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
125 SkinPixmapId pixmap_id,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
126 gint xsrc, gint ysrc, gint xdest, gint ydest,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
127 gint width, gint height);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
128 void skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
129 void skin_install_skin(const gchar * path);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
130
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
131 void skin_draw_playlistwin_shaded(Skin * skin,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
132 GdkDrawable * drawable, GdkGC * gc,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
133 gint width, gboolean focus);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
134 void skin_draw_playlistwin_frame(Skin * skin,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
135 GdkDrawable * drawable, GdkGC * gc,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
136 gint width, gint height, gboolean focus);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
137
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
138 void skin_draw_mainwin_titlebar(Skin * skin,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
139 GdkDrawable * drawable, GdkGC * gc,
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
140 gboolean shaded, gboolean focus);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
141
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
142
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
143 void skin_parse_hints(Skin * skin, gchar *path_p);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
144
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
145
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
146 gboolean
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
147 skin_reload_forced(void);
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
148
06329cbf186a [svn] this massive commit does the following:
nenolod
parents:
diff changeset
149 #endif