Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 3783:de6b00131e95
show a-v delay in osd (based on subdelay osd patch)
author | arpi |
---|---|
date | Thu, 27 Dec 2001 00:59:40 +0000 |
parents | e518999fa7e7 |
children | b1a2469e78ac |
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 ); | |
2980 | 35 |
1693 | 36 |
37 switch( Button ) | |
38 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
39 case wsPMMouseButton: |
3075 | 40 #ifdef USE_DVDREAD |
3054 | 41 memcpy( >kShMem->DVD,&mplShMem->DVD,sizeof( mplDVDStruct ) ); |
3075 | 42 #endif |
2980 | 43 gtkSendMessage( evShowPopUpMenu ); |
44 break; | |
1693 | 45 case wsPRMouseButton: |
2980 | 46 if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu ); |
1693 | 47 mplShowMenu( RX,RY ); |
48 msButton=wsPRMouseButton; | |
49 break; | |
50 case wsRRMouseButton: | |
51 mplHideMenu( RX,RY ); | |
52 msButton=0; | |
53 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
54 // --- |
1693 | 55 case wsPLMouseButton: |
3477
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
56 if ( appMPlayer.subWindow.isFullScreen ) |
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
57 { |
3478 | 58 if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
59 else wsMoveTopWindow( &appMPlayer.subWindow ); | |
60 mplSubMoved=1; | |
3477
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
61 break; |
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
62 } |
2980 | 63 if ( gtkShMem->visiblepopupmenu ) gtkSendMessage( evHidePopUpMenu ); |
1693 | 64 sx=X; sy=Y; |
65 msButton=wsPLMouseButton; | |
66 mplSubMoved=0; | |
67 break; | |
68 case wsMoveMouse: | |
69 switch ( msButton ) | |
70 { | |
71 case wsPLMouseButton: | |
72 mplSubMoved=1; | |
2854 | 73 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 74 break; |
75 case wsPRMouseButton: | |
76 mplMenuMouseHandle( X,Y,RX,RY ); | |
77 mplMouseTimer=mplMouseTimerConst; | |
78 break; | |
79 } | |
80 break; | |
81 case wsRLMouseButton: | |
2030 | 82 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
83 if ( !mplSubMoved ) | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
84 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
85 if( SubVisible++%2 ) |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
86 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
87 wsMoveTopWindow( &appMPlayer.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
88 fprintf( stderr,"[sw] MAIN TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
89 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
90 else |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
91 { |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
92 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
93 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
94 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
95 } |
1693 | 96 msButton=0; |
97 mplSubMoved=0; | |
98 break; | |
99 } | |
100 } |