23077
|
1 /*
|
23079
|
2 * MPlayer GUI for Win32
|
|
3 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de>
|
|
4 * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com>
|
|
5 * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
|
|
6 *
|
|
7 * This file is part of MPlayer.
|
|
8 *
|
|
9 * MPlayer is free software; you can redistribute it and/or modify
|
|
10 * it under the terms of the GNU General Public License as published by
|
|
11 * the Free Software Foundation; either version 2 of the License, or
|
|
12 * (at your option) any later version.
|
|
13 *
|
|
14 * MPlayer is distributed in the hope that it will be useful,
|
|
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17 * GNU General Public License for more details.
|
|
18 *
|
|
19 * You should have received a copy of the GNU General Public License
|
|
20 * along with MPlayer; if not, write to the Free Software
|
|
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
22 */
|
23077
|
23
|
26029
|
24 #ifndef MPLAYER_GUI_SKINLOAD_H
|
|
25 #define MPLAYER_GUI_SKINLOAD_H
|
23077
|
26
|
|
27 typedef struct
|
|
28 {
|
|
29 char *name; /* image name */
|
|
30 int size; /* image data size in bytes */
|
|
31 int width; /* image width */
|
|
32 int height; /* image height */
|
|
33 char *data; /* pointer to image data */
|
|
34 } image;
|
|
35
|
|
36 typedef struct
|
|
37 {
|
|
38 char c;
|
|
39 int x;
|
|
40 int y;
|
|
41 int width;
|
|
42 int height;
|
|
43 } char_t;
|
|
44
|
|
45 typedef struct
|
|
46 {
|
|
47 char *name;
|
|
48 char *id;
|
|
49 image *image;
|
|
50 unsigned int charcount;
|
|
51 char_t **chars;
|
|
52 } font_t;
|
|
53
|
|
54 typedef struct
|
|
55 {
|
|
56 int id; /* widget id */
|
|
57 int type; /* widget type */
|
|
58 int window; /* the window it belongs to */
|
|
59 // ---
|
|
60 int x, y; /* x and y position the button */
|
|
61 int wx, wy; /* x and y postion of the widget */
|
|
62 int width, height; /* width and height of the button */
|
|
63 int wwidth, wheight; /* width and height of the widget */
|
|
64 // ---
|
|
65 // ---
|
|
66 int msg, msg2;
|
|
67 int pressed, tmp;
|
|
68 int key, key2;
|
|
69 int phases;
|
|
70 float value;
|
|
71 image *bitmap[2]; /* Associated image(s) in imagepool */
|
|
72 // ---
|
|
73 font_t *font;
|
|
74 int length;
|
|
75 int align;
|
|
76 char *label;
|
|
77 // ---
|
|
78 int event;
|
|
79 } widget;
|
|
80
|
|
81 typedef struct
|
|
82 {
|
|
83 char *name;
|
|
84 int decoration;
|
|
85 int type;
|
|
86 widget *base;
|
|
87 int backgroundcolor[3];
|
|
88 void *priv;
|
|
89 } window;
|
|
90
|
|
91 typedef struct skin_t skin_t;
|
|
92 struct skin_t
|
|
93 {
|
|
94 char *skindir;
|
|
95 unsigned int widgetcount; /* number of widgets */
|
|
96 unsigned int lastusedid; /* which widget id was used last */
|
|
97 widget **widgets; /* widget handle */
|
|
98 unsigned int imagecount; /* number of images */
|
|
99 image **images; /* image handle */
|
|
100 int desktopbpp; /* image format of those images */
|
|
101 unsigned int fontcount;
|
|
102 font_t **fonts;
|
|
103
|
|
104 unsigned int windowcount; /* number of windows */
|
|
105 window **windows;
|
|
106 void (*freeskin)(skin_t* skin);
|
|
107 void (*addwidget)(skin_t *skin, window *win, const char *desc);
|
|
108 void (*removewidget)(skin_t *skin, int id);
|
|
109 char *(*geteventname)(int event);
|
|
110 image *(*pngRead)(skin_t *skin, unsigned char *fname);
|
|
111 };
|
|
112
|
|
113 extern skin_t *loadskin(char *skindir, int desktopbpp);
|
|
114
|
|
115 // --- Widget types ---
|
|
116
|
|
117 #define tyBase 1
|
|
118 #define tyButton 2
|
|
119 #define tyHpotmeter 3
|
|
120 #define tyVpotmeter 4
|
|
121 #define tyPotmeter 5
|
|
122 #define tyMenu 6
|
|
123 #define tySlabel 7
|
|
124 #define tyDlabel 8
|
|
125
|
|
126 // --- Window types ---
|
|
127
|
|
128 #define wiMain 1
|
|
129 #define wiSub 2
|
|
130 #define wiMenu 3
|
|
131 #define wiPlaybar 4
|
|
132
|
|
133 // --- User events ------
|
|
134
|
|
135 #define evNone 0
|
|
136 #define evPlay 1
|
|
137 #define evStop 2
|
|
138 #define evPause 3
|
|
139 #define evPrev 6
|
|
140 #define evNext 7
|
|
141 #define evLoad 8
|
|
142 #define evEqualizer 9
|
|
143 #define evPlayList 10
|
|
144 #define evIconify 11
|
|
145 #define evAbout 12
|
|
146 #define evLoadPlay 13
|
|
147 #define evPreferences 14
|
|
148 #define evSkinBrowser 15
|
|
149 #define evPlaySwitchToPause 16
|
|
150 #define evPauseSwitchToPlay 17
|
|
151
|
|
152 #define evBackward10sec 18
|
|
153 #define evForward10sec 19
|
|
154 #define evBackward1min 20
|
|
155 #define evForward1min 21
|
|
156 #define evBackward10min 22
|
|
157 #define evForward10min 23
|
|
158
|
|
159 #define evNormalSize 24
|
|
160 #define evDoubleSize 25
|
|
161 #define evFullScreen 26
|
|
162
|
|
163 #define evSetMoviePosition 27
|
|
164 #define evSetVolume 28
|
|
165 #define evSetBalance 29
|
|
166 #define evMute 30
|
|
167
|
|
168 #define evIncVolume 31
|
|
169 #define evDecVolume 32
|
|
170 #define evIncAudioBufDelay 33
|
|
171 #define evDecAudioBufDelay 34
|
|
172 #define evIncBalance 35
|
|
173 #define evDecBalance 36
|
|
174
|
|
175 #define evHelp 37
|
|
176
|
|
177 #define evLoadSubtitle 38
|
|
178 #define evDropSubtitle 43
|
|
179 #define evPlayDVD 39
|
|
180 #define evPlayVCD 40
|
|
181 #define evPlayNetwork 41
|
|
182 #define evLoadAudioFile 42
|
|
183 #define evSetAspect 44
|
|
184 #define evSetAudio 45
|
|
185 #define evSetVideo 46
|
|
186 #define evDropFile 47
|
|
187 #define evPlayCD 48
|
|
188
|
|
189 #define evExit 1000
|
|
190
|
|
191 // --- General events ---
|
|
192
|
|
193 #define evFileLoaded 5000
|
|
194 #define evHideMouseCursor 5001
|
|
195 #define evMessageBox 5002
|
|
196 #define evGeneralTimer 5003
|
|
197 #define evGtkIsOk 5004
|
|
198 #define evShowPopUpMenu 5005
|
|
199 #define evHidePopUpMenu 5006
|
|
200 #define evSetDVDAudio 5007
|
|
201 #define evSetDVDSubtitle 5008
|
|
202 #define evSetDVDTitle 5009
|
|
203 #define evSetDVDChapter 5010
|
|
204 #define evSubtitleLoaded 5011
|
|
205 #define evSetVCDTrack 5012
|
|
206 #define evSetURL 5013
|
|
207
|
|
208 #define evFName 7000
|
|
209 #define evMovieTime 7001
|
|
210 #define evRedraw 7002
|
|
211 #define evHideWindow 7003
|
|
212 #define evShowWindow 7004
|
|
213 #define evFirstLoad 7005
|
|
214
|
26029
|
215 #endif /* MPLAYER_GUI_SKINLOAD_H */
|