Mercurial > mplayer.hg
annotate gui/interface.h @ 32967:d9363dbd3f83
Avoid mixing declaration and code.
Additionally, move assignment where variable is used.
author | ib |
---|---|
date | Tue, 08 Mar 2011 13:12:30 +0000 |
parents | 1481268ccd30 |
children | b68d209b6f28 |
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" |
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
24 #include "playtree.h" |
23077 | 25 #include "mplayer/play.h" |
32466
9e627a1793b1
Move font_load.[ch], font_load_ft.c and osd_font.h from libvo to sub.
cigaes
parents:
31397
diff
changeset
|
26 #include "sub/font_load.h" |
23077 | 27 #include "cfg.h" |
29149 | 28 #include "stream/stream.h" |
23077 | 29 |
30 typedef struct | |
31 { | |
32 int x; | |
33 int y; | |
34 int width; | |
35 int height; | |
36 } guiResizeStruct; | |
37 | |
38 typedef struct | |
39 { | |
40 int signal; | |
41 char module[512]; | |
42 } guiUnknownErrorStruct; | |
43 | |
44 typedef struct | |
45 { | |
46 int seek; | |
47 int format; | |
48 int width; | |
49 int height; | |
50 char codecdll[128]; | |
51 } guiVideoStruct; | |
52 | |
27341
e7c989f7a7c9
Start unifying names of internal preprocessor directives.
diego
parents:
26458
diff
changeset
|
53 #ifdef CONFIG_DVDREAD |
23077 | 54 typedef struct |
55 { | |
56 int titles; | |
57 int chapters; | |
58 int angles; | |
59 int current_chapter; | |
60 int current_title; | |
61 int current_angle; | |
62 int nr_of_audio_channels; | |
63 stream_language_t audio_streams[32]; | |
64 int nr_of_subtitles; | |
65 stream_language_t subtitles[32]; | |
66 } guiDVDStruct; | |
67 #endif | |
68 | |
69 typedef struct | |
70 { | |
71 int message; | |
72 guiResizeStruct resize; | |
73 guiVideoStruct videodata; | |
74 guiUnknownErrorStruct error; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29149
diff
changeset
|
75 |
23077 | 76 struct MPContext * mpcontext; |
77 void * sh_video; | |
78 void * afilter; | |
79 void * demuxer; | |
80 void * event_struct; | |
81 | |
82 int DiskChanged; | |
83 int NewPlay; | |
84 | |
27341
e7c989f7a7c9
Start unifying names of internal preprocessor directives.
diego
parents:
26458
diff
changeset
|
85 #ifdef CONFIG_DVDREAD |
23077 | 86 guiDVDStruct DVD; |
87 int Title; | |
88 int Angle; | |
89 int Chapter; | |
90 #endif | |
91 | |
27370
14c5017f40d2
Change a bunch of video/audio-output-specific preprocessor directives from
diego
parents:
27341
diff
changeset
|
92 #ifdef CONFIG_VCD |
23077 | 93 int VCDTracks; |
94 #endif | |
95 | |
96 int Playing; | |
97 float Position; | |
98 | |
99 int MovieWidth; | |
100 int MovieHeight; | |
101 int NoWindow; | |
102 | |
103 float Volume; | |
104 float Balance; | |
105 | |
106 int Track; | |
107 int AudioType; | |
108 int StreamType; | |
109 int AudioOnly; | |
110 int TimeSec; | |
111 int LengthInSec; | |
112 int FrameDrop; | |
113 int FileFormat; | |
114 float FPS; | |
115 | |
116 char * Filename; | |
117 int FilenameChanged; | |
118 | |
119 char * Subtitlename; | |
120 int SubtitleChanged; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29149
diff
changeset
|
121 |
23077 | 122 char * Othername; |
123 int OtherChanged; | |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
29149
diff
changeset
|
124 |
23077 | 125 char * AudioFile; |
126 int AudioFileChanged; | |
127 | |
128 int SkinChange; | |
129 } guiInterface_t; | |
130 | |
131 extern guiInterface_t guiIntfStruct; | |
132 | |
133 #define guiXEvent 0 | |
134 #define guiCEvent 1 | |
135 #define guiIEvent 2 | |
136 #define guiSetDVD 3 | |
137 #define guiSetFileName 4 | |
138 #define guiSetState 5 | |
139 #define guiSetAudioOnly 6 | |
140 #define guiReDrawSubWindow 7 | |
141 #define guiSetShVideo 8 | |
142 #define guiSetStream 9 | |
143 #define guiReDraw 10 | |
144 #define guiSetVolume 11 | |
145 #define guiSetDefaults 12 | |
146 #define guiSetValues 13 | |
147 #define guiSetFileFormat 14 | |
148 #define guiSetDemuxer 15 | |
149 #define guiSetParameters 16 | |
150 #define guiSetAfilter 17 | |
151 #define guiSetContext 18 | |
152 | |
153 #define guiSetStop 0 | |
154 #define guiSetPlay 1 | |
155 #define guiSetPause 2 | |
156 | |
157 #define guiDVD 1 | |
158 #define guiVCD 2 | |
159 #define guiFilenames 4 | |
160 #define guiALL 0xffffffff | |
161 | |
162 extern int use_gui; | |
31387 | 163 extern int guiWinID; |
23077 | 164 |
28051 | 165 void guiInit( void ); |
166 void guiDone( void ); | |
30689
ebe42a93c6c3
Fix silly type of guiGetEvent argument to use void * instead of char * and
reimar
parents:
30533
diff
changeset
|
167 int guiGetEvent( int type,void * arg ); |
28051 | 168 void guiEventHandling( void ); |
169 void guiLoadFont( void ); | |
170 void guiLoadSubtitle( char * name ); | |
171 void guiMessageBox(int level, char * str); | |
23077 | 172 |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
173 typedef struct plItem |
23077 | 174 { |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
175 struct plItem * prev,* next; |
23077 | 176 int played; |
177 char * path; | |
178 char * name; | |
179 } plItem; | |
180 | |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
181 typedef struct urlItem |
23077 | 182 { |
25607
9d0b189ce1b2
Fix illegal identifiers: Names starting with __ or _ and uppercase are reserved
diego
parents:
25535
diff
changeset
|
183 struct urlItem *next; |
23077 | 184 char * url; |
185 } URLItem; | |
186 | |
31397
4d6bb9606833
Remove includes that break building if X11 is not available.
reimar
parents:
31387
diff
changeset
|
187 extern char * skinName; |
32900 | 188 extern char * skinDirInHome; |
189 extern char * skinMPlayerDir; | |
190 | |
23077 | 191 extern plItem * plList; |
192 extern plItem * plCurrent; | |
193 extern plItem * plLastPlayed; | |
194 | |
195 extern URLItem * URLList; | |
196 | |
197 #define fsPersistant_MaxPath 512 | |
198 #define fsPersistant_MaxPos 5 | |
199 extern char * fsHistory[fsPersistant_MaxPos]; | |
200 | |
201 #define gtkSetContrast 0 | |
202 #define gtkSetBrightness 1 | |
203 #define gtkSetHue 2 | |
204 #define gtkSetSaturation 3 | |
205 #define gtkSetEqualizer 4 | |
206 #define gtkAddPlItem 5 | |
207 #define gtkGetNextPlItem 6 | |
208 #define gtkGetPrevPlItem 7 | |
209 #define gtkGetCurrPlItem 8 | |
210 #define gtkDelPl 9 | |
211 #define gtkSetExtraStereo 10 | |
212 #define gtkSetPanscan 11 | |
213 #define gtkSetFontFactor 12 | |
214 #define gtkSetAutoq 13 | |
215 #define gtkClearStruct 14 | |
216 #define gtkAddURLItem 15 | |
217 #define gtkSetFontOutLine 16 | |
218 #define gtkSetFontBlur 17 | |
219 #define gtkSetFontTextScale 18 | |
220 #define gtkSetFontOSDScale 19 | |
221 #define gtkSetFontEncoding 20 | |
222 #define gtkSetFontAutoScale 21 | |
223 #define gtkSetSubEncoding 22 | |
224 #define gtkDelCurrPlItem 23 | |
225 #define gtkInsertPlItem 24 | |
226 #define gtkSetCurrPlItem 25 | |
227 | |
228 extern float gtkEquChannels[6][10]; | |
229 | |
28051 | 230 void * gtkSet( int cmd, float param, void * vparam ); |
23077 | 231 |
28051 | 232 char * gstrdup( const char * str ); |
233 int gstrcmp( const char * a, const char * b ); | |
234 void gfree( void ** p ); | |
235 void gaddlist( char *** list, const char * entry ); | |
236 char * gstrchr( char * str, int c ); | |
23077 | 237 |
30533
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
238 int import_initial_playtree_into_gui(play_tree_t* my_playtree, |
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
239 m_config_t* config, int enqueue); |
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
240 int import_playtree_playlist_into_gui(play_tree_t* my_playtree, |
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
241 m_config_t* config); |
e3e329bc727a
Avoid forward declarations for import_initial_playtree_into_gui() and
diego
parents:
29263
diff
changeset
|
242 |
23077 | 243 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); } |
244 | |
245 #define guiSetDF( s,d,n ) \ | |
246 { \ | |
247 gfree( (void **)&s ); \ | |
248 s=malloc( strlen( d ) + strlen( n ) + 5 ); \ | |
249 sprintf( s,"%s/%s",d,n ); \ | |
250 } | |
251 | |
26029 | 252 #endif /* MPLAYER_GUI_INTERFACE_H */ |