annotate Gui/mplayer/sw.h @ 7404:f0dacd58604f

prefer ffsvq1 if available
author arpi
date Sun, 15 Sep 2002 14:20:24 +0000
parents 77980ab4e296
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
1
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
2 // sub window
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
3
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
4 int mplSubRender = 0;
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
5 int SubVisible = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
6
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
7 void mplSubDraw( wsParamDisplay )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
8 {
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
9 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit );
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
10
2045
deb4aff05c44 fix other bugs
pontscho
parents: 2030
diff changeset
11 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
6622
da08877b9512 fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents: 6619
diff changeset
12 if ( appMPlayer.subWindow.State == wsWindowFocusOut && wsWMType != wsWMKDE && wsWMType != wsWMIceWM ) SubVisible--;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
13
1852
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
14 if ( !appMPlayer.subWindow.Mapped ||
58dd326fcc4a fix xshape, mixer, fullscreen, etc
pontscho
parents: 1841
diff changeset
15 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
1823
a6c67352ccac fix some bug.
pontscho
parents: 1815
diff changeset
16
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
17 if ( guiIntfStruct.Playing ) mplSubRender=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
18
6794
77980ab4e296 - add preferences support (first try)
pontscho
parents: 6651
diff changeset
19 if ( mplSubRender && appMPlayer.subWindow.State == wsWindowExpose )
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
20 {
2029
41ed89701ece fix fucking icewm fullscreen bug.
pontscho
parents: 2025
diff changeset
21 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
22 }
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
23 appMPlayer.subWindow.State=0;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
24 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
25
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
26 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
27 {
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
28 static int mplSubMoved = 0;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
29 static int msButton = 0;
1812
d2d6a26ddb02 majd fix play&stop&pause&redraw
pontscho
parents: 1798
diff changeset
30
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
31 switch( Button )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
32 {
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
33 case wsPRMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
34 gtkShow( evShowPopUpMenu,NULL );
2980
c4b6dc8bb554 fix middle menu hideing bug
pontscho
parents: 2902
diff changeset
35 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
36 case wsPMMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
37 gtkShow( evHidePopUpMenu,NULL );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
38 mplShowMenu( RX,RY );
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
39 msButton=wsPMMouseButton;
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
40 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
41 case wsRMMouseButton:
5919
60cf2bca993f some bug fix
pontscho
parents: 5651
diff changeset
42 mplHideMenu( RX,RY,1 );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
43 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
44 break;
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
45 // ---
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
46 case wsPLMouseButton:
4818
3473ca9ef158 new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents: 4797
diff changeset
47 gtkShow( evHidePopUpMenu,NULL );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
48 sx=X; sy=Y;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
49 msButton=wsPLMouseButton;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
50 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
51 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
52 case wsMoveMouse:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
53 switch ( msButton )
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
54 {
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
55 case wsPLMouseButton:
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
56 mplSubMoved=1;
2854
fd44ecf77f8d move bug meg fileload bug fixed asszem.
pontscho
parents: 2851
diff changeset
57 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
58 break;
6651
8f49c75a2824 - add icon (nice, but very ugly hakk:)
pontscho
parents: 6623
diff changeset
59 case wsPMMouseButton:
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
60 mplMenuMouseHandle( X,Y,RX,RY );
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
61 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
62 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
63 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
64 case wsRLMouseButton:
5997
b5fb9a927bf3 add WM detection, and wm specific fullscreen code. (???)
pontscho
parents: 5919
diff changeset
65 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) )
2851
b64fa5d25142 add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents: 2045
diff changeset
66 {
6146
b9651eb9749e fix some gtk bug...
pontscho
parents: 5997
diff changeset
67 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID );
6622
da08877b9512 fix window hiding bug with some wms (kde, gnome, icewm, mwm, wmaker)
pontscho
parents: 6619
diff changeset
68 else if ( wsWMType != wsWMNetWM && wsWMType != wsWMKDE ) wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID );
6623
7bc4c6ba9485 add -audiofile support for gui
pontscho
parents: 6622
diff changeset
69 }
1693
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
70 msButton=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
71 mplSubMoved=0;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
72 break;
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
73 }
d237c5d4b216 GUI version n-1
arpi
parents:
diff changeset
74 }