obvious gcc warning fix, approved by Nico
[mplayer/glamo.git] / Gui / interface.h
blobd9410c90cd6468c981fdbbb72fc93ce9be841d78
2 #ifndef _INTERFACE_H
3 #define _INTERFACE_H
5 #include "../config.h"
6 #include "mplayer/play.h"
7 #include "../mplayer.h"
8 #include "../libvo/font_load.h"
9 #include "cfg.h"
11 #ifdef USE_DVDREAD
12 #include "../libmpdemux/stream.h"
13 #endif
15 typedef struct
17 int x;
18 int y;
19 int width;
20 int height;
21 } guiResizeStruct;
23 typedef struct
25 int signal;
26 char module[512];
27 } guiUnknownErrorStruct;
29 typedef struct
31 int seek;
32 int format;
33 int width;
34 int height;
35 char codecdll[128];
36 } guiVideoStruct;
38 #ifdef USE_DVDREAD
39 typedef struct
41 int titles;
42 int chapters;
43 int angles;
44 int current_chapter;
45 int current_title;
46 int current_angle;
47 int nr_of_audio_channels;
48 stream_language_t audio_streams[32];
49 int nr_of_subtitles;
50 stream_language_t subtitles[32];
51 } guiDVDStruct;
52 #endif
54 typedef struct
56 int message;
57 guiResizeStruct resize;
58 guiVideoStruct videodata;
59 guiUnknownErrorStruct error;
61 void * sh_video;
62 void * afilter;
63 void * demuxer;
64 void * event_struct;
66 int DiskChanged;
67 int NewPlay;
69 #ifdef USE_DVDREAD
70 guiDVDStruct DVD;
71 int Title;
72 int Angle;
73 int Chapter;
74 #endif
76 #ifdef HAVE_VCD
77 int VCDTracks;
78 #endif
80 int Playing;
81 float Position;
83 int MovieWidth;
84 int MovieHeight;
85 int NoWindow;
87 float Volume;
88 float Balance;
90 int Track;
91 int AudioType;
92 int StreamType;
93 int AudioOnly;
94 int TimeSec;
95 int LengthInSec;
96 int FrameDrop;
97 int FileFormat;
98 float FPS;
100 char * Filename;
101 int FilenameChanged;
103 char * Subtitlename;
104 int SubtitleChanged;
106 char * Othername;
107 int OtherChanged;
109 char * AudioFile;
110 int AudioFileChanged;
112 int SkinChange;
113 } guiInterface_t;
115 extern guiInterface_t guiIntfStruct;
117 #define guiXEvent 0
118 #define guiCEvent 1
119 #define guiIEvent 2
120 #define guiSetDVD 3
121 #define guiSetFileName 4
122 #define guiSetState 5
123 #define guiSetAudioOnly 6
124 #define guiReDrawSubWindow 7
125 #define guiSetShVideo 8
126 #define guiSetStream 9
127 #define guiReDraw 10
128 #define guiSetVolume 11
129 #define guiSetDefaults 12
130 #define guiSetValues 13
131 #define guiSetFileFormat 14
132 #define guiSetDemuxer 15
133 #define guiSetParameters 16
134 #define guiSetAfilter 17
136 #define guiSetStop 0
137 #define guiSetPlay 1
138 #define guiSetPause 2
140 #define guiDVD 1
141 #define guiVCD 2
142 #define guiFilenames 4
143 #define guiALL 0xffffffff
145 extern char *get_path(char *filename);
147 extern void guiInit( void );
148 extern void guiDone( void );
149 extern int guiGetEvent( int type,char * arg );
150 extern void guiEventHandling( void );
151 extern void guiLoadFont( void );
152 extern void guiLoadSubtitle( char * name );
154 typedef struct _plItem
156 struct _plItem * prev,* next;
157 int played;
158 char * path;
159 char * name;
160 } plItem;
162 typedef struct _urlItem
164 struct _urlItem *next;
165 char * url;
166 } URLItem;
168 extern plItem * plList;
169 extern plItem * plCurrent;
170 extern plItem * plLastPlayed;
172 extern URLItem * URLList;
174 #define fsPersistant_MaxPath 512
175 #define fsPersistant_MaxPos 5
176 extern char * fsHistory[fsPersistant_MaxPos];
178 #define gtkSetContrast 0
179 #define gtkSetBrightness 1
180 #define gtkSetHue 2
181 #define gtkSetSaturation 3
182 #define gtkSetEqualizer 4
183 #define gtkAddPlItem 5
184 #define gtkGetNextPlItem 6
185 #define gtkGetPrevPlItem 7
186 #define gtkGetCurrPlItem 8
187 #define gtkDelPl 9
188 #define gtkSetExtraStereo 10
189 #define gtkSetPanscan 11
190 #define gtkSetFontFactor 12
191 #define gtkSetAutoq 13
192 #define gtkClearStruct 14
193 #define gtkAddURLItem 15
194 #define gtkSetFontOutLine 16
195 #define gtkSetFontBlur 17
196 #define gtkSetFontTextScale 18
197 #define gtkSetFontOSDScale 19
198 #define gtkSetFontEncoding 20
199 #define gtkSetFontAutoScale 21
200 #define gtkSetSubEncoding 22
201 #define gtkDelCurrPlItem 23
202 #define gtkInsertPlItem 24
203 #define gtkSetCurrPlItem 25
205 extern float gtkEquChannels[6][10];
207 extern void * gtkSet( int cmd,float param, void * vparam );
209 extern char * gconvert_uri_to_filename( char * str );
210 extern char * gstrdup( char * str );
211 extern int gstrcmp( char * a,char * b );
212 extern void gfree( void ** p );
213 extern void gaddlist( char *** list,char * entry );
214 extern char * gstrchr( char * str,int c );
216 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
218 #define guiSetDF( s,d,n ) \
220 gfree( (void **)&s ); \
221 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
222 sprintf( s,"%s/%s",d,n ); \
225 #endif