2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
// sub window
|
|
|
|
|
|
|
|
int mplSubRender = 1;
|
2001-09-04 15:21:00 +00:00
|
|
|
int SubVisible = 0;
|
2001-08-31 21:19:52 +00:00
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
void mplSubDraw( wsParamDisplay )
|
|
|
|
{
|
2001-10-02 15:01:56 +00:00
|
|
|
if ( appMPlayer.subWindow.State == wsWindowFocusIn ) SubVisible++;
|
2001-11-12 12:26:09 +00:00
|
|
|
|
2001-09-04 15:21:00 +00:00
|
|
|
if ( !appMPlayer.subWindow.Mapped ||
|
|
|
|
appMPlayer.subWindow.Visible == wsWindowNotVisible ) return;
|
2001-09-01 17:53:07 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
if ( guiIntfStruct.Playing ) mplSubRender=0;
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
if ( mplSubRender )
|
|
|
|
{
|
2001-10-01 12:28:39 +00:00
|
|
|
if ( appMPlayer.sub.Bitmap.Image ) wsPutImage( &appMPlayer.subWindow );
|
2001-10-01 09:30:46 +00:00
|
|
|
// XFlush( wsDisplay );
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
2001-11-12 12:26:09 +00:00
|
|
|
appMPlayer.subWindow.State=0;
|
2001-08-25 21:04:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void mplSubMouseHandle( int Button,int X,int Y,int RX,int RY )
|
|
|
|
{
|
2001-08-31 21:19:52 +00:00
|
|
|
static int mplSubMoved = 0;
|
2001-11-12 12:26:09 +00:00
|
|
|
static int msButton = 0;
|
2001-08-31 21:19:52 +00:00
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
mplMouseTimer=mplMouseTimerConst;
|
|
|
|
wsVisibleMouse( &appMPlayer.subWindow,wsShowMouseCursor );
|
2002-02-23 15:12:55 +00:00
|
|
|
|
2001-08-25 21:04:29 +00:00
|
|
|
|
|
|
|
switch( Button )
|
|
|
|
{
|
2001-11-14 16:05:33 +00:00
|
|
|
case wsPMMouseButton:
|
2002-02-23 15:12:55 +00:00
|
|
|
gtkShow( evShowPopUpMenu,NULL );
|
2001-11-18 19:22:55 +00:00
|
|
|
break;
|
2001-08-25 21:04:29 +00:00
|
|
|
case wsPRMouseButton:
|
2002-02-23 15:12:55 +00:00
|
|
|
gtkShow( evHidePopUpMenu,NULL );
|
2001-08-25 21:04:29 +00:00
|
|
|
mplShowMenu( RX,RY );
|
|
|
|
msButton=wsPRMouseButton;
|
|
|
|
break;
|
|
|
|
case wsRRMouseButton:
|
|
|
|
mplHideMenu( RX,RY );
|
|
|
|
msButton=0;
|
|
|
|
break;
|
2001-11-12 12:26:09 +00:00
|
|
|
// ---
|
2001-08-25 21:04:29 +00:00
|
|
|
case wsPLMouseButton:
|
2001-12-12 23:15:15 +00:00
|
|
|
if ( appMPlayer.subWindow.isFullScreen )
|
2002-02-23 15:12:55 +00:00
|
|
|
{
|
2001-12-12 23:53:44 +00:00
|
|
|
if( ++SubVisible%2 ) wsMoveTopWindow( &appMPlayer.mainWindow );
|
|
|
|
else wsMoveTopWindow( &appMPlayer.subWindow );
|
|
|
|
mplSubMoved=1;
|
2002-02-23 15:12:55 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
gtkShow( evHidePopUpMenu,NULL );
|
2001-08-25 21:04:29 +00:00
|
|
|
sx=X; sy=Y;
|
|
|
|
msButton=wsPLMouseButton;
|
|
|
|
mplSubMoved=0;
|
|
|
|
break;
|
|
|
|
case wsMoveMouse:
|
|
|
|
switch ( msButton )
|
|
|
|
{
|
|
|
|
case wsPLMouseButton:
|
|
|
|
mplSubMoved=1;
|
2001-11-12 15:16:13 +00:00
|
|
|
if ( !appMPlayer.subWindow.isFullScreen ) wsMoveWindow( &appMPlayer.subWindow,False,RX - sx,RY - sy );
|
2001-08-25 21:04:29 +00:00
|
|
|
break;
|
|
|
|
case wsPRMouseButton:
|
|
|
|
mplMenuMouseHandle( X,Y,RX,RY );
|
|
|
|
mplMouseTimer=mplMouseTimerConst;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case wsRLMouseButton:
|
2001-10-01 13:09:04 +00:00
|
|
|
// if ( ( !mplSubMoved )&&( ( SubVisible++%2 ) ) ) wsMoveTopWindow( &appMPlayer.mainWindow );
|
|
|
|
if ( !mplSubMoved )
|
2001-11-12 12:26:09 +00:00
|
|
|
{
|
|
|
|
if( SubVisible++%2 )
|
|
|
|
{
|
|
|
|
wsMoveTopWindow( &appMPlayer.mainWindow );
|
|
|
|
fprintf( stderr,"[sw] MAIN TOP\n" );
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
wsMoveTopWindow( &appMPlayer.subWindow );
|
|
|
|
fprintf( stderr,"[sw] SUB TOP\n" );
|
|
|
|
}
|
|
|
|
}
|
2001-08-25 21:04:29 +00:00
|
|
|
msButton=0;
|
|
|
|
mplSubMoved=0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|