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