Mercurial > mplayer.hg
annotate gui/app.h @ 32790:5c23e57bb0a4
Remove desultory parameter checks.
These functions will only be called with parameters already checked
or the checked parameters don't harm.
author | ib |
---|---|
date | Thu, 10 Feb 2011 13:24:00 +0000 |
parents | 3ceeb62a1125 |
children | 12ae3b893c59 |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_GUI_APP_H |
20 #define MPLAYER_GUI_APP_H | |
23077 | 21 |
22 #include "bitmap.h" | |
23 #include "wm/ws.h" | |
24 #include "wm/wskeys.h" | |
25 | |
26 // --- User events ------ | |
27 | |
28 #define evNone 0 | |
29 #define evPlay 1 | |
30 #define evStop 2 | |
31 #define evPause 3 | |
32 #define evPrev 6 | |
33 #define evNext 7 | |
34 #define evLoad 8 | |
35 #define evEqualizer 9 | |
36 #define evPlayList 10 | |
37 #define evIconify 11 | |
38 #define evAbout 12 | |
39 #define evLoadPlay 13 | |
40 #define evPreferences 14 | |
41 #define evSkinBrowser 15 | |
42 #define evPlaySwitchToPause 16 | |
43 #define evPauseSwitchToPlay 17 | |
44 | |
45 #define evBackward10sec 18 | |
46 #define evForward10sec 19 | |
47 #define evBackward1min 20 | |
48 #define evForward1min 21 | |
49 #define evBackward10min 22 | |
50 #define evForward10min 23 | |
51 | |
52 #define evHalfSize 301 | |
53 #define evNormalSize 24 | |
54 #define evDoubleSize 25 | |
55 #define evFullScreen 26 | |
56 | |
57 #define evSetMoviePosition 27 | |
58 #define evSetVolume 28 | |
59 #define evSetBalance 29 | |
60 #define evMute 30 | |
61 | |
62 #define evIncVolume 31 | |
63 #define evDecVolume 32 | |
64 #define evIncAudioBufDelay 33 | |
65 #define evDecAudioBufDelay 34 | |
66 #define evIncBalance 35 | |
67 #define evDecBalance 36 | |
68 | |
69 #define evHelp 37 | |
70 | |
71 #define evLoadSubtitle 38 | |
72 #define evDropSubtitle 43 | |
73 #define evPlayDVD 39 | |
74 #define evPlayVCD 40 | |
75 #define evPlayNetwork 41 | |
76 #define evLoadAudioFile 42 | |
77 #define evSetAspect 44 | |
78 #define evSetAudio 45 | |
79 #define evSetVideo 46 | |
80 #define evSetSubtitle 47 | |
81 // 48 ... | |
82 | |
83 #define evExit 1000 | |
84 | |
85 // --- General events --- | |
86 | |
87 #define evFileLoaded 5000 | |
88 #define evHideMouseCursor 5001 | |
89 #define evMessageBox 5002 | |
90 #define evGeneralTimer 5003 | |
91 #define evGtkIsOk 5004 | |
92 #define evShowPopUpMenu 5005 | |
93 #define evHidePopUpMenu 5006 | |
94 #define evSetDVDAudio 5007 | |
95 #define evSetDVDSubtitle 5008 | |
96 #define evSetDVDTitle 5009 | |
97 #define evSetDVDChapter 5010 | |
98 #define evSubtitleLoaded 5011 | |
99 #define evSetVCDTrack 5012 | |
100 #define evSetURL 5013 | |
101 | |
102 #define evFName 7000 | |
103 #define evMovieTime 7001 | |
104 #define evRedraw 7002 | |
105 #define evHideWindow 7003 | |
106 #define evShowWindow 7004 | |
107 #define evFirstLoad 7005 | |
108 | |
109 // ---------------------- | |
110 | |
111 typedef struct | |
112 { | |
113 int msg; | |
114 const char * name; | |
115 } evName; | |
116 | |
117 #define itNULL 0 | |
118 #define itButton 101 // button | |
119 #define itHPotmeter 102 // horizontal potmeter | |
120 #define itVPotmeter 103 // vertical potmeter | |
121 #define itSLabel 104 // static label | |
122 #define itDLabel 105 // dynamic label | |
123 #define itBase 106 | |
124 #define itPotmeter 107 | |
125 #define itFont 108 | |
126 // --- | |
127 #define btnPressed 0 | |
128 #define btnReleased 1 | |
129 #define btnDisabled 2 | |
130 // --- | |
131 typedef struct | |
132 { | |
32760 | 133 int type; |
23077 | 134 // --- |
32760 | 135 int x,y; |
136 int width,height; | |
23077 | 137 // --- |
32760 | 138 int px,py,psx,psy; |
23077 | 139 // --- |
32760 | 140 int msg,msg2; |
141 int pressed,tmp; | |
142 int key,key2; | |
143 int phases; | |
144 float value; | |
145 txSample Bitmap; | |
146 txSample Mask; | |
23077 | 147 // --- |
32760 | 148 int fontid; |
149 int align; | |
150 char * label; | |
32761
3ceeb62a1125
Improve the readability of dynamic labels which scroll.
ib
parents:
32760
diff
changeset
|
151 char * text; |
3ceeb62a1125
Improve the readability of dynamic labels which scroll.
ib
parents:
32760
diff
changeset
|
152 int textwidth; |
3ceeb62a1125
Improve the readability of dynamic labels which scroll.
ib
parents:
32760
diff
changeset
|
153 unsigned int starttime; |
3ceeb62a1125
Improve the readability of dynamic labels which scroll.
ib
parents:
32760
diff
changeset
|
154 int last_x; |
23077 | 155 // --- |
32760 | 156 int event; |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
157 // --- |
32760 | 158 int R,G,B; |
23077 | 159 } wItem; |
160 | |
161 typedef struct | |
162 { | |
163 wItem main; | |
164 wsTWindow mainWindow; | |
165 int mainDecoration; | |
166 | |
167 wItem sub; | |
168 wsTWindow subWindow; | |
169 | |
170 wItem bar; | |
171 wsTWindow barWindow; | |
172 int barIsPresent; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
173 |
23077 | 174 wItem menuBase; |
175 wItem menuSelected; | |
176 wsTWindow menuWindow; | |
177 int menuIsPresent; | |
178 | |
179 // --- | |
180 int NumberOfItems; | |
181 wItem Items[256]; | |
182 // --- | |
183 int NumberOfMenuItems; | |
184 wItem MenuItems[64]; | |
185 // --- | |
186 int NumberOfBarItems; | |
187 wItem barItems[256]; | |
188 } listItems; | |
189 | |
190 extern listItems appMPlayer; | |
191 | |
192 extern char * skinDirInHome; | |
193 extern char * skinDirInHome_obsolete; | |
194 extern char * skinMPlayerDir; | |
195 extern char * skinMPlayerDir_obsolete; | |
196 | |
28051 | 197 void appInitStruct( listItems * item ); |
198 void appClearItem( wItem * item ); | |
199 void appCopy( listItems * item1, listItems * item2 ); | |
200 int appFindMessage( unsigned char * str ); | |
201 int appFindKey( unsigned char * name ); | |
23077 | 202 |
28051 | 203 void btnModify( int event, float state ); |
204 float btnGetValue( int event ); | |
205 void btnSet( int event, int set ); | |
23077 | 206 |
26029 | 207 #endif /* MPLAYER_GUI_APP_H */ |