Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 2854:fd44ecf77f8d
move bug meg fileload bug fixed asszem.
author | pontscho |
---|---|
date | Mon, 12 Nov 2001 15:16:13 +0000 |
parents | b64fa5d25142 |
children | d47cbcdce1a8 |
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 |
1852 | 14 if ( mplShMem->Playing ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
15 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
16 vo_expose=1; |
1812 | 17 mplSubRender=0; |
1798 | 18 } |
1693 | 19 |
20 if ( mplSubRender ) | |
21 { | |
2029 | 22 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
|
23 // XFlush( wsDisplay ); |
1693 | 24 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
25 appMPlayer.subWindow.State=0; |
1693 | 26 } |
27 | |
28 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
29 { | |
1812 | 30 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
31 static int msButton = 0; |
1812 | 32 |
1693 | 33 mplMouseTimer=mplMouseTimerConst; |
34 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); | |
35 | |
36 switch( Button ) | |
37 { | |
38 case wsPRMouseButton: | |
39 mplShowMenu( RX,RY ); | |
40 msButton=wsPRMouseButton; | |
41 break; | |
42 case wsRRMouseButton: | |
43 mplHideMenu( RX,RY ); | |
44 msButton=0; | |
45 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
46 // --- |
1693 | 47 case wsPLMouseButton: |
48 sx=X; sy=Y; | |
49 msButton=wsPLMouseButton; | |
50 mplSubMoved=0; | |
51 break; | |
52 case wsMoveMouse: | |
53 switch ( msButton ) | |
54 { | |
55 case wsPLMouseButton: | |
56 mplSubMoved=1; | |
2854 | 57 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 58 break; |
59 case wsPRMouseButton: | |
60 mplMenuMouseHandle( X,Y,RX,RY ); | |
61 mplMouseTimer=mplMouseTimerConst; | |
62 break; | |
63 } | |
64 break; | |
65 case wsRLMouseButton: | |
2030 | 66 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
67 if ( !mplSubMoved ) | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
68 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
69 if( SubVisible++%2 ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
70 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
71 wsMoveTopWindow( &appMPlayer.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
72 fprintf( stderr,"[sw] MAIN TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
73 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
74 else |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
75 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
76 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
77 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
78 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
79 } |
1693 | 80 msButton=0; |
81 mplSubMoved=0; | |
82 break; | |
83 } | |
84 } |