Mercurial > audlegacy
annotate audacious/widgets/skin.h @ 1597:2685ac3bd8f6 trunk
[svn] CXXFLAGS fixes by Mike Frysinger (Gentoo).
author | chainsaw |
---|---|
date | Sat, 26 Aug 2006 12:00:05 -0700 |
parents | 7c7195221c0b |
children |
rev | line source |
---|---|
1541 | 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
20 */ | |
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 | 26 #ifndef SKIN_H |
27 #define SKIN_H | |
28 | |
29 | |
30 #include <glib.h> | |
31 #include <gdk/gdk.h> | |
32 | |
33 | |
34 #define BMP_DEFAULT_SKIN_PATH \ | |
35 DATA_DIR G_DIR_SEPARATOR_S "Skins" G_DIR_SEPARATOR_S "Default" | |
36 | |
37 | |
38 typedef enum { | |
39 SKIN_MAIN = 0, | |
40 SKIN_CBUTTONS, | |
41 SKIN_TITLEBAR, | |
42 SKIN_SHUFREP, | |
43 SKIN_TEXT, | |
44 SKIN_VOLUME, | |
45 SKIN_BALANCE, | |
46 SKIN_MONOSTEREO, | |
47 SKIN_PLAYPAUSE, | |
48 SKIN_NUMBERS, | |
49 SKIN_POSBAR, | |
50 SKIN_PLEDIT, | |
51 SKIN_EQMAIN, | |
52 SKIN_EQ_EX, | |
53 SKIN_PIXMAP_COUNT | |
54 } SkinPixmapId; | |
55 | |
56 typedef enum { | |
57 SKIN_MASK_MAIN = 0, | |
58 SKIN_MASK_MAIN_SHADE, | |
59 SKIN_MASK_EQ, | |
60 SKIN_MASK_EQ_SHADE, | |
61 SKIN_MASK_COUNT | |
62 } SkinMaskId; | |
63 | |
64 typedef enum { | |
65 SKIN_PLEDIT_NORMAL = 0, | |
66 SKIN_PLEDIT_CURRENT, | |
67 SKIN_PLEDIT_NORMALBG, | |
68 SKIN_PLEDIT_SELECTEDBG, | |
69 SKIN_TEXTBG, | |
70 SKIN_TEXTFG, | |
71 SKIN_COLOR_COUNT | |
72 } SkinColorId; | |
73 | |
74 typedef struct _SkinProperties { | |
75 gboolean mainwin_othertext; | |
76 } SkinProperties; | |
77 | |
78 #define SKIN_PIXMAP(x) ((SkinPixmap *)(x)) | |
79 typedef struct _SkinPixmap { | |
80 GdkPixmap *pixmap; | |
81 /* GdkPixmap *def_pixmap; */ | |
82 | |
83 /* The real size of the pixmap */ | |
84 gint width, height; | |
85 | |
86 /* The size of the pixmap from the current skin, | |
87 which might be smaller */ | |
88 gint current_width, current_height; | |
89 } SkinPixmap; | |
90 | |
91 | |
92 #define SKIN(x) ((Skin *)(x)) | |
93 typedef struct _Skin { | |
94 GMutex *lock; | |
95 gchar *path; | |
96 gchar *def_path; | |
97 SkinPixmap pixmaps[SKIN_PIXMAP_COUNT]; | |
98 GdkColor textbg[6], def_textbg[6]; | |
99 GdkColor textfg[6], def_textfg[6]; | |
100 GdkColor *colors[SKIN_COLOR_COUNT]; | |
101 guchar vis_color[24][3]; | |
102 GdkBitmap *masks[SKIN_MASK_COUNT]; | |
103 SkinProperties properties; | |
104 } Skin; | |
105 | |
106 extern Skin *bmp_active_skin; | |
107 | |
108 gboolean init_skins(const gchar * path); | |
109 void cleanup_skins(void); | |
110 | |
111 gboolean bmp_active_skin_load(const gchar * path); | |
112 gboolean bmp_active_skin_reload(void); | |
113 | |
114 Skin *skin_new(void); | |
115 gboolean skin_load(Skin * skin, const gchar * path); | |
116 void skin_reload(Skin * skin); | |
117 void skin_free(Skin * skin); | |
118 | |
119 GdkBitmap *skin_get_mask(Skin * skin, SkinMaskId mi); | |
120 GdkColor *skin_get_color(Skin * skin, SkinColorId color_id); | |
121 | |
122 void skin_get_viscolor(Skin * skin, guchar vis_color[24][3]); | |
123 gint skin_get_id(void); | |
124 void skin_draw_pixmap(Skin * skin, GdkDrawable * drawable, GdkGC * gc, | |
125 SkinPixmapId pixmap_id, | |
126 gint xsrc, gint ysrc, gint xdest, gint ydest, | |
127 gint width, gint height); | |
128 void skin_get_eq_spline_colors(Skin * skin, guint32 colors[19]); | |
129 void skin_install_skin(const gchar * path); | |
130 | |
131 void skin_draw_playlistwin_shaded(Skin * skin, | |
132 GdkDrawable * drawable, GdkGC * gc, | |
133 gint width, gboolean focus); | |
134 void skin_draw_playlistwin_frame(Skin * skin, | |
135 GdkDrawable * drawable, GdkGC * gc, | |
136 gint width, gint height, gboolean focus); | |
137 | |
138 void skin_draw_mainwin_titlebar(Skin * skin, | |
139 GdkDrawable * drawable, GdkGC * gc, | |
140 gboolean shaded, gboolean focus); | |
141 | |
142 | |
143 void skin_parse_hints(Skin * skin, gchar *path_p); | |
144 | |
145 | |
146 gboolean | |
147 skin_reload_forced(void); | |
148 | |
149 #endif |