annotate gui/interface.h @ 24556:965062bfe084

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