Mercurial > mplayer.hg
annotate gui/interface.h @ 33656:3c300c37766f
Remove guiGetEvent type guiSetFileFormat.
Directly retrieve the information from the demuxer.
author | ib |
---|---|
date | Mon, 27 Jun 2011 18:55:18 +0000 |
parents | cbb7cfeb8c71 |
children | c92f23eac7a4 |
rev | line source |
---|---|
26458 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
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. | |
8 * | |
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. | |
13 * | |
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. | |
17 */ | |
18 | |
26029 | 19 #ifndef MPLAYER_GUI_INTERFACE_H |
20 #define MPLAYER_GUI_INTERFACE_H | |
23077 | 21 |
26382
b2f4abcf20ed
Make include paths consistent; do not use ../ in them.
diego
parents:
26029
diff
changeset
|
22 #include "config.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
23 #include "m_config.h" |
33309 | 24 #include "mp_core.h" |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
25 #include "playtree.h" |
29149 | 26 #include "stream/stream.h" |
23077 | 27 |
33021 | 28 // These are in support of the non-GUI files that interact with |
29 // the GUI and that only need to include interface.h for this. | |
30 // ------------------------------------------------------------ | |
32984 | 31 #include "cfg.h" |
33556 | 32 #include "ui/actions.h" |
23077 | 33 |
33021 | 34 extern int use_gui; // this is defined in mplayer.c |
35 // ------------------------------------------------------------ | |
36 | |
33466 | 37 #define GMPlayer "gmplayer" |
38 | |
32984 | 39 #define guiXEvent 0 |
33611 | 40 #define guiSetState 1 |
32984 | 41 #define guiIEvent 2 |
42 #define guiSetDVD 3 | |
43 #define guiSetFileName 4 | |
44 #define guiSetAudioOnly 6 | |
45 #define guiReDrawSubWindow 7 | |
33653
86819da22c57
Rename guiGetEvent type guiSetVideo guiSetVideoWindow.
ib
parents:
33651
diff
changeset
|
46 #define guiSetVideoWindow 8 |
32984 | 47 #define guiSetStream 9 |
48 #define guiReDraw 10 | |
49 #define guiSetVolume 11 | |
50 #define guiSetDefaults 12 | |
51 #define guiSetValues 13 | |
52 #define guiSetDemuxer 15 | |
53 #define guiSetParameters 16 | |
54 #define guiSetAfilter 17 | |
55 #define guiSetContext 18 | |
23077 | 56 |
33614 | 57 #define GUI_STOP 0 |
58 #define GUI_PLAY 1 | |
59 #define GUI_PAUSE 2 | |
23077 | 60 |
32984 | 61 #define guiDVD 1 |
62 #define guiVCD 2 | |
63 #define guiFilenames 4 | |
64 #define guiALL 0xffffffff | |
23077 | 65 |
32984 | 66 #define gtkSetContrast 0 |
67 #define gtkSetBrightness 1 | |
68 #define gtkSetHue 2 | |
69 #define gtkSetSaturation 3 | |
70 #define gtkSetEqualizer 4 | |
71 #define gtkAddPlItem 5 | |
72 #define gtkGetNextPlItem 6 | |
73 #define gtkGetPrevPlItem 7 | |
74 #define gtkGetCurrPlItem 8 | |
75 #define gtkDelPl 9 | |
23077 | 76 #define gtkSetExtraStereo 10 |
77 #define gtkSetPanscan 11 | |
78 #define gtkSetFontFactor 12 | |
79 #define gtkSetAutoq 13 | |
80 #define gtkClearStruct 14 | |
81 #define gtkAddURLItem 15 | |
82 #define gtkSetFontOutLine 16 | |
83 #define gtkSetFontBlur 17 | |
84 #define gtkSetFontTextScale 18 | |
85 #define gtkSetFontOSDScale 19 | |
86 #define gtkSetFontEncoding 20 | |
87 #define gtkSetFontAutoScale 21 | |
88 #define gtkSetSubEncoding 22 | |
89 #define gtkDelCurrPlItem 23 | |
90 #define gtkInsertPlItem 24 | |
91 #define gtkSetCurrPlItem 25 | |
92 | |
32984 | 93 #define fsPersistant_MaxPos 5 |
94 | |
95 #define guiSetFilename(s, n) \ | |
96 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
97 free(s); \ |
32984 | 98 s = gstrdup(n); \ |
99 } | |
100 | |
101 #define guiSetDF(s, d, n) \ | |
102 { \ | |
33282
3ce656827dd7
Use free() instead of gfree() in guiSetFilename and guiSetDF macros.
ib
parents:
33263
diff
changeset
|
103 free(s); \ |
32984 | 104 s = malloc(strlen(d) + strlen(n) + 5); \ |
105 sprintf(s, "%s/%s", d, n); \ | |
106 } | |
107 | |
108 typedef struct { | |
109 int x; | |
110 int y; | |
111 int width; | |
112 int height; | |
113 } guiResizeStruct; | |
114 | |
115 typedef struct { | |
116 int signal; | |
117 char module[512]; | |
118 } guiUnknownErrorStruct; | |
119 | |
120 typedef struct { | |
121 int seek; | |
122 int format; | |
123 int width; | |
124 int height; | |
125 char codecdll[128]; | |
126 } guiVideoStruct; | |
127 | |
128 #ifdef CONFIG_DVDREAD | |
129 typedef struct { | |
130 int titles; | |
131 int chapters; | |
132 int angles; | |
133 int current_chapter; | |
134 int current_title; | |
135 int current_angle; | |
136 int nr_of_audio_channels; | |
137 stream_language_t audio_streams[32]; | |
138 int nr_of_subtitles; | |
139 stream_language_t subtitles[32]; | |
140 } guiDVDStruct; | |
141 #endif | |
142 | |
143 typedef struct { | |
144 int message; | |
145 guiResizeStruct resize; | |
146 guiVideoStruct videodata; | |
147 guiUnknownErrorStruct error; | |
148 | |
149 struct MPContext *mpcontext; | |
150 void *sh_video; | |
151 void *afilter; | |
152 void *demuxer; | |
153 void *event_struct; | |
154 | |
155 int DiskChanged; | |
156 int NewPlay; | |
157 | |
158 #ifdef CONFIG_DVDREAD | |
159 guiDVDStruct DVD; | |
160 int Title; | |
161 int Angle; | |
162 int Chapter; | |
163 #endif | |
164 | |
165 #ifdef CONFIG_VCD | |
166 int VCDTracks; | |
167 #endif | |
168 | |
169 int Playing; | |
170 float Position; | |
171 | |
172 int MovieWidth; | |
173 int MovieHeight; | |
33655 | 174 int MovieWindow; |
32984 | 175 |
176 float Volume; | |
177 float Balance; | |
178 | |
179 int Track; | |
33646 | 180 int AudioChannels; |
32984 | 181 int StreamType; |
182 int AudioOnly; | |
183 int TimeSec; | |
184 int LengthInSec; | |
185 int FrameDrop; | |
186 float FPS; | |
187 | |
188 char *Filename; | |
189 int FilenameChanged; | |
190 | |
191 char *Subtitlename; | |
192 int SubtitleChanged; | |
193 | |
194 char *Othername; | |
195 int OtherChanged; | |
196 | |
197 char *AudioFile; | |
198 int AudioFileChanged; | |
199 | |
200 int SkinChange; | |
201 } guiInterface_t; | |
202 | |
203 typedef struct plItem { | |
204 struct plItem *prev, *next; | |
205 char *path; | |
206 char *name; | |
207 } plItem; | |
208 | |
209 typedef struct urlItem { | |
210 struct urlItem *next; | |
211 char *url; | |
33555 | 212 } urlItem; |
32984 | 213 |
33555 | 214 extern guiInterface_t guiInfo; |
32984 | 215 |
216 extern int guiWinID; | |
217 | |
218 extern char *skinName; | |
219 extern char *skinDirInHome; | |
220 extern char *skinMPlayerDir; | |
221 | |
222 extern plItem *plList; | |
223 extern plItem *plCurrent; | |
224 extern plItem *plLastPlayed; | |
225 | |
33555 | 226 extern urlItem *URLList; |
32984 | 227 |
228 extern char *fsHistory[fsPersistant_MaxPos]; | |
229 | |
23077 | 230 extern float gtkEquChannels[6][10]; |
231 | |
32984 | 232 void gaddlist(char ***list, const char *entry); |
233 void gfree(void **p); | |
33023 | 234 void gmp_msg(int mod, int lev, const char *format, ...); |
32984 | 235 char *gstrchr(char *str, int c); |
236 int gstrcmp(const char *a, const char *b); | |
237 char *gstrdup(const char *str); | |
238 void *gtkSet(int cmd, float fparam, void *vparam); | |
239 void guiDone(void); | |
240 void guiEventHandling(void); | |
33309 | 241 void guiExit(enum exit_reason how); |
32984 | 242 int guiGetEvent(int type, void *arg); |
243 void guiInit(void); | |
244 void guiLoadFont(void); | |
245 void guiLoadSubtitle(char *name); | |
246 int import_initial_playtree_into_gui(play_tree_t *my_playtree, m_config_t *config, int enqueue); | |
247 int import_playtree_playlist_into_gui(play_tree_t *my_playtree, m_config_t *config); | |
23077 | 248 |
26029 | 249 #endif /* MPLAYER_GUI_INTERFACE_H */ |