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