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-08-29 17:16:34 +00:00
|
|
|
#include "../libvo/font_load.h"
|
2002-08-15 22:52:52 +00:00
|
|
|
#include "cfg.h"
|
2002-02-21 22:48:47 +00:00
|
|
|
|
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];
|
2003-08-15 11:55:21 +00:00
|
|
|
} guiUnknownErrorStruct;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
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;
|
2003-08-15 11:55:21 +00:00
|
|
|
guiResizeStruct resize;
|
|
|
|
guiVideoStruct videodata;
|
|
|
|
guiUnknownErrorStruct error;
|
2002-09-01 11:28:18 +00:00
|
|
|
|
|
|
|
void * sh_video;
|
2004-12-27 19:34:42 +00:00
|
|
|
void * afilter;
|
2002-11-29 00:58:25 +00:00
|
|
|
void * demuxer;
|
2002-11-28 00:44:24 +00:00
|
|
|
void * event_struct;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
2002-09-01 11:28:18 +00:00
|
|
|
int DiskChanged;
|
2002-12-11 01:21:12 +00:00
|
|
|
int NewPlay;
|
2002-06-03 15:06:32 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
#ifdef USE_DVDREAD
|
|
|
|
guiDVDStruct DVD;
|
2002-12-11 01:21:12 +00:00
|
|
|
int Title;
|
|
|
|
int Angle;
|
|
|
|
int Chapter;
|
2002-06-03 15:06:32 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_VCD
|
|
|
|
int VCDTracks;
|
2002-02-23 15:12:55 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
int Playing;
|
|
|
|
float Position;
|
|
|
|
|
|
|
|
int MovieWidth;
|
|
|
|
int MovieHeight;
|
2002-08-14 23:02:45 +00:00
|
|
|
int NoWindow;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
float Volume;
|
|
|
|
float Balance;
|
|
|
|
|
|
|
|
int Track;
|
|
|
|
int AudioType;
|
|
|
|
int StreamType;
|
2002-04-22 21:36:12 +00:00
|
|
|
int AudioOnly;
|
2002-02-23 15:12:55 +00:00
|
|
|
int TimeSec;
|
|
|
|
int LengthInSec;
|
|
|
|
int FrameDrop;
|
2002-08-14 23:02:45 +00:00
|
|
|
int FileFormat;
|
2002-08-29 22:24:49 +00:00
|
|
|
float FPS;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
char * Filename;
|
|
|
|
int FilenameChanged;
|
|
|
|
|
|
|
|
char * Subtitlename;
|
|
|
|
int SubtitleChanged;
|
2002-07-25 20:26:38 +00:00
|
|
|
|
2002-02-23 15:12:55 +00:00
|
|
|
char * Othername;
|
|
|
|
int OtherChanged;
|
2002-07-02 22:31:50 +00:00
|
|
|
|
|
|
|
char * AudioFile;
|
|
|
|
int AudioFileChanged;
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
int SkinChange;
|
|
|
|
} guiInterface_t;
|
|
|
|
|
|
|
|
extern guiInterface_t guiIntfStruct;
|
|
|
|
|
2002-04-22 21:36:12 +00:00
|
|
|
#define guiXEvent 0
|
|
|
|
#define guiCEvent 1
|
|
|
|
#define guiIEvent 2
|
|
|
|
#define guiSetDVD 3
|
|
|
|
#define guiSetFileName 4
|
|
|
|
#define guiSetState 5
|
|
|
|
#define guiSetAudioOnly 6
|
|
|
|
#define guiReDrawSubWindow 7
|
|
|
|
#define guiSetShVideo 8
|
2002-06-03 15:06:32 +00:00
|
|
|
#define guiSetStream 9
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiReDraw 10
|
|
|
|
#define guiSetVolume 11
|
|
|
|
#define guiSetDefaults 12
|
2002-08-04 19:23:58 +00:00
|
|
|
#define guiSetValues 13
|
2002-08-14 23:02:45 +00:00
|
|
|
#define guiSetFileFormat 14
|
2002-11-29 00:58:25 +00:00
|
|
|
#define guiSetDemuxer 15
|
2002-12-11 01:21:12 +00:00
|
|
|
#define guiSetParameters 16
|
2004-12-27 19:34:42 +00:00
|
|
|
#define guiSetAfilter 17
|
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-06-03 15:06:32 +00:00
|
|
|
#define guiDVD 1
|
|
|
|
#define guiVCD 2
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiFilenames 4
|
2002-06-03 15:06:32 +00:00
|
|
|
#define guiALL 0xffffffff
|
|
|
|
|
2002-03-07 15:06:02 +00:00
|
|
|
extern char *get_path(char *filename);
|
|
|
|
|
2002-05-28 11:55:17 +00:00
|
|
|
extern void guiInit( void );
|
2002-03-07 11:57:33 +00:00
|
|
|
extern void guiDone( void );
|
2002-08-14 23:02:45 +00:00
|
|
|
extern int guiGetEvent( int type,char * arg );
|
2002-02-21 22:48:47 +00:00
|
|
|
extern void guiEventHandling( void );
|
2002-07-25 20:26:38 +00:00
|
|
|
extern void guiLoadFont( void );
|
2002-10-10 14:06:49 +00:00
|
|
|
extern void guiLoadSubtitle( char * name );
|
2005-09-03 15:19:52 +00:00
|
|
|
extern void guiMessageBox(int level, char * str);
|
2002-02-21 22:48:47 +00:00
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
typedef struct _plItem
|
|
|
|
{
|
|
|
|
struct _plItem * prev,* next;
|
|
|
|
int played;
|
|
|
|
char * path;
|
|
|
|
char * name;
|
|
|
|
} plItem;
|
|
|
|
|
2002-08-26 22:20:58 +00:00
|
|
|
typedef struct _urlItem
|
|
|
|
{
|
|
|
|
struct _urlItem *next;
|
|
|
|
char * url;
|
|
|
|
} URLItem;
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
extern plItem * plList;
|
|
|
|
extern plItem * plCurrent;
|
|
|
|
extern plItem * plLastPlayed;
|
|
|
|
|
2002-08-26 22:20:58 +00:00
|
|
|
extern URLItem * URLList;
|
|
|
|
|
2003-01-21 13:33:40 +00:00
|
|
|
#define fsPersistant_MaxPath 512
|
|
|
|
#define fsPersistant_MaxPos 5
|
|
|
|
extern char * fsHistory[fsPersistant_MaxPos];
|
|
|
|
|
2002-11-02 16:09:05 +00:00
|
|
|
#define gtkSetContrast 0
|
|
|
|
#define gtkSetBrightness 1
|
|
|
|
#define gtkSetHue 2
|
|
|
|
#define gtkSetSaturation 3
|
|
|
|
#define gtkSetEqualizer 4
|
|
|
|
#define gtkAddPlItem 5
|
|
|
|
#define gtkGetNextPlItem 6
|
|
|
|
#define gtkGetPrevPlItem 7
|
|
|
|
#define gtkGetCurrPlItem 8
|
|
|
|
#define gtkDelPl 9
|
|
|
|
#define gtkSetExtraStereo 10
|
|
|
|
#define gtkSetPanscan 11
|
|
|
|
#define gtkSetFontFactor 12
|
|
|
|
#define gtkSetAutoq 13
|
|
|
|
#define gtkClearStruct 14
|
|
|
|
#define gtkAddURLItem 15
|
|
|
|
#define gtkSetFontOutLine 16
|
|
|
|
#define gtkSetFontBlur 17
|
|
|
|
#define gtkSetFontTextScale 18
|
|
|
|
#define gtkSetFontOSDScale 19
|
|
|
|
#define gtkSetFontEncoding 20
|
|
|
|
#define gtkSetFontAutoScale 21
|
2003-01-21 19:12:46 +00:00
|
|
|
#define gtkSetSubEncoding 22
|
2003-02-05 23:02:35 +00:00
|
|
|
#define gtkDelCurrPlItem 23
|
|
|
|
#define gtkInsertPlItem 24
|
|
|
|
#define gtkSetCurrPlItem 25
|
2002-07-03 18:57:52 +00:00
|
|
|
|
|
|
|
extern float gtkEquChannels[6][10];
|
|
|
|
|
2002-07-12 00:53:26 +00:00
|
|
|
extern void * gtkSet( int cmd,float param, void * vparam );
|
2002-07-03 18:57:52 +00:00
|
|
|
|
2002-08-14 12:17:04 +00:00
|
|
|
extern char * gconvert_uri_to_filename( char * str );
|
2002-07-25 20:26:38 +00:00
|
|
|
extern char * gstrdup( char * str );
|
|
|
|
extern int gstrcmp( char * a,char * b );
|
|
|
|
extern void gfree( void ** p );
|
2002-10-02 13:16:15 +00:00
|
|
|
extern void gaddlist( char *** list,char * entry );
|
2002-11-25 18:18:45 +00:00
|
|
|
extern char * gstrchr( char * str,int c );
|
2002-02-24 19:34:52 +00:00
|
|
|
|
2002-07-25 20:26:38 +00:00
|
|
|
#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
|
2002-02-23 15:12:55 +00:00
|
|
|
|
|
|
|
#define guiSetDF( s,d,n ) \
|
|
|
|
{ \
|
2002-07-25 20:26:38 +00:00
|
|
|
gfree( (void **)&s ); \
|
2002-02-23 15:12:55 +00:00
|
|
|
s=malloc( strlen( d ) + strlen( n ) + 5 ); \
|
|
|
|
sprintf( s,"%s/%s",d,n ); \
|
|
|
|
}
|
|
|
|
|
2002-02-24 19:34:52 +00:00
|
|
|
#endif
|