Mercurial > mplayer.hg
annotate Gui/mplayer/mw.h @ 4598:badb76094897
setting vo_fps, required for vo_yuv4mpeg
author | arpi |
---|---|
date | Sat, 09 Feb 2002 01:29:11 +0000 |
parents | b013d01d9968 |
children | 3473ca9ef158 |
rev | line source |
---|---|
1693 | 1 |
2 // main window | |
3 | |
2447 | 4 #include "../../libmpdemux/stream.h" |
5 | |
1693 | 6 unsigned char * mplDrawBuffer = NULL; |
7 int mplMainRender = 1; | |
2940 | 8 |
1693 | 9 int mplMainAutoPlay = 0; |
2940 | 10 int mplMiddleMenu = 0; |
1693 | 11 |
12 int mainVisible = 1; | |
13 | |
14 int boxMoved = 0; | |
15 int sx = 0,sy = 0; | |
16 int i,pot = 0; | |
17 | |
3054 | 18 inline void TranslateFilename( int c,char * tmp ) |
19 { | |
20 int i; | |
21 switch ( mplShMem->StreamType ) | |
22 { | |
23 case STREAMTYPE_FILE: | |
24 if ( gtkShMem->fs.filename[0] ) | |
25 { | |
26 strcpy( tmp,gtkShMem->fs.filename ); | |
27 if ( tmp[strlen( tmp ) - 4] == '.' ) tmp[strlen( tmp ) - 4]=0; | |
28 if ( tmp[strlen( tmp ) - 5] == '.' ) tmp[strlen( tmp ) - 5]=0; | |
29 } else strcpy( tmp,"no file loaded" ); | |
30 break; | |
31 #ifdef USE_DVDREAD | |
32 case STREAMTYPE_DVD: | |
33 if ( mplShMem->DVD.current_chapter ) sprintf( tmp,"chapter %d",mplShMem->DVD.current_chapter ); | |
34 else strcat( tmp,"no chapter" ); | |
35 break; | |
36 #endif | |
37 default: strcpy( tmp,"no media opened" ); | |
38 } | |
39 if ( c ) | |
40 { | |
41 for ( i=0;i < strlen( tmp );i++ ) | |
42 { | |
43 int t=0; | |
44 if ( c == 1 ) { if ( ( tmp[i] >= 'A' )&&( tmp[i] <= 'Z' ) ) t=32; } | |
45 if ( c == 2 ) { if ( ( tmp[i] >= 'a' )&&( tmp[i] <= 'z' ) ) t=-32; } | |
46 tmp[i]=(char)( tmp[i] + t ); | |
47 } | |
48 } | |
49 } | |
50 | |
1693 | 51 char * Translate( char * str ) |
52 { | |
53 static char trbuf[512]; | |
54 char tmp[128]; | |
55 int i,c; | |
2045 | 56 int t; |
1693 | 57 memset( trbuf,0,512 ); |
58 memset( tmp,0,128 ); | |
59 for ( c=0,i=0;i < strlen( str );i++ ) | |
60 { | |
61 if ( str[i] != '$' ) { trbuf[c++]=str[i]; trbuf[c]=0; } | |
62 else | |
63 { | |
64 switch ( str[++i] ) | |
65 { | |
3054 | 66 case 't': sprintf( tmp,"%02d",mplShMem->Track ); strcat( trbuf,tmp ); break; |
67 case 'o': TranslateFilename( 0,tmp ); strcat( trbuf,tmp ); break; | |
68 case 'f': TranslateFilename( 1,tmp ); strcat( trbuf,tmp ); break; | |
69 case 'F': TranslateFilename( 2,tmp ); strcat( trbuf,tmp ); break; | |
1693 | 70 case '6': t=mplShMem->LengthInSec; goto calclengthhhmmss; |
71 case '1': t=mplShMem->TimeSec; | |
72 calclengthhhmmss: | |
1888 | 73 sprintf( tmp,"%02d:%02d:%02d",t/3600,t/60%60,t%60 ); strcat( trbuf,tmp ); |
1693 | 74 break; |
75 case '7': t=mplShMem->LengthInSec; goto calclengthmmmmss; | |
76 case '2': t=mplShMem->TimeSec; | |
77 calclengthmmmmss: | |
1888 | 78 sprintf( tmp,"%04d:%02d",t/60,t%60 ); strcat( trbuf,tmp ); |
1693 | 79 break; |
1888 | 80 case '3': sprintf( tmp,"%02d",mplShMem->TimeSec / 3600 ); strcat( trbuf,tmp ); break; |
81 case '4': sprintf( tmp,"%02d",( ( mplShMem->TimeSec / 60 ) % 60 ) ); strcat( trbuf,tmp ); break; | |
1707 | 82 case '5': sprintf( tmp,"%02d",mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break; |
1888 | 83 case '8': sprintf( tmp,"%01d:%02d:%02d",mplShMem->TimeSec / 3600,( mplShMem->TimeSec / 60 ) % 60,mplShMem->TimeSec % 60 ); strcat( trbuf,tmp ); break; |
1707 | 84 case 'v': sprintf( tmp,"%3.2f%%",mplShMem->Volume ); strcat( trbuf,tmp ); break; |
85 case 'V': sprintf( tmp,"%3.1f",mplShMem->Volume ); strcat( trbuf,tmp ); break; | |
86 case 'b': sprintf( tmp,"%3.2f%%",mplShMem->Balance ); strcat( trbuf,tmp ); break; | |
87 case 'B': sprintf( tmp,"%3.1f",mplShMem->Balance ); strcat( trbuf,tmp ); break; | |
1823 | 88 case 'd': sprintf( tmp,"%d",mplShMem->FrameDrop ); strcat( trbuf,tmp ); break; |
1707 | 89 case 's': if ( mplShMem->Playing == 0 ) strcat( trbuf,"s" ); break; |
90 case 'l': if ( mplShMem->Playing == 1 ) strcat( trbuf,"p" ); break; | |
91 case 'e': if ( mplShMem->Playing == 2 ) strcat( trbuf,"e" ); break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
92 case 'a': |
1888 | 93 switch ( mplShMem->AudioType ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
94 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
95 case 0: strcat( trbuf,"n" ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
96 case 1: strcat( trbuf,"m" ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
97 case 2: strcat( trbuf,"t" ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
98 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
99 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
100 case 'T': |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
101 switch ( mplShMem->StreamType ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
102 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
103 case STREAMTYPE_FILE: strcat( trbuf,"f" ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
104 case STREAMTYPE_VCD: strcat( trbuf,"v" ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
105 case STREAMTYPE_STREAM: strcat( trbuf,"u" ); break; |
3054 | 106 #ifdef USE_DVDREAD |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
107 case STREAMTYPE_DVD: strcat( trbuf,"d" ); break; |
3054 | 108 #endif |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
109 default: strcat( trbuf," " ); break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
110 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
111 break; |
1707 | 112 case '$': strcat( trbuf,"$" ); break; |
1693 | 113 default: continue; |
114 } | |
115 c=strlen( trbuf ); | |
116 } | |
117 } | |
118 return trbuf; | |
119 } | |
120 | |
3054 | 121 inline void PutImage( txSample * bf,int x,int y,int max,int ofs ) |
1693 | 122 { |
123 int i=0,ix,iy; | |
124 unsigned long * buf = NULL; | |
125 unsigned long * drw = NULL; | |
126 unsigned long tmp; | |
127 | |
128 if ( ( !bf )||( bf->Image == NULL ) ) return; | |
129 | |
130 i=( bf->Width * ( bf->Height / max ) ) * ofs; | |
131 buf=(unsigned long *)mplDrawBuffer; | |
132 drw=(unsigned long *)bf->Image; | |
133 | |
134 for ( iy=y;iy < y+bf->Height / max;iy++ ) | |
135 for ( ix=x;ix < x+bf->Width;ix++ ) | |
136 { | |
137 tmp=drw[i++]; | |
138 if ( tmp != 0x00ff00ff ) | |
139 buf[ iy*appMPlayer.main.Bitmap.Width+ix ]=tmp; | |
140 } | |
141 } | |
142 | |
143 void mplMainDraw( wsParamDisplay ) | |
144 { | |
145 wItem * item; | |
146 txSample * image = NULL; | |
147 int i; | |
148 | |
149 if ( appMPlayer.mainWindow.Visible == wsWindowNotVisible || | |
1729 | 150 !mainVisible ) return; |
151 // !appMPlayer.mainWindow.Mapped ) return; | |
152 | |
153 btnModify( evSetMoviePosition,mplShMem->Position ); | |
154 btnModify( evSetVolume,mplShMem->Volume ); | |
1751 | 155 |
1693 | 156 if ( mplMainRender ) |
157 { | |
158 memcpy( mplDrawBuffer,appMPlayer.main.Bitmap.Image,appMPlayer.main.Bitmap.ImageSize ); | |
159 for( i=0;i < appMPlayer.NumberOfItems + 1;i++ ) | |
160 { | |
161 item=&appMPlayer.Items[i]; | |
162 switch( item->type ) | |
163 { | |
164 case itButton: | |
165 PutImage( &item->Bitmap,item->x,item->y,3,item->pressed ); | |
166 break; | |
1729 | 167 case itPotmeter: |
168 PutImage( &item->Bitmap,item->x,item->y,item->phases,item->phases * ( item->value / 100.0f ) ); | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
169 break; |
1693 | 170 case itHPotmeter: |
171 PutImage( &item->Bitmap,item->x,item->y,item->phases,item->phases * ( item->value / 100.0f ) ); | |
172 PutImage( &item->Mask,item->x + (int)( ( item->width - item->psx ) * item->value / 100.0f ),item->y,3,item->pressed ); | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
173 break; |
1693 | 174 case itSLabel: |
175 image=fntRender( item->fontid,0,item->width,"%s",item->label ); | |
176 goto drawrenderedtext; | |
177 case itDLabel: | |
1729 | 178 image=fntRender( item->fontid,mplTimer%item->width,item->width,"%s",Translate( item->label ) ); |
179 // image=fntRender( item->fontid,( mplRedrawTimer / 10 )%item->width,item->width,"%s",Translate( item->label ) ); | |
1693 | 180 drawrenderedtext: |
181 PutImage( image,item->x,item->y,1,0 ); | |
182 if ( image ) | |
183 { | |
184 if ( image->Image ) free( image->Image ); | |
185 free( image ); | |
186 } | |
187 break; | |
188 } | |
189 } | |
190 wsConvert( &appMPlayer.mainWindow,mplDrawBuffer,appMPlayer.main.Bitmap.ImageSize ); | |
191 mplMainRender=0; | |
192 } | |
193 wsPutImage( &appMPlayer.mainWindow ); | |
2854 | 194 // XFlush( wsDisplay ); |
1693 | 195 } |
196 | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
197 #define IZE(x) printf("@@@ " x " @@@\n"); |
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
198 |
1729 | 199 extern void exit_player(char* how); |
3618 | 200 extern int audio_id; |
201 extern int dvdsub_id; | |
1729 | 202 |
1693 | 203 void mplMsgHandle( int msg,float param ) |
204 { | |
205 int j; | |
206 | |
207 switch( msg ) | |
208 { | |
209 // --- user events | |
210 case evExit: | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
211 wsDoExit(); // sets wsTrue=False; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
212 exit_player( "Exit" ); |
1693 | 213 break; |
2994 | 214 |
3054 | 215 #ifdef USE_DVDREAD |
2994 | 216 case evPlayDVD: |
3618 | 217 dvd_title=1; |
218 dvd_chapter=1; | |
219 dvd_angle=1; | |
220 play_dvd_2: | |
2994 | 221 mplShMem->StreamType=STREAMTYPE_DVD; |
3054 | 222 #endif |
2994 | 223 case evPlay: |
224 case evPlaySwitchToPause: | |
4465 | 225 // btnModify( evPlaySwitchToPause,btnDisabled ); |
226 // btnModify( evPauseSwitchToPlay,btnReleased ); | |
2994 | 227 if ( ( msg == evPlaySwitchToPause )&( mplShMem->Playing == 1 ) ) goto NoPause; |
228 mplMainRender=1; | |
3618 | 229 |
2994 | 230 switch ( mplShMem->StreamType ) |
1693 | 231 { |
2995 | 232 case STREAMTYPE_STREAM: |
233 case STREAMTYPE_VCD: | |
234 case STREAMTYPE_FILE: | |
235 dvd_title=0; | |
236 break; | |
3054 | 237 #ifdef USE_DVDREAD |
2994 | 238 case STREAMTYPE_DVD: |
239 strcpy( mplShMem->Filename,"/dev/dvd" ); | |
240 break; | |
3054 | 241 #endif |
1693 | 242 } |
243 mplPlay(); | |
4465 | 244 mplState(); |
1693 | 245 break; |
3597 | 246 case evSetDVDSubtitle: |
3618 | 247 #ifdef USE_DVDREAD |
248 dvdsub_id=(int)param; | |
249 dvd_title=mplShMem->DVD.current_title; | |
250 dvd_angle=mplShMem->DVD.current_angle; | |
251 dvd_chapter=mplShMem->DVD.current_chapter; | |
252 mplShMem->DVDChanged=1; | |
253 goto play_dvd_2; | |
254 #endif | |
3597 | 255 break; |
256 case evSetDVDAudio: | |
3618 | 257 #ifdef USE_DVDREAD |
258 audio_id=(int)param; | |
259 dvd_title=mplShMem->DVD.current_title; | |
260 dvd_angle=mplShMem->DVD.current_angle; | |
261 dvd_chapter=mplShMem->DVD.current_chapter; | |
262 mplShMem->DVDChanged=1; | |
263 goto play_dvd_2; | |
264 #endif | |
3597 | 265 break; |
266 case evSetDVDChapter: | |
3618 | 267 #ifdef USE_DVDREAD |
268 dvd_title=mplShMem->DVD.current_title; | |
269 dvd_angle=mplShMem->DVD.current_angle; | |
3597 | 270 dvd_chapter=(int)param; |
3618 | 271 mplShMem->DVDChanged=1; |
272 goto play_dvd_2; | |
273 #endif | |
3597 | 274 break; |
275 case evSetDVDTitle: | |
3618 | 276 #ifdef USE_DVDREAD |
3597 | 277 dvd_title=(int)param; |
278 dvd_chapter=1; | |
279 dvd_angle=1; | |
3618 | 280 mplShMem->DVDChanged=1; |
281 goto play_dvd_2; | |
282 #endif | |
3597 | 283 break; |
1693 | 284 |
2994 | 285 case evPause: |
1693 | 286 case evPauseSwitchToPlay: |
3618 | 287 // btnModify( evPlaySwitchToPause,btnReleased ); |
288 // btnModify( evPauseSwitchToPlay,btnDisabled ); | |
1693 | 289 NoPause: |
290 mplMainRender=1; | |
291 mplPause(); | |
292 break; | |
293 | |
294 case evStop: | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
295 IZE("evStop"); |
4465 | 296 // btnModify( evPlaySwitchToPause,btnReleased ); |
297 // btnModify( evPauseSwitchToPlay,btnDisabled ); | |
1693 | 298 mplMainRender=1; |
299 mplStop(); | |
4465 | 300 mplState(); |
1693 | 301 break; |
302 | |
303 case evLoadPlay: | |
304 mplMainAutoPlay=1; | |
305 case evLoad: | |
306 mplMainRender=1; | |
307 gtkSendMessage( evLoad ); | |
308 break; | |
3499 | 309 case evLoadSubtitle: |
310 mplMainRender=1; | |
311 gtkSendMessage( evLoadSubtitle ); | |
312 break; | |
1693 | 313 case evPrev: |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
314 IZE("evPrev"); |
1693 | 315 mplMainRender=1; |
316 #ifdef DEBUG | |
317 dbprintf( 1,"[mw.h] previous stream ...\n" ); | |
318 #endif | |
319 break; | |
320 case evNext: | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
321 IZE("evNext"); |
1693 | 322 mplMainRender=1; |
323 #ifdef DEBUG | |
324 dbprintf( 1,"[mw.h] next stream ...\n" ); | |
325 #endif | |
326 break; | |
327 | |
328 case evPlayList: | |
1723
5e4214a7540e
GUI stuff. now seeking works, and xmga renders to video window
arpi
parents:
1707
diff
changeset
|
329 IZE("evPlayList"); |
1693 | 330 mplMainRender=1; |
331 if ( gtkVisiblePlayList ) | |
332 { | |
333 btnModify( evPlayList,btnReleased ); | |
334 gtkShMem->vs.window=evPlayList; | |
335 gtkSendMessage( evHideWindow ); | |
336 gtkVisiblePlayList=0; | |
337 } | |
338 else | |
339 { | |
340 gtkSendMessage( evPlayList ); | |
341 btnModify( evPlayList,btnPressed ); | |
342 gtkVisiblePlayList=1; | |
343 } | |
344 break; | |
345 | |
346 case evSkinBrowser: gtkSendMessage( evSkinBrowser ); break; | |
347 case evAbout: gtkSendMessage( evAbout ); break; | |
348 case evPreferences: gtkSendMessage( evPreferences ); break; | |
349 | |
350 case evForward1min: mplRelSeek( 60 ); break; | |
351 case evBackward1min: mplRelSeek( -60 ); break; | |
352 case evForward10sec: mplRelSeek( 10 ); break; | |
353 case evBackward10sec: mplRelSeek( -10 ); break; | |
354 case evSetMoviePosition: mplAbsSeek( param ); break; | |
355 | |
1860 | 356 case evIncVolume: vo_x11_putkey( wsGrayMul ); break; |
357 case evDecVolume: vo_x11_putkey( wsGrayDiv ); break; | |
1847 | 358 case evMute: mplShMem->Mute=1; break; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
359 case evSetVolume: |
1847 | 360 case evSetBalance: mplShMem->VolumeChanged=1; break; |
361 | |
1693 | 362 |
2994 | 363 case evIconify: |
364 switch ( (int)param ) | |
365 { | |
366 case 0: wsIconify( appMPlayer.mainWindow ); break; | |
367 case 1: wsIconify( appMPlayer.subWindow ); break; | |
368 } | |
369 break; | |
1765 | 370 case evNormalSize: |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
371 if ( mplShMem->Playing ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
372 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
373 appMPlayer.subWindow.isFullScreen=True; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
374 appMPlayer.subWindow.OldX=( wsMaxX - moviewidth ) / 2; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
375 appMPlayer.subWindow.OldY=( wsMaxY - movieheight ) / 2; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
376 appMPlayer.subWindow.OldWidth=moviewidth; appMPlayer.subWindow.OldHeight=movieheight; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
377 wsFullScreen( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
378 mplResize( appMPlayer.subWindow.X,appMPlayer.subWindow.Y,moviewidth,movieheight ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
379 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
380 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
381 case evDoubleSize: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
382 if ( mplShMem->Playing ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
383 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
384 appMPlayer.subWindow.isFullScreen=True; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
385 appMPlayer.subWindow.OldX=( wsMaxX - moviewidth * 2 ) / 2; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
386 appMPlayer.subWindow.OldY=( wsMaxY - movieheight * 2 ) / 2; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
387 appMPlayer.subWindow.OldWidth=moviewidth * 2; appMPlayer.subWindow.OldHeight=movieheight * 2; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
388 wsFullScreen( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
389 mplResize( appMPlayer.subWindow.X,appMPlayer.subWindow.Y,moviewidth,movieheight ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
390 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
391 break; |
2994 | 392 case evFullScreen: |
393 IZE("evFullS"); | |
394 for ( j=0;j<appMPlayer.NumberOfItems + 1;j++ ) | |
395 { | |
396 if ( appMPlayer.Items[j].msg == evFullScreen ) | |
397 { | |
398 appMPlayer.Items[j].tmp=!appMPlayer.Items[j].tmp; | |
399 appMPlayer.Items[j].pressed=appMPlayer.Items[j].tmp; | |
400 } | |
401 } | |
402 mplMainRender=1; | |
403 mplFullScreen(); | |
404 break; | |
1693 | 405 |
406 // --- timer events | |
407 case evHideMouseCursor: | |
408 wsVisibleMouse( &appMPlayer.subWindow,wsHideMouseCursor ); | |
409 break; | |
410 case evRedraw: | |
411 mplMainRender=1; | |
412 wsPostRedisplay( &appMPlayer.mainWindow ); | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
413 // if ( !mplShMem->Playing ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
414 // wsPostRedisplay( &appMPlayer.subWindow ); |
1693 | 415 XFlush( wsDisplay ); |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
416 mplRedrawTimer=mplRedrawTimerConst; |
1693 | 417 break; |
418 case evGeneralTimer: | |
419 if ( mplMainAutoPlay ) | |
420 { | |
421 mplMainRender=1; | |
422 mplMainAutoPlay=0; | |
423 mplPlay(); | |
424 } | |
2940 | 425 if ( mplMiddleMenu ) |
426 { | |
427 mplMiddleMenu=0; | |
3054 | 428 mplMsgHandle( gtkShMem->popupmenu,gtkShMem->popupmenuparam ); |
2940 | 429 } |
1693 | 430 break; |
431 // --- system events | |
432 case evNone: | |
433 dbprintf( 1,"[mw] event none received.\n" ); | |
434 break; | |
435 default: | |
436 dbprintf( 1,"[mw] unknown event received ( %d,%.2f ).\n",msg,param ); | |
437 break; | |
438 } | |
439 } | |
440 | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
441 #define itPLMButton (itNULL - 1) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
442 #define itPRMButton (itNULL - 2) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
443 |
1693 | 444 void mplMainMouseHandle( int Button,int X,int Y,int RX,int RY ) |
445 { | |
446 static int itemtype = 0; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
447 int i; |
1693 | 448 wItem * item = NULL; |
449 float value = 0.0f; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
450 |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
451 static int SelectedItem = -1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
452 int currentselected = -1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
453 |
1693 | 454 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
455 |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
456 for ( i=0;i < appMPlayer.NumberOfItems + 1;i++ ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
457 if ( ( appMPlayer.Items[i].pressed != btnDisabled )&& |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
458 ( wgIsRect( X,Y,appMPlayer.Items[i].x,appMPlayer.Items[i].y,appMPlayer.Items[i].x+appMPlayer.Items[i].width,appMPlayer.Items[i].y+appMPlayer.Items[i].height ) ) ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
459 { currentselected=i; break; } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
460 |
1693 | 461 switch ( Button ) |
462 { | |
463 case wsPRMouseButton: | |
464 mplShowMenu( RX,RY ); | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
465 itemtype=itPRMButton; |
1693 | 466 break; |
467 case wsRRMouseButton: | |
468 mplHideMenu( RX,RY ); | |
469 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
470 |
1693 | 471 case wsPLMouseButton: |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
472 sx=X; sy=Y; boxMoved=1; itemtype=itPLMButton; // if move the main window |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
473 SelectedItem=currentselected; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
474 if ( SelectedItem == -1 ) break; // yeees, i'm move the fucking window |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
475 boxMoved=0; mplMainRender=1; // No, not move the window, i'm pressed one button |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
476 item=&appMPlayer.Items[SelectedItem]; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
477 itemtype=item->type; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
478 item->pressed=btnPressed; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
479 item->used=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
480 switch( item->type ) |
1693 | 481 { |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
482 case itButton: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
483 if ( ( SelectedItem > -1 ) && |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
484 ( ( ( appMPlayer.Items[SelectedItem].msg == evPlaySwitchToPause && item->msg == evPauseSwitchToPlay ) ) || |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
485 ( ( appMPlayer.Items[SelectedItem].msg == evPauseSwitchToPlay && item->msg == evPlaySwitchToPause ) ) ) ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
486 { appMPlayer.Items[SelectedItem].pressed=btnDisabled; } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
487 break; |
1693 | 488 } |
489 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
490 case wsRLMouseButton: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
491 boxMoved=0; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
492 item=&appMPlayer.Items[SelectedItem]; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
493 item->pressed=btnReleased; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
494 SelectedItem=-1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
495 if ( currentselected == - 1 ) { itemtype=0; break; } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
496 value=0; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
497 switch( itemtype ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
498 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
499 case itPotmeter: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
500 case itHPotmeter: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
501 item->used=0; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
502 btnModify( item->msg,(float)( X - item->x ) / item->width * 100.0f ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
503 switch ( item->msg ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
504 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
505 case evSetVolume: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
506 mplShMem->VolumeChanged=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
507 mplShMem->Volume=item->value; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
508 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
509 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
510 value=item->value; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
511 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
512 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
513 mplMsgHandle( item->msg,value ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
514 mplMainRender=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
515 itemtype=0; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
516 break; |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
517 |
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
518 case wsPMMouseButton: |
3075 | 519 #ifdef USE_DVDREAD |
3054 | 520 memcpy( >kShMem->DVD,&mplShMem->DVD,sizeof( mplDVDStruct ) ); |
3075 | 521 #endif |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
522 gtkSendMessage( evShowPopUpMenu ); |
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
523 break; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
524 |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
525 // --- rolled mouse ... de szar :))) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
526 case wsP5MouseButton: value=-2.5f; goto rollerhandled; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
527 case wsP4MouseButton: value= 2.5f; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
528 rollerhandled: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
529 item=&appMPlayer.Items[currentselected]; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
530 if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
531 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
532 item->used=0; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
533 item->value+=value; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
534 btnModify( item->msg,item->value ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
535 switch ( item->msg ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
536 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
537 case evSetVolume: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
538 mplShMem->VolumeChanged=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
539 mplShMem->Volume=item->value; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
540 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
541 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
542 mplMsgHandle( item->msg,item->value ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
543 mplMainRender=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
544 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
545 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
546 |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
547 // --- moving |
1693 | 548 case wsMoveMouse: |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
549 item=&appMPlayer.Items[SelectedItem]; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
550 switch ( itemtype ) |
1693 | 551 { |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
552 case itPLMButton: |
2854 | 553 wsMoveWindow( &appMPlayer.mainWindow,False,RX - abs( sx ),RY - abs( sy ) ); |
1693 | 554 mplMainRender=0; |
555 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
556 case itPRMButton: |
1693 | 557 mplMenuMouseHandle( X,Y,RX,RY ); |
558 break; | |
559 case itPotmeter: | |
1729 | 560 item->value=(float)( X - item->x ) / item->width * 100.0f; |
1693 | 561 goto potihandled; |
562 case itHPotmeter: | |
1729 | 563 item->value=(float)( X - item->x ) / item->width * 100.0f; |
1693 | 564 potihandled: |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
565 if ( item->value > 100.0f ) item->value=100.0f; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
566 if ( item->value < 0.0f ) item->value=0.0f; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
567 switch ( item->msg ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
568 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
569 case evSetVolume: |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
570 mplShMem->VolumeChanged=1; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
571 mplShMem->Volume=item->value; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
572 break; |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
573 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2447
diff
changeset
|
574 mplMsgHandle( item->msg,item->value ); |
1693 | 575 mplMainRender=1; wsPostRedisplay( &appMPlayer.mainWindow ); |
576 break; | |
577 } | |
578 break; | |
579 } | |
580 if ( Button != wsMoveMouse ) wsPostRedisplay( &appMPlayer.mainWindow ); | |
581 } | |
582 | |
583 int keyPressed = 0; | |
584 | |
585 void mplMainKeyHandle( int State,int Type,int Key ) | |
586 { | |
587 int msg = evNone; | |
4409 | 588 if ( Type != wsKeyPressed ) return; |
1693 | 589 switch ( Key ) |
590 { | |
591 case '.': | |
592 case '>': msg=evNext; break; | |
593 case ',': | |
594 case '<': msg=evPrev; break; | |
595 | |
596 case wsEscape: msg=evExit; break; | |
597 | |
598 case wsEnter: msg=evPlay; break; | |
599 case wsSpace: msg=evPause; break; | |
600 case wsa: | |
601 case wsA: msg=evAbout; break; | |
602 case wsb: | |
603 case wsB: msg=evSkinBrowser; break; | |
604 case wse: | |
605 case wsE: msg=evEqualeaser; break; | |
606 case wsf: | |
607 case wsF: msg=evFullScreen; break; | |
608 case wsl: | |
609 case wsL: msg=evLoad; break; | |
3499 | 610 case wsu: |
611 case wsU: msg=evLoadSubtitle; break; | |
1693 | 612 case wsm: |
613 case wsM: msg=evMute; break; | |
614 case wss: | |
615 case wsS: msg=evStop; break; | |
616 case wsp: | |
617 case wsP: msg=evPlayList; break; | |
4409 | 618 |
619 case wsXF86LowerVolume: msg=evDecVolume; break; | |
620 case wsXF86RaiseVolume: msg=evIncVolume; break; | |
621 case wsXF86Mute: msg=evMute; break; | |
622 case wsXF86Play: msg=evPlaySwitchToPause; break; | |
623 case wsXF86Stop: msg=evStop; break; | |
624 case wsXF86Prev: msg=evPrev; break; | |
625 case wsXF86Next: msg=evNext; break; | |
626 case wsXF86Media: msg=evLoad; break; | |
627 | |
628 default: vo_x11_putkey( Key ); return; | |
1693 | 629 } |
4409 | 630 if ( msg != evNone ) |
1693 | 631 { |
632 mplMsgHandle( msg,0 ); | |
1845 | 633 // mplMainRender=1; |
634 // wsPostRedisplay( &appMPlayer.mainWindow ); | |
1693 | 635 } |
636 } |