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