Mercurial > mplayer.hg
comparison DOCS/xml/en/skin.xml @ 9675:62c5a17038ba
XML version of MPlayer's doc
author | nicolas |
---|---|
date | Sun, 23 Mar 2003 23:35:12 +0000 |
parents | |
children | a570a78537aa |
comparison
equal
deleted
inserted
replaced
9674:461f71ba8af4 | 9675:62c5a17038ba |
---|---|
1 <?xml version="1.0" encoding="iso-8859-1"?> | |
2 <appendix id="skin"> | |
3 <title>MPlayer skin format</title> | |
4 <para> | |
5 The purpose of this document is to describe the MPlayer skin format. | |
6 The information contained here might be wrong, for | |
7 <orderedlist> | |
8 <listitem><para>It is not me who wrote the GUI.</para></listitem> | |
9 <listitem><para>The GUI is not finished.</para></listitem> | |
10 <listitem><para>I might be wrong.</para></listitem> | |
11 </orderedlist> | |
12 So do not be surprised if something does not work as described here. | |
13 </para> | |
14 | |
15 <para>Thanks to <emphasis>Zoltán Ponekker</emphasis> for his help.</para> | |
16 | |
17 <para><emphasis>András Mohari <mayday@freemail.hu></emphasis></para> | |
18 | |
19 <sect1 id="skin-overview"> | |
20 <title>Overview</title> | |
21 <para> | |
22 It does not really have anything to do with the skin format, but you should | |
23 know that MPlayer has <emphasis role="bold">no</emphasis> builtin skin, so | |
24 <emphasis role="bold">at least one skin must be installed in order to be able | |
25 to use the GUI.</emphasis> | |
26 </para> | |
27 | |
28 <sect2 id="skin-overview-directories"> | |
29 <title>Directories</title> | |
30 <para> | |
31 The directories searched for skins are (in order): | |
32 <orderedlist> | |
33 <listitem><para> | |
34 <filename class="directory">$(DATADIR)/Skin/</filename> | |
35 </para></listitem> | |
36 <listitem><para> | |
37 <filename class="directory">$(PREFIX)/share/mplayer/Skin/</filename> | |
38 </para></listitem> | |
39 <listitem><para> | |
40 <filename class="directory">~/.mplayer/Skin/</filename> | |
41 </para></listitem> | |
42 </orderedlist> | |
43 </para> | |
44 | |
45 <para> | |
46 Note that the first path may vary according to the way MPlayer was configured | |
47 (see the <option>--prefix</option> and <option>--datadir</option> arguments of | |
48 the <command>configure</command> script). | |
49 </para> | |
50 | |
51 <para> | |
52 Every skin is installed into its own directory under one of the directories | |
53 listed above, for example: | |
54 <screen>$(PREFIX)/share/mplayer/Skin/default/</screen> | |
55 </para> | |
56 </sect2> | |
57 | |
58 <sect2 id="skin-overview-formats"> | |
59 <title>Image formats</title> | |
60 <para>Images must be truecolor (24 or 32 bpp) PNGs.</para> | |
61 <para> | |
62 In the main window and in the playbar (see below) you can use images with | |
63 `transparency': Regions filled with the color #FF00FF (magenta) are fully | |
64 transparent when viewed by MPlayer. This means that you can even have shaped | |
65 windows if your X server has the XShape extension. | |
66 </para> | |
67 </sect2> | |
68 | |
69 <sect2 id="skin-overview-components"> | |
70 <title>Skin components</title> | |
71 <para> | |
72 Skins are quite free-format (unlike the fixed-format skins of Winamp/XMMS, | |
73 for example), so it is up to you to create something great. | |
74 </para> | |
75 | |
76 <para> | |
77 Currently there are three windows to be decorated: the | |
78 <link linkend="skin-file-main">main window</link>, the | |
79 <link linkend="skin-file-subwindow">subwindow</link>, the | |
80 <link linkend="skin-file-main">playbar</link>, and the | |
81 <link linkend="skin-file-menu">skin menu</link> (which can be activated | |
82 by a right click). | |
83 | |
84 <itemizedlist> | |
85 <listitem><para> | |
86 The <emphasis role="bold">main window</emphasis> and/or the | |
87 <emphasis role="bold">playbar</emphasis> is where you can control MPlayer. | |
88 The background of the window is an image. Various items can (and must) be placed | |
89 in the window: <emphasis>buttons</emphasis>, <emphasis>potmeters</emphasis> | |
90 (sliders) and <emphasis>labels</emphasis>. For every item, you must specify its | |
91 position and size. | |
92 </para><para> | |
93 A <emphasis role="bold">button</emphasis> has three states (pressed, released, | |
94 disabled), thus its image must be divided into three parts vertically. See the | |
95 <link linkend="skin-button">button</link> item for details. | |
96 </para><para> | |
97 A <emphasis role="bold">potmeter</emphasis> (mainly used for the seek bar and | |
98 volume/balance control) can have any number of phases by dividing its image | |
99 into different parts below each other. See | |
100 <link linkend="skin-hpotmeter">hpotmeter</link> and | |
101 <link linkend="skin-potmeter">potmeter</link> for details. | |
102 </para><para> | |
103 <emphasis role="bold">Labels</emphasis> are a bit special: The characters | |
104 needed to draw them are taken from an image file, and the characters in the | |
105 image are described by a <link linkend="skin-fonts">font description file</link>. | |
106 The latter is a plain text file which specifies the x,y position and size of | |
107 each character in the image (the image file and its font description file | |
108 form a font <emphasis>together</emphasis>). See <link linkend="skin-dlabel">dlabel</link> | |
109 and <link linkend="skin-slabel">slabel</link> for details. | |
110 </para> | |
111 <note><para>All images can have full transparency as described in the section about | |
112 <link linkend="skin-overview-formats">image formats</link>. If the X server | |
113 doesn't support the XShape extension, the parts marked transparent will be | |
114 black. If you'd like to use this feature, the width of the main window's | |
115 background image must be dividable by 8. | |
116 </para></note> | |
117 </listitem> | |
118 | |
119 <listitem><para> | |
120 The <emphasis role="bold">subwindow</emphasis> is where the movie appears. It | |
121 can display a specified image if there is no movie loaded (it is quite boring | |
122 to have an empty window :-)) <emphasis role="bold">Note:</emphasis> transparency | |
123 is <emphasis role="bold">not allowed</emphasis> here. | |
124 </para></listitem> | |
125 | |
126 <listitem><para> | |
127 The <emphasis role="bold">skin menu</emphasis> is just a way to control MPlayer by | |
128 means of menu entries. Two images are required for the menu: one of them is | |
129 the base image that shows the menu in its normal state, the other one is used | |
130 to display the selected entries. When you pop up the menu, the first image is | |
131 shown. If you move the mouse over the menu entries, the currently selected | |
132 entry is copied from the second image over the menu entry below the mouse pointer | |
133 (the second image is never shown as a whole). | |
134 </para><para> | |
135 A menu entry is defined by its position and size in the image (see the | |
136 section about the <link linkend="skin-file-menu">skin menu</link> for details). | |
137 </para></listitem> | |
138 </itemizedlist> | |
139 </para> | |
140 | |
141 <para> | |
142 There is an important thing not mentioned yet: For buttons, potmeters and | |
143 menu entries to work, MPlayer must know what to do if they are clicked. This | |
144 is done by <link linkend="skin-gui">messages</link> (events). For these items | |
145 you must define the messages to be generated when they are clicked. | |
146 </para> | |
147 </sect2> | |
148 | |
149 <sect2 id="skin-files"> | |
150 <title>Files</title> | |
151 <para> | |
152 You need the following files to build a skin: | |
153 <itemizedlist> | |
154 <listitem><para> | |
155 The configuration file named <link linkend="skin-file">skin</link> tells | |
156 MPlayer how to put different parts of the skin together and what to do if | |
157 you click somewhere in the window. | |
158 </para></listitem> | |
159 <listitem><para> | |
160 The background image for the main window. | |
161 </para></listitem> | |
162 <listitem><para> | |
163 Images for the items in the main window (including one or more font | |
164 description files needed to draw labels). | |
165 </para></listitem> | |
166 <listitem><para> | |
167 The image to be displayed in the subwindow (optional). | |
168 </para></listitem> | |
169 <listitem><para> | |
170 Two images for the skin menu (they are needed only if you want to create | |
171 a menu). | |
172 </para></listitem> | |
173 </itemizedlist> | |
174 With the exception of the skin configuration file, you can name the other | |
175 files whatever you want (but note that font description files must have | |
176 a <filename>.fnt</filename> extension). | |
177 </para> | |
178 </sect2> | |
179 </sect1> | |
180 | |
181 <sect1 id="skin-file"> | |
182 <title>The skin file</title> | |
183 <para> | |
184 As mentioned above, this is the skin configuration file. It is line oriented; | |
185 comment lines start with a '<literal>;</literal>' character at the beginning | |
186 of the line (only spaces and tabs are allowed before the '<literal>;</literal>'). | |
187 </para> | |
188 | |
189 <para> | |
190 The file is made up of sections. Each section describes the skin for an | |
191 application and has the following form: | |
192 <programlisting> | |
193 section = <replaceable>section name</replaceable> | |
194 . | |
195 . | |
196 . | |
197 end | |
198 </programlisting> | |
199 </para> | |
200 | |
201 <para> | |
202 where <replaceable>window name</replaceable> can be one of these strings: | |
203 <itemizedlist> | |
204 <listitem><para><emphasis role="bold">main</emphasis> - for the main window</para></listitem> | |
205 <listitem><para><emphasis role="bold">sub</emphasis> - for the subwindow</para></listitem> | |
206 <listitem><para><emphasis role="bold">menu</emphasis> - for the skin menu</para></listitem> | |
207 <listitem><para><emphasis role="bold">playbar</emphasis> - playbar</para></listitem> | |
208 </itemizedlist> | |
209 </para> | |
210 | |
211 <para> | |
212 (The sub and menu blocks are optional - you do not need to create a menu or | |
213 decorate the subwindow.) | |
214 </para> | |
215 | |
216 <para> | |
217 Within a window block, you can define each item for the window by a line in | |
218 this form: | |
219 <programlisting>item = parameter</programlisting> | |
220 Where <literal>item</literal> is a string that identifies the type of the GUI | |
221 item, <literal>parameter</literal> is a numeric or textual value (or a list of | |
222 values separated by commas). | |
223 </para> | |
224 | |
225 <para> | |
226 Putting the above together, the whole file looks something like this: | |
227 <programlisting> | |
228 section = movieplayer | |
229 window = main | |
230 ; ... items for main window ... | |
231 end | |
232 | |
233 window = sub | |
234 ; ... items for subwindow ... | |
235 end | |
236 | |
237 window = menu | |
238 ; ... items for menu ... | |
239 end | |
240 | |
241 window = playbar | |
242 ; ... items for playbar ... | |
243 end | |
244 end | |
245 </programlisting> | |
246 </para> | |
247 | |
248 <para> | |
249 The name of an image file must be given without leading directories - images | |
250 are searched for in the <filename class="directory">Skin</filename> directory. | |
251 You may (but you need not) specify the extension of the file. If the file does | |
252 not exist, MPlayer tries to load the file | |
253 <filename><filename>.<ext></filename>, where <literal>png</literal> | |
254 and <literal>PNG</literal> are tried for <filename><ext></filename> | |
255 (in this order). The first matching file will be used. | |
256 </para> | |
257 | |
258 <para> | |
259 Finally some words about positioning. The main window and the subwindow can | |
260 be placed in the different corners of the screen by giving <literal>X</literal> and | |
261 <literal>Y</literal> coordinates. <literal>0</literal> is top or left, | |
262 <literal>-1</literal> is center and <literal>-2</literal> is right or bottom, as | |
263 shown in this illustration: | |
264 </para> | |
265 <informalfigure> | |
266 <screen> | |
267 (0, 0)----(-1, 0)----(-2, 0) | |
268 | | | | |
269 | | | | |
270 (0,-1)----(-1,-1)----(-2,-1) | |
271 | | | | |
272 | | | | |
273 (0,-2)----(-1,-2)----(-2,-2) | |
274 </screen> | |
275 </informalfigure> | |
276 | |
277 <para> | |
278 Here is an example to make this clear. Suppose that you have an image called | |
279 <filename>main.png</filename> that you use for the main window: | |
280 <programlisting>base = main, -1, -1</programlisting> | |
281 MPlayer tries to load <filename>main</filename>, <filename>main.png</filename>, | |
282 <filename>main.PNG</filename> files. | |
283 </para> | |
284 | |
285 | |
286 <sect2 id="skin-file-main"> | |
287 <title>Main window and playbar</title> | |
288 <para> | |
289 Below is the list of entries that can be used in the | |
290 '<literal>window = main</literal>' . . . '<literal>end</literal>', | |
291 and the '<literal>window = playbar</literal>' . . . '<literal>end</literal>' | |
292 blocks. | |
293 </para> | |
294 | |
295 <variablelist> | |
296 <varlistentry> | |
297 <term><literal> | |
298 <anchor id="skin-main-base"/>base = image, X, Y | |
299 </literal></term> | |
300 <listitem><para> | |
301 Lets you specify the background image to be used for the main window. | |
302 The window will appear at the given <literal>X,Y</literal> position on | |
303 the screen The window will have the size of the image. | |
304 </para> | |
305 <note><para>These coordinates do not currently work for the display window.</para></note> | |
306 <warning><para>Transparent regions in the image (colored #FF00FF) appear black | |
307 on X servers without the XShape extension. The image's width must be dividable | |
308 by 8.</para></warning> | |
309 </listitem> | |
310 </varlistentry> | |
311 | |
312 <varlistentry> | |
313 <term><literal> | |
314 <anchor id="skin-button"/>button = image, X, Y, width, height, message | |
315 </literal></term> | |
316 <listitem><para> | |
317 Place a button of <literal>width</literal> * <literal>height</literal> size at | |
318 position <literal>X,Y</literal>. The specified <literal>message</literal> is | |
319 generated when the button is clicked. The image given by <literal>image</literal> | |
320 must have three parts below each other (according to the possible states of the | |
321 button), like this: | |
322 </para> | |
323 <informalfigure> | |
324 <screen> | |
325 +------------+ | |
326 | pressed | | |
327 +------------+ | |
328 | released | | |
329 +------------+ | |
330 | disabled | | |
331 +------------+ | |
332 </screen> | |
333 </informalfigure> | |
334 </listitem> | |
335 </varlistentry> | |
336 | |
337 <varlistentry> | |
338 <term><literal> | |
339 <anchor id="skin-decoration"/>decoration = enable|disable | |
340 </literal></term> | |
341 <listitem><para> | |
342 Enable or disable window manager decoration of the main window. Default is | |
343 <emphasis role="bold">disable</emphasis>. | |
344 </para> | |
345 <note><para>This doesn't work for the display window, there is no need to.</para></note> | |
346 </listitem> | |
347 </varlistentry> | |
348 | |
349 <varlistentry> | |
350 <term><literal> | |
351 <anchor id="skin-hpotmeter"/>hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message | |
352 </literal></term> | |
353 <listitem><para> | |
354 | |
355 </para></listitem> | |
356 </varlistentry> | |
357 | |
358 <varlistentry> | |
359 <term><literal> | |
360 <anchor id="skin-vpotmeter"/>vpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message | |
361 </literal></term> | |
362 <listitem><para> | |
363 Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of | |
364 <literal>width</literal> * <literal>height</literal> size at position | |
365 <literal>X,Y</literal>. The image can be divided into different parts for the | |
366 different phases of the potmeter (for example, you can have a pot for volume | |
367 control that turns from green to red while its value changes from the minimum | |
368 to the maximum.). <literal>hpotmeter</literal> can have a button that can be | |
369 dragged horizontally. The parameters are: | |
370 </para> | |
371 <itemizedlist> | |
372 <listitem><para><literal>button</literal> - the image to be used for the | |
373 button (must have three parts below each other, like in case of | |
374 <link linkend="skin-button">button</link>) | |
375 </para></listitem> | |
376 <listitem><para><literal>bwidth</literal>,<literal>bheight</literal> - size | |
377 of the button | |
378 </para></listitem> | |
379 <listitem><para><literal>phases</literal> - the image to be used for the | |
380 different phases of the hpotmeter. A special value of <literal>NULL</literal> | |
381 can be used if you want no such image. The image must be divided into | |
382 <literal>numphasesparts</literal> vertically like this: | |
383 </para> | |
384 <informalfigure> | |
385 <screen> | |
386 +------------+ | |
387 | phase #1 | | |
388 +------------+ | |
389 | phase #2 | | |
390 +------------+ | |
391 ... | |
392 +------------+ | |
393 | phase #n | | |
394 +------------+ | |
395 </screen> | |
396 </informalfigure> | |
397 </listitem> | |
398 <listitem><para><literal>numphases</literal> - number of phases stored in the | |
399 <literal>phases</literal> image | |
400 </para></listitem> | |
401 <listitem><para><literal>default</literal> - default value for hpotmeter | |
402 (in the range <literal>0</literal> to <literal>100</literal>) | |
403 </para></listitem> | |
404 <listitem><para><literal>X</literal>,<literal>Y</literal> - position for the hpotmeter | |
405 </para></listitem> | |
406 <listitem><para><literal>width</literal>,<literal>height</literal> - width and height | |
407 of the <literal>hpotmeter</literal> | |
408 </para></listitem> | |
409 <listitem><para><literal>message</literal> - the message to be generated when the | |
410 value of <literal>hpotmeter</literal> is changed | |
411 </para></listitem> | |
412 </itemizedlist> | |
413 | |
414 </listitem> | |
415 </varlistentry> | |
416 | |
417 <varlistentry> | |
418 <term><literal> | |
419 <anchor id="skin-potmeter"/>potmeter = phases, numphases, default, X, Y, width, height, message | |
420 </literal></term> | |
421 <listitem><para> | |
422 A <literal>hpotmeter</literal> without a button. (I guess it is meant to be | |
423 turned around, but it reacts to horizontal dragging only.) For the description | |
424 of the parameters see <link linkend="skin-hpotmeter">hpotmeter</link>. | |
425 <literal>phases</literal> can be <literal>NULL</literal>, but it is quite useless, | |
426 since you cannot see where the <literal>potmeter</literal> is set. | |
427 </para></listitem> | |
428 </varlistentry> | |
429 | |
430 <varlistentry> | |
431 <term><literal> | |
432 <anchor id="skin-font"/>font = fontfile, fontid | |
433 </literal></term> | |
434 <listitem><para> | |
435 Defines a font. <literal>fontfile</literal> is the name of a font description file | |
436 with a <filename>.fnt</filename> extension (do not specify the extension here). | |
437 fontid is used to refer to the font (see <link linkend="skin-dlabel">dlabel</link> | |
438 and <link linkend="skin-slabel">slabel</link>). Up to 25 fonts can be defined. | |
439 </para></listitem> | |
440 </varlistentry> | |
441 | |
442 <varlistentry> | |
443 <term><literal> | |
444 <anchor id="skin-slabel"/>slabel = X, Y, fontid, "text" | |
445 </literal></term> | |
446 <listitem><para> | |
447 Place a static label at the position <literal>X,Y</literal>. <literal>text</literal> | |
448 is displayed using the font identified by <literal>fontid</literal>. The text is | |
449 just a raw string (<literal>$x</literal> variables do not work) that must be enclosed | |
450 between double quotes (but the " character cannot be part of the text). The | |
451 label is displayed using the font identified by <literal>fontid</literal>. | |
452 </para></listitem> | |
453 </varlistentry> | |
454 | |
455 <varlistentry> | |
456 <term><literal> | |
457 <anchor id="skin-dlabel"/>dlabel = X, Y, length, align, fontid, "text" | |
458 </literal></term> | |
459 <listitem> | |
460 <para> | |
461 Place a dynamic label at the position <literal>X,Y</literal>. The label is called | |
462 dynamic because its text is refreshed periodically. The maximum length of the | |
463 label is given by <literal>length</literal> (its height is the height of a | |
464 character). If the text to be displayed is wider than that, it will be scrolled, | |
465 otherwise it is aligned within the specified space by the value of the | |
466 <literal>align</literal> parameter: <literal>0</literal> is for right, | |
467 <literal>1</literal> is for center, <literal>2</literal> is for left. | |
468 </para> | |
469 <para> | |
470 The text to be displayed is given by <literal>text</literal>: It must be written | |
471 between double quotes (but the quot; character cannot be part of the text). The | |
472 label is displayed using the font identified by <literal>fontid</literal>. You | |
473 can use the following variables in the text: | |
474 </para> | |
475 | |
476 <informaltable> | |
477 <tgroup cols="2"> | |
478 <thead> | |
479 <row><entry>Variable</entry><entry>Meaning</entry></row> | |
480 </thead> | |
481 <tbody> | |
482 <row> | |
483 <entry>$1</entry> | |
484 <entry>play time in <emphasis>hh:mm:ss</emphasis> format</entry> | |
485 </row> | |
486 <row> | |
487 <entry>$2</entry> | |
488 <entry>play time in <emphasis>mmmm:ss</emphasis> format</entry> | |
489 </row> | |
490 <row> | |
491 <entry>$3</entry> | |
492 <entry>play time in <emphasis>hh</emphasis> format (hours)</entry> | |
493 </row> | |
494 <row> | |
495 <entry>$4</entry> | |
496 <entry>play time in <emphasis>mm</emphasis> format (minutes)</entry> | |
497 </row> | |
498 <row> | |
499 <entry>$5</entry> | |
500 <entry>play time in <emphasis>ss</emphasis> format (seconds)</entry> | |
501 </row> | |
502 <row> | |
503 <entry>$6</entry> | |
504 <entry>movie length in <emphasis>hh:mm:ss</emphasis> format</entry> | |
505 </row> | |
506 <row> | |
507 <entry>$7</entry> | |
508 <entry>movie length in <emphasis>mmmm:ss</emphasis> format</entry> | |
509 </row> | |
510 <row> | |
511 <entry>$8</entry> | |
512 <entry>play time in <emphasis>h:mm:ss</emphasis> format</entry> | |
513 </row> | |
514 <row> | |
515 <entry>$v</entry> | |
516 <entry>volume in <emphasis>xxx.xx</emphasis>% format</entry> | |
517 </row> | |
518 <row> | |
519 <entry>$V</entry> | |
520 <entry>volume in <emphasis>xxx.xx</emphasis> format</entry> | |
521 </row> | |
522 <row> | |
523 <entry>$b</entry> | |
524 <entry>balance in <emphasis>xxx.xx</emphasis>% format</entry> | |
525 </row> | |
526 <row> | |
527 <entry>$B</entry> | |
528 <entry>balance in <emphasis>xxx.xx</emphasis> format</entry> | |
529 </row> | |
530 <row> | |
531 <entry>$$</entry> | |
532 <entry>the $ character</entry> | |
533 </row> | |
534 <row> | |
535 <entry>$a</entry> | |
536 <entry>a character according to the audio type (none: <literal>n</literal>, | |
537 mono: <literal>m</literal>, stereo: <literal>t</literal>)</entry> | |
538 </row> | |
539 <row> | |
540 <entry>$t</entry> | |
541 <entry>track number (in playlist)</entry> | |
542 </row> | |
543 <row> | |
544 <entry>$o</entry> | |
545 <entry>filename</entry> | |
546 </row> | |
547 <row> | |
548 <entry>$f</entry> | |
549 <entry>filename in lower case</entry> | |
550 </row> | |
551 <row> | |
552 <entry>$F</entry> | |
553 <entry>filename in upper case</entry> | |
554 </row> | |
555 <row> | |
556 <entry>$T</entry> | |
557 <entry>a character according to the stream type (file: <literal>f</literal>, | |
558 Video CD: <literal>v</literal>, DVD: <literal>d</literal>, URL: <literal>u</literal>)</entry> | |
559 </row> | |
560 <row> | |
561 <entry>$p</entry> | |
562 <entry>the <keycap>p</keycap> character (if a movie is playing and the font has | |
563 the <keycap>p</keycap> character)</entry> | |
564 </row> | |
565 <row> | |
566 <entry>$s</entry> | |
567 <entry>the <keycap>s</keycap> character (if the movie is stopped and the font has | |
568 the <keycap>s</keycap> character)</entry> | |
569 </row> | |
570 <row> | |
571 <entry>$e</entry> | |
572 <entry>the <keycap>e</keycap> character (if playback is paused and the font has | |
573 the <keycap>e</keycap> character)</entry> | |
574 </row> | |
575 <row> | |
576 <entry>$x</entry> | |
577 <entry>movie width</entry> | |
578 </row> | |
579 <row> | |
580 <entry>$y</entry> | |
581 <entry>movie height</entry> | |
582 </row> | |
583 <row> | |
584 <entry>$C</entry> | |
585 <entry>name of the codec used</entry> | |
586 </row> | |
587 | |
588 </tbody> | |
589 </tgroup> | |
590 </informaltable> | |
591 </listitem> | |
592 | |
593 </varlistentry> | |
594 </variablelist> | |
595 | |
596 <note><para> | |
597 The <literal>$a, $T, $p, $s</literal> and <literal>$e</literal> | |
598 variables all return characters that should be displayed as special symbols (for | |
599 example, <keycap>e</keycap> is for the pause symbol that usually looks something | |
600 like ||). You should have a font for normal characters and a different font for | |
601 symbols. See the section about <link linkend="skin-fonts-symbols">symbols</link> | |
602 for more information. | |
603 </para></note> | |
604 </sect2> | |
605 | |
606 <sect2 id="skin-file-subwindow"> | |
607 <title>Subwindow</title> | |
608 <para> | |
609 The following entries can be used in the | |
610 '<literal>window = sub</literal>' . . . '<literal>end</literal>' block. | |
611 </para> | |
612 | |
613 <variablelist> | |
614 <varlistentry> | |
615 <term><literal> | |
616 <anchor id="skin-sub-base"/>base = image, X, Y, width, height | |
617 </literal></term> | |
618 <listitem><para> | |
619 The image to be displayed in the window. The window will appear at the given | |
620 <literal>X,Y</literal> position on the screen (<literal>0,0</literal> is the | |
621 top left corner). You can specify <literal>-1</literal> for center and <literal>-2</literal> | |
622 for right (<literal>X</literal>) and bottom (<literal>Y</literal>). The window | |
623 will be as large as the image. <literal>width</literal> and <literal>height</literal> | |
624 denote the size of the window; they are optional (if they are missing, the | |
625 window is the same size as the image). | |
626 </para></listitem> | |
627 </varlistentry> | |
628 | |
629 <varlistentry> | |
630 <term><literal> | |
631 <anchor id="skin-background"/>background = R, G, B | |
632 </literal></term> | |
633 <listitem><para> | |
634 Lets you set the background color. It is useful if the image is smaller than | |
635 the window. <literal>R</literal>, <literal>G</literal> and <literal>B</literal> | |
636 specifies the red, green and blue component of the color (each of them is a | |
637 decimal number from 0 to 255). | |
638 </para></listitem> | |
639 </varlistentry> | |
640 </variablelist> | |
641 </sect2> | |
642 | |
643 <sect2 id="skin-file-menu"> | |
644 <title>Skin menu</title> | |
645 <para> | |
646 As mentioned earlier, the menu is displayed using two images. Normal menu | |
647 entries are taken from the image specified by the <literal>base</literal> item, | |
648 while the currently selected entry is taken from the image specified by the | |
649 <literal>selected</literal> item. You must define the position and size of each | |
650 menu entry through the menu item. | |
651 </para> | |
652 | |
653 <para> | |
654 The following entries can be used in the | |
655 '<literal>window = menu</literal>'. . .'<literal>end</literal>' block. | |
656 </para> | |
657 | |
658 <variablelist> | |
659 <varlistentry> | |
660 <term><literal> | |
661 <anchor id="skin-menu-base"/>base = image | |
662 </literal></term> | |
663 <listitem><para> | |
664 The image for normal menu entries. | |
665 </para></listitem> | |
666 </varlistentry> | |
667 | |
668 <varlistentry> | |
669 <term><literal> | |
670 <anchor id="skin-selected"/>selected = image | |
671 </literal></term> | |
672 <listitem><para> | |
673 The image showing the menu with all entries selected. | |
674 </para></listitem> | |
675 </varlistentry> | |
676 | |
677 <varlistentry> | |
678 <term><literal> | |
679 <anchor id="skin-menu"/>menu = X, Y, width, height, message | |
680 </literal></term> | |
681 <listitem><para> | |
682 Defines the <literal>X,Y</literal> position and the size of a menu entry in | |
683 the image. <literal>message</literal> is the message to be generated when the | |
684 mouse button is released over the entry. | |
685 </para></listitem> | |
686 </varlistentry> | |
687 </variablelist> | |
688 </sect2> | |
689 </sect1> | |
690 | |
691 <sect1 id="skin-fonts"> | |
692 <title>Fonts</title> | |
693 <para> | |
694 As mentioned in the section about the parts of a skin, a font is defined by an | |
695 image and a description file. You can place the characters anywhere in the image, | |
696 but make sure that their position and size is given in the description file | |
697 exactly. | |
698 </para> | |
699 | |
700 <para> | |
701 The font description file (with <filename>.fnt</filename> extension) can have | |
702 comment lines starting with '<literal>;</literal>'. The file must have a line | |
703 in the form | |
704 <anchor id="skin-font-image"/> | |
705 <programlisting>image = <replaceable>image</replaceable></programlisting> | |
706 Where <literal><replaceable>image</replaceable></literal> is the name of the | |
707 image file to be used for the font (you do not have to specify the extension). | |
708 <anchor id="skin-font-char"/> | |
709 <programlisting>"char" = X, Y, width, height</programlisting> | |
710 Here <literal>X</literal> and <literal>Y</literal> specify the position of the | |
711 <literal>char</literal> character in the image (<literal>0,0</literal> is the | |
712 upper left corner). <literal>width</literal> and <literal>height</literal> are | |
713 the dimensions of the character in pixels. | |
714 </para> | |
715 | |
716 <para> | |
717 This example defines the A, B, C characters using <filename>font.png</filename>. | |
718 <programlisting> | |
719 ; Can be "font" instead of "font.png". | |
720 image = font.png | |
721 | |
722 ; Three characters are enough for demonstration purposes :-) | |
723 "A" = 0,0, 7,13 | |
724 "B" = 7,0, 7,13 | |
725 "C" = 14,0, 7,13 | |
726 </programlisting> | |
727 </para> | |
728 | |
729 <sect2 id="skin-fonts-symbols"> | |
730 <title>Symbols</title> | |
731 <para> | |
732 Some characters have special meanings when returned by some of the variables | |
733 used in <link linkend="skin-dlabel">dlabel</link>. These characters are meant | |
734 to be shown as symbols so that things like a nice DVD logo can be displayed | |
735 instead of the character '<literal>d</literal>' for a DVD stream. | |
736 </para> | |
737 <para> | |
738 The following table lists all the characters that can be used to display | |
739 symbols (and thus require a different font). | |
740 </para> | |
741 | |
742 <informaltable> | |
743 <tgroup cols="2"> | |
744 <thead> | |
745 <row><entry>Character</entry><entry>Symbol</entry></row> | |
746 </thead> | |
747 <tbody> | |
748 <row><entry><keycap>p</keycap></entry><entry>play</entry></row> | |
749 <row><entry><keycap>s</keycap></entry><entry>stop</entry></row> | |
750 <row><entry><keycap>e</keycap></entry><entry>pause</entry></row> | |
751 <row><entry><keycap>n</keycap></entry><entry>no sound</entry></row> | |
752 <row><entry><keycap>m</keycap></entry><entry>mono sound</entry></row> | |
753 <row><entry><keycap>t</keycap></entry><entry>stereo sound</entry></row> | |
754 <row><entry><keycap>f</keycap></entry><entry>stream is a file</entry></row> | |
755 <row><entry><keycap>v</keycap></entry><entry>stream is a Video CD</entry></row> | |
756 <row><entry><keycap>d</keycap></entry><entry>stream is a DVD</entry></row> | |
757 <row><entry><keycap>u</keycap></entry><entry>stream is a URL</entry></row> | |
758 </tbody> | |
759 </tgroup> | |
760 </informaltable> | |
761 </sect2> | |
762 </sect1> | |
763 | |
764 <sect1 id="skin-gui"> | |
765 <title>GUI messages</title> | |
766 <para> | |
767 These are the messages that can be generated by buttons, potmeters and | |
768 menu entries. | |
769 </para> | |
770 <note><para> | |
771 Some of the messages might not work as expected (or not work at all). | |
772 As you know, the GUI is under development. | |
773 </para></note> | |
774 | |
775 <variablelist> | |
776 <title>Playback control:</title> | |
777 <varlistentry> | |
778 <term><emphasis role="bold">evNext</emphasis></term> | |
779 <listitem><para> | |
780 Jump to next track in the playlist. | |
781 </para></listitem> | |
782 </varlistentry> | |
783 | |
784 <varlistentry> | |
785 <term><emphasis role="bold">evPause</emphasis></term> | |
786 <listitem><para> | |
787 Forms a switch together with <literal>evPlaySwitchToPause</literal>. They can | |
788 be used to have a common play/pause button. Both messages should be assigned to | |
789 buttons displayed at the very same position in the window. This message pauses | |
790 playing and the image for the <literal>evPlaySwitchToPause</literal> button is | |
791 displayed (to indicate that the button can be pressed to continue playing). | |
792 </para></listitem> | |
793 </varlistentry> | |
794 | |
795 <varlistentry> | |
796 <term><emphasis role="bold">evPlay</emphasis></term> | |
797 <listitem><para> | |
798 Start playing. | |
799 </para></listitem> | |
800 </varlistentry> | |
801 | |
802 <varlistentry> | |
803 <term><emphasis role="bold">evPlaySwitchToPause</emphasis></term> | |
804 <listitem><para> | |
805 The opposite of <literal>evPauseSwitchToPlay</literal>. This message starts | |
806 playing and the image for the <literal>evPauseSwitchToPlay</literal> button | |
807 is displayed (to indicate that the button can be pressed to pause playing). | |
808 </para></listitem> | |
809 </varlistentry> | |
810 | |
811 <varlistentry> | |
812 <term><emphasis role="bold">evPrev</emphasis></term> | |
813 <listitem><para> | |
814 Jump to previous track in the playlist. | |
815 </para></listitem> | |
816 </varlistentry> | |
817 | |
818 <varlistentry> | |
819 <term><emphasis role="bold">evStop</emphasis></term> | |
820 <listitem><para> | |
821 Stop playing. | |
822 </para></listitem> | |
823 </varlistentry> | |
824 </variablelist> | |
825 | |
826 <variablelist> | |
827 <title>Seeking:</title> | |
828 <varlistentry> | |
829 <term><emphasis role="bold">evBackward10sec</emphasis></term> | |
830 <listitem><para> | |
831 Seek backward 10 seconds. | |
832 </para></listitem> | |
833 </varlistentry> | |
834 | |
835 <varlistentry> | |
836 <term><emphasis role="bold">evBackward1min</emphasis></term> | |
837 <listitem><para> | |
838 Seek backward 1 minute. | |
839 </para></listitem> | |
840 </varlistentry> | |
841 | |
842 <varlistentry> | |
843 <term><emphasis role="bold">evBackward10min</emphasis></term> | |
844 <listitem><para> | |
845 Seek backward 10 minutes. | |
846 </para></listitem> | |
847 </varlistentry> | |
848 | |
849 <varlistentry> | |
850 <term><emphasis role="bold">evForward10sec</emphasis></term> | |
851 <listitem><para> | |
852 Seek forward 10 seconds. | |
853 </para></listitem> | |
854 </varlistentry> | |
855 | |
856 <varlistentry> | |
857 <term><emphasis role="bold">evForward1min</emphasis></term> | |
858 <listitem><para> | |
859 Seek forward 1 minute. | |
860 </para></listitem> | |
861 </varlistentry> | |
862 | |
863 <varlistentry> | |
864 <term><emphasis role="bold">evForward10min</emphasis></term> | |
865 <listitem><para> | |
866 Seek forward 10 minutes. | |
867 </para></listitem> | |
868 </varlistentry> | |
869 | |
870 <varlistentry> | |
871 <term><emphasis role="bold">evSetMoviePosition</emphasis></term> | |
872 <listitem><para> | |
873 Seek to position (can be used by a potmeter; the | |
874 relative value (0-100%) of the potmeter is used). | |
875 </para></listitem> | |
876 </varlistentry> | |
877 </variablelist> | |
878 | |
879 <variablelist> | |
880 <title>Video control:</title> | |
881 <varlistentry> | |
882 <term><emphasis role="bold">evDoubleSize</emphasis></term> | |
883 <listitem><para> | |
884 Set the movie window to double size. | |
885 </para></listitem> | |
886 </varlistentry> | |
887 <varlistentry> | |
888 <term><emphasis role="bold">evFullScreen</emphasis></term> | |
889 <listitem><para> | |
890 Switch fullscreen mode on/off. | |
891 </para></listitem> | |
892 </varlistentry> | |
893 <varlistentry> | |
894 <term><emphasis role="bold">evNormalSize</emphasis></term> | |
895 <listitem><para> | |
896 Set the movie window to its normal size. | |
897 </para></listitem> | |
898 </varlistentry> | |
899 </variablelist> | |
900 | |
901 <variablelist> | |
902 <title>Audio control:</title> | |
903 <varlistentry> | |
904 <term><emphasis role="bold">evDecAudioBufDelay</emphasis></term> | |
905 <listitem><para> | |
906 Decrease audio buffer delay. | |
907 </para></listitem> | |
908 </varlistentry> | |
909 | |
910 <varlistentry> | |
911 <term><emphasis role="bold">evDecBalance</emphasis></term> | |
912 <listitem><para> | |
913 Decrease balance. | |
914 </para></listitem> | |
915 </varlistentry> | |
916 | |
917 <varlistentry> | |
918 <term><emphasis role="bold">evDecVolume</emphasis></term> | |
919 <listitem><para> | |
920 Decrease volume. | |
921 </para></listitem> | |
922 </varlistentry> | |
923 | |
924 <varlistentry> | |
925 <term><emphasis role="bold">evIncAudioBufDelay</emphasis></term> | |
926 <listitem><para> | |
927 Increase audio buffer delay. | |
928 </para></listitem> | |
929 </varlistentry> | |
930 | |
931 <varlistentry> | |
932 <term><emphasis role="bold">evIncBalance</emphasis></term> | |
933 <listitem><para> | |
934 Increase balance. | |
935 </para></listitem> | |
936 </varlistentry> | |
937 | |
938 <varlistentry> | |
939 <term><emphasis role="bold">evIncVolume</emphasis></term> | |
940 <listitem><para> | |
941 Increase volume. | |
942 </para></listitem> | |
943 </varlistentry> | |
944 | |
945 <varlistentry> | |
946 <term><emphasis role="bold">evMute</emphasis></term> | |
947 <listitem><para> | |
948 Mute/unmute the sound. | |
949 </para></listitem> | |
950 </varlistentry> | |
951 | |
952 <varlistentry> | |
953 <term><emphasis role="bold">evSetBalance</emphasis></term> | |
954 <listitem><para> | |
955 Set balance (can be used by a potmeter; the | |
956 relative value (0-100%) of the potmeter is used). | |
957 </para></listitem> | |
958 </varlistentry> | |
959 | |
960 <varlistentry> | |
961 <term><emphasis role="bold">evSetVolume</emphasis></term> | |
962 <listitem><para> | |
963 Set volume (can be used by a potmeter; the relative | |
964 value (0-100%) of the potmeter is used). | |
965 </para></listitem> | |
966 </varlistentry> | |
967 </variablelist> | |
968 | |
969 <variablelist> | |
970 <title>Miscellaneous:</title> | |
971 <varlistentry> | |
972 <term><emphasis role="bold">evAbout</emphasis></term> | |
973 <listitem><para> | |
974 Open the about window. | |
975 </para></listitem> | |
976 </varlistentry> | |
977 | |
978 <varlistentry> | |
979 <term><emphasis role="bold">evDropSubtitle</emphasis></term> | |
980 <listitem><para> | |
981 Disables the currently used subtitle. | |
982 </para></listitem> | |
983 </varlistentry> | |
984 | |
985 <varlistentry> | |
986 <term><emphasis role="bold">evEqualizer</emphasis></term> | |
987 <listitem><para> | |
988 Turn the equalizer on/off. | |
989 </para></listitem> | |
990 </varlistentry> | |
991 | |
992 <varlistentry> | |
993 <term><emphasis role="bold">evExit</emphasis></term> | |
994 <listitem><para> | |
995 Quit the program. | |
996 </para></listitem> | |
997 </varlistentry> | |
998 | |
999 <varlistentry> | |
1000 <term><emphasis role="bold">evIconify</emphasis></term> | |
1001 <listitem><para> | |
1002 Iconify the window. | |
1003 </para></listitem> | |
1004 </varlistentry> | |
1005 | |
1006 <varlistentry> | |
1007 <term><emphasis role="bold">evLoad</emphasis></term> | |
1008 <listitem><para> | |
1009 Load a file (by opening a file browser window, where you can choose a file). | |
1010 </para></listitem> | |
1011 </varlistentry> | |
1012 | |
1013 <varlistentry> | |
1014 <term><emphasis role="bold">evLoadPlay</emphasis></term> | |
1015 <listitem><para> | |
1016 Does the same as <literal>evLoad</literal>, but it automatically starts playing after | |
1017 the file is loaded. | |
1018 </para></listitem> | |
1019 </varlistentry> | |
1020 | |
1021 <varlistentry> | |
1022 <term><emphasis role="bold">evLoadSubtitle</emphasis></term> | |
1023 <listitem><para> | |
1024 Loads a subtitle file (with the fileselector) | |
1025 </para></listitem> | |
1026 </varlistentry> | |
1027 | |
1028 <varlistentry> | |
1029 <term><emphasis role="bold">evLoadAudioFile</emphasis></term> | |
1030 <listitem><para> | |
1031 Loads an audio file (with the fileselector) | |
1032 </para></listitem> | |
1033 </varlistentry> | |
1034 | |
1035 <varlistentry> | |
1036 <term><emphasis role="bold">evNone</emphasis></term> | |
1037 <listitem><para> | |
1038 Empty message, it has no effect (except maybe in CVS versions :-)). | |
1039 </para></listitem> | |
1040 </varlistentry> | |
1041 | |
1042 <varlistentry> | |
1043 <term><emphasis role="bold">evPlayList</emphasis></term> | |
1044 <listitem><para> | |
1045 Open/close the playlist window. | |
1046 </para></listitem> | |
1047 </varlistentry> | |
1048 | |
1049 <varlistentry> | |
1050 <term><emphasis role="bold">evPlayDVD</emphasis></term> | |
1051 <listitem><para> | |
1052 Tries to open the disc in the given DVD-ROM drive. | |
1053 </para></listitem> | |
1054 </varlistentry> | |
1055 | |
1056 <varlistentry> | |
1057 <term><emphasis role="bold">evPlayVCD</emphasis></term> | |
1058 <listitem><para> | |
1059 Tries to open the disc in the given CD-ROM drive. | |
1060 </para></listitem> | |
1061 </varlistentry> | |
1062 | |
1063 <varlistentry> | |
1064 <term><emphasis role="bold">evPreferences</emphasis></term> | |
1065 <listitem><para> | |
1066 Open the preferences window. | |
1067 </para></listitem> | |
1068 </varlistentry> | |
1069 | |
1070 <varlistentry> | |
1071 <term><emphasis role="bold">evSetAspect</emphasis></term> | |
1072 <listitem><para> | |
1073 Sets displayed image aspect. | |
1074 </para></listitem> | |
1075 </varlistentry> | |
1076 | |
1077 <varlistentry> | |
1078 <term><emphasis role="bold">evSetURL</emphasis></term> | |
1079 <listitem><para> | |
1080 Displays the URL dialog window. | |
1081 </para></listitem> | |
1082 </varlistentry> | |
1083 | |
1084 <varlistentry> | |
1085 <term><emphasis role="bold">evSkinBrowser</emphasis></term> | |
1086 <listitem><para> | |
1087 Open the skin browser window. | |
1088 </para></listitem> | |
1089 </varlistentry> | |
1090 </variablelist> | |
1091 | |
1092 </sect1> | |
1093 | |
1094 </appendix> |