summaryrefslogtreecommitdiffstats
path: root/Gui/interface.h
blob: 9a28da66ae7ce09df1d19b0b726438930873ef06 (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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191

#ifndef _INTERFACE_H
#define _INTERFACE_H

#include "../config.h"
#include "mplayer/play.h"
#include "../mplayer.h"

#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;

   int                  DiskChanged;

#ifdef USE_DVDREAD
   guiDVDStruct         DVD;
#endif

#ifdef HAVE_VCD
   int    VCDTracks;
#endif

   int    Playing;
   float  Position;

   int    MovieWidth;
   int    MovieHeight;
   int    NoWindow;

   float  Volume;
   float  Balance;

   int    Track;
   int    AudioType;
   int    StreamType;
   int	  AudioOnly;
   int    TimeSec;
   int    LengthInSec;
   int    FrameDrop;
   int    FileFormat;

   char * Filename;
   int    FilenameChanged;

   char * Subtitlename;
   int    SubtitleChanged;
   
   char * Fontname;

   char * Othername;
   int    OtherChanged;
   
   char * AudioFile;
   int    AudioFileChanged;

   int    SkinChange;
} guiInterface_t;

extern guiInterface_t guiIntfStruct;

#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
#define guiSetStream        9
#define guiReDraw	    10
#define guiSetVolume        11
#define guiSetDefaults	    12
#define guiSetValues	    13
#define guiSetFileFormat    14

#define guiSetStop  0
#define guiSetPlay  1
#define guiSetPause 2

#define guiDVD      	1
#define guiVCD		2
#define guiFilenames	4
#define guiALL		0xffffffff

extern char *get_path(char *filename); 

extern void guiInit( void );
extern void guiDone( void );
extern int  guiGetEvent( int type,char * arg );
extern void guiEventHandling( void );
extern void guiLoadFont( void );

typedef struct _plItem 
{
 struct _plItem * prev,* next;
 int       played;
 char    * path;
 char    * name;
} plItem;

extern plItem * plList;
extern plItem * plCurrent;
extern plItem * plLastPlayed;

#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 gtkSetAudioDelay  11
#define gtkSetPanscan     12
#define gtkSetSubDelay    13
#define gtkSetSubFPS      14
#define gtkSetSubPos      15
#define gtkSetSubAuto     16
#define gtkSetFontFactor  17
#define gtkSetAutoq       18
#define gtkClearStruct    19

extern float gtkEquChannels[6][10];

extern void * gtkSet( int cmd,float param, void * vparam );

extern char * gconvert_uri_to_filename( char * str );
extern char * gstrdup( char * str );
extern int    gstrcmp( char * a,char * b );
extern void   gfree( void ** p );

#define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }

#define guiSetDF( s,d,n )                       \
 {                                              \
  gfree( (void **)&s );                          \
  s=malloc( strlen( d ) + strlen( n ) + 5 );    \
  sprintf( s,"%s/%s",d,n );                     \
 }

#endif