added my nick
[mplayer/glamo.git] / Gui / interface.h
blob4ef00d4c2681d2a382dd352224d97ce376f47141
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 * demuxer;
63 void * event_struct;
65 int DiskChanged;
66 int NewPlay;
68 #ifdef USE_DVDREAD
69 guiDVDStruct DVD;
70 int Title;
71 int Angle;
72 int Chapter;
73 #endif
75 #ifdef HAVE_VCD
76 int VCDTracks;
77 #endif
79 int Playing;
80 float Position;
82 int MovieWidth;
83 int MovieHeight;
84 int NoWindow;
86 float Volume;
87 float Balance;
89 int Track;
90 int AudioType;
91 int StreamType;
92 int AudioOnly;
93 int TimeSec;
94 int LengthInSec;
95 int FrameDrop;
96 int FileFormat;
97 float FPS;
99 char * Filename;
100 int FilenameChanged;
102 char * Subtitlename;
103 int SubtitleChanged;
105 char * Othername;
106 int OtherChanged;
108 char * AudioFile;
109 int AudioFileChanged;
111 int SkinChange;
112 } guiInterface_t;
114 extern guiInterface_t guiIntfStruct;
116 #define guiXEvent 0
117 #define guiCEvent 1
118 #define guiIEvent 2
119 #define guiSetDVD 3
120 #define guiSetFileName 4
121 #define guiSetState 5
122 #define guiSetAudioOnly 6
123 #define guiReDrawSubWindow 7
124 #define guiSetShVideo 8
125 #define guiSetStream 9
126 #define guiReDraw 10
127 #define guiSetVolume 11
128 #define guiSetDefaults 12
129 #define guiSetValues 13
130 #define guiSetFileFormat 14
131 #define guiSetDemuxer 15
132 #define guiSetParameters 16
134 #define guiSetStop 0
135 #define guiSetPlay 1
136 #define guiSetPause 2
138 #define guiDVD 1
139 #define guiVCD 2
140 #define guiFilenames 4
141 #define guiALL 0xffffffff
143 extern char *get_path(char *filename);
145 extern void guiInit( void );
146 extern void guiDone( void );
147 extern int guiGetEvent( int type,char * arg );
148 extern void guiEventHandling( void );
149 extern void guiLoadFont( void );
150 extern void guiLoadSubtitle( char * name );
152 typedef struct _plItem
154 struct _plItem * prev,* next;
155 int played;
156 char * path;
157 char * name;
158 } plItem;
160 typedef struct _urlItem
162 struct _urlItem *next;
163 char * url;
164 } URLItem;
166 extern plItem * plList;
167 extern plItem * plCurrent;
168 extern plItem * plLastPlayed;
170 extern URLItem * URLList;
172 #define fsPersistant_MaxPath 512
173 #define fsPersistant_MaxPos 5
174 extern char * fsHistory[fsPersistant_MaxPos];
176 #define gtkSetContrast 0
177 #define gtkSetBrightness 1
178 #define gtkSetHue 2
179 #define gtkSetSaturation 3
180 #define gtkSetEqualizer 4
181 #define gtkAddPlItem 5
182 #define gtkGetNextPlItem 6
183 #define gtkGetPrevPlItem 7
184 #define gtkGetCurrPlItem 8
185 #define gtkDelPl 9
186 #define gtkSetExtraStereo 10
187 #define gtkSetPanscan 11
188 #define gtkSetFontFactor 12
189 #define gtkSetAutoq 13
190 #define gtkClearStruct 14
191 #define gtkAddURLItem 15
192 #define gtkSetFontOutLine 16
193 #define gtkSetFontBlur 17
194 #define gtkSetFontTextScale 18
195 #define gtkSetFontOSDScale 19
196 #define gtkSetFontEncoding 20
197 #define gtkSetFontAutoScale 21
198 #define gtkSetSubEncoding 22
199 #define gtkDelCurrPlItem 23
200 #define gtkInsertPlItem 24
201 #define gtkSetCurrPlItem 25
203 extern float gtkEquChannels[6][10];
205 extern void * gtkSet( int cmd,float param, void * vparam );
207 extern char * gconvert_uri_to_filename( char * str );
208 extern char * gstrdup( char * str );
209 extern int gstrcmp( char * a,char * b );
210 extern void gfree( void ** p );
211 extern void gaddlist( char *** list,char * entry );
212 extern char * gstrchr( char * str,int c );
214 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
216 #define guiSetDF( s,d,n ) \
218 gfree( (void **)&s ); \
219 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
220 sprintf( s,"%s/%s",d,n ); \
223 #endif