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
25 #include "mplayer/play.h"
26 #include "libvo/font_load.h"
28 #include "stream/stream.h"
42 } guiUnknownErrorStruct
;
62 int nr_of_audio_channels
;
63 stream_language_t audio_streams
[32];
65 stream_language_t subtitles
[32];
72 guiResizeStruct resize
;
73 guiVideoStruct videodata
;
74 guiUnknownErrorStruct error
;
76 struct MPContext
* mpcontext
;
126 int AudioFileChanged
;
131 extern guiInterface_t guiIntfStruct
;
137 #define guiSetFileName 4
138 #define guiSetState 5
139 #define guiSetAudioOnly 6
140 #define guiReDrawSubWindow 7
141 #define guiSetShVideo 8
142 #define guiSetStream 9
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
155 #define guiSetPause 2
159 #define guiFilenames 4
160 #define guiALL 0xffffffff
164 void guiInit( void );
165 void guiDone( void );
166 int guiGetEvent( int type
,void * 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
;
180 typedef struct urlItem
182 struct urlItem
*next
;
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
199 #define gtkSetSaturation 3
200 #define gtkSetEqualizer 4
201 #define gtkAddPlItem 5
202 #define gtkGetNextPlItem 6
203 #define gtkGetPrevPlItem 7
204 #define gtkGetCurrPlItem 8
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
,
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 */