view Gui/interface.c @ 4825:41d2da3bd082

Make blocking call in libmpdemux interuptable (only with new input, awnser to quit, pt_next, pt_up_step and alt_src_step)
author albeu
date Sat, 23 Feb 2002 21:22:55 +0000
parents 3473ca9ef158
children ed5aa118e142
line wrap: on
line source


#include <string.h>

#include "ws.h"
#include "mplayer/play.h"
#include "interface.h"

#include "../mplayer.h"
#include "mplayer/widgets.h"
#include "mplayer/mplayer.h"
#include "app.h"
#include "../libvo/x11_common.h"

guiInterface_t guiIntfStruct;

void guiInit( int argc,char* argv[], char *envp[] )
{
 memset( &guiIntfStruct,0,sizeof( guiIntfStruct ) );
 appInit( argc,argv,envp,(void*)mDisplay );
}

void guiDone( void )
{
 mp_msg( MSGT_GPLAYER,MSGL_V,"[mplayer] exit.\n" );
 mplStop();
 gtkDone();
 wsXDone();
}

void guiGetEvent( int type,char * arg )
{
 switch ( type )
  {
   case guiXEvent:
        wsEvents( wsDisplay,(XEvent *)arg,NULL );
        gtkEventHandling();
        break;
   case guiCEvent:
        break;
  }
}

void guiEventHandling( void )
{
 if ( use_gui && !guiIntfStruct.Playing ) wsHandleEvents();
 gtkEventHandling();
 mplTimerHandler(); // handle GUI timer events
}