annotate gui/interface.h @ 26326:5bfc1d8bece9

Remove the need for code using stream to export an mp_input_check_interrupt() function. It also removes the compile-time dependency on input.
author albeu
date Wed, 09 Apr 2008 00:36:28 +0000
parents 4129c8cfa742
children b2f4abcf20ed
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
1 #ifndef MPLAYER_GUI_INTERFACE_H
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
2 #define MPLAYER_GUI_INTERFACE_H
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
4 #include "../config.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
5 #include "mplayer/play.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
6 #include "libvo/font_load.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
7 #include "cfg.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
9 #ifdef USE_DVDREAD
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
10 #include "stream/stream.h"
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
11 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
13 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
14 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
15 int x;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
16 int y;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
17 int width;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
18 int height;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
19 } guiResizeStruct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
21 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
22 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
23 int signal;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
24 char module[512];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
25 } guiUnknownErrorStruct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
26
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
27 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
28 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
29 int seek;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
30 int format;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
31 int width;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
32 int height;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
33 char codecdll[128];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
34 } guiVideoStruct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
35
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
36 #ifdef USE_DVDREAD
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
37 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
38 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
39 int titles;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
40 int chapters;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
41 int angles;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
42 int current_chapter;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
43 int current_title;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
44 int current_angle;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
45 int nr_of_audio_channels;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
46 stream_language_t audio_streams[32];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
47 int nr_of_subtitles;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
48 stream_language_t subtitles[32];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
49 } guiDVDStruct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
50 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
51
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
52 typedef struct
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
53 {
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
54 int message;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
55 guiResizeStruct resize;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
56 guiVideoStruct videodata;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
57 guiUnknownErrorStruct error;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
58
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
59 struct MPContext * mpcontext;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
60 void * sh_video;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
61 void * afilter;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
62 void * demuxer;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
63 void * event_struct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
64
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
65 int DiskChanged;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
66 int NewPlay;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
67
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
68 #ifdef USE_DVDREAD
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
69 guiDVDStruct DVD;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
70 int Title;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
71 int Angle;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
72 int Chapter;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
73 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
74
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
75 #ifdef HAVE_VCD
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
76 int VCDTracks;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
77 #endif
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
78
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
79 int Playing;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
80 float Position;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
81
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
82 int MovieWidth;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
83 int MovieHeight;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
84 int NoWindow;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
85
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
86 float Volume;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
87 float Balance;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
88
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
89 int Track;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
90 int AudioType;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
91 int StreamType;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
92 int AudioOnly;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
93 int TimeSec;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
94 int LengthInSec;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
95 int FrameDrop;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
96 int FileFormat;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
97 float FPS;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
98
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
99 char * Filename;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
100 int FilenameChanged;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
101
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
102 char * Subtitlename;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
103 int SubtitleChanged;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
104
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
105 char * Othername;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
106 int OtherChanged;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
107
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
108 char * AudioFile;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
109 int AudioFileChanged;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
110
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
111 int SkinChange;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
112 } guiInterface_t;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
113
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
114 extern guiInterface_t guiIntfStruct;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
115
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
116 #define guiXEvent 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
117 #define guiCEvent 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
118 #define guiIEvent 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
119 #define guiSetDVD 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
120 #define guiSetFileName 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
121 #define guiSetState 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
122 #define guiSetAudioOnly 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
123 #define guiReDrawSubWindow 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
124 #define guiSetShVideo 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
125 #define guiSetStream 9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
126 #define guiReDraw 10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
127 #define guiSetVolume 11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
128 #define guiSetDefaults 12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
129 #define guiSetValues 13
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
130 #define guiSetFileFormat 14
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
131 #define guiSetDemuxer 15
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
132 #define guiSetParameters 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
133 #define guiSetAfilter 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
134 #define guiSetContext 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
135
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
136 #define guiSetStop 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
137 #define guiSetPlay 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
138 #define guiSetPause 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
139
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
140 #define guiDVD 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
141 #define guiVCD 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
142 #define guiFilenames 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
143 #define guiALL 0xffffffff
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
144
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
145 extern int use_gui;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
146
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
147 extern void guiInit( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
148 extern void guiDone( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
149 extern int guiGetEvent( int type,char * arg );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
150 extern void guiEventHandling( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
151 extern void guiLoadFont( void );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
152 extern void guiLoadSubtitle( char * name );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
153 extern void guiMessageBox(int level, char * str);
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
154
25607
9d0b189ce1b2 Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents: 25535
diff changeset
155 typedef struct plItem
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
156 {
25607
9d0b189ce1b2 Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents: 25535
diff changeset
157 struct plItem * prev,* next;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
158 int played;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
159 char * path;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
160 char * name;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
161 } plItem;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
162
25607
9d0b189ce1b2 Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents: 25535
diff changeset
163 typedef struct urlItem
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
164 {
25607
9d0b189ce1b2 Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents: 25535
diff changeset
165 struct urlItem *next;
23077
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
166 char * url;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
167 } URLItem;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
168
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
169 extern plItem * plList;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
170 extern plItem * plCurrent;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
171 extern plItem * plLastPlayed;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
172
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
173 extern URLItem * URLList;
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
174
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
175 #define fsPersistant_MaxPath 512
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
176 #define fsPersistant_MaxPos 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
177 extern char * fsHistory[fsPersistant_MaxPos];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
178
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
179 #define gtkSetContrast 0
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
180 #define gtkSetBrightness 1
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
181 #define gtkSetHue 2
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
182 #define gtkSetSaturation 3
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
183 #define gtkSetEqualizer 4
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
184 #define gtkAddPlItem 5
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
185 #define gtkGetNextPlItem 6
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
186 #define gtkGetPrevPlItem 7
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
187 #define gtkGetCurrPlItem 8
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
188 #define gtkDelPl 9
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
189 #define gtkSetExtraStereo 10
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
190 #define gtkSetPanscan 11
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
191 #define gtkSetFontFactor 12
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
192 #define gtkSetAutoq 13
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
193 #define gtkClearStruct 14
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
194 #define gtkAddURLItem 15
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
195 #define gtkSetFontOutLine 16
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
196 #define gtkSetFontBlur 17
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
197 #define gtkSetFontTextScale 18
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
198 #define gtkSetFontOSDScale 19
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
199 #define gtkSetFontEncoding 20
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
200 #define gtkSetFontAutoScale 21
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
201 #define gtkSetSubEncoding 22
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
202 #define gtkDelCurrPlItem 23
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
203 #define gtkInsertPlItem 24
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
204 #define gtkSetCurrPlItem 25
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
205
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
206 extern float gtkEquChannels[6][10];
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
207
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
208 extern void * gtkSet( int cmd,float param, void * vparam );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
209
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
210 extern char * gstrdup( const char * str );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
211 extern int gstrcmp( const char * a,const char * b );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
212 extern void gfree( void ** p );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
213 extern void gaddlist( char *** list,const char * entry );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
214 extern char * gstrchr( char * str,int c );
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
215
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
216 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
217
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
218 #define guiSetDF( s,d,n ) \
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
219 { \
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
220 gfree( (void **)&s ); \
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
221 s=malloc( strlen( d ) + strlen( n ) + 5 ); \
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
222 sprintf( s,"%s/%s",d,n ); \
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
223 }
17bf4f4b0715 Gui --> gui
diego
parents:
diff changeset
224
26029
4129c8cfa742 Add MPLAYER_ prefix to multiple inclusion guards.
diego
parents: 25607
diff changeset
225 #endif /* MPLAYER_GUI_INTERFACE_H */