Mercurial > mplayer.hg
comparison DOCS/skin.html @ 6271:b85d324d4503
Grammar, spellchecking and HTML fixups as usual, as well as an explanatory
diagram. Review by Nilmoni Deb.
author | diego |
---|---|
date | Sun, 02 Jun 2002 19:03:03 +0000 |
parents | b190d3e9427c |
children | 9b218a01b74b |
comparison
equal
deleted
inserted
replaced
6270:8dfe9b162624 | 6271:b85d324d4503 |
---|---|
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | |
1 <html> | 2 <html> |
2 <head> | 3 <head> |
3 <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1"> | 4 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
4 <title>MPlayer skin format</title> | 5 <title>MPlayer skin format</title> |
5 <style type="text/css"> | 6 <style type="text/css"> |
6 em.note {color: green} | 7 body {font-family : Verdana, Arial, Helvetica, sans-serif; |
7 em.warn {color: red} | 8 font-size : 14px; |
9 background : white;} | |
10 em.note {color: green; | |
11 font-style: normal;} | |
12 em.warn {color: red; | |
13 font-style: normal;} | |
8 </style> | 14 </style> |
9 </head> | 15 </head> |
10 | 16 |
11 <body bgcolor=white text=black> | 17 <body> |
12 | 18 |
13 <h1 align="center">MPlayer skin format</h1> | 19 <h1 align="center">MPlayer skin format</h1> |
14 | 20 |
15 <hr> | 21 <hr> |
16 | 22 |
17 <h2>Contents</h2> | 23 <h2>Contents</h2> |
18 | 24 |
19 <ul type=disc> | 25 <ul type=disc> |
20 <li><a href="#intro">1 Introduction</a></li> | 26 <li><a href="#intro">1 Introduction</a></li> |
21 <li><a href="#overview">2 Overview</a></li> | 27 <li><a href="#overview">2 Overview</a> |
22 <ul type=circle> | 28 <ul type=circle> |
23 <li><a href="#dirs">2.1 Directories</a></li> | 29 <li><a href="#dirs">2.1 Directories</a></li> |
24 <li><a href="#images">2.2 Images</a></li> | 30 <li><a href="#images">2.2 Images</a></li> |
25 <li><a href="#parts">2.3 Parts of a skin</a></li> | 31 <li><a href="#components">2.3 Skin components</a></li> |
26 <li><a href="#files">2.4 Files</a></li> | 32 <li><a href="#files">2.4 Files</a></li> |
27 </ul> | 33 </ul> |
28 <li><a href="#skin">3 The <code>skin</code> file</a></li> | 34 </li> |
35 <li><a href="#skin">3 The <code>skin</code> file</a> | |
29 <ul type=circle> | 36 <ul type=circle> |
30 <li><a href="#mainwin">3.1 Main window</a></li> | 37 <li><a href="#mainwin">3.1 Main window</a></li> |
31 <li><a href="#subwindow">3.2 Subwindow</a></li> | 38 <li><a href="#subwindow">3.2 Subwindow</a></li> |
32 <li><a href="#skinmenu">3.3 Skin menu</a></li> | 39 <li><a href="#skinmenu">3.3 Skin menu</a></li> |
33 </ul> | 40 </ul> |
34 <li><a href="#fonts">4 Fonts</a></li> | 41 </li> |
42 <li><a href="#fonts">4 Fonts</a> | |
35 <ul type=circle> | 43 <ul type=circle> |
36 <li><a href="#symbols">4.1 Symbols</a></li> | 44 <li><a href="#symbols">4.1 Symbols</a></li> |
37 </ul> | 45 </ul> |
46 </li> | |
38 <li><a href="#guimsg">Appendix A: GUI messages</a></li> | 47 <li><a href="#guimsg">Appendix A: GUI messages</a></li> |
39 </ul> | 48 </ul> |
40 | 49 |
41 <hr> | 50 <hr> |
42 | 51 |
43 <div align=center> | 52 <div align=center> |
44 Last modified: Sep 10, 2001 | 53 Last modified: 2002/05/24 |
45 </div> | 54 </div> |
46 | 55 |
47 <hr> | 56 <hr> |
48 | 57 |
49 <h2><a name="intro">1 Introduction</a></h2> | 58 <h2><a name="intro">1 Introduction</a></h2> |
50 | 59 |
51 The purpose of this document is to describe the MPlayer skin format. | 60 The purpose of this document is to describe the <b>MPlayer</b> skin format. |
52 The information contained here might be wrong, for <em>a)</em> it is not me | 61 The information contained here might be wrong, for |
53 who wrote the GUI, <em>b)</em> the GUI is not finished, <em>c)</em> I might | 62 |
54 be wrong. So do not be surprised if something does not work as described here. | 63 <ol type="a"> |
64 <li>It is not me who wrote the GUI</li> | |
65 <li>The GUI is not finished</li> | |
66 <li>I might be wrong.</li> | |
67 </ol> | |
68 | |
69 So do not be surprised if something does not work as described here. | |
55 | 70 |
56 <p> | 71 <p> |
57 Thanks to <em>Zoltán Ponekker</em> for his help. | 72 Thanks to <em>Zoltán Ponekker</em> for his help. |
73 </p> | |
58 | 74 |
59 <p> | 75 <p> |
60 <em>András Mohari <mayday@freemail.hu></em> | 76 <em>András Mohari <mayday@freemail.hu></em> |
77 </p> | |
61 | 78 |
62 | 79 |
63 <h2><a name="overview">2 Overview</a></h2> | 80 <h2><a name="overview">2 Overview</a></h2> |
64 | 81 |
65 It does not really have anything to do with the skin format, but you should | 82 It does not really have anything to do with the skin format, but you should |
66 know that <em>MPlayer has <b>no</b> builtin skin, so <b>at least one skin | 83 know that <b>MPlayer</b> has <b>no</b> builtin skin, so <b>at least one skin |
67 must be installed in order to be able to use the GUI.</b></em> | 84 must be installed in order to be able to use the GUI.</b> |
68 | 85 |
69 | 86 |
70 <h3><a name="dirs">2.1 Directories</a></h3> | 87 <h3><a name="dirs">2.1 Directories</a></h3> |
71 | 88 |
72 The directories searched for skins are (in order): | 89 The directories searched for skins are (in order): |
73 <pre> | 90 <pre> |
74 /usr/local/share/mplayer/Skin/ | 91 $(DATADIR)/Skin/ |
92 $(PREFIX)/share/mplayer/Skin/ | |
75 ~/.mplayer/Skin/ | 93 ~/.mplayer/Skin/ |
76 </pre> | 94 </pre> |
77 | 95 |
78 <p> | 96 <p> |
79 Note that the first path may vary according to the way MPlayer was configured | 97 Note that the first path may vary according to the way <b>MPlayer</b> was |
80 (see the <code>--datadir</code> argument of the <code>configure</code> | 98 configured (see the <code>--prefix</code> and <code>--datadir</code> arguments |
81 script). | 99 of the <code>configure</code> script). |
82 | 100 </p> |
83 <p> | 101 |
84 Every skin is installed into its own directory under one of the directories | 102 Every skin is installed into its own directory under one of the directories |
85 listed above, for example: | 103 listed above, for example: |
86 <pre> | 104 <pre> |
87 /usr/local/share/mplayer/Skin/default/ | 105 $(PREFIX)/share/mplayer/Skin/default/ |
88 </pre> | 106 </pre> |
89 | 107 |
90 | 108 |
91 <h3><a name="images">2.2 Image formats</a></h3> | 109 <h3><a name="images">2.2 Image formats</a></h3> |
92 | 110 |
93 Images must be truecolor (24 or 32 bpp) and can be in | 111 Images must be truecolor (24 or 32 bpp) and can be in BMP, PNG or uncompressed |
94 BMP, PNG and TGA format (note that TGA images must be uncompressed). | 112 TGA format. The preferred format is PNG as it compresses very well. |
95 <em>The preferred format is PNG as it compresses very well.</em> | |
96 | 113 |
97 <p> | 114 <p> |
98 In the main window (see below) you can use images with `transparency': | 115 In the main window (see below) you can use images with `transparency': |
99 regions filled with the color #FF00FF (<font color="#FF00FF">magenta</font>) | 116 Regions filled with the color #FF00FF (<font color="#FF00FF">magenta</font>) |
100 are fully transparent when viewed by MPlayer. This means that you can even | 117 are fully transparent when viewed by <b>MPlayer</b>. This means that you can even |
101 have shaped windows if your X server has the XShape extension. | 118 have shaped windows if your X server has the XShape extension. |
102 | 119 </p> |
103 | 120 |
104 <h3><a name="parts">2.3 Parts of a skin</a></h3> | 121 |
122 <h3><a name="components">2.3 Skin components</a></h3> | |
105 | 123 |
106 Skins are quite free-format (unlike the fixed-format skins of | 124 Skins are quite free-format (unlike the fixed-format skins of |
107 Winamp/XMMS, for example), so it is up to you to create something great. | 125 Winamp/XMMS, for example), so it is up to you to create something great. |
108 | 126 |
109 <p> | 127 <p> |
110 Currently there are three windows to be decorated: the | 128 Currently there are three windows to be decorated: the |
111 <a href="#mainwin">main window</a>, the <a href="#subwindow">subwindow</a> and | 129 <a href="#mainwin">main window</a>, the <a href="#subwindow">subwindow</a> and |
112 the <a href="#skinmenu">skin menu</a> (which can be activated by a right | 130 the <a href="#skinmenu">skin menu</a> (which can be activated by a right |
113 click). | 131 click). |
132 </p> | |
114 | 133 |
115 <ul> | 134 <ul> |
116 <li> | 135 <li> |
117 The <b>main window</b> is where you can control MPlayer. The background of | 136 The <b>main window</b> is where you can control <b>MPlayer</b>. The background of |
118 the window is an image. Various items can (and must) be | 137 the window is an image. Various items can (and must) be |
119 placed in the window: <em>buttons</em>, <em>potmeters</em> (sliders, if | 138 placed in the window: <em>buttons</em>, <em>potmeters</em> (sliders) and |
120 you like it better) and <em>labels</em>. For every item, you must | 139 <em>labels</em>. For every item, you must |
121 specify its position and size. | 140 specify its position and size. |
122 | 141 |
123 <p> | 142 <p> |
124 A <b>button</b> has three states (pressed, released, | 143 A <b>button</b> has three states (pressed, released, |
125 disabled), so its image must be divided into three parts vertically. | 144 disabled), thus its image must be divided into three parts vertically. |
126 See the <a href="#main.button">button</a> item for details. | 145 See the <a href="#main.button">button</a> item for details. |
146 </p> | |
147 | |
127 <p> | 148 <p> |
128 A <b>potmeter</b> (mainly used for the seek bar and volume/balance | 149 A <b>potmeter</b> (mainly used for the seek bar and volume/balance |
129 control) can have any number of phases by dividing its image into different | 150 control) can have any number of phases by dividing its image into different |
130 parts below each other. | 151 parts below each other. |
131 See <a href="#main.hpotmeter">hpotmeter</a> and | 152 See <a href="#main.hpotmeter">hpotmeter</a> and |
132 <a href="#main.potmeter">potmeter</a> for details. | 153 <a href="#main.potmeter">potmeter</a> for details. |
133 | 154 </p> |
134 <p> | 155 |
135 <b>Labels</b> are a bit special: the characters needed to draw them are taken | 156 <p> |
157 <b>Labels</b> are a bit special: The characters needed to draw them are taken | |
136 from an image file, and the characters in the image are described | 158 from an image file, and the characters in the image are described |
137 by a <a href="#fonts">font description file</a>. | 159 by a <a href="#fonts">font description file</a>. |
138 The latter is a plain text file which specifies | 160 The latter is a plain text file which specifies |
139 the x,y position and size of each character in the image. (So the | 161 the x,y position and size of each character in the image (the |
140 image file and its font description file form a font <em>together</em>.) | 162 image file and its font description file form a font <em>together</em>). |
141 See <a href="#main.dlabel">dlabel</a> and <a href="#main.slabel">slabel</a> | 163 See <a href="#main.dlabel">dlabel</a> and <a href="#main.slabel">slabel</a> |
142 for details. | 164 for details. |
165 </p> | |
143 | 166 |
144 <p> | 167 <p> |
145 <em class=note> | 168 <em class=note> |
146 <b>Note:</b> all images can have full transparency as described in the | 169 <b>Note:</b> all images can have full transparency as described in the |
147 section about <a href="#images">image formats</a>. | 170 section about <a href="#images">image formats</a>. |
148 </em> | 171 </em> |
172 </p> | |
149 </li> | 173 </li> |
150 | 174 |
151 <li> | 175 <li> |
152 The <b>subwindow</b> is where the movie appears. It can display a specified | 176 The <b>subwindow</b> is where the movie appears. It can display a specified |
153 image if there is no movie loaded (it is quite boring to have an empty | 177 image if there is no movie loaded (it is quite boring to have an empty |
155 <em class=note><b>Note:</b> transparency | 179 <em class=note><b>Note:</b> transparency |
156 is <b>not allowed</b> here.</em> | 180 is <b>not allowed</b> here.</em> |
157 </li> | 181 </li> |
158 | 182 |
159 <li> | 183 <li> |
160 The <b>skin menu</b> is just a way to control MPlayer by means of | 184 The <b>skin menu</b> is just a way to control <b>MPlayer</b> by means of |
161 menu entries. Two images are required for the menu: one of them is the base | 185 menu entries. Two images are required for the menu: one of them is the base |
162 image that shows the menu in its normal state, the other one is used to | 186 image that shows the menu in its normal state, the other one is used to |
163 display the selected entries. When you pop up the menu, the first image is | 187 display the selected entries. When you pop up the menu, the first image is |
164 shown. If you move the mouse over the menu entries, the currently selected | 188 shown. If you move the mouse over the menu entries, the currently selected |
165 entry is copied from the second image over the menu entry below the mouse | 189 entry is copied from the second image over the menu entry below the mouse |
166 pointer. (So the second image is never shown in whole.) | 190 pointer (the second image is never shown as a whole). |
167 <p> | 191 <p> |
168 A menu entry is defined by its position and size in the image (see the | 192 A menu entry is defined by its position and size in the image (see the |
169 section about the <a href="#skinmenu">skin menu</a> for details). | 193 section about the <a href="#skinmenu">skin menu</a> for details). |
194 </p> | |
170 </li> | 195 </li> |
171 </ul> | 196 </ul> |
172 | 197 |
173 <p> | 198 <p> |
174 There is an important thing not mentioned yet: for buttons, potmeters and | 199 There is an important thing not mentioned yet: For buttons, potmeters and |
175 menu entries to work, MPlayer must know what to do if they are clicked. | 200 menu entries to work, <b>MPlayer</b> must know what to do if they are clicked. |
176 This is done by <a href="#guimsg">messages</a> (events). For these items | 201 This is done by <a href="#guimsg">messages</a> (events). For these items |
177 you must define the messages to be genereated when they are clicked. | 202 you must define the messages to be generated when they are clicked. |
203 </p> | |
178 | 204 |
179 <h3><a name="files">2.4 Files</a></h3> | 205 <h3><a name="files">2.4 Files</a></h3> |
180 | 206 |
181 You need the following files to build a skin. | 207 You need the following files to build a skin: |
182 <ul> | 208 <ul> |
183 <li> | 209 <li> |
184 The configuration file named <a href="#skin">skin</a> tells MPlayer how | 210 The configuration file named <a href="#skin">skin</a> tells <b>MPlayer</b> how |
185 to put different parts of the skin together and what to do if you click | 211 to put different parts of the skin together and what to do if you click |
186 somewhere in the window. | 212 somewhere in the window. |
187 </li> | 213 </li> |
188 <li>The background image for the main window.</li> | 214 <li>The background image for the main window.</li> |
189 <li>Images for the items in the main window (including one or more font | 215 <li>Images for the items in the main window (including one or more font |
190 description files needed to draw labels).</li> | 216 description files needed to draw labels).</li> |
191 <li>The image to be displayed in the subwindow (optional).</li> | 217 <li>The image to be displayed in the subwindow (optional).</li> |
192 <li>Two images for the skin menu (they are needed only if you want to create | 218 <li>Two images for the skin menu (they are needed only if you want to create |
193 a menu). | 219 a menu).</li> |
194 </ul> | 220 </ul> |
195 | 221 |
196 With the exception of the skin configuration file, you can name the other | 222 With the exception of the skin configuration file, you can name the other |
197 files whatever you want (but note that font description files must have | 223 files whatever you want (but note that font description files must have |
198 .fnt extension). | 224 a <code>.fnt</code> extension). |
199 | 225 |
200 | 226 |
201 <h2><a name="skin">3 The <code><b>skin</b></code> file</a></h2> | 227 <h2><a name="skin">3 The <code>skin</code> file</a></h2> |
202 | 228 |
203 <p> | 229 <p> |
204 As mentioned above, this is the skin configuration file. | 230 As mentioned above, this is the skin configuration file. |
205 It is line oriented; comment lines start with a '<code>;</code>' character | 231 It is line oriented; comment lines start with a '<code>;</code>' character |
206 at the beginning of the line (only spaces and tabs are allowed before the | 232 at the beginning of the line (only spaces and tabs are allowed before the |
207 '<code>;</code>'). | 233 '<code>;</code>'). |
234 </p> | |
208 | 235 |
209 <p> | 236 <p> |
210 The file is made up of sections. Each section describes the skin for an | 237 The file is made up of sections. Each section describes the skin for an |
211 application and has the following form: | 238 application and has the following form: |
239 </p> | |
240 | |
212 <table border=1 width="100%"><tr bgcolor=silver><td><pre> | 241 <table border=1 width="100%"><tr bgcolor=silver><td><pre> |
213 section = <i>section name</i> | 242 section = <i>section name</i> |
214 . | 243 . |
215 . | 244 . |
216 . | 245 . |
218 </pre></td></tr></table> | 247 </pre></td></tr></table> |
219 | 248 |
220 <p> | 249 <p> |
221 Currently there is only one application, so you need only one section: | 250 Currently there is only one application, so you need only one section: |
222 its name is <b>movieplayer</b>. | 251 its name is <b>movieplayer</b>. |
223 | 252 </p> |
224 <p> | 253 |
225 Within this section each window is described by a block in the following form: | 254 <p> |
255 Within this section each window is described by a block of the following form: | |
256 </p> | |
257 | |
226 <table border=1 width="100%"><tr bgcolor=silver><td><pre> | 258 <table border=1 width="100%"><tr bgcolor=silver><td><pre> |
227 window = <i>window name</i> | 259 window = <i>window name</i> |
228 . | 260 . |
229 . | 261 . |
230 . | 262 . |
231 end | 263 end |
232 </pre></tr></td></table> | 264 </pre></td></tr></table> |
265 | |
266 <p> | |
233 where <i>window name</i> can be one of these strings: | 267 where <i>window name</i> can be one of these strings: |
268 </p> | |
269 | |
234 <ul> | 270 <ul> |
235 <li><b>main</b> - for the main window</li> | 271 <li><b>main</b> - for the main window</li> |
236 <li><b>sub</b> - for the subwindow</li> | 272 <li><b>sub</b> - for the subwindow</li> |
237 <li><b>menu</b> - for the skin menu</li> | 273 <li><b>menu</b> - for the skin menu</li> |
238 </ul> | 274 </ul> |
239 | 275 |
240 <p> | 276 <p> |
241 (The sub and menu block is optional---you do not need to create a menu or | 277 (The sub and menu blocks are optional - you do not need to create a menu or |
242 to decorate the subwindow.) | 278 decorate the subwindow.) |
279 </p> | |
243 | 280 |
244 <p> | 281 <p> |
245 Within a window block, you can define each item for the window | 282 Within a window block, you can define each item for the window |
246 by a line in this form: | 283 by a line in this form: |
247 | 284 </p> |
248 <blockquote> | 285 |
249 <pre> | 286 <dl> |
250 item = parameter | 287 <dt> |
251 </pre> | 288 <b><code>item = parameter</code></b> |
252 </blockquote> | 289 </dt> |
253 | 290 <dd> |
254 <p> | 291 Where <code>item</code> is a string that identifies the type of the GUI item, |
255 where <i>item</i> is a string that identifies the type of the GUI item, | 292 <code>parameter</code> is a numeric or textual value (or a list of values |
256 <i>parameter</i> is a numeric or textual value (or a list of values | |
257 separated by commas). | 293 separated by commas). |
258 </p> | 294 </dd> |
295 </dl> | |
259 | 296 |
260 <p> | 297 <p> |
261 Putting the above together, the whole file looks something like this: | 298 Putting the above together, the whole file looks something like this: |
262 | 299 </p> |
263 <p> | 300 |
264 <table border=1 width="100%"><tr bgcolor=silver><td><pre> | 301 <table border=1 width="100%"><tr bgcolor=silver><td><pre> |
265 section = movieplayer | 302 section = movieplayer |
266 window = main | 303 window = main |
267 ; ... items for main window ... | 304 ; ... items for main window ... |
268 end | 305 end |
273 | 310 |
274 window = menu | 311 window = menu |
275 ; ... items for skin menu ... | 312 ; ... items for skin menu ... |
276 end | 313 end |
277 end | 314 end |
278 </pre></tr></td></table> | 315 </pre></td></tr></table> |
279 | 316 |
280 <p> | 317 <p> |
281 Finally some words about specifying images for the various items. | 318 The name of an image file must be given without leading directories - images are |
282 <br> | 319 searched for in the <code>Skin</code> directory. You may (but you need not) |
283 The name of an image file must be given without leading directories--- | 320 specify the extension of the file. If the file does not exist, <b>MPlayer</b> |
284 images are searched in the directory of the skins. You may (but you need not) | 321 tries to load the file <code><filename>.<ext></code>, where |
285 specify the file's extension. If the file doesn't exist, MPlayer tries to | 322 <code>tga</code>, <code>TGA</code>, <code>bmp</code>, <code>BMP</code>, |
286 load the file <i><filename>.<ext></i>, where <i>tga</i>, | 323 <code>png</code> and <code>PNG</code> is tried for <code><ext></code> |
287 <i>TGA</i>, <i>bmp</i>, <i>BMP</i>, <i>png</i> and <i>PNG</i> is tried | 324 (in this order). The first matching file will be used. |
288 for <i><ext></i> (in this order). The first matching file will be used. | 325 </p> |
289 | 326 |
290 <p> | 327 <p> |
328 Finally some words about positioning. The main window and the subwindow can be | |
329 placed in the different corners of the screen by giving <code>X</code> and | |
330 <code>Y</code> coordinates. <code>0</code> is top or left, <code>-1</code> is | |
331 center and <code>-2</code> is right or bottom, as shown in this illustration: | |
332 </p> | |
333 | |
334 <pre> | |
335 | |
336 (0, 0)----(-1, 0)----(-2, 0) | |
337 | | | | |
338 | | | | |
339 (0,-1)----(-1,-1)----(-2,-1) | |
340 | | | | |
341 | | | | |
342 (0,-2)----(-1,-2)----(-2,-2) | |
343 | |
344 </pre> | |
291 | 345 |
292 <table border=1 cellpadding=5 width="100%"><tr bgcolor="#ffffcc"><td> | 346 <table border=1 cellpadding=5 width="100%"><tr bgcolor="#ffffcc"><td> |
293 Here is an example to make this clear. Suppose that you have an image called | 347 Here is an example to make this clear. Suppose that you have an image called |
294 <i>main.png</i> that you use for the main window: | 348 <code>main.png</code> that you use for the main window: |
295 <blockquote> | 349 <blockquote> |
296 <pre> | 350 <pre> |
297 base = main, -1, -1 | 351 base = main, -1, -1 |
298 </pre> | 352 </pre> |
299 </blockquote> | 353 </blockquote> |
300 | 354 |
301 MPlayer tries to load <i>main</i>, <i>main.tga</i>, <i>main.TGA</i>, | 355 <b>MPlayer</b> tries to load <code>main</code>, <code>main.tga</code>, |
302 <i>main.bmp</i> etc, so <i>main.png</i> will be found. | 356 <code>main.TGA</code>, <code>main.bmp</code> etc, so that <code>main.png</code> |
357 will be found. | |
303 <br> | 358 <br> |
304 If (by accident) you wrote | 359 If (by accident) you wrote |
305 <blockquote> | 360 <blockquote> |
306 <pre> | 361 <pre> |
307 base = main.bmp, -1, -1 | 362 base = main.bmp, -1, -1 |
308 </pre> | 363 </pre> |
309 </blockquote> | 364 </blockquote> |
310 then <i>main.bmp</i>, <i>main.bmp.tga</i>, <i>main.bmp.TGA</i>, | 365 then <code>main.bmp</code>, <code>main.bmp.tga</code>, <code>main.bmp.TGA</code>, |
311 <i>main.bmp.bmp</i> would be searched and MPlayer would finally give up | 366 <code>main.bmp.bmp</code> would be searched for and <b>MPlayer</b> would finally |
312 because there is no <i>main.bmp</i> in the directory, but <i>main.png</i>. | 367 give up because there is no <code>main.bmp</code> in the directory, only |
368 <code>main.png</code>. | |
313 </td></tr></table> | 369 </td></tr></table> |
314 | 370 |
315 | 371 |
316 <h3><a name="mainwin">3.1 Main window</a></h3> | 372 <h3><a name="mainwin">3.1 Main window</a></h3> |
317 | 373 |
318 Below you can see the list of items that can be used in the | 374 Below is the list of entries that can be used in the |
319 '<code>window = main</code>' . . . '<code>end</code>' block. | 375 '<code>window = main</code>' . . . '<code>end</code>' block. |
320 | 376 |
321 <dl> | 377 <dl> |
322 <dt><a name="main.base"> | 378 <dt><a name="main.base"> |
323 <b>base = <i>image, x, y</i></b> | 379 <b><code>base = image, X, Y</code></b> |
324 </a></dt> | 380 </a></dt> |
325 <dd> | 381 <dd> |
326 Lets you specify the background image to be used for the main window. | 382 Lets you specify the background image to be used for the main window. |
327 The window will appear at the given <i>x</i>,<i>y</i> position | 383 The window will appear at the given <code>X,Y</code> position on the screen |
328 on the screen (0,0 is the top left corner). You can specify -1 for center | 384 The window will have the size of the image. |
329 and -2 for right (x) and bottom (y). The window will be as large as the image. | 385 <div> |
330 <p> | |
331 <em class=warn> | 386 <em class=warn> |
332 <b>Warning:</b> transparent regions in the image (colored #FF00FF) appear | 387 <b>Warning:</b> Transparent regions in the image (colored #FF00FF) appear |
333 black on X servers without the XShape extension. | 388 black on X servers without the XShape extension. |
334 </em> | 389 </em> |
335 </dd> | 390 </div> |
336 </dl> | 391 </dd> |
337 | 392 |
338 <dl> | |
339 <dt><a name="main.button"> | 393 <dt><a name="main.button"> |
340 <b>button = <i>image, x, y, width, height, message</i></b></a></dt> | 394 <b><code>button = image, X, Y, width, height, message</code></b></a></dt> |
341 <dd> | 395 <dd> |
342 Place a button of <i>width</i> * <i>height</i> size at the | 396 Place a button of <code>width</code> * <code>height</code> size at position |
343 <i>x</i>,<i>y</i> position. The specified message is generated when | 397 <code>X</code>,<code>Y</code>. The specified <code>message</code> is generated |
344 the button is clicked. | 398 when the button is clicked. The image given by <code>image</code> must have |
345 The image given by <i>image</i> must have three parts below each other | 399 three parts below each other (according to the possible states of the button), |
346 (according to the possible states of the button), like this: | 400 like this: |
347 <div align=center><table><tr><td><pre><small> | 401 <pre> |
348 +------------+ | 402 +------------+ |
349 | pressed | | 403 | pressed | |
350 +------------+ | 404 +------------+ |
351 | released | | 405 | released | |
352 +------------+ | 406 +------------+ |
353 | disabled | | 407 | disabled | |
354 +------------+ | 408 +------------+ |
355 </small></pre></td></tr></table></div> | 409 </pre> |
356 </dd> | 410 </dd> |
357 </dl> | 411 |
358 | |
359 <dl> | |
360 <dt><a name="main.decoration"> | 412 <dt><a name="main.decoration"> |
361 <b>decoration = enable|disable</b> | 413 <b><code>decoration = enable|disable</code></b> |
362 </a></dt> | 414 </a></dt> |
363 <dd> | 415 <dd> |
364 Enable or disable window manager decoration of the main window. Default | 416 Enable or disable window manager decoration of the main window. Default |
365 is <b>disable</b>. | 417 is <b>disable</b>. |
366 </dd> | 418 </dd> |
367 </dl> | 419 |
368 | |
369 <dl> | |
370 <dt> | 420 <dt> |
371 <a name="main.hpotmeter"> | 421 <a name="main.hpotmeter"> |
372 <b> | 422 <b> |
373 hpotmeter = <i>butt, bw,bh, phases, numphases, default, x, y, w, h, msg</i> | 423 <code>hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message</code> |
374 </b> | 424 </b> |
375 </a> | 425 </a> |
376 </dt> | 426 </dt> |
377 <dd> | 427 <dd> |
378 Place a horizontal potmeter of <i>w</i> * <i>h</i> size at the | 428 Place a horizontal potmeter of <code>width</code> * <code>height</code> size |
379 <i>x</i>,<i>y</i> position. The image can be divided into | 429 at position <code>X</code>,<code>Y</code>. The image can be divided into |
380 different parts for the different phases of the potmeter (for example, | 430 different parts for the different phases of the potmeter (for example, |
381 you can have a pot for volume control that turns from green to red | 431 you can have a pot for volume control that turns from green to red |
382 while its value changes from the minimum to the maximum.) | 432 while its value changes from the minimum to the maximum.). |
383 hpotmeter can have a button that can be dragged horizontally. | 433 <code>hpotmeter</code> can have a button that can be dragged horizontally. |
384 The parameters are: | 434 |
435 <div>The parameters are:</div> | |
436 | |
385 <ul> | 437 <ul> |
386 <li><i>butt</i> - the image to be used for the button | 438 <li><code>button</code> - the image to be used for the button |
387 (must have three parts below each other, like in case of | 439 (must have three parts below each other, like in case of |
388 <a href="#main.button">button</a>)</li> | 440 <a href="#main.button">button</a>)</li> |
389 <li><i>bw</i>, <i>bh</i> - size of the button</li> | 441 <li><code>bwidth</code>, <code>bheight</code> - size of the button</li> |
390 <li><i>phases</i> - The image to be used for the different phases of the | 442 <li><code>phases</code> - The image to be used for the different phases of the |
391 hpotmeter. The image must be divided into <i>numphases</i> parts vertically | 443 hpotmeter. A special value of <code>NULL</code> can be used if you want |
392 (see below). A special value of <kbd>NULL</kbd> can be used if you want | 444 no such image. The image must be divided into <code>numphases</code> parts |
393 no such image. | 445 vertically like this: |
394 </li> | 446 <pre> |
395 <li><i>numphases</i> - number of phases stored in the <i>phases</i> | |
396 image</li> | |
397 <li><i>default</i> - default value for hpotmeter (in the range 0 to | |
398 100)</li> | |
399 <li><i>x</i>, <i>y</i> - position for the hpotmeter</li> | |
400 <li><i>w</i>, <i>h</i> - width and height of the hpotmeter</li> | |
401 <li><i>msg</i> - the message to be generated when the value of hpotmeter | |
402 is changed</li> | |
403 </ul> | |
404 The image used for the different phases must look something like this: | |
405 <div align=center><table border=0><tr><td><pre><small> | |
406 +------------+ | 447 +------------+ |
407 | phase #1 | | 448 | phase #1 | |
408 +------------+ | 449 +------------+ |
409 | phase #2 | | 450 | phase #2 | |
410 +------------+ | 451 +------------+ |
411 ... | 452 ... |
412 +------------+ | 453 +------------+ |
413 | phase #n | | 454 | phase #n | |
414 +------------+ | 455 +------------+ |
415 </small></pre></td></tr></table></div> | 456 </pre> |
457 </li> | |
458 <li><code>numphases</code> - number of phases stored in the <code>phases</code> | |
459 image</li> | |
460 <li><code>default</code> - default value for hpotmeter (in the range 0 to | |
461 100)</li> | |
462 <li><code>X</code>, <code>Y</code> - position for the hpotmeter</li> | |
463 <li><code>width</code>, <code>height</code> - width and height of the | |
464 <code>hpotmeter</code></li> | |
465 <li><code>message</code> - the message to be generated when the value of | |
466 <code>hpotmeter</code> is changed</li> | |
467 </ul> | |
468 | |
416 <em class=note> | 469 <em class=note> |
417 <b>Note:</b> there will be a vpotmeter item too, but is it not implemented | 470 <b>Note:</b> There will be a <code>vpotmeter</code> item, too, but it is not |
418 yet. | 471 implemented yet. |
419 </em> | 472 </em> |
420 </dd> | 473 </dd> |
421 </dl> | 474 |
422 | |
423 <dl> | |
424 <dt><a name="main.potmeter"> | 475 <dt><a name="main.potmeter"> |
425 <b>potmeter = <i>phases, numphases, default, x, y, w, h, msg</i></b> | 476 <b><code>potmeter = phases, numphases, default, X, Y, width, height, message</code></b> |
426 </a></dt> | 477 </a></dt> |
427 <dd> | 478 <dd> |
428 A potmeter without a button. (I guess it is ment to be turned round, | 479 A <code>hpotmeter</code> without a button. (I guess it is meant to be turned |
429 but it reacts to horizontal dragging only.) | 480 around, but it reacts to horizontal dragging only.) |
430 For the description of the parameters see | 481 For the description of the parameters see |
431 <a href="#main.hpotmeter">hpotmeter</a>. <i>phases</i> can be | 482 <a href="#main.hpotmeter">hpotmeter</a>. <code>phases</code> can be |
432 <code>NULL</code>, but its quite useless, since you can not see where | 483 <code>NULL</code>, but it is quite useless, since you cannot see where |
433 the potmeter is set. | 484 the <code>potmeter</code> is set. |
434 </dd> | 485 </dd> |
435 </dl> | 486 |
436 | |
437 <dl> | |
438 <dt><a name="main.font"> | 487 <dt><a name="main.font"> |
439 <b>font = <i>fontfile, fontid</i></b> | 488 <b><code>font = fontfile, fontid</code></b> |
440 </a></dt> | 489 </a></dt> |
441 <dd> | 490 <dd> |
442 Defines a font. <i>fontfile</i> is the name of a font description file | 491 Defines a font. <code>fontfile</code> is the name of a font description file |
443 with <code>.fnt</code> extension (<b>no need</b> to specify the extension | 492 with a <code>.fnt</code> extension (<b>do not</b> specify the extension here). |
444 here). | 493 <code>fontid</code> is used to refer to the font |
445 <i>fontid</i> is used to refer to the font | |
446 (see <a href="#main.dlabel">dlabel</a> and <a href="#main.slabel">slabel</a>). | 494 (see <a href="#main.dlabel">dlabel</a> and <a href="#main.slabel">slabel</a>). |
447 Up to 25 fonts can be defined. | 495 Up to 25 fonts can be defined. |
448 </dd> | 496 </dd> |
449 </dl> | 497 |
450 | 498 <dt><a name="main.slabel"> |
451 <dl> | 499 <b><code>slabel = X, Y, fontid, "text"</code></b> |
500 </a></dt> | |
501 <dd> | |
502 Place a static label at the position <code>X</code>,<code>Y</code>. | |
503 <code>text</code> is displayed using the font identified by <code>fontid</code>. | |
504 The text is just a raw string (<code>$x</code> variables do not work) that must | |
505 be enclosed between double quotes (but the <code>"</code> character cannot be | |
506 part of the text). The label is displayed using the font identified by | |
507 <code>fontid</code>. | |
508 </dd> | |
509 | |
452 <dt><a name="main.dlabel"> | 510 <dt><a name="main.dlabel"> |
453 <b>dlabel = <i>x, y, length, align, fontid, "text"</i></b> | 511 <b><code>dlabel = X, Y, length, align, fontid, "text"</code></b> |
454 </a></dt> | 512 </a></dt> |
455 <dd> | 513 <dd> |
456 Place a dynamic label at the <i>x</i>,<i>y</i> position. The label is called | 514 Place a dynamic label at the position <code>X</code>,<code>Y</code>. The label is |
457 dynamic because its text is refreshed periodically. | 515 called dynamic because its text is refreshed periodically. The maximum length of |
458 The maximum length of the label is given by <i>length</i> (its height is the | 516 the label is given by <code>length</code> (its height is the height of a |
459 height of a character). | 517 character). If the text to be displayed is wider than that, it will be scrolled, |
460 If the text to be displayed is wider than that, then it will be | 518 otherwise it is aligned within the specified space by the value of the |
461 scrolled, otherwise it is aligned within the specified space by the value | 519 <code>align</code> parameter: <code>0</code> is for right, <code>1</code> is for |
462 of the <i>align</i> parameter: 0 is for right, 1 is for center, | 520 center, <code>2</code> is for left. |
463 2 is for left. | |
464 <br> | 521 <br> |
465 The text to be displayed is given by <i>text</i>: it must be written between | 522 The text to be displayed is given by <code>text</code>: It must be written |
466 double quotes (<code>"</code>) (but the <code>"</code> cannot be part of the | 523 between double quotes (but the <code>"</code> character cannot be part of the |
467 text). The label is displayed using the font identified by <i>fontid</i>. | 524 text). The label is displayed using the font identified by <code>fontid</code>. |
468 You can use the following variables in the text. | 525 You can use the following variables in the text: |
469 | 526 |
470 <div align=center> | 527 <table align="center" border="1"> |
471 <table valign=top border=1> | |
472 <tr align=center><th>Variable</th><th align=left>Meaning</th></tr> | 528 <tr align=center><th>Variable</th><th align=left>Meaning</th></tr> |
473 <tr><td align=center><kbd>$1</kbd></td> | 529 <tr><td align=center><kbd>$1</kbd></td> |
474 <td>play time in <em>hh:mm:ss</em> format</td></tr> | 530 <td>play time in <em>hh:mm:ss</em> format</td></tr> |
475 <tr><td align=center><kbd>$2</kbd></td> | 531 <tr><td align=center><kbd>$2</kbd></td> |
476 <td>play time in <em>mmmm:ss</em> format</td></tr> | 532 <td>play time in <em>mmmm:ss</em> format</td></tr> |
479 <tr><td align=center><kbd>$4</kbd></td> | 535 <tr><td align=center><kbd>$4</kbd></td> |
480 <td>play time in <em>mm</em> format (minutes)</td></tr> | 536 <td>play time in <em>mm</em> format (minutes)</td></tr> |
481 <tr><td align=center><kbd>$5</kbd></td> | 537 <tr><td align=center><kbd>$5</kbd></td> |
482 <td>play time in <em>ss</em> format (seconds)</td></tr> | 538 <td>play time in <em>ss</em> format (seconds)</td></tr> |
483 <tr><td align=center><kbd>$6</kbd></td> | 539 <tr><td align=center><kbd>$6</kbd></td> |
484 <td>movie's length in <em>hh:mm:ss</em> format</td></tr> | 540 <td>movie length in <em>hh:mm:ss</em> format</td></tr> |
485 <tr><td align=center><kbd>$7</kbd></td> | 541 <tr><td align=center><kbd>$7</kbd></td> |
486 <td>movie's length in <em>mmmm:ss</em> format</td></tr> | 542 <td>movie length in <em>mmmm:ss</em> format</td></tr> |
487 <tr><td align=center><kbd>$8</kbd></td> | 543 <tr><td align=center><kbd>$8</kbd></td> |
488 <td>play time in <em>h:mm:ss</em> format</td></tr> | 544 <td>play time in <em>h:mm:ss</em> format</td></tr> |
489 <tr><td align=center><kbd>$v</kbd></td> | 545 <tr><td align=center><kbd>$v</kbd></td> |
490 <td>volume in <em>xxx.xx%</em> format</td></tr> | 546 <td>volume in <em>xxx.xx%</em> format</td></tr> |
491 <tr><td align=center><kbd>$V</kbd></td> | 547 <tr><td align=center><kbd>$V</kbd></td> |
507 <td>filename in lower case</td></tr> | 563 <td>filename in lower case</td></tr> |
508 <tr><td align=center><kbd>$F</kbd></td> | 564 <tr><td align=center><kbd>$F</kbd></td> |
509 <td>filename in upper case</td></tr> | 565 <td>filename in upper case</td></tr> |
510 <tr><td align=center><kbd>$T</kbd></td> | 566 <tr><td align=center><kbd>$T</kbd></td> |
511 <td>a character according to the stream type (file: <code>f</code>, | 567 <td>a character according to the stream type (file: <code>f</code>, |
512 video CD: <code>v</code>, DVD: <code>d</code>, URL: <code>u</code>) | 568 Video CD: <code>v</code>, DVD: <code>d</code>, URL: <code>u</code>) |
513 </td></tr> | 569 </td></tr> |
514 <tr><td align=center><kbd>$p</kbd></td> | 570 <tr><td align=center><kbd>$p</kbd></td> |
515 <td>the "p" character (if a movie is playing and the font has the "p" | 571 <td>the "p" character (if a movie is playing and the font has the "p" |
516 character) | 572 character) |
517 </td></tr> | 573 </td></tr> |
521 </td></tr> | 577 </td></tr> |
522 <tr><td align=center><kbd>$e</kbd></td> | 578 <tr><td align=center><kbd>$e</kbd></td> |
523 <td>the "e" character (if playback is paused and the font has the "e" | 579 <td>the "e" character (if playback is paused and the font has the "e" |
524 character) | 580 character) |
525 </td></tr> | 581 </td></tr> |
526 </table></div> | 582 </table> |
527 <p> | 583 |
584 <em class="note"> | |
528 <b>Note:</b> The <kbd>$a</kbd>, <kbd>$T</kbd>, <kbd>$p</kbd>, <kbd>$s</kbd> | 585 <b>Note:</b> The <kbd>$a</kbd>, <kbd>$T</kbd>, <kbd>$p</kbd>, <kbd>$s</kbd> |
529 and <kbd>$e</kbd> variables all return characters that should be displayed | 586 and <kbd>$e</kbd> variables all return characters that should be displayed |
530 as special symbols (for example, "e" is for the pause symbol that usually | 587 as special symbols (for example, "e" is for the pause symbol that usually |
531 looks something like <code>||</code>). You should have a font for normal | 588 looks something like <code>||</code>). You should have a font for normal |
532 characters and a different font for symbols. | 589 characters and a different font for symbols. |
533 See the section about <a href="#symbols">symbols</a> for more information. | 590 See the section about <a href="#symbols">symbols</a> for more information. |
591 </em> | |
534 </dd> | 592 </dd> |
535 </dl> | 593 </dl> |
536 | 594 |
537 <dl> | |
538 <dt><a name="main.slabel"> | |
539 <b>slabel = <i>x, y, fontid, text</i></b> | |
540 </a></dt> | |
541 <dd> | |
542 Place a static label at the <i>x</i>,<i>y</i> position. | |
543 <i>text</i> is displayed using the font identified by <i>fontid</i>. | |
544 The text is just a raw string ($x variables do not work) that must be enclosed | |
545 between double quotes (the <code>"</code> cannot be part of the text). | |
546 The label is displayed using the font identified by <i>fontid</i>. | |
547 </dd> | |
548 </dl> | |
549 | |
550 | 595 |
551 <h3><a name="subwindow">3.2 Subwindow</a></h3> | 596 <h3><a name="subwindow">3.2 Subwindow</a></h3> |
552 | 597 |
553 The following items can be used in the | 598 The following entries can be used in the |
554 '<code>window = sub</code>' . . . '<code>end</code>' block. | 599 '<code>window = sub</code>' . . . '<code>end</code>' block. |
555 | 600 |
556 <dl> | 601 <dl> |
557 <dt><a name="sub.base"> | 602 <dt><a name="sub.base"> |
558 <b>base = <i>image, x, y, width, height</i></b> | 603 <b><code>base = image, X, Y, width, height</code></b> |
559 </a></dt> | 604 </a></dt> |
560 <dd> | 605 <dd> |
561 The image to be displayed in the window. | 606 The image to be displayed in the window. |
562 The window will appear at the given <i>x</i>,<i>y</i> position | 607 The window will appear at the given <code>X</code>,<code>Y</code> position |
563 on the screen (0,0 is the top left corner). You can specify -1 for center | 608 on the screen (<code>0,0</code> is the top left corner). You can specify |
564 and -2 for right (x) and bottom (y). The window will be as large as the image. | 609 <code>-1</code> for center and <code>-2</code> for right (<code>X</code>) and |
565 <i>width</i> and <i>height</i> gives the size of the window; they are | 610 bottom (<code>Y</code>). The window will be as large as the image. |
566 optional (if they are missing, the window is the same size as the image). | 611 <code>width</code> and <code>height</code> denote the size of the window; they |
567 </dd> | 612 are optional (if they are missing, the window is the same size as the image). |
568 </dl> | 613 </dd> |
569 | 614 |
570 <dl> | |
571 <dt><a name="sub.background"> | 615 <dt><a name="sub.background"> |
572 <b>background = <i>r, g, b</i></b> | 616 <b><code>background = R, G, B</code></b> |
573 </a></dt> | 617 </a></dt> |
574 <dd> | 618 <dd> |
575 Lets you set the background color. It is useful if the image is smaller than | 619 Lets you set the background color. It is useful if the image is smaller than |
576 the window. | 620 the window. |
577 <i>r</i>, <i>g</i> and <i>b</i> specifies the red, green and blue | 621 <code>R</code>, <code>G</code> and <code>B</code> specifies the red, green and blue |
578 component of the color (each of them is a decimal number from 0 to 255). | 622 component of the color (each of them is a decimal number from 0 to 255). |
579 </dd> | 623 </dd> |
580 </dl> | 624 </dl> |
581 | 625 |
582 | 626 |
583 <h3><a name="skinmenu">3.3 Skin menu</a></h3> | 627 <h3><a name="skinmenu">3.3 Skin menu</a></h3> |
584 | 628 |
585 As mentioned earlier, the menu is displayed using two images. | 629 As mentioned earlier, the menu is displayed using two images. |
586 Normal menu entries are taken from the image specified by the <i>base</i> | 630 Normal menu entries are taken from the image specified by the <code>base</code> |
587 item, while the currently selected entry is taken from the image specified | 631 item, while the currently selected entry is taken from the image specified |
588 by the <i>selected</i> item. | 632 by the <code>selected</code> item. You must define the position and size of each |
589 You must define the position and size of each menu entry by the <i>menu</i> | 633 menu entry through the <code>menu</code> item. |
590 item. | 634 |
591 | 635 <p> |
592 <p> | 636 These are the entries that can be used in the '<code>window = menu</code>' |
593 These are the items that can be used in the '<code>window = menu</code>' | |
594 . . . '<code>end</code>' block. | 637 . . . '<code>end</code>' block. |
638 </p> | |
595 | 639 |
596 <dl> | 640 <dl> |
597 <dt><a name="menu.base"> | 641 <dt><a name="menu.base"> |
598 <b>base = <i>image</i></b> | 642 <b><code>base = image</code></b> |
599 </a></dt> | 643 </a></dt> |
600 <dd> | 644 <dd> |
601 The image for normal menu entries. | 645 The image for normal menu entries. |
602 </dl> | 646 </dd> |
603 </dd> | 647 |
604 | |
605 <dl> | |
606 <dt><a name="menu.selected"> | 648 <dt><a name="menu.selected"> |
607 <b>selected = <i>image</i></b> | 649 <b><code>selected = image</code></b> |
608 </a></dt> | 650 </a></dt> |
609 <dd> | 651 <dd> |
610 The image showing the menu with all entries selected. | 652 The image showing the menu with all entries selected. |
611 </dd> | 653 </dd> |
612 </dl> | 654 |
613 | |
614 <dl> | |
615 <dt><a name="menu.menu"> | 655 <dt><a name="menu.menu"> |
616 <b>menu = <i>x, y, width, height, message</i></b> | 656 <b><code>menu = X, Y, width, height, message</code></b> |
617 </a></dt> | 657 </a></dt> |
618 <dd> | 658 <dd> |
619 Defines the <i>x</i>,<i>y</i> position and the size of a menu entry in | 659 Defines the <code>X,Y</code> position and the size of a menu entry in |
620 the images. <i>message</i> is the message to be generated when | 660 the image. <code>message</code> is the message to be generated when |
621 the mouse button is released over the entry. | 661 the mouse button is released over the entry. |
622 </dd> | 662 </dd> |
623 </dl> | 663 </dl> |
624 | 664 |
625 | 665 |
629 by an image and a description | 669 by an image and a description |
630 file. You can place the characters anywhere in the image, but make sure that | 670 file. You can place the characters anywhere in the image, but make sure that |
631 their position and size is given in the description file exactly. | 671 their position and size is given in the description file exactly. |
632 | 672 |
633 <p> | 673 <p> |
634 The font description file (with .fnt extension) can have comment | 674 The font description file (with <code>.fnt</code> extension) can have comment |
635 lines starting with '<code>;</code>'. | 675 lines starting with '<code>;</code>'. The file must have a line in the form |
636 The file must have a line in the form | 676 </p> |
637 <blockquote> | 677 |
638 <pre> | 678 <dl> |
639 image = <i>image</i> | 679 <dt><a name="font.image"> |
640 </pre> | 680 <b><code>image = image</code></b> |
641 </blockquote> | 681 </a></dt> |
642 | 682 <dd> |
643 <p> | 683 Where <code>image</code> is the name of the image file to be used for |
644 where <i>image</i> is the name of the image file to be used for | |
645 the font (you do not have to specify the extension). | 684 the font (you do not have to specify the extension). |
646 The above line is followed by character definition lines of the form: | 685 </dd> |
647 | 686 |
648 <blockquote> | 687 <dt><a name="font.char"> |
649 <pre> | 688 <b><code>"char" = X, Y, width, height</code></b> |
650 "<i>char</i>" = <i>x, y, w, h</i> | 689 </a></dt> |
651 </pre> | 690 <dd> |
652 </blockquote> | 691 Here <code>X</code> and <code>Y</code> specify the position of the |
653 | 692 <code>char</code> character in the image (<code>0,0</code> is the upper left |
654 <p> | 693 corner). <code>width</code> and <code>height</code> are the dimensions of the |
655 Here <i>x</i> and <i>y</i> specifies the position of the | 694 character in pixels. |
656 <i>char</i> character in the image (0,0 is the upper left corner). | 695 </dd> |
657 <i>w</i> and <i>h</i> is the width and height of the character | 696 </dl> |
658 (in pixels, of course). | 697 |
659 | 698 This example defines the A, B, C characters using <code>font.png</code>. |
660 <p> | |
661 Here is an example that defines the A, B, C characters using font.png. | |
662 <table width="100%" border=1><tr bgcolor=silver><td><pre> | 699 <table width="100%" border=1><tr bgcolor=silver><td><pre> |
663 ; can be "font" instead of "font.png" | 700 ; Can be "font" instead of "font.png". |
664 image = font.png | 701 image = font.png |
665 | 702 |
666 ; Three characters are enough for demonstration only. :-) | 703 ; Three characters are enough for demonstration purposes :-) |
667 "A" = 0,0, 7,13 | 704 "A" = 0,0, 7,13 |
668 "B" = 7,0, 7,13 | 705 "B" = 7,0, 7,13 |
669 "C" = 14,0, 7,13 | 706 "C" = 14,0, 7,13 |
670 </pre></td></tr></table> | 707 </pre></td></tr></table> |
671 | 708 |
672 | 709 |
673 <h3><a name="symbols">4.1 Symbols</a></h3> | 710 <h3><a name="symbols">4.1 Symbols</a></h3> |
674 | 711 |
675 Some characters have special meanings when returned by some of the variables | 712 Some characters have special meanings when returned by some of the variables |
676 used in | 713 used in <a href="#main.dlabel">dlabel</a>. These characters are meant to be |
677 <a href="#main.dlabel">dlabel</a>; these characters are meant to be | 714 shown as symbols so that things like a nice DVD logo can be displayed instead |
678 displayed as symbols. (For example, in case of a DVD stream, you could display | 715 of the character 'd' for a DVD stream. |
679 a nice DVD logo instead of the character 'd'.) | |
680 | 716 |
681 <p> | 717 <p> |
682 The following table lists all the characters that can be used to display | 718 The following table lists all the characters that can be used to display |
683 symbols (and thus require a different font). | 719 symbols (and thus require a different font). |
684 | 720 </p> |
685 <div align=center> | 721 |
686 <table> | 722 <table align="center" border="1"> |
687 <tr><th align=center>Character</th><th align=left>Symbol</th></tr> | 723 <tr><th align=center>Character</th><th align=left>Symbol</th></tr> |
688 <tr><td align=center><kbd>p</kbd></td> | 724 <tr><td align=center><kbd>p</kbd></td> |
689 <td align=left>play</td></tr> | 725 <td align=left>play</td></tr> |
690 <tr><td align=center><kbd>s</kbd></td> | 726 <tr><td align=center><kbd>s</kbd></td> |
691 <td align=left>stop</td></tr> | 727 <td align=left>stop</td></tr> |
698 <tr><td align=center><kbd>t</kbd></td> | 734 <tr><td align=center><kbd>t</kbd></td> |
699 <td align=left>stereo sound</td></tr> | 735 <td align=left>stereo sound</td></tr> |
700 <tr><td align=center><kbd>f</kbd></td> | 736 <tr><td align=center><kbd>f</kbd></td> |
701 <td align=left>stream is a file</td></tr> | 737 <td align=left>stream is a file</td></tr> |
702 <tr><td align=center><kbd>v</kbd></td> | 738 <tr><td align=center><kbd>v</kbd></td> |
703 <td align=left>stream is a video CD</td></tr> | 739 <td align=left>stream is a Video CD</td></tr> |
704 <tr><td align=center><kbd>d</kbd></td> | 740 <tr><td align=center><kbd>d</kbd></td> |
705 <td align=left>stream is a DVD</td></tr> | 741 <td align=left>stream is a DVD</td></tr> |
706 <tr><td align=center><kbd>u</kbd></td> | 742 <tr><td align=center><kbd>u</kbd></td> |
707 <td align=left>stream is a URL</td></tr> | 743 <td align=left>stream is a URL</td></tr> |
708 </table> | 744 </table> |
709 </div> | 745 |
710 | 746 <p> |
711 <p> | 747 <em class="note"> |
712 <b>Note:</b> currently only 'p', 's', 'e', 'n', 'm' and 't' is used. | 748 <b>Note:</b> Currently only 'p', 's', 'e', 'n', 'm' and 't' are used. |
749 </em> | |
713 </p> | 750 </p> |
714 | 751 |
715 <h2><a name="guimsg">Appendix A: GUI messages</a></h2> | 752 <h2><a name="guimsg">Appendix A: GUI messages</a></h2> |
716 | 753 |
717 These are the messages that can be generated by buttons, potmeters and | 754 These are the messages that can be generated by buttons, potmeters and |
718 menu entries. | 755 menu entries. |
719 | 756 |
720 <p> | 757 <p> |
721 <em class=note> | 758 <em class=note> |
722 <b>Note:</b> some of the messages might not work as expected (or not | 759 <b>Note:</b> Some of the messages might not work as expected (or not work at |
723 work at all). As you know, the GUI is under development.</em> | 760 all). As you know, the GUI is under development.</em> |
724 | 761 </p> |
725 <p> | 762 |
726 <i>Playback control:</i> | 763 |
764 <h3>Playback control:</h3> | |
727 <blockquote> | 765 <blockquote> |
728 <dl> | 766 <dl> |
729 <dt><b>evNext</b> | 767 <dt><b>evNext</b> |
730 <dd>Jump to next track in the playlist. | 768 <dd>Jump to next track in the playlist. |
731 | 769 |
732 <dt><b>evPause</b> | 770 <dt><b>evPause</b> |
733 <dd>Pause playing. | 771 <dd>Pause playing. |
734 | 772 |
735 <dt><b>evPauseSwitchToPlay</b> | 773 <dt><b>evPauseSwitchToPlay</b> |
736 <dd>Forms a switch together with <i>evPlaySwitchToPause</i>. They can be | 774 <dd>Forms a switch together with <code>evPlaySwitchToPause</code>. They can be |
737 used to have a common play/pause button. Both messages should be assigned | 775 used to have a common play/pause button. Both messages should be assigned |
738 to buttons displayed at the very same position in the window. This | 776 to buttons displayed at the very same position in the window. This |
739 message pauses playing and the image for the <i>evPlaySwitchToPause</i> button | 777 message pauses playing and the image for the <code>evPlaySwitchToPause</code> button |
740 is displayed (to indicate that the button can be pressed to continue playing). | 778 is displayed (to indicate that the button can be pressed to continue playing). |
741 | 779 |
742 <dt><b>evPlay</b> | 780 <dt><b>evPlay</b> |
743 <dd>Start playing. | 781 <dd>Start playing. |
744 | 782 |
745 <dt><b>evPlaySwitchToPause</b> | 783 <dt><b>evPlaySwitchToPause</b> |
746 <dd>The opposite of <i>evPauseSwitchToPlay</i>. This message starts playing | 784 <dd>The opposite of <code>evPauseSwitchToPlay</code>. This message starts playing |
747 and the image for the <i>evPauseSwitchToPlay</i> button is displayed (to | 785 and the image for the <code>evPauseSwitchToPlay</code> button is displayed (to |
748 indicate that the button can be pressed to pause playing). | 786 indicate that the button can be pressed to pause playing). |
749 | 787 |
750 <dt><b>evPrev</b> | 788 <dt><b>evPrev</b> |
751 <dd>Jump to previous track in the playlist. | 789 <dd>Jump to previous track in the playlist. |
752 | 790 |
753 <dt><b>evStop</b> | 791 <dt><b>evStop</b> |
754 <dd>Stop playing. | 792 <dd>Stop playing. |
755 </dl> | 793 </dl> |
756 </blockquote> | 794 </blockquote> |
757 | 795 |
758 <p> | 796 |
759 <i>Seeking in the stream:</i> | 797 <h3>Seeking:</h3> |
760 <blockquote> | 798 <blockquote> |
761 <dl> | 799 <dl> |
762 <dt><b>evBackward10sec</b> | 800 <dt><b>evBackward10sec</b> |
763 <dt><b>evBackward1min</b> | 801 <dt><b>evBackward1min</b> |
764 <dt><b>evBackward10min</b> | 802 <dt><b>evBackward10min</b> |
773 <dd>Seek to position (can be used by a potmeter; the relative | 811 <dd>Seek to position (can be used by a potmeter; the relative |
774 value (0-100%) of the potmeter is used). | 812 value (0-100%) of the potmeter is used). |
775 </dl> | 813 </dl> |
776 </blockquote> | 814 </blockquote> |
777 | 815 |
778 <p> | 816 |
779 <i>Video control:</i> | 817 <h3>Video control:</h3> |
780 <blockquote> | 818 <blockquote> |
781 <dl> | 819 <dl> |
782 <dt><b>evDoubleSize</b> | 820 <dt><b>evDoubleSize</b> |
783 <dd>Set the movie window to double size. | 821 <dd>Set the movie window to double size. |
784 | 822 |
788 <dt><b>evNormalSize</b> | 826 <dt><b>evNormalSize</b> |
789 <dd>Set the movie window to its normal size. | 827 <dd>Set the movie window to its normal size. |
790 </dl> | 828 </dl> |
791 </blockquote> | 829 </blockquote> |
792 | 830 |
793 <p> | 831 |
794 <i>Audio control:</i> | 832 <h3>Audio control:</h3> |
795 <blockquote> | 833 <blockquote> |
796 <dl> | 834 <dl> |
797 <dt><b>evDecAudioBufDelay</b> | 835 <dt><b>evDecAudioBufDelay</b> |
798 <dd>Decrease audio buffer delay. | 836 <dd>Decrease audio buffer delay. |
799 | 837 |
823 <dd>Set volume (can be used by a potmeter; the relative | 861 <dd>Set volume (can be used by a potmeter; the relative |
824 value (0-100%) of the potmeter is used). | 862 value (0-100%) of the potmeter is used). |
825 </dl> | 863 </dl> |
826 </blockquote> | 864 </blockquote> |
827 | 865 |
828 <p> | 866 |
829 <i>Miscellaneous:</i> | 867 <h3>Miscellaneous:</h3> |
830 <blockquote> | 868 <blockquote> |
831 <dl> | 869 <dl> |
832 <dt><b>evAbout</b> | 870 <dt><b>evAbout</b> |
833 <dd>Open the about window. | 871 <dd>Open the about window. |
834 | 872 |
835 <dt><b>evEqualeaser</b> | 873 <dt><b>evEqualeaser</b> |
836 <dd>Turn the equalizer on/off. | 874 <dd>Turn the equalizer on/off. |
837 | 875 |
838 <dt><b>evExit</b> | 876 <dt><b>evExit</b> |
839 <dd>Quit from the program. | 877 <dd>Quit the program. |
840 | 878 |
841 <dt><b>evIconify</b> | 879 <dt><b>evIconify</b> |
842 <dd>Iconify the window. | 880 <dd>Iconify the window. |
843 | 881 |
844 <dt><b>evLoad</b> | 882 <dt><b>evLoad</b> |
845 <dd>Load a file (by opening a file browser window, where you can choose a | 883 <dd>Load a file (by opening a file browser window, where you can choose a |
846 file). | 884 file). |
847 | 885 |
848 <dt><b>evLoadPlay</b> | 886 <dt><b>evLoadPlay</b> |
849 <dd>Does the same as <i>evLoad</i>, but it automatically starts | 887 <dd>Does the same as <code>evLoad</code>, but it automatically starts |
850 playing after the file is loaded. | 888 playing after the file is loaded. |
851 | 889 |
852 <dt><b>evNone</b> | 890 <dt><b>evNone</b> |
853 <dd>Empty message, it has no effect. (Except maybe in CVS versions. :-)) | 891 <dd>Empty message, it has no effect (except maybe in CVS versions :-)). |
854 | 892 |
855 <dt><b>evPlayList</b> | 893 <dt><b>evPlayList</b> |
856 <dd>Open/close the playlist window. | 894 <dd>Open/close the playlist window. |
857 | 895 |
858 <dt><b>evPreferences</b> | 896 <dt><b>evPreferences</b> |