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