2002-02-21 22:48:47 +00:00
|
|
|
|
|
|
|
#ifndef _INTERFACE_H
|
|
|
|
#define _INTERFACE_H
|
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#include "../config.h"
|
2002-02-21 22:48:47 +00:00
|
|
|
#include "mplayer/play.h"
|
|
|
|
#include "../mplayer.h"
|
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
#include "../libmpdemux/stream.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
} guiResizeStruct;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int signal;
|
|
|
|
char module[512];
|
|
|
|
} guiUnknowErrorStruct;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int seek;
|
|
|
|
int format;
|
|
|
|
int width;
|
|
|
|
int height;
|
|
|
|
char codecdll[128];
|
|
|
|
} guiVideoStruct;
|
|
|
|
|
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int titles;
|
|
|
|
int chapters;
|
|
|
|
int angles;
|
|
|
|
int current_chapter;
|
|
|
|
int current_title;
|
|
|
|
int current_angle;
|
|
|
|
int nr_of_audio_channels;
|
|
|
|
stream_language_t audio_streams[32];
|
|
|
|
int nr_of_subtitles;
|
|
|
|
stream_language_t subtitles[32];
|
|
|
|
} guiDVDStruct;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int message;
|
|
|
|
guiResizeStruct resize;
|
|
|
|
guiVideoStruct videodata;
|
|
|
|
guiUnknowErrorStruct error;
|
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
guiDVDStruct DVD;
|
|
|
|
int DVDChanged;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
int Playing;
|
|
|
|
float Position;
|
|
|
|
|
|
|
|
int MovieWidth;
|
|
|
|
int MovieHeight;
|
|
|
|
|
|
|
|
float Volume;
|
|
|
|
int VolumeChanged;
|
|
|
|
float Balance;
|
|
|
|
int Mute;
|
|
|
|
|
|
|
|
int Track;
|
|
|
|
int AudioType;
|
|
|
|
int StreamType;
|
|
|
|
int TimeSec;
|
|
|
|
int LengthInSec;
|
|
|
|
int FrameDrop;
|
|
|
|
|
|
|
|
char * Filename;
|
|
|
|
int FilenameChanged;
|
|
|
|
|
|
|
|
char * Subtitlename;
|
|
|
|
int SubtitleChanged;
|
|
|
|
|
|
|
|
char * Othername;
|
|
|
|
int OtherChanged;
|
|
|
|
|
|
|
|
int SkinChange;
|
|
|
|
} guiInterface_t;
|
|
|
|
|
|
|
|
extern guiInterface_t guiIntfStruct;
|
|
|
|
|
2002-02-21 22:48:47 +00:00
|
|
|
#define guiXEvent 0
|
|
|
|
#define guiCEvent 1
|
2002-02-24 21:57:16 +00:00
|
|
|
#define guiIEvent 2
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2002-03-06 23:54:20 +00:00
|
|
|
#define guiSetStop 0
|
|
|
|
#define guiSetPlay 1
|
|
|
|
#define guiSetPause 2
|
|
|
|
|
2002-03-07 15:06:02 +00:00
|
|
|
extern char *get_path(char *filename);
|
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
extern void guiInit( int argc,char* argv[], char *envp[] );
|
2002-03-07 11:57:33 +00:00
|
|
|
extern void guiDone( void );
|
2002-02-21 22:48:47 +00:00
|
|
|
extern void guiGetEvent( int type,char * arg );
|
|
|
|
extern void guiEventHandling( void );
|
|
|
|
|
2002-02-24 19:34:52 +00:00
|
|
|
#define gstrdup( s,ss ) { s=malloc( strlen( ss ) + 3 ); strcpy( s,ss ); }
|
|
|
|
|
2002-02-24 21:57:16 +00:00
|
|
|
#define guiSetFilename( s,n ) { if ( s ) free( s ); s=strdup( n ); }
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
#define guiSetDF( s,d,n ) \
|
|
|
|
{ \
|
|
|
|
if ( s ) free( s ); s=NULL; \
|
|
|
|
s=malloc( strlen( d ) + strlen( n ) + 5 ); \
|
|
|
|
sprintf( s,"%s/%s",d,n ); \
|
|
|
|
}
|
|
|
|
|
2002-02-24 19:34:52 +00:00
|
|
|
#endif
|