Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 5651:b8d8d72776f2
fix playlist bug with gui and rewrite mousecursor show/hide code
author | pontscho |
---|---|
date | Tue, 16 Apr 2002 17:41:29 +0000 |
parents | 3473ca9ef158 |
children | 60cf2bca993f |
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 { | |
2045 | 9 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
|
10 |
1852 | 11 if ( !appMPlayer.subWindow.Mapped || |
12 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 13 |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
14 if ( guiIntfStruct.Playing ) mplSubRender=0; |
1693 | 15 |
16 if ( mplSubRender ) | |
17 { | |
2029 | 18 if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow ); |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
19 // XFlush( wsDisplay ); |
1693 | 20 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
21 appMPlayer.subWindow.State=0; |
1693 | 22 } |
23 | |
24 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
25 { | |
1812 | 26 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
27 static int msButton = 0; |
1812 | 28 |
1693 | 29 switch( Button ) |
30 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
31 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
32 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 33 break; |
1693 | 34 case wsPRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
35 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 36 mplShowMenu( RX,RY ); |
37 msButton=wsPRMouseButton; | |
38 break; | |
39 case wsRRMouseButton: | |
40 mplHideMenu( RX,RY ); | |
41 msButton=0; | |
42 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
43 // --- |
1693 | 44 case wsPLMouseButton: |
3477
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
45 if ( appMPlayer.subWindow.isFullScreen ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
46 { |
3478 | 47 if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
48 else wsMoveTopWindow( &appMPlayer.subWindow ); | |
49 mplSubMoved=1; | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
50 break; |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
51 } |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
52 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 53 sx=X; sy=Y; |
54 msButton=wsPLMouseButton; | |
55 mplSubMoved=0; | |
56 break; | |
57 case wsMoveMouse: | |
58 switch ( msButton ) | |
59 { | |
60 case wsPLMouseButton: | |
61 mplSubMoved=1; | |
2854 | 62 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 63 break; |
64 case wsPRMouseButton: | |
65 mplMenuMouseHandle( X,Y,RX,RY ); | |
66 break; | |
67 } | |
68 break; | |
69 case wsRLMouseButton: | |
2030 | 70 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
71 if ( !mplSubMoved ) | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
72 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
73 if( SubVisible++%2 ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
74 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
75 wsMoveTopWindow( &appMPlayer.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
76 fprintf( stderr,"[sw] MAIN TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
77 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
78 else |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
79 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
80 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
81 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
82 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
83 } |
1693 | 84 msButton=0; |
85 mplSubMoved=0; | |
86 break; | |
87 } | |
88 } |