Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 6619:f554e7271587
fix volume handling ( step 2 ) -- add balance support and some code cleanup and fix
author | pontscho |
---|---|
date | Tue, 02 Jul 2002 13:35:04 +0000 |
parents | b9651eb9749e |
children | da08877b9512 |
rev | line source |
---|---|
1693 | 1 |
2 // sub window | |
3 | |
4 int mplSubRender = 1; | |
1852 | 5 int SubVisible = 0; |
1812 | 6 |
1693 | 7 void mplSubDraw( wsParamDisplay ) |
8 { | |
5919 | 9 if ( appMPlayer.subWindow.State == wsWindowClosed ) exit_player( MSGTR_Exit_quit ); |
10 | |
2045 | 11 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
12 |
1852 | 13 if ( !appMPlayer.subWindow.Mapped || |
14 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 15 |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
16 if ( guiIntfStruct.Playing ) mplSubRender=0; |
1693 | 17 |
18 if ( mplSubRender ) | |
19 { | |
2029 | 20 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
1693 | 21 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
22 appMPlayer.subWindow.State=0; |
1693 | 23 } |
24 | |
25 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
26 { | |
1812 | 27 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
28 static int msButton = 0; |
1812 | 29 |
1693 | 30 switch( Button ) |
31 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
32 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
33 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 34 break; |
1693 | 35 case wsPRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
36 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 37 mplShowMenu( RX,RY ); |
38 msButton=wsPRMouseButton; | |
39 break; | |
40 case wsRRMouseButton: | |
5919 | 41 mplHideMenu( RX,RY,1 ); |
1693 | 42 msButton=0; |
43 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
44 // --- |
1693 | 45 case wsPLMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
46 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 47 sx=X; sy=Y; |
48 msButton=wsPLMouseButton; | |
49 mplSubMoved=0; | |
50 break; | |
51 case wsMoveMouse: | |
52 switch ( msButton ) | |
53 { | |
54 case wsPLMouseButton: | |
55 mplSubMoved=1; | |
2854 | 56 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 57 break; |
58 case wsPRMouseButton: | |
59 mplMenuMouseHandle( X,Y,RX,RY ); | |
60 break; | |
61 } | |
62 break; | |
63 case wsRLMouseButton: | |
5997
b5fb9a927bf3
add WM detection, and wm specific fullscreen code. (???)
pontscho
parents:
5919
diff
changeset
|
64 if ( ( !mplSubMoved )&&( appMPlayer.subWindow.isFullScreen ) ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
65 { |
6146 | 66 if( SubVisible++%2 ) wsMoveTopWindow( wsDisplay,appMPlayer.mainWindow.WindowID ); |
67 else wsMoveTopWindow( wsDisplay,appMPlayer.subWindow.WindowID ); | |
5997
b5fb9a927bf3
add WM detection, and wm specific fullscreen code. (???)
pontscho
parents:
5919
diff
changeset
|
68 } |
1693 | 69 msButton=0; |
70 mplSubMoved=0; | |
71 break; | |
72 } | |
73 } |