blob: ff003d406448357f572c30c9910a325898ef3b25 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#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
}
|