Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 2977:28bcf0ca1448
ao_mpegpes isn't really optional
author | pl |
---|---|
date | Sun, 18 Nov 2001 18:58:03 +0000 |
parents | d47cbcdce1a8 |
children | c4b6dc8bb554 |
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 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
38 case wsPMMouseButton: |
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
39 gtkSendMessage( evShowPopUpMenu ); |
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
40 break; |
1693 | 41 case wsPRMouseButton: |
42 mplShowMenu( RX,RY ); | |
43 msButton=wsPRMouseButton; | |
44 break; | |
45 case wsRRMouseButton: | |
46 mplHideMenu( RX,RY ); | |
47 msButton=0; | |
48 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
49 // --- |
1693 | 50 case wsPLMouseButton: |
51 sx=X; sy=Y; | |
52 msButton=wsPLMouseButton; | |
53 mplSubMoved=0; | |
54 break; | |
55 case wsMoveMouse: | |
56 switch ( msButton ) | |
57 { | |
58 case wsPLMouseButton: | |
59 mplSubMoved=1; | |
2854 | 60 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 61 break; |
62 case wsPRMouseButton: | |
63 mplMenuMouseHandle( X,Y,RX,RY ); | |
64 mplMouseTimer=mplMouseTimerConst; | |
65 break; | |
66 } | |
67 break; | |
68 case wsRLMouseButton: | |
2030 | 69 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
70 if ( !mplSubMoved ) | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
71 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
72 if( SubVisible++%2 ) |
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 wsMoveTopWindow( &appMPlayer.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
75 fprintf( stderr,"[sw] MAIN TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
76 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
77 else |
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 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
80 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
81 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
82 } |
1693 | 83 msButton=0; |
84 mplSubMoved=0; | |
85 break; | |
86 } | |
87 } |