Mercurial > mplayer.hg
view Gui/interface.c @ 4818:3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
author | pontscho |
---|---|
date | Sat, 23 Feb 2002 15:12:55 +0000 |
parents | c39affa2b376 |
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 }