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