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