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