Mercurial > mplayer.hg
annotate gui/app.h @ 31144:c2d5a1f6360b
Extract the cache main loop into a separate function.
author | reimar |
---|---|
date | Sun, 23 May 2010 21:58:50 +0000 |
parents | 0f1b5b68af32 |
children | 4d6bb9606833 |
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 { | |
133 int type; | |
134 // --- | |
135 int x,y; | |
136 int width,height; | |
137 // --- | |
138 int px,py,psx,psy; | |
139 // --- | |
140 int msg,msg2; | |
141 int pressed,tmp; | |
142 int key,key2; | |
143 int phases; | |
144 float value; | |
145 txSample Bitmap; | |
146 txSample Mask; | |
147 // --- | |
148 int fontid; | |
149 int align; | |
150 char * label; | |
151 // --- | |
152 int event; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
153 // --- |
23077 | 154 int R,G,B; |
155 } wItem; | |
156 | |
157 typedef struct | |
158 { | |
159 wItem main; | |
160 wsTWindow mainWindow; | |
161 int mainDecoration; | |
162 | |
163 wItem sub; | |
164 wsTWindow subWindow; | |
165 | |
166 wItem bar; | |
167 wsTWindow barWindow; | |
168 int barIsPresent; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28051
diff
changeset
|
169 |
23077 | 170 wItem menuBase; |
171 wItem menuSelected; | |
172 wsTWindow menuWindow; | |
173 int menuIsPresent; | |
174 | |
175 // --- | |
176 int NumberOfItems; | |
177 wItem Items[256]; | |
178 // --- | |
179 int NumberOfMenuItems; | |
180 wItem MenuItems[64]; | |
181 // --- | |
182 int NumberOfBarItems; | |
183 wItem barItems[256]; | |
184 } listItems; | |
185 | |
186 extern listItems appMPlayer; | |
187 | |
188 extern char * skinDirInHome; | |
189 extern char * skinDirInHome_obsolete; | |
190 extern char * skinMPlayerDir; | |
191 extern char * skinMPlayerDir_obsolete; | |
192 extern char * skinName; | |
193 | |
28051 | 194 void appInitStruct( listItems * item ); |
195 void appClearItem( wItem * item ); | |
196 void appCopy( listItems * item1, listItems * item2 ); | |
197 int appFindMessage( unsigned char * str ); | |
198 int appFindKey( unsigned char * name ); | |
23077 | 199 |
28051 | 200 void btnModify( int event, float state ); |
201 float btnGetValue( int event ); | |
202 void btnSet( int event, int set ); | |
23077 | 203 |
26029 | 204 #endif /* MPLAYER_GUI_APP_H */ |