Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 5995:fa5d0ec52031
time to make libavcodec as default
author | arpi |
---|---|
date | Mon, 06 May 2002 12:45:02 +0000 |
parents | 60cf2bca993f |
children | b5fb9a927bf3 |
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 ); |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
21 // XFlush( wsDisplay ); |
1693 | 22 } |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
23 appMPlayer.subWindow.State=0; |
1693 | 24 } |
25 | |
26 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
27 { | |
1812 | 28 static int mplSubMoved = 0; |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
29 static int msButton = 0; |
1812 | 30 |
1693 | 31 switch( Button ) |
32 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
33 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
34 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 35 break; |
1693 | 36 case wsPRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
37 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 38 mplShowMenu( RX,RY ); |
39 msButton=wsPRMouseButton; | |
40 break; | |
41 case wsRRMouseButton: | |
5919 | 42 mplHideMenu( RX,RY,1 ); |
1693 | 43 msButton=0; |
44 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
45 // --- |
1693 | 46 case wsPLMouseButton: |
3477
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
47 if ( appMPlayer.subWindow.isFullScreen ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
48 { |
3478 | 49 if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
50 else wsMoveTopWindow( &appMPlayer.subWindow ); | |
51 mplSubMoved=1; | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
52 break; |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
53 } |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
54 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 55 sx=X; sy=Y; |
56 msButton=wsPLMouseButton; | |
57 mplSubMoved=0; | |
58 break; | |
59 case wsMoveMouse: | |
60 switch ( msButton ) | |
61 { | |
62 case wsPLMouseButton: | |
63 mplSubMoved=1; | |
2854 | 64 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 65 break; |
66 case wsPRMouseButton: | |
67 mplMenuMouseHandle( X,Y,RX,RY ); | |
68 break; | |
69 } | |
70 break; | |
71 case wsRLMouseButton: | |
2030 | 72 if ( !mplSubMoved ) |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
73 { |
5919 | 74 #if 0 |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
75 if( SubVisible++%2 ) |
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 wsMoveTopWindow( &appMPlayer.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
78 fprintf( stderr,"[sw] MAIN TOP\n" ); |
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 else |
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 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
83 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
84 } |
5919 | 85 #else |
86 if ( appMPlayer.subWindow.Focused == 2 ) | |
87 { | |
88 wsMoveTopWindow( &appMPlayer.mainWindow ); | |
89 fprintf( stderr,"[sw] MAIN TOP\n" ); | |
90 } | |
91 else | |
92 { | |
93 wsMoveTopWindow( &appMPlayer.subWindow ); | |
94 fprintf( stderr,"[sw] SUB TOP\n" ); | |
95 } | |
96 #endif | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
97 } |
1693 | 98 msButton=0; |
99 mplSubMoved=0; | |
100 break; | |
101 } | |
102 } |