Mercurial > mplayer.hg
view Gui/interface.c @ 4833:395844d9d5d6
fixes bug in alban's new input handling code that caused the terminal
state to get trashed and not restored on exit. hopefully this change
won't interfere with the functionality of the new code; as far as i
can tell it seems to work fine.
author | rfelker |
---|---|
date | Sun, 24 Feb 2002 04:56:54 +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 }