annotate gui/win32/skinload.h @ 26992:d0c873ddfaef

Only check for VIDIX PCI device name database if VIDIX is enabled.
author diego
date Sat, 07 Jun 2008 14:00:04 +0000
parents 9ba6d4487292
children 9e739bdb049c
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);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110 image *(*pngRead)(skin_t *skin, unsigned char *fname);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 };
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113 extern skin_t *loadskin(char *skindir, int desktopbpp);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115 // --- Widget types ---
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
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 // --- Window types ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 #define wiMain 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 #define wiSub 2
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
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 // --- User events ------
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
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 #define evEqualizer 9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 #define evPlayList 10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144 #define evIconify 11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 #define evAbout 12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146 #define evLoadPlay 13
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 #define evPreferences 14
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 #define evSkinBrowser 15
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 #define evPlaySwitchToPause 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 #define evPauseSwitchToPlay 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 #define evBackward10sec 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 #define evForward10sec 19
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154 #define evBackward1min 20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
155 #define evForward1min 21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 #define evBackward10min 22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
157 #define evForward10min 23
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 #define evNormalSize 24
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 #define evDoubleSize 25
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 #define evFullScreen 26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
163 #define evSetMoviePosition 27
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 #define evSetVolume 28
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
165 #define evSetBalance 29
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 #define evMute 30
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
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 #define evIncAudioBufDelay 33
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 #define evDecAudioBufDelay 34
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172 #define evIncBalance 35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 #define evDecBalance 36
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 #define evHelp 37
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 #define evLoadSubtitle 38
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178 #define evDropSubtitle 43
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 #define evPlayDVD 39
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 #define evPlayVCD 40
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 #define evPlayNetwork 41
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 #define evLoadAudioFile 42
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 #define evSetAspect 44
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 #define evSetAudio 45
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 #define evSetVideo 46
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 #define evDropFile 47
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 #define evPlayCD 48
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189 #define evExit 1000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 // --- General events ---
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 #define evFileLoaded 5000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 #define evHideMouseCursor 5001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 #define evMessageBox 5002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 #define evGeneralTimer 5003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 #define evGtkIsOk 5004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 #define evShowPopUpMenu 5005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 #define evHidePopUpMenu 5006
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 #define evSetDVDAudio 5007
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 #define evSetDVDSubtitle 5008
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 #define evSetDVDTitle 5009
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 #define evSetDVDChapter 5010
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 #define evSubtitleLoaded 5011
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205 #define evSetVCDTrack 5012
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 #define evSetURL 5013
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 #define evFName 7000
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209 #define evMovieTime 7001
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 #define evRedraw 7002
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 #define evHideWindow 7003
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 #define evShowWindow 7004
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213 #define evFirstLoad 7005
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25535
diff changeset
215 #endif /* MPLAYER_GUI_SKINLOAD_H */