Mercurial > mplayer.hg
annotate gui/interface.h @ 25454:e2bbaf29e61e
Remove another useless cast
author | reimar |
---|---|
date | Fri, 21 Dec 2007 11:37:47 +0000 |
parents | 76f5d8892c04 |
children | 3baf6a2283da |
rev | line source |
---|---|
23077 | 1 |
23689
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
23685
diff
changeset
|
2 #ifndef GUI_INTERFACE_H |
3f0d00abc073
Do not use leading underscores in multiple inclusion guards, they are reserved.
diego
parents:
23685
diff
changeset
|
3 #define GUI_INTERFACE_H |
23077 | 4 |
5 #include "../config.h" | |
6 #include "mplayer/play.h" | |
7 #include "libvo/font_load.h" | |
8 #include "cfg.h" | |
9 | |
10 #ifdef USE_DVDREAD | |
11 #include "stream/stream.h" | |
12 #endif | |
13 | |
14 typedef struct | |
15 { | |
16 int x; | |
17 int y; | |
18 int width; | |
19 int height; | |
20 } guiResizeStruct; | |
21 | |
22 typedef struct | |
23 { | |
24 int signal; | |
25 char module[512]; | |
26 } guiUnknownErrorStruct; | |
27 | |
28 typedef struct | |
29 { | |
30 int seek; | |
31 int format; | |
32 int width; | |
33 int height; | |
34 char codecdll[128]; | |
35 } guiVideoStruct; | |
36 | |
37 #ifdef USE_DVDREAD | |
38 typedef struct | |
39 { | |
40 int titles; | |
41 int chapters; | |
42 int angles; | |
43 int current_chapter; | |
44 int current_title; | |
45 int current_angle; | |
46 int nr_of_audio_channels; | |
47 stream_language_t audio_streams[32]; | |
48 int nr_of_subtitles; | |
49 stream_language_t subtitles[32]; | |
50 } guiDVDStruct; | |
51 #endif | |
52 | |
53 typedef struct | |
54 { | |
55 int message; | |
56 guiResizeStruct resize; | |
57 guiVideoStruct videodata; | |
58 guiUnknownErrorStruct error; | |
59 | |
60 struct MPContext * mpcontext; | |
61 void * sh_video; | |
62 void * afilter; | |
63 void * demuxer; | |
64 void * event_struct; | |
65 | |
66 int DiskChanged; | |
67 int NewPlay; | |
68 | |
69 #ifdef USE_DVDREAD | |
70 guiDVDStruct DVD; | |
71 int Title; | |
72 int Angle; | |
73 int Chapter; | |
74 #endif | |
75 | |
76 #ifdef HAVE_VCD | |
77 int VCDTracks; | |
78 #endif | |
79 | |
80 int Playing; | |
81 float Position; | |
82 | |
83 int MovieWidth; | |
84 int MovieHeight; | |
85 int NoWindow; | |
86 | |
87 float Volume; | |
88 float Balance; | |
89 | |
90 int Track; | |
91 int AudioType; | |
92 int StreamType; | |
93 int AudioOnly; | |
94 int TimeSec; | |
95 int LengthInSec; | |
96 int FrameDrop; | |
97 int FileFormat; | |
98 float FPS; | |
99 | |
100 char * Filename; | |
101 int FilenameChanged; | |
102 | |
103 char * Subtitlename; | |
104 int SubtitleChanged; | |
105 | |
106 char * Othername; | |
107 int OtherChanged; | |
108 | |
109 char * AudioFile; | |
110 int AudioFileChanged; | |
111 | |
112 int SkinChange; | |
113 } guiInterface_t; | |
114 | |
115 extern guiInterface_t guiIntfStruct; | |
116 | |
117 #define guiXEvent 0 | |
118 #define guiCEvent 1 | |
119 #define guiIEvent 2 | |
120 #define guiSetDVD 3 | |
121 #define guiSetFileName 4 | |
122 #define guiSetState 5 | |
123 #define guiSetAudioOnly 6 | |
124 #define guiReDrawSubWindow 7 | |
125 #define guiSetShVideo 8 | |
126 #define guiSetStream 9 | |
127 #define guiReDraw 10 | |
128 #define guiSetVolume 11 | |
129 #define guiSetDefaults 12 | |
130 #define guiSetValues 13 | |
131 #define guiSetFileFormat 14 | |
132 #define guiSetDemuxer 15 | |
133 #define guiSetParameters 16 | |
134 #define guiSetAfilter 17 | |
135 #define guiSetContext 18 | |
136 | |
137 #define guiSetStop 0 | |
138 #define guiSetPlay 1 | |
139 #define guiSetPause 2 | |
140 | |
141 #define guiDVD 1 | |
142 #define guiVCD 2 | |
143 #define guiFilenames 4 | |
144 #define guiALL 0xffffffff | |
145 | |
146 extern int use_gui; | |
147 | |
148 extern void guiInit( void ); | |
149 extern void guiDone( void ); | |
150 extern int guiGetEvent( int type,char * arg ); | |
151 extern void guiEventHandling( void ); | |
152 extern void guiLoadFont( void ); | |
153 extern void guiLoadSubtitle( char * name ); | |
154 extern void guiMessageBox(int level, char * str); | |
155 | |
156 typedef struct _plItem | |
157 { | |
158 struct _plItem * prev,* next; | |
159 int played; | |
160 char * path; | |
161 char * name; | |
162 } plItem; | |
163 | |
164 typedef struct _urlItem | |
165 { | |
166 struct _urlItem *next; | |
167 char * url; | |
168 } URLItem; | |
169 | |
170 extern plItem * plList; | |
171 extern plItem * plCurrent; | |
172 extern plItem * plLastPlayed; | |
173 | |
174 extern URLItem * URLList; | |
175 | |
176 #define fsPersistant_MaxPath 512 | |
177 #define fsPersistant_MaxPos 5 | |
178 extern char * fsHistory[fsPersistant_MaxPos]; | |
179 | |
180 #define gtkSetContrast 0 | |
181 #define gtkSetBrightness 1 | |
182 #define gtkSetHue 2 | |
183 #define gtkSetSaturation 3 | |
184 #define gtkSetEqualizer 4 | |
185 #define gtkAddPlItem 5 | |
186 #define gtkGetNextPlItem 6 | |
187 #define gtkGetPrevPlItem 7 | |
188 #define gtkGetCurrPlItem 8 | |
189 #define gtkDelPl 9 | |
190 #define gtkSetExtraStereo 10 | |
191 #define gtkSetPanscan 11 | |
192 #define gtkSetFontFactor 12 | |
193 #define gtkSetAutoq 13 | |
194 #define gtkClearStruct 14 | |
195 #define gtkAddURLItem 15 | |
196 #define gtkSetFontOutLine 16 | |
197 #define gtkSetFontBlur 17 | |
198 #define gtkSetFontTextScale 18 | |
199 #define gtkSetFontOSDScale 19 | |
200 #define gtkSetFontEncoding 20 | |
201 #define gtkSetFontAutoScale 21 | |
202 #define gtkSetSubEncoding 22 | |
203 #define gtkDelCurrPlItem 23 | |
204 #define gtkInsertPlItem 24 | |
205 #define gtkSetCurrPlItem 25 | |
206 | |
207 extern float gtkEquChannels[6][10]; | |
208 | |
209 extern void * gtkSet( int cmd,float param, void * vparam ); | |
210 | |
211 extern char * gstrdup( const char * str ); | |
212 extern int gstrcmp( const char * a,const char * b ); | |
213 extern void gfree( void ** p ); | |
214 extern void gaddlist( char *** list,const char * entry ); | |
215 extern char * gstrchr( char * str,int c ); | |
216 | |
217 #define guiSetFilename( s,n ) { gfree( (void **)&s ); s=gstrdup( n ); } | |
218 | |
219 #define guiSetDF( s,d,n ) \ | |
220 { \ | |
221 gfree( (void **)&s ); \ | |
222 s=malloc( strlen( d ) + strlen( n ) + 5 ); \ | |
223 sprintf( s,"%s/%s",d,n ); \ | |
224 } | |
225 | |
226 #endif |