Mercurial > mplayer.hg
annotate gui/win32/skinload.h @ 37075:3021ac203d3c
Rewrite add_vf().
Add a parameter in order to pass options to a video filter to be added.
author | ib |
---|---|
date | Thu, 24 Apr 2014 13:17:00 +0000 |
parents | 84c93a60ead3 |
children | e8559b9913ff |
rev | line source |
---|---|
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 * | |
26457 | 19 * You should have received a copy of the GNU General Public License along |
20 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
21 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA | |
23079 | 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 image *image; | |
49 unsigned int charcount; | |
50 char_t **chars; | |
51 } font_t; | |
52 | |
53 typedef struct | |
54 { | |
55 int id; /* widget id */ | |
56 int type; /* widget type */ | |
57 int window; /* the window it belongs to */ | |
58 // --- | |
59 int x, y; /* x and y position the button */ | |
60 int wx, wy; /* x and y postion of the widget */ | |
61 int width, height; /* width and height of the button */ | |
62 int wwidth, wheight; /* width and height of the widget */ | |
63 // --- | |
37053 | 64 int maxwh; |
23077 | 65 // --- |
66 int msg, msg2; | |
67 int pressed, tmp; | |
68 int key, key2; | |
69 int phases; | |
70 float value; | |
37053 | 71 double zeropoint; |
72 double arclength; | |
23077 | 73 image *bitmap[2]; /* Associated image(s) in imagepool */ |
74 // --- | |
75 font_t *font; | |
76 int length; | |
77 int align; | |
78 char *label; | |
79 // --- | |
80 int event; | |
81 } widget; | |
82 | |
83 typedef struct | |
84 { | |
85 char *name; | |
86 int decoration; | |
87 int type; | |
88 widget *base; | |
89 int backgroundcolor[3]; | |
90 void *priv; | |
91 } window; | |
92 | |
93 typedef struct skin_t skin_t; | |
94 struct skin_t | |
95 { | |
96 char *skindir; | |
97 unsigned int widgetcount; /* number of widgets */ | |
98 unsigned int lastusedid; /* which widget id was used last */ | |
99 widget **widgets; /* widget handle */ | |
100 unsigned int imagecount; /* number of images */ | |
101 image **images; /* image handle */ | |
102 int desktopbpp; /* image format of those images */ | |
103 unsigned int fontcount; | |
104 font_t **fonts; | |
105 | |
106 unsigned int windowcount; /* number of windows */ | |
107 window **windows; | |
108 void (*freeskin)(skin_t* skin); | |
109 void (*addwidget)(skin_t *skin, window *win, const char *desc); | |
110 void (*removewidget)(skin_t *skin, int id); | |
111 char *(*geteventname)(int event); | |
33784 | 112 image *(*pngRead)(skin_t *skin, const char *fname); |
23077 | 113 }; |
114 | |
28051 | 115 skin_t *loadskin(char *skindir, int desktopbpp); |
23077 | 116 |
34684 | 117 /* --- Widget types --- */ |
23077 | 118 |
119 #define tyBase 1 | |
120 #define tyButton 2 | |
121 #define tyHpotmeter 3 | |
122 #define tyVpotmeter 4 | |
36920 | 123 #define tyPimage 5 |
23077 | 124 #define tyMenu 6 |
125 #define tySlabel 7 | |
126 #define tyDlabel 8 | |
37053 | 127 #define tyRpotmeter 9 |
23077 | 128 |
34684 | 129 /* --- Window types --- */ |
23077 | 130 |
131 #define wiMain 1 | |
34697 | 132 #define wiVideo 2 |
23077 | 133 #define wiMenu 3 |
134 #define wiPlaybar 4 | |
135 | |
34684 | 136 /* --- User events --- */ |
23077 | 137 |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
138 enum |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
139 { |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
140 evNone, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
141 evPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
142 evStop, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
143 evPause, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
144 evPrev, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
145 evNext, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
146 evLoad, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
147 evLoadPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
148 evLoadAudioFile, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
149 evLoadSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
150 evDropSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
151 evPlaylist, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
152 evPlayCD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
153 evPlayVCD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
154 evPlayDVD, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
155 evLoadURL, |
36429 | 156 evPlayTV, |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
157 evPlaySwitchToPause, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
158 evPauseSwitchToPlay, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
159 evBackward10sec, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
160 evForward10sec, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
161 evBackward1min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
162 evForward1min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
163 evBackward10min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
164 evForward10min, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
165 evSetMoviePosition, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
166 evHalfSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
167 evDoubleSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
168 evFullScreen, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
169 evNormalSize, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
170 evSetAspect, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
171 evIncVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
172 evDecVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
173 evSetVolume, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
174 evMute, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
175 evSetBalance, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
176 evEqualizer, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
177 evAbout, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
178 evPreferences, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
179 evSkinBrowser, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
180 evMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
181 evIconify, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
182 evExit = 100 |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
183 }; |
34317 | 184 |
34684 | 185 /* --- Internal events --- */ |
34317 | 186 |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
187 enum |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
188 { |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
189 ivSetVideo = 1000, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
190 ivSetAudio, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
191 ivSetSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
192 ivSetCDTrack, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
193 ivSetVCDTrack, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
194 ivSetDVDTitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
195 ivSetDVDChapter, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
196 ivSetDVDAudio, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
197 ivSetDVDSubtitle, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
198 ivPlayDVD, |
36933 | 199 ivSetVolume, |
36958 | 200 ivSetBalance, |
35503
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
201 ivShowPopUpMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
202 ivHidePopUpMenu, |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
203 ivRedraw |
ac6c531dc9d1
Replace symbolic GUI message (event) constants by enums.
ib
parents:
34697
diff
changeset
|
204 }; |
23077 | 205 |
26029 | 206 #endif /* MPLAYER_GUI_SKINLOAD_H */ |