Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 5429:e9e2dc1306b1
BITMAPINFOHEADER fixed to be accepted by win32 decoders (divx,divxds)
author | arpi |
---|---|
date | Sun, 31 Mar 2002 20:17:27 +0000 |
parents | 3473ca9ef158 |
children | b8d8d72776f2 |
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 mplMouseTimer=mplMouseTimerConst; |
30 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
31 |
1693 | 32 |
33 switch( Button ) | |
34 { | |
2902
d47cbcdce1a8
rewrite some header meg jol csinaltam menu -t koepso gombra gonosz mod ( bocs, tom, nem angol).
pontscho
parents:
2854
diff
changeset
|
35 case wsPMMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
36 gtkShow( evShowPopUpMenu,NULL ); |
2980 | 37 break; |
1693 | 38 case wsPRMouseButton: |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
39 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 40 mplShowMenu( RX,RY ); |
41 msButton=wsPRMouseButton; | |
42 break; | |
43 case wsRRMouseButton: | |
44 mplHideMenu( RX,RY ); | |
45 msButton=0; | |
46 break; | |
2851
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
47 // --- |
1693 | 48 case wsPLMouseButton: |
3477
9e7289fdc471
ize ... majd gabu ide irja. ilyen fullscreenben mouse button press - re jon elo main window.
pontscho
parents:
3075
diff
changeset
|
49 if ( appMPlayer.subWindow.isFullScreen ) |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
50 { |
3478 | 51 if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
52 else wsMoveTopWindow( &appMPlayer.subWindow ); | |
53 mplSubMoved=1; | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
54 break; |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
55 } |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
4797
diff
changeset
|
56 gtkShow( evHidePopUpMenu,NULL ); |
1693 | 57 sx=X; sy=Y; |
58 msButton=wsPLMouseButton; | |
59 mplSubMoved=0; | |
60 break; | |
61 case wsMoveMouse: | |
62 switch ( msButton ) | |
63 { | |
64 case wsPLMouseButton: | |
65 mplSubMoved=1; | |
2854 | 66 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy ); |
1693 | 67 break; |
68 case wsPRMouseButton: | |
69 mplMenuMouseHandle( X,Y,RX,RY ); | |
70 mplMouseTimer=mplMouseTimerConst; | |
71 break; | |
72 } | |
73 break; | |
74 case wsRLMouseButton: | |
2030 | 75 // if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
76 if ( !mplSubMoved ) | |
2851
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 if( SubVisible++%2 ) |
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.mainWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
81 fprintf( stderr,"[sw] MAIN 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 else |
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 wsMoveTopWindow( &appMPlayer.subWindow ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
86 fprintf( stderr,"[sw] SUB TOP\n" ); |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
87 } |
b64fa5d25142
add roleld mouse support and some small bugfix. neked jol a testedbe.
pontscho
parents:
2045
diff
changeset
|
88 } |
1693 | 89 msButton=0; |
90 mplSubMoved=0; | |
91 break; | |
92 } | |
93 } |