Give table headings more meaningful names.
[mplayer/glamo.git] / gui / interface.h
blob63398867fc23aa0dff8c517f585bc32facf3540e
1 /*
2 * This file is part of MPlayer.
4 * MPlayer is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * MPlayer is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License along
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 #ifndef MPLAYER_GUI_INTERFACE_H
20 #define MPLAYER_GUI_INTERFACE_H
22 #include "config.h"
23 #include "mplayer/play.h"
24 #include "libvo/font_load.h"
25 #include "cfg.h"
27 #ifdef CONFIG_DVDREAD
28 #include "stream/stream.h"
29 #endif
31 typedef struct
33 int x;
34 int y;
35 int width;
36 int height;
37 } guiResizeStruct;
39 typedef struct
41 int signal;
42 char module[512];
43 } guiUnknownErrorStruct;
45 typedef struct
47 int seek;
48 int format;
49 int width;
50 int height;
51 char codecdll[128];
52 } guiVideoStruct;
54 #ifdef CONFIG_DVDREAD
55 typedef struct
57 int titles;
58 int chapters;
59 int angles;
60 int current_chapter;
61 int current_title;
62 int current_angle;
63 int nr_of_audio_channels;
64 stream_language_t audio_streams[32];
65 int nr_of_subtitles;
66 stream_language_t subtitles[32];
67 } guiDVDStruct;
68 #endif
70 typedef struct
72 int message;
73 guiResizeStruct resize;
74 guiVideoStruct videodata;
75 guiUnknownErrorStruct error;
77 struct MPContext * mpcontext;
78 void * sh_video;
79 void * afilter;
80 void * demuxer;
81 void * event_struct;
83 int DiskChanged;
84 int NewPlay;
86 #ifdef CONFIG_DVDREAD
87 guiDVDStruct DVD;
88 int Title;
89 int Angle;
90 int Chapter;
91 #endif
93 #ifdef CONFIG_VCD
94 int VCDTracks;
95 #endif
97 int Playing;
98 float Position;
100 int MovieWidth;
101 int MovieHeight;
102 int NoWindow;
104 float Volume;
105 float Balance;
107 int Track;
108 int AudioType;
109 int StreamType;
110 int AudioOnly;
111 int TimeSec;
112 int LengthInSec;
113 int FrameDrop;
114 int FileFormat;
115 float FPS;
117 char * Filename;
118 int FilenameChanged;
120 char * Subtitlename;
121 int SubtitleChanged;
123 char * Othername;
124 int OtherChanged;
126 char * AudioFile;
127 int AudioFileChanged;
129 int SkinChange;
130 } guiInterface_t;
132 extern guiInterface_t guiIntfStruct;
134 #define guiXEvent 0
135 #define guiCEvent 1
136 #define guiIEvent 2
137 #define guiSetDVD 3
138 #define guiSetFileName 4
139 #define guiSetState 5
140 #define guiSetAudioOnly 6
141 #define guiReDrawSubWindow 7
142 #define guiSetShVideo 8
143 #define guiSetStream 9
144 #define guiReDraw 10
145 #define guiSetVolume 11
146 #define guiSetDefaults 12
147 #define guiSetValues 13
148 #define guiSetFileFormat 14
149 #define guiSetDemuxer 15
150 #define guiSetParameters 16
151 #define guiSetAfilter 17
152 #define guiSetContext 18
154 #define guiSetStop 0
155 #define guiSetPlay 1
156 #define guiSetPause 2
158 #define guiDVD 1
159 #define guiVCD 2
160 #define guiFilenames 4
161 #define guiALL 0xffffffff
163 extern int use_gui;
165 void guiInit( void );
166 void guiDone( void );
167 int guiGetEvent( int type,char * arg );
168 void guiEventHandling( void );
169 void guiLoadFont( void );
170 void guiLoadSubtitle( char * name );
171 void guiMessageBox(int level, char * str);
173 typedef struct plItem
175 struct plItem * prev,* next;
176 int played;
177 char * path;
178 char * name;
179 } plItem;
181 typedef struct urlItem
183 struct urlItem *next;
184 char * url;
185 } URLItem;
187 extern plItem * plList;
188 extern plItem * plCurrent;
189 extern plItem * plLastPlayed;
191 extern URLItem * URLList;
193 #define fsPersistant_MaxPath 512
194 #define fsPersistant_MaxPos 5
195 extern char * fsHistory[fsPersistant_MaxPos];
197 #define gtkSetContrast 0
198 #define gtkSetBrightness 1
199 #define gtkSetHue 2
200 #define gtkSetSaturation 3
201 #define gtkSetEqualizer 4
202 #define gtkAddPlItem 5
203 #define gtkGetNextPlItem 6
204 #define gtkGetPrevPlItem 7
205 #define gtkGetCurrPlItem 8
206 #define gtkDelPl 9
207 #define gtkSetExtraStereo 10
208 #define gtkSetPanscan 11
209 #define gtkSetFontFactor 12
210 #define gtkSetAutoq 13
211 #define gtkClearStruct 14
212 #define gtkAddURLItem 15
213 #define gtkSetFontOutLine 16
214 #define gtkSetFontBlur 17
215 #define gtkSetFontTextScale 18
216 #define gtkSetFontOSDScale 19
217 #define gtkSetFontEncoding 20
218 #define gtkSetFontAutoScale 21
219 #define gtkSetSubEncoding 22
220 #define gtkDelCurrPlItem 23
221 #define gtkInsertPlItem 24
222 #define gtkSetCurrPlItem 25
224 extern float gtkEquChannels[6][10];
226 void * gtkSet( int cmd, float param, void * vparam );
228 char * gstrdup( const char * str );
229 int gstrcmp( const char * a, const char * b );
230 void gfree( void ** p );
231 void gaddlist( char *** list, const char * entry );
232 char * gstrchr( char * str, int c );
234 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
236 #define guiSetDF( s,d,n ) \
238 gfree( (void **)&s ); \
239 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
240 sprintf( s,"%s/%s",d,n ); \
243 #endif /* MPLAYER_GUI_INTERFACE_H */