Mercurial > mplayer.hg
comparison DOCS/skin.html @ 9061:b840039be057
Skin file added to TOC and renumbered, one sentence reworded.
author | diego |
---|---|
date | Wed, 22 Jan 2003 01:25:37 +0000 |
parents | 99a3ab65891d |
children | 0704ccc47abf |
comparison
equal
deleted
inserted
replaced
9060:eb1ecffe9231 | 9061:b840039be057 |
---|---|
12 </style> | 12 </style> |
13 </head> | 13 </head> |
14 | 14 |
15 <body> | 15 <body> |
16 | 16 |
17 <h1 align="center">MPlayer skin format</h1> | 17 <h1>Appendix D - MPlayer skin format</h1> |
18 | |
19 <hr> | |
20 | |
21 <h2>Contents</h2> | |
22 | |
23 <ul type=disc> | |
24 <li><a href="#intro">1 Introduction</a></li> | |
25 <li><a href="#overview">2 Overview</a> | |
26 <ul type=circle> | |
27 <li><a href="#dirs">2.1 Directories</a></li> | |
28 <li><a href="#images">2.2 Images</a></li> | |
29 <li><a href="#components">2.3 Skin components</a></li> | |
30 <li><a href="#files">2.4 Files</a></li> | |
31 </ul> | |
32 </li> | |
33 <li><a href="#skin">3 The <code>skin</code> file</a> | |
34 <ul type=circle> | |
35 <li><a href="#mainwin">3.1 Main window</a></li> | |
36 <li><a href="#subwindow">3.2 Subwindow</a></li> | |
37 <li><a href="#skinmenu">3.3 Skin menu</a></li> | |
38 </ul> | |
39 </li> | |
40 <li><a href="#fonts">4 Fonts</a> | |
41 <ul type=circle> | |
42 <li><a href="#symbols">4.1 Symbols</a></li> | |
43 </ul> | |
44 </li> | |
45 <li><a href="#guimsg">Appendix A: GUI messages</a></li> | |
46 </ul> | |
47 | |
48 <hr> | |
49 | |
50 <div align=center> | |
51 Last modified: 2002/05/24 | |
52 </div> | |
53 | |
54 <hr> | |
55 | |
56 <h2><a name="intro">1 Introduction</a></h2> | |
57 | 18 |
58 The purpose of this document is to describe the MPlayer skin format. | 19 The purpose of this document is to describe the MPlayer skin format. |
59 The information contained here might be wrong, for | 20 The information contained here might be wrong, for |
60 | 21 |
61 <ol type="a"> | 22 <ol type="a"> |
73 <p> | 34 <p> |
74 <em>András Mohari <mayday@freemail.hu></em> | 35 <em>András Mohari <mayday@freemail.hu></em> |
75 </p> | 36 </p> |
76 | 37 |
77 | 38 |
78 <h2><a name="overview">2 Overview</a></h2> | 39 <h2><a name="overview">D.1 Overview</a></h2> |
79 | 40 |
80 It does not really have anything to do with the skin format, but you should | 41 It does not really have anything to do with the skin format, but you should |
81 know that MPlayer has <b>no</b> builtin skin, so <b>at least one skin | 42 know that MPlayer has <b>no</b> builtin skin, so <b>at least one skin |
82 must be installed in order to be able to use the GUI.</b> | 43 must be installed in order to be able to use the GUI.</b> |
83 | 44 |
84 | 45 |
85 <h3><a name="dirs">2.1 Directories</a></h3> | 46 <h3><a name="directories">D.1.1 Directories</a></h3> |
86 | 47 |
87 The directories searched for skins are (in order): | 48 The directories searched for skins are (in order): |
88 <pre> | 49 <pre> |
89 $(DATADIR)/Skin/ | 50 $(DATADIR)/Skin/ |
90 $(PREFIX)/share/mplayer/Skin/ | 51 $(PREFIX)/share/mplayer/Skin/ |
102 <pre> | 63 <pre> |
103 $(PREFIX)/share/mplayer/Skin/default/ | 64 $(PREFIX)/share/mplayer/Skin/default/ |
104 </pre> | 65 </pre> |
105 | 66 |
106 | 67 |
107 <h3><a name="images">2.2 Image formats</a></h3> | 68 <h3><a name="images">D.1.2 Image formats</a></h3> |
108 | 69 |
109 Images must be truecolor (24 or 32 bpp) PNGs. | 70 Images must be truecolor (24 or 32 bpp) PNGs. |
110 | 71 |
111 <p> | 72 <p> |
112 In the main window and in the playbar (see below) you can use images with `transparency': | 73 In the main window and in the playbar (see below) you can use images with `transparency': |
114 are fully transparent when viewed by MPlayer. This means that you can even | 75 are fully transparent when viewed by MPlayer. This means that you can even |
115 have shaped windows if your X server has the XShape extension. | 76 have shaped windows if your X server has the XShape extension. |
116 </p> | 77 </p> |
117 | 78 |
118 | 79 |
119 <h3><a name="components">2.3 Skin components</a></h3> | 80 <h3><a name="components">D.1.3 Skin components</a></h3> |
120 | 81 |
121 Skins are quite free-format (unlike the fixed-format skins of | 82 Skins are quite free-format (unlike the fixed-format skins of |
122 Winamp/XMMS, for example), so it is up to you to create something great. | 83 Winamp/XMMS, for example), so it is up to you to create something great. |
123 | 84 |
124 <p> | 85 <p> |
201 menu entries to work, MPlayer must know what to do if they are clicked. | 162 menu entries to work, MPlayer must know what to do if they are clicked. |
202 This is done by <a href="#guimsg">messages</a> (events). For these items | 163 This is done by <a href="#guimsg">messages</a> (events). For these items |
203 you must define the messages to be generated when they are clicked. | 164 you must define the messages to be generated when they are clicked. |
204 </p> | 165 </p> |
205 | 166 |
206 <h3><a name="files">2.4 Files</a></h3> | 167 <h3><a name="files">D.1.4 Files</a></h3> |
207 | 168 |
208 You need the following files to build a skin: | 169 You need the following files to build a skin: |
209 <ul> | 170 <ul> |
210 <li> | 171 <li> |
211 The configuration file named <a href="#skin">skin</a> tells MPlayer how | 172 The configuration file named <a href="#skin">skin</a> tells MPlayer how |
223 With the exception of the skin configuration file, you can name the other | 184 With the exception of the skin configuration file, you can name the other |
224 files whatever you want (but note that font description files must have | 185 files whatever you want (but note that font description files must have |
225 a <code>.fnt</code> extension). | 186 a <code>.fnt</code> extension). |
226 | 187 |
227 | 188 |
228 <h2><a name="skin">3 The <code>skin</code> file</a></h2> | 189 <h2><a name="skinfile">D.2 The skin file</a></h2> |
229 | 190 |
230 <p> | 191 <p> |
231 As mentioned above, this is the skin configuration file. | 192 As mentioned above, this is the skin configuration file. |
232 It is line oriented; comment lines start with a '<code>;</code>' character | 193 It is line oriented; comment lines start with a '<code>;</code>' character |
233 at the beginning of the line (only spaces and tabs are allowed before the | 194 at the beginning of the line (only spaces and tabs are allowed before the |
361 <code>main.PNG</code> files. | 322 <code>main.PNG</code> files. |
362 <br> | 323 <br> |
363 </td></tr></table> | 324 </td></tr></table> |
364 | 325 |
365 | 326 |
366 <h3><a name="mainwin">3.1 Main window and playbar</a></h3> | 327 <h3><a name="mainwindow">D.2.1 Main window and playbar</a></h3> |
367 | 328 |
368 Below is the list of entries that can be used in the | 329 Below is the list of entries that can be used in the |
369 '<code>window = main</code>' . . . '<code>end</code>', and the | 330 '<code>window = main</code>' . . . '<code>end</code>', and the |
370 '<code>window = playbar</code>' . . '<code>end</code>' blocks. | 331 '<code>window = playbar</code>' . . '<code>end</code>' blocks. |
371 | 332 |
377 Lets you specify the background image to be used for the main window. | 338 Lets you specify the background image to be used for the main window. |
378 The window will appear at the given <code>X,Y</code> position on the screen | 339 The window will appear at the given <code>X,Y</code> position on the screen |
379 The window will have the size of the image. | 340 The window will have the size of the image. |
380 <div> | 341 <div> |
381 <em class=warn> | 342 <em class=warn> |
382 <b>Note:</b> this coordinating doesn't work for the display window currently. | 343 <b>Note:</b> These coordinates do not currently work for the display window. |
383 </em> | 344 </em> |
384 <br> | 345 <br> |
385 <em class=warn> | 346 <em class=warn> |
386 <b>Warning:</b> Transparent regions in the image (colored #FF00FF) appear | 347 <b>Warning:</b> Transparent regions in the image (colored #FF00FF) appear |
387 black on X servers without the XShape extension. The image's width must be | 348 black on X servers without the XShape extension. The image's width must be |
604 </em> | 565 </em> |
605 </dd> | 566 </dd> |
606 </dl> | 567 </dl> |
607 | 568 |
608 | 569 |
609 <h3><a name="subwindow">3.2 Subwindow</a></h3> | 570 <h3><a name="subwindow">D.2.2 Subwindow</a></h3> |
610 | 571 |
611 The following entries can be used in the | 572 The following entries can be used in the |
612 '<code>window = sub</code>' . . . '<code>end</code>' block. | 573 '<code>window = sub</code>' . . . '<code>end</code>' block. |
613 | 574 |
614 <dl> | 575 <dl> |
635 component of the color (each of them is a decimal number from 0 to 255). | 596 component of the color (each of them is a decimal number from 0 to 255). |
636 </dd> | 597 </dd> |
637 </dl> | 598 </dl> |
638 | 599 |
639 | 600 |
640 <h3><a name="skinmenu">3.3 Skin menu</a></h3> | 601 <h3><a name="skinmenu">D.2.3 Skin menu</a></h3> |
641 | 602 |
642 As mentioned earlier, the menu is displayed using two images. | 603 As mentioned earlier, the menu is displayed using two images. |
643 Normal menu entries are taken from the image specified by the <code>base</code> | 604 Normal menu entries are taken from the image specified by the <code>base</code> |
644 item, while the currently selected entry is taken from the image specified | 605 item, while the currently selected entry is taken from the image specified |
645 by the <code>selected</code> item. You must define the position and size of each | 606 by the <code>selected</code> item. You must define the position and size of each |
674 the mouse button is released over the entry. | 635 the mouse button is released over the entry. |
675 </dd> | 636 </dd> |
676 </dl> | 637 </dl> |
677 | 638 |
678 | 639 |
679 <h2><a name="fonts">4 Fonts</a></h2> | 640 <h2><a name="fonts">D.3 Fonts</a></h2> |
680 | 641 |
681 As mentioned in the section about the parts of a skin, a font is defined | 642 As mentioned in the section about the parts of a skin, a font is defined |
682 by an image and a description | 643 by an image and a description |
683 file. You can place the characters anywhere in the image, but make sure that | 644 file. You can place the characters anywhere in the image, but make sure that |
684 their position and size is given in the description file exactly. | 645 their position and size is given in the description file exactly. |
718 "B" = 7,0, 7,13 | 679 "B" = 7,0, 7,13 |
719 "C" = 14,0, 7,13 | 680 "C" = 14,0, 7,13 |
720 </pre></td></tr></table> | 681 </pre></td></tr></table> |
721 | 682 |
722 | 683 |
723 <h3><a name="symbols">4.1 Symbols</a></h3> | 684 <h3><a name="symbols">D.3.1 Symbols</a></h3> |
724 | 685 |
725 Some characters have special meanings when returned by some of the variables | 686 Some characters have special meanings when returned by some of the variables |
726 used in <a href="#main.dlabel">dlabel</a>. These characters are meant to be | 687 used in <a href="#main.dlabel">dlabel</a>. These characters are meant to be |
727 shown as symbols so that things like a nice DVD logo can be displayed instead | 688 shown as symbols so that things like a nice DVD logo can be displayed instead |
728 of the character 'd' for a DVD stream. | 689 of the character 'd' for a DVD stream. |
755 <tr><td align=center><kbd>u</kbd></td> | 716 <tr><td align=center><kbd>u</kbd></td> |
756 <td align=left>stream is a URL</td></tr> | 717 <td align=left>stream is a URL</td></tr> |
757 </table> | 718 </table> |
758 | 719 |
759 | 720 |
760 <h2><a name="guimsg">Appendix A: GUI messages</a></h2> | 721 <h2><a name="guimessages">D.4 GUI messages</a></h2> |
761 | 722 |
762 These are the messages that can be generated by buttons, potmeters and | 723 These are the messages that can be generated by buttons, potmeters and |
763 menu entries. | 724 menu entries. |
764 | 725 |
765 <p> | 726 <p> |