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