Mercurial > mplayer.hg
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 |
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 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); | |
33784 | 110 image *(*pngRead)(skin_t *skin, const char *fname); |
23077 | 111 }; |
112 | |
28051 | 113 skin_t *loadskin(char *skindir, int desktopbpp); |
23077 | 114 |
34684 | 115 /* --- Widget types --- */ |
23077 | 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 | |
34684 | 126 /* --- Window types --- */ |
23077 | 127 |
128 #define wiMain 1 | |
34697 | 129 #define wiVideo 2 |
23077 | 130 #define wiMenu 3 |
131 #define wiPlaybar 4 | |
132 | |
34684 | 133 /* --- User events --- */ |
23077 | 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 | |
34317 | 142 #define evLoadPlay 13 |
143 #define evLoadAudioFile 42 | |
144 #define evLoadSubtitle 38 | |
145 #define evDropSubtitle 43 | |
34321
daebf766dea6
Cosmetic: Synchronize evPlaylist event and message names.
ib
parents:
34320
diff
changeset
|
146 #define evPlaylist 10 |
34332 | 147 #define evPlayCD 48 |
34317 | 148 #define evPlayVCD 40 |
149 #define evPlayDVD 39 | |
34324 | 150 #define evLoadURL 5013 |
23077 | 151 #define evPlaySwitchToPause 16 |
152 #define evPauseSwitchToPlay 17 | |
153 | |
154 #define evBackward10sec 18 | |
155 #define evForward10sec 19 | |
156 #define evBackward1min 20 | |
157 #define evForward1min 21 | |
158 #define evBackward10min 22 | |
159 #define evForward10min 23 | |
34317 | 160 #define evSetMoviePosition 27 |
23077 | 161 |
34320 | 162 #define evHalfSize 301 |
23077 | 163 #define evDoubleSize 25 |
164 #define evFullScreen 26 | |
34317 | 165 #define evNormalSize 24 |
34322 | 166 #define evSetAspect 44 |
23077 | 167 |
168 #define evIncVolume 31 | |
169 #define evDecVolume 32 | |
34317 | 170 #define evSetVolume 28 |
171 #define evMute 30 | |
172 #define evSetBalance 29 | |
173 #define evEqualizer 9 | |
174 | |
175 #define evAbout 12 | |
176 #define evPreferences 14 | |
177 #define evSkinBrowser 15 | |
34458 | 178 #define evMenu 33 |
34317 | 179 |
180 #define evIconify 11 | |
181 #define evExit 1000 | |
182 | |
34684 | 183 /* --- Internal events --- */ |
34317 | 184 |
34333 | 185 #define ivSetAudio 45 |
186 #define ivSetVideo 46 | |
187 #define ivSetSubtitle 47 | |
23077 | 188 |
34333 | 189 #define ivShowPopUpMenu 5005 |
190 #define ivHidePopUpMenu 5006 | |
191 #define ivSetDVDAudio 5007 | |
192 #define ivSetDVDSubtitle 5008 | |
193 #define ivSetDVDTitle 5009 | |
194 #define ivSetDVDChapter 5010 | |
195 #define ivSetVCDTrack 5012 | |
34387 | 196 #define ivSetCDTrack 5014 |
23077 | 197 |
34333 | 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 | 200 |
26029 | 201 #endif /* MPLAYER_GUI_SKINLOAD_H */ |