annotate gui/win32/skinload.h @ 35452:f42cc2361ee4

Cosmetic: Rename uiSetFileName().
author ib
date Sat, 01 Dec 2012 19:05:24 +0000
parents ac6b38cd0d45
children ac6c531dc9d1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
1 /*
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
2 * MPlayer GUI for Win32
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
3 * Copyright (C) 2003 Sascha Sommer <saschasommer@freenet.de>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
4 * Copyright (C) 2006 Erik Augustson <erik_27can@yahoo.com>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
5 * Copyright (C) 2006 Gianluigi Tiesi <sherpya@netfarm.it>
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
6 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
7 * This file is part of MPlayer.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
8 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
9 * MPlayer is free software; you can redistribute it and/or modify
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
10 * it under the terms of the GNU General Public License as published by
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
12 * (at your option) any later version.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
13 *
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
14 * MPlayer is distributed in the hope that it will be useful,
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
17 * GNU General Public License for more details.
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
18 *
26457
9ba6d4487292 Use standard GPL header.
diego
parents: 26029
diff changeset
19 * You should have received a copy of the GNU General Public License along
9ba6d4487292 Use standard GPL header.
diego
parents: 26029
diff changeset
20 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
9ba6d4487292 Use standard GPL header.
diego
parents: 26029
diff changeset
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
23079
8e9b11648f40 Use proper GPL header.
diego
parents: 23078
diff changeset
22 */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
24 #ifndef MPLAYER_GUI_SKINLOAD_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
25 #define MPLAYER_GUI_SKINLOAD_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 char *name; /* image name */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 int size; /* image data size in bytes */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 int width; /* image width */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 int height; /* image height */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 char *data; /* pointer to image data */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 } image;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 char c;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 int x;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 int y;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 int width;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 int height;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 } char_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 char *name;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 char *id;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 image *image;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 unsigned int charcount;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51 char_t **chars;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 } font_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 int id; /* widget id */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 int type; /* widget type */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58 int window; /* the window it belongs to */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 int x, y; /* x and y position the button */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 int wx, wy; /* x and y postion of the widget */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 int width, height; /* width and height of the button */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 int wwidth, wheight; /* width and height of the widget */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 int msg, msg2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67 int pressed, tmp;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 int key, key2;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 int phases;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 float value;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 image *bitmap[2]; /* Associated image(s) in imagepool */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 font_t *font;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74 int length;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 int align;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 char *label;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 // ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78 int event;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 } widget;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 char *name;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 int decoration;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85 int type;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 widget *base;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 int backgroundcolor[3];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88 void *priv;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 } window;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 typedef struct skin_t skin_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 struct skin_t
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 char *skindir;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 unsigned int widgetcount; /* number of widgets */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 unsigned int lastusedid; /* which widget id was used last */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 widget **widgets; /* widget handle */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98 unsigned int imagecount; /* number of images */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 image **images; /* image handle */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 int desktopbpp; /* image format of those images */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101 unsigned int fontcount;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 font_t **fonts;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104 unsigned int windowcount; /* number of windows */
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 window **windows;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 void (*freeskin)(skin_t* skin);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107 void (*addwidget)(skin_t *skin, window *win, const char *desc);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 void (*removewidget)(skin_t *skin, int id);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 char *(*geteventname)(int event);
33784
72adb79f5a16 Change fname parameter to const in pngRead().
ib
parents: 28051
diff changeset
110 image *(*pngRead)(skin_t *skin, const char *fname);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112
28051
9e739bdb049c Get rid of pointless 'extern' keywords.
diego
parents: 26457
diff changeset
113 skin_t *loadskin(char *skindir, int desktopbpp);
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114
34684
b03481253518 Cosmetic: Prefer C style for single line comments.
ib
parents: 34458
diff changeset
115 /* --- Widget types --- */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 #define tyBase 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 #define tyButton 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 #define tyHpotmeter 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 #define tyVpotmeter 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 #define tyPotmeter 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 #define tyMenu 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 #define tySlabel 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 #define tyDlabel 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125
34684
b03481253518 Cosmetic: Prefer C style for single line comments.
ib
parents: 34458
diff changeset
126 /* --- Window types --- */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 #define wiMain 1
34697
ac6b38cd0d45 Rename sub window video window.
ib
parents: 34684
diff changeset
129 #define wiVideo 2
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 #define wiMenu 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 #define wiPlaybar 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132
34684
b03481253518 Cosmetic: Prefer C style for single line comments.
ib
parents: 34458
diff changeset
133 /* --- User events --- */
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135 #define evNone 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 #define evPlay 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 #define evStop 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 #define evPause 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139 #define evPrev 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 #define evNext 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 #define evLoad 8
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
142 #define evLoadPlay 13
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
143 #define evLoadAudioFile 42
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
144 #define evLoadSubtitle 38
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
145 #define evDropSubtitle 43
34321
daebf766dea6 Cosmetic: Synchronize evPlaylist event and message names.
ib
parents: 34320
diff changeset
146 #define evPlaylist 10
34332
18b362493e28 Add evSetSubtitle event to the Win32 GUI.
ib
parents: 34331
diff changeset
147 #define evPlayCD 48
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
148 #define evPlayVCD 40
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
149 #define evPlayDVD 39
34324
58aaa0d8cc82 Replace evSetURL by evLoadURL for consistency.
ib
parents: 34322
diff changeset
150 #define evLoadURL 5013
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 #define evPlaySwitchToPause 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 #define evPauseSwitchToPlay 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 #define evBackward10sec 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 #define evForward10sec 19
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 #define evBackward1min 20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 #define evForward1min 21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 #define evBackward10min 22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 #define evForward10min 23
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
160 #define evSetMoviePosition 27
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161
34320
e3e77ce76c13 Add evHalfSize event to the Win32 GUI.
ib
parents: 34317
diff changeset
162 #define evHalfSize 301
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 #define evDoubleSize 25
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 #define evFullScreen 26
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
165 #define evNormalSize 24
34322
6075b19ad3ad Cosmetic: Add evSetAspect event to video events.
ib
parents: 34321
diff changeset
166 #define evSetAspect 44
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168 #define evIncVolume 31
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 #define evDecVolume 32
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
170 #define evSetVolume 28
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
171 #define evMute 30
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
172 #define evSetBalance 29
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
173 #define evEqualizer 9
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
174
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
175 #define evAbout 12
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
176 #define evPreferences 14
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
177 #define evSkinBrowser 15
34458
1e84148527ab Add user event evMenu.
ib
parents: 34455
diff changeset
178 #define evMenu 33
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
179
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
180 #define evIconify 11
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
181 #define evExit 1000
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
182
34684
b03481253518 Cosmetic: Prefer C style for single line comments.
ib
parents: 34458
diff changeset
183 /* --- Internal events --- */
34317
e905a896243d Cosmetic: Rearrange and group GUI user events.
ib
parents: 34315
diff changeset
184
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
185 #define ivSetAudio 45
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
186 #define ivSetVideo 46
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
187 #define ivSetSubtitle 47
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
189 #define ivShowPopUpMenu 5005
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
190 #define ivHidePopUpMenu 5006
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
191 #define ivSetDVDAudio 5007
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
192 #define ivSetDVDSubtitle 5008
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
193 #define ivSetDVDTitle 5009
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
194 #define ivSetDVDChapter 5010
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
195 #define ivSetVCDTrack 5012
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
196 #define ivSetCDTrack 5014
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34332
diff changeset
198 #define ivRedraw 7002
34455
00cf27b14c15 Replace goto label by an internal event case expression.
ib
parents: 34387
diff changeset
199 #define ivPlayDVD 7003
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
201 #endif /* MPLAYER_GUI_SKINLOAD_H */