Add missing 'defined' for __bsdi__.
[mplayer/glamo.git] / gui / interface.h
blob59d0cbac4736681fd62881bb40493e0060ae11ed
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 "m_config.h"
24 #include "playtree.h"
25 #include "mplayer/play.h"
26 #include "libvo/font_load.h"
27 #include "cfg.h"
28 #include "stream/stream.h"
30 typedef struct
32 int x;
33 int y;
34 int width;
35 int height;
36 } guiResizeStruct;
38 typedef struct
40 int signal;
41 char module[512];
42 } guiUnknownErrorStruct;
44 typedef struct
46 int seek;
47 int format;
48 int width;
49 int height;
50 char codecdll[128];
51 } guiVideoStruct;
53 #ifdef CONFIG_DVDREAD
54 typedef struct
56 int titles;
57 int chapters;
58 int angles;
59 int current_chapter;
60 int current_title;
61 int current_angle;
62 int nr_of_audio_channels;
63 stream_language_t audio_streams[32];
64 int nr_of_subtitles;
65 stream_language_t subtitles[32];
66 } guiDVDStruct;
67 #endif
69 typedef struct
71 int message;
72 guiResizeStruct resize;
73 guiVideoStruct videodata;
74 guiUnknownErrorStruct error;
76 struct MPContext * mpcontext;
77 void * sh_video;
78 void * afilter;
79 void * demuxer;
80 void * event_struct;
82 int DiskChanged;
83 int NewPlay;
85 #ifdef CONFIG_DVDREAD
86 guiDVDStruct DVD;
87 int Title;
88 int Angle;
89 int Chapter;
90 #endif
92 #ifdef CONFIG_VCD
93 int VCDTracks;
94 #endif
96 int Playing;
97 float Position;
99 int MovieWidth;
100 int MovieHeight;
101 int NoWindow;
103 float Volume;
104 float Balance;
106 int Track;
107 int AudioType;
108 int StreamType;
109 int AudioOnly;
110 int TimeSec;
111 int LengthInSec;
112 int FrameDrop;
113 int FileFormat;
114 float FPS;
116 char * Filename;
117 int FilenameChanged;
119 char * Subtitlename;
120 int SubtitleChanged;
122 char * Othername;
123 int OtherChanged;
125 char * AudioFile;
126 int AudioFileChanged;
128 int SkinChange;
129 } guiInterface_t;
131 extern guiInterface_t guiIntfStruct;
133 #define guiXEvent 0
134 #define guiCEvent 1
135 #define guiIEvent 2
136 #define guiSetDVD 3
137 #define guiSetFileName 4
138 #define guiSetState 5
139 #define guiSetAudioOnly 6
140 #define guiReDrawSubWindow 7
141 #define guiSetShVideo 8
142 #define guiSetStream 9
143 #define guiReDraw 10
144 #define guiSetVolume 11
145 #define guiSetDefaults 12
146 #define guiSetValues 13
147 #define guiSetFileFormat 14
148 #define guiSetDemuxer 15
149 #define guiSetParameters 16
150 #define guiSetAfilter 17
151 #define guiSetContext 18
153 #define guiSetStop 0
154 #define guiSetPlay 1
155 #define guiSetPause 2
157 #define guiDVD 1
158 #define guiVCD 2
159 #define guiFilenames 4
160 #define guiALL 0xffffffff
162 extern int use_gui;
164 void guiInit( void );
165 void guiDone( void );
166 int guiGetEvent( int type,char * arg );
167 void guiEventHandling( void );
168 void guiLoadFont( void );
169 void guiLoadSubtitle( char * name );
170 void guiMessageBox(int level, char * str);
172 typedef struct plItem
174 struct plItem * prev,* next;
175 int played;
176 char * path;
177 char * name;
178 } plItem;
180 typedef struct urlItem
182 struct urlItem *next;
183 char * url;
184 } URLItem;
186 extern plItem * plList;
187 extern plItem * plCurrent;
188 extern plItem * plLastPlayed;
190 extern URLItem * URLList;
192 #define fsPersistant_MaxPath 512
193 #define fsPersistant_MaxPos 5
194 extern char * fsHistory[fsPersistant_MaxPos];
196 #define gtkSetContrast 0
197 #define gtkSetBrightness 1
198 #define gtkSetHue 2
199 #define gtkSetSaturation 3
200 #define gtkSetEqualizer 4
201 #define gtkAddPlItem 5
202 #define gtkGetNextPlItem 6
203 #define gtkGetPrevPlItem 7
204 #define gtkGetCurrPlItem 8
205 #define gtkDelPl 9
206 #define gtkSetExtraStereo 10
207 #define gtkSetPanscan 11
208 #define gtkSetFontFactor 12
209 #define gtkSetAutoq 13
210 #define gtkClearStruct 14
211 #define gtkAddURLItem 15
212 #define gtkSetFontOutLine 16
213 #define gtkSetFontBlur 17
214 #define gtkSetFontTextScale 18
215 #define gtkSetFontOSDScale 19
216 #define gtkSetFontEncoding 20
217 #define gtkSetFontAutoScale 21
218 #define gtkSetSubEncoding 22
219 #define gtkDelCurrPlItem 23
220 #define gtkInsertPlItem 24
221 #define gtkSetCurrPlItem 25
223 extern float gtkEquChannels[6][10];
225 void * gtkSet( int cmd, float param, void * vparam );
227 char * gstrdup( const char * str );
228 int gstrcmp( const char * a, const char * b );
229 void gfree( void ** p );
230 void gaddlist( char *** list, const char * entry );
231 char * gstrchr( char * str, int c );
233 int import_initial_playtree_into_gui(play_tree_t* my_playtree,
234 m_config_t* config, int enqueue);
235 int import_playtree_playlist_into_gui(play_tree_t* my_playtree,
236 m_config_t* config);
238 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
240 #define guiSetDF( s,d,n ) \
242 gfree( (void **)&s ); \
243 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
244 sprintf( s,"%s/%s",d,n ); \
247 #endif /* MPLAYER_GUI_INTERFACE_H */