Fix wrong #endif comment that does not match the #ifdef directive.
[mplayer/greg.git] / gui / interface.h
blobad073a7333f23ac800325c288560ba45e7495497
2 #ifndef GUI_INTERFACE_H
3 #define GUI_INTERFACE_H
5 #include "../config.h"
6 #include "mplayer/play.h"
7 #include "libvo/font_load.h"
8 #include "cfg.h"
10 #ifdef USE_DVDREAD
11 #include "stream/stream.h"
12 #endif
14 typedef struct
16 int x;
17 int y;
18 int width;
19 int height;
20 } guiResizeStruct;
22 typedef struct
24 int signal;
25 char module[512];
26 } guiUnknownErrorStruct;
28 typedef struct
30 int seek;
31 int format;
32 int width;
33 int height;
34 char codecdll[128];
35 } guiVideoStruct;
37 #ifdef USE_DVDREAD
38 typedef struct
40 int titles;
41 int chapters;
42 int angles;
43 int current_chapter;
44 int current_title;
45 int current_angle;
46 int nr_of_audio_channels;
47 stream_language_t audio_streams[32];
48 int nr_of_subtitles;
49 stream_language_t subtitles[32];
50 } guiDVDStruct;
51 #endif
53 typedef struct
55 int message;
56 guiResizeStruct resize;
57 guiVideoStruct videodata;
58 guiUnknownErrorStruct error;
60 struct MPContext * mpcontext;
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
135 #define guiSetContext 18
137 #define guiSetStop 0
138 #define guiSetPlay 1
139 #define guiSetPause 2
141 #define guiDVD 1
142 #define guiVCD 2
143 #define guiFilenames 4
144 #define guiALL 0xffffffff
146 extern int use_gui;
148 extern void guiInit( void );
149 extern void guiDone( void );
150 extern int guiGetEvent( int type,char * arg );
151 extern void guiEventHandling( void );
152 extern void guiLoadFont( void );
153 extern void guiLoadSubtitle( char * name );
154 extern void guiMessageBox(int level, char * str);
156 typedef struct _plItem
158 struct _plItem * prev,* next;
159 int played;
160 char * path;
161 char * name;
162 } plItem;
164 typedef struct _urlItem
166 struct _urlItem *next;
167 char * url;
168 } URLItem;
170 extern plItem * plList;
171 extern plItem * plCurrent;
172 extern plItem * plLastPlayed;
174 extern URLItem * URLList;
176 #define fsPersistant_MaxPath 512
177 #define fsPersistant_MaxPos 5
178 extern char * fsHistory[fsPersistant_MaxPos];
180 #define gtkSetContrast 0
181 #define gtkSetBrightness 1
182 #define gtkSetHue 2
183 #define gtkSetSaturation 3
184 #define gtkSetEqualizer 4
185 #define gtkAddPlItem 5
186 #define gtkGetNextPlItem 6
187 #define gtkGetPrevPlItem 7
188 #define gtkGetCurrPlItem 8
189 #define gtkDelPl 9
190 #define gtkSetExtraStereo 10
191 #define gtkSetPanscan 11
192 #define gtkSetFontFactor 12
193 #define gtkSetAutoq 13
194 #define gtkClearStruct 14
195 #define gtkAddURLItem 15
196 #define gtkSetFontOutLine 16
197 #define gtkSetFontBlur 17
198 #define gtkSetFontTextScale 18
199 #define gtkSetFontOSDScale 19
200 #define gtkSetFontEncoding 20
201 #define gtkSetFontAutoScale 21
202 #define gtkSetSubEncoding 22
203 #define gtkDelCurrPlItem 23
204 #define gtkInsertPlItem 24
205 #define gtkSetCurrPlItem 25
207 extern float gtkEquChannels[6][10];
209 extern void * gtkSet( int cmd,float param, void * vparam );
211 extern char * gstrdup( const char * str );
212 extern int gstrcmp( const char * a,const char * b );
213 extern void gfree( void ** p );
214 extern void gaddlist( char *** list,const char * entry );
215 extern char * gstrchr( char * str,int c );
217 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
219 #define guiSetDF( s,d,n ) \
221 gfree( (void **)&s ); \
222 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
223 sprintf( s,"%s/%s",d,n ); \
226 #endif /* GUI_INTERFACE_H */