Mercurial > mplayer.hg
annotate Gui/mplayer/sw.h @ 2025:0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
author | pontscho |
---|---|
date | Mon, 01 Oct 2001 09:30:46 +0000 |
parents | 88a88d0a3f94 |
children | 41ed89701ece |
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 { | |
1854 | 9 if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible=0; |
1852 | 10 |
11 if ( !appMPlayer.subWindow.Mapped || | |
12 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return; | |
1823 | 13 |
1852 | 14 if ( mplShMem->Playing ) |
1798 | 15 { |
1858
88a88d0a3f94
fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents:
1854
diff
changeset
|
16 // wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 ); |
88a88d0a3f94
fix skin changing, xv fullscreen redraw bug, etc.
pontscho
parents:
1854
diff
changeset
|
17 // wsClearWindow( appMPlayer.subWindow ); |
1798 | 18 vo_expose=1; |
1812 | 19 mplSubRender=0; |
1798 | 20 } |
1693 | 21 |
22 if ( mplSubRender ) | |
23 { | |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
24 // wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB ); |
1852 | 25 if ( appMPlayer.sub.Bitmap.Image ) |
1798 | 26 { |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
27 // wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize ); |
1798 | 28 wsPutImage( &appMPlayer.subWindow ); |
29 } | |
2025
0653e90b3118
some bug fix, and sub window render speed up.. 10l kola ? :)
pontscho
parents:
1858
diff
changeset
|
30 // XFlush( wsDisplay ); |
1693 | 31 } |
1812 | 32 appMPlayer.subWindow.State=0; |
1693 | 33 } |
34 | |
35 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY ) | |
36 { | |
1812 | 37 static int mplSubMoved = 0; |
38 | |
1693 | 39 mplMouseTimer=mplMouseTimerConst; |
40 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor ); | |
41 | |
42 switch( Button ) | |
43 { | |
44 case wsPRMouseButton: | |
45 mplShowMenu( RX,RY ); | |
46 msButton=wsPRMouseButton; | |
47 break; | |
48 case wsRRMouseButton: | |
49 mplHideMenu( RX,RY ); | |
50 msButton=0; | |
51 break; | |
1812 | 52 // --- |
1693 | 53 case wsPLMouseButton: |
54 sx=X; sy=Y; | |
55 msButton=wsPLMouseButton; | |
56 mplSubMoved=0; | |
57 break; | |
58 case wsMoveMouse: | |
59 switch ( msButton ) | |
60 { | |
61 case wsPLMouseButton: | |
62 mplSubMoved=1; | |
1778 | 63 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,RX - sx,RY - sy ); |
1693 | 64 break; |
65 case wsPRMouseButton: | |
66 mplMenuMouseHandle( X,Y,RX,RY ); | |
67 mplMouseTimer=mplMouseTimerConst; | |
68 break; | |
69 } | |
70 break; | |
71 case wsRLMouseButton: | |
1854 | 72 if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow ); |
1693 | 73 msButton=0; |
74 mplSubMoved=0; | |
75 break; | |
76 } | |
77 } |