Mercurial > mplayer.hg
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 |
rev | line source |
---|---|
26029 | 1 #ifndef MPLAYER_GUI_INTERFACE_H |
2 #define MPLAYER_GUI_INTERFACE_H | |
23077 | 3 |
4 #include "../config.h" | |
5 #include "mplayer/play.h" | |
6 #include "libvo/font_load.h" | |
7 #include "cfg.h" | |
8 | |
9 #ifdef USE_DVDREAD | |
10 #include "stream/stream.h" | |
11 #endif | |
12 | |
13 typedef struct | |
14 { | |
15 int x; | |
16 int y; | |
17 int width; | |
18 int height; | |
19 } guiResizeStruct; | |
20 | |
21 typedef struct | |
22 { | |
23 int signal; | |
24 char module[512]; | |
25 } guiUnknownErrorStruct; | |
26 | |
27 typedef struct | |
28 { | |
29 int seek; | |
30 int format; | |
31 int width; | |
32 int height; | |
33 char codecdll[128]; | |
34 } guiVideoStruct; | |
35 | |
36 #ifdef USE_DVDREAD | |
37 typedef struct | |
38 { | |
39 int titles; | |
40 int chapters; | |
41 int angles; | |
42 int current_chapter; | |
43 int current_title; | |
44 int current_angle; | |
45 int nr_of_audio_channels; | |
46 stream_language_t audio_streams[32]; | |
47 int nr_of_subtitles; | |
48 stream_language_t subtitles[32]; | |
49 } guiDVDStruct; | |
50 #endif | |
51 | |
52 typedef struct | |
53 { | |
54 int message; | |
55 guiResizeStruct resize; | |
56 guiVideoStruct videodata; | |
57 guiUnknownErrorStruct error; | |
58 | |
59 struct MPContext * mpcontext; | |
60 void * sh_video; | |
61 void * afilter; | |
62 void * demuxer; | |
63 void * event_struct; | |
64 | |
65 int DiskChanged; | |
66 int NewPlay; | |
67 | |
68 #ifdef USE_DVDREAD | |
69 guiDVDStruct DVD; | |
70 int Title; | |
71 int Angle; | |
72 int Chapter; | |
73 #endif | |
74 | |
75 #ifdef HAVE_VCD | |
76 int VCDTracks; | |
77 #endif | |
78 | |
79 int Playing; | |
80 float Position; | |
81 | |
82 int MovieWidth; | |
83 int MovieHeight; | |
84 int NoWindow; | |
85 | |
86 float Volume; | |
87 float Balance; | |
88 | |
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; | |
98 | |
99 char * Filename; | |
100 int FilenameChanged; | |
101 | |
102 char * Subtitlename; | |
103 int SubtitleChanged; | |
104 | |
105 char * Othername; | |
106 int OtherChanged; | |
107 | |
108 char * AudioFile; | |
109 int AudioFileChanged; | |
110 | |
111 int SkinChange; | |
112 } guiInterface_t; | |
113 | |
114 extern guiInterface_t guiIntfStruct; | |
115 | |
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 | |
133 #define guiSetAfilter 17 | |
134 #define guiSetContext 18 | |
135 | |
136 #define guiSetStop 0 | |
137 #define guiSetPlay 1 | |
138 #define guiSetPause 2 | |
139 | |
140 #define guiDVD 1 | |
141 #define guiVCD 2 | |
142 #define guiFilenames 4 | |
143 #define guiALL 0xffffffff | |
144 | |
145 extern int use_gui; | |
146 | |
147 extern void guiInit( void ); | |
148 extern void guiDone( void ); | |
149 extern int guiGetEvent( int type,char * arg ); | |
150 extern void guiEventHandling( void ); | |
151 extern void guiLoadFont( void ); | |
152 extern void guiLoadSubtitle( char * name ); | |
153 extern void guiMessageBox(int level, char * str); | |
154 | |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
155 typedef struct plItem |
23077 | 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 | 158 int played; |
159 char * path; | |
160 char * name; | |
161 } plItem; | |
162 | |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
163 typedef struct urlItem |
23077 | 164 { |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
165 struct urlItem *next; |
23077 | 166 char * url; |
167 } URLItem; | |
168 | |
169 extern plItem * plList; | |
170 extern plItem * plCurrent; | |
171 extern plItem * plLastPlayed; | |
172 | |
173 extern URLItem * URLList; | |
174 | |
175 #define fsPersistant_MaxPath 512 | |
176 #define fsPersistant_MaxPos 5 | |
177 extern char * fsHistory[fsPersistant_MaxPos]; | |
178 | |
179 #define gtkSetContrast 0 | |
180 #define gtkSetBrightness 1 | |
181 #define gtkSetHue 2 | |
182 #define gtkSetSaturation 3 | |
183 #define gtkSetEqualizer 4 | |
184 #define gtkAddPlItem 5 | |
185 #define gtkGetNextPlItem 6 | |
186 #define gtkGetPrevPlItem 7 | |
187 #define gtkGetCurrPlItem 8 | |
188 #define gtkDelPl 9 | |
189 #define gtkSetExtraStereo 10 | |
190 #define gtkSetPanscan 11 | |
191 #define gtkSetFontFactor 12 | |
192 #define gtkSetAutoq 13 | |
193 #define gtkClearStruct 14 | |
194 #define gtkAddURLItem 15 | |
195 #define gtkSetFontOutLine 16 | |
196 #define gtkSetFontBlur 17 | |
197 #define gtkSetFontTextScale 18 | |
198 #define gtkSetFontOSDScale 19 | |
199 #define gtkSetFontEncoding 20 | |
200 #define gtkSetFontAutoScale 21 | |
201 #define gtkSetSubEncoding 22 | |
202 #define gtkDelCurrPlItem 23 | |
203 #define gtkInsertPlItem 24 | |
204 #define gtkSetCurrPlItem 25 | |
205 | |
206 extern float gtkEquChannels[6][10]; | |
207 | |
208 extern void * gtkSet( int cmd,float param, void * vparam ); | |
209 | |
210 extern char * gstrdup( const char * str ); | |
211 extern int gstrcmp( const char * a,const char * b ); | |
212 extern void gfree( void ** p ); | |
213 extern void gaddlist( char *** list,const char * entry ); | |
214 extern char * gstrchr( char * str,int c ); | |
215 | |
216 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); } | |
217 | |
218 #define guiSetDF( s,d,n ) \ | |
219 { \ | |
220 gfree( (void **)&s ); \ | |
221 s=malloc( strlen( d ) + strlen( n ) + 5 ); \ | |
222 sprintf( s,"%s/%s",d,n ); \ | |
223 } | |
224 | |
26029 | 225 #endif /* MPLAYER_GUI_INTERFACE_H */ |