1693
|
1
|
|
2 // sub window
|
|
3
|
|
4 int mplSubRender = 1;
|
1852
|
5 int SubVisible = 0;
|
1812
|
6
|
1693
|
7 void mplSubDraw( wsParamDisplay )
|
|
8 {
|
1852
|
9 if ( appMPlayer.subWindow.State == wsFocused ||
|
|
10 appMPlayer.subWindow.State ==
|
|
11
|
|
12 ) SubVisible=0;
|
|
13
|
|
14 if ( !appMPlayer.subWindow.Mapped ||
|
|
15 appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
|
1823
|
16
|
1852
|
17 if ( mplShMem->Playing )
|
1798
|
18 {
|
1852
|
19 wsSetBackgroundRGB( &appMPlayer.subWindow,0,0,0 );
|
|
20 wsClearWindow( appMPlayer.subWindow );
|
1798
|
21 vo_expose=1;
|
1812
|
22 mplSubRender=0;
|
1798
|
23 }
|
1693
|
24
|
|
25 if ( mplSubRender )
|
|
26 {
|
1852
|
27 wsSetBackgroundRGB( &appMPlayer.subWindow,appMPlayer.subR,appMPlayer.subG,appMPlayer.subB );
|
|
28 if ( appMPlayer.sub.Bitmap.Image )
|
1798
|
29 {
|
|
30 wsConvert( &appMPlayer.subWindow,appMPlayer.sub.Bitmap.Image,appMPlayer.sub.Bitmap.ImageSize );
|
|
31 wsPutImage( &appMPlayer.subWindow );
|
|
32 }
|
1729
|
33 XFlush( wsDisplay );
|
1693
|
34 }
|
1812
|
35 appMPlayer.subWindow.State=0;
|
1693
|
36 }
|
|
37
|
|
38 void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
|
|
39 {
|
1812
|
40 static int mplSubMoved = 0;
|
|
41
|
1693
|
42 mplMouseTimer=mplMouseTimerConst;
|
|
43 wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
|
|
44
|
|
45 switch( Button )
|
|
46 {
|
|
47 case wsPRMouseButton:
|
|
48 mplShowMenu( RX,RY );
|
|
49 msButton=wsPRMouseButton;
|
|
50 break;
|
|
51 case wsRRMouseButton:
|
|
52 mplHideMenu( RX,RY );
|
|
53 msButton=0;
|
|
54 break;
|
1812
|
55 // ---
|
1693
|
56 case wsPLMouseButton:
|
|
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;
|
1778
|
66 if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,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:
|
1852
|
75 if ( ( !mplSubMoved )&&( !( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
|
1693
|
76 msButton=0;
|
|
77 mplSubMoved=0;
|
|
78 break;
|
|
79 }
|
|
80 }
|