Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > a42e22ddf1d70fb02e9f62289d71cafa > files > 868

mplayer-doc-1.0-1.rc4.0.r31086.3.1mdv2010.2.i586.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>B.1. Overview</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="MPlayer - 电影播放器"><link rel="up" href="skin.html" title="附录 B. MPlayer skin format"><link rel="prev" href="skin.html" title="附录 B. MPlayer skin format"><link rel="next" href="skin-file.html" title="B.2. The skin file"><link rel="preface" href="howtoread.html" title="如何阅读此文档"><link rel="chapter" href="intro.html" title="第 1 章 介绍"><link rel="chapter" href="install.html" title="第 2 章 Installation"><link rel="chapter" href="usage.html" title="第 3 章 Usage"><link rel="chapter" href="advaudio.html" title="第 4 章 Advanced audio usage"><link rel="chapter" href="cd-dvd.html" title="第 5 章 CD/DVD用法"><link rel="chapter" href="video.html" title="第 6 章 Video output devices"><link rel="chapter" href="tv.html" title="第 7 章 TV"><link rel="chapter" href="radio.html" title="第 8 章 广播电台"><link rel="chapter" href="ports.html" title="第 9 章 Ports"><link rel="chapter" href="mencoder.html" title="第 10 章 MEncoder的基础用法"><link rel="chapter" href="encoding-guide.html" title="第 11 章 Encoding with MEncoder"><link rel="chapter" href="faq.html" title="第 12 章 Frequently Asked Questions"><link rel="appendix" href="bugreports.html" title="附录 A. 如何报告错误"><link rel="appendix" href="skin.html" title="附录 B. MPlayer skin format"><link rel="subsection" href="skin-overview.html#skin-overview-components" title="B.1.1. Skin components"><link rel="subsection" href="skin-overview.html#skin-overview-formats" title="B.1.2. Image formats"><link rel="subsection" href="skin-overview.html#skin-files" title="B.1.3. Files"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">B.1. Overview</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="skin.html">上一页</a> </td><th width="60%" align="center">附录 B. <span class="application">MPlayer</span> skin format</th><td width="20%" align="right"> <a accesskey="n" href="skin-file.html">下一页</a></td></tr></table><hr></div><div class="sect1" title="B.1. Overview"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="skin-overview"></a>B.1. Overview</h2></div></div></div><div class="sect2" title="B.1.1. Skin components"><div class="titlepage"><div><div><h3 class="title"><a name="skin-overview-components"></a>B.1.1. Skin components</h3></div></div></div><p>
Skins are quite free-format (unlike the fixed-format skins of
<span class="application">Winamp</span>/<span class="application">XMMS</span>,
for example), so it is up to you to create something great.
</p><p>
Currently there are four windows to be decorated: the
<a class="link" href="skin-file.html#skin-file-main" title="B.2.1. Main window and playbar">main window</a>, the
<a class="link" href="skin-file.html#skin-file-subwindow" title="B.2.2. Subwindow">subwindow</a>, the
<a class="link" href="skin-file.html#skin-file-main" title="B.2.1. Main window and playbar">playbar</a>, and the
<a class="link" href="skin-file.html#skin-file-menu" title="B.2.3. Skin menu">skin menu</a> (which can be activated
by a right click).

</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
  The <span class="bold"><strong>main window</strong></span> and/or the
  <span class="bold"><strong>playbar</strong></span> is where you can control
  <span class="application">MPlayer</span>. The background of the window is an image.
  Various items can (and must) be placed in the window:
  <span class="emphasis"><em>buttons</em></span>, <span class="emphasis"><em>potmeters</em></span> (sliders) and
  <span class="emphasis"><em>labels</em></span>.
  For every item, you must specify its position and size.
  </p><p>
  A <span class="bold"><strong>button</strong></span> has three states (pressed, released,
  disabled), thus its image must be divided into three parts vertically. See the
  <a class="link" href="skin-file.html#skin-button">button</a> item for details.
  </p><p>
  A <span class="bold"><strong>potmeter</strong></span> (mainly used for the seek bar and
  volume/balance control) can have any number of phases by dividing its image
  into different parts below each other. See
  <a class="link" href="skin-file.html#skin-hpotmeter">hpotmeter</a> and
  <a class="link" href="skin-file.html#skin-potmeter">potmeter</a> for details.
  </p><p>
  <span class="bold"><strong>Labels</strong></span> are a bit special: The characters
  needed to draw them are taken from an image file, and the characters in the
  image are described by a
  <a class="link" href="skin-fonts.html" title="B.3. Fonts">font description file</a>.
  The latter is a plain text file which specifies the x,y position and size of
  each character in the image (the image file and its font description file
  form a font <span class="emphasis"><em>together</em></span>).
  See <a class="link" href="skin-file.html#skin-dlabel">dlabel</a>
  and <a class="link" href="skin-file.html#skin-slabel">slabel</a> for details.
  </p><div class="note" title="注意" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">注意</h3><p>
  All images can have full transparency as described in the section about
  <a class="link" href="skin-overview.html#skin-overview-formats" title="B.1.2. Image formats">image formats</a>. If the X server
  doesn't support the XShape extension, the parts marked transparent will be
  black. If you'd like to use this feature, the width of the main window's
  background image must be dividable by 8.
  </p></div></li><li class="listitem"><p>
  The <span class="bold"><strong>subwindow</strong></span> is where the movie appears. It
  can display a specified image if there is no movie loaded (it is quite boring
  to have an empty window :-)) <span class="bold"><strong>Note:</strong></span>
  transparency is <span class="bold"><strong>not allowed</strong></span> here.
</p></li><li class="listitem"><p>
  The <span class="bold"><strong>skin menu</strong></span> is just a way to control
  <span class="application">MPlayer</span> by means of menu entries. Two images
  are required for the menu: one of them is the base image that shows the
  menu in its normal state, the other one is used to display the selected
  entries. When you pop up the menu, the first image is shown. If you move
  the mouse over the menu entries, the currently selected entry is copied
  from the second image over the menu entry below the mouse pointer
  (the second image is never shown as a whole).
  </p><p>
  A menu entry is defined by its position and size in the image (see the
  section about the <a class="link" href="skin-file.html#skin-file-menu" title="B.2.3. Skin menu">skin menu</a> for
  details).
  </p></li></ul></div><p>
</p><p>
There is an important thing not mentioned yet: For buttons, potmeters and
menu entries to work, <span class="application">MPlayer</span> must know what to
do if they are clicked. This is done by <a class="link" href="skin-gui.html" title="B.4. GUI messages">messages</a>
(events). For these items you must define the messages to be generated when
they are clicked.
</p></div><div class="sect2" title="B.1.2. Image formats"><div class="titlepage"><div><div><h3 class="title"><a name="skin-overview-formats"></a>B.1.2. Image formats</h3></div></div></div><p>Images must be truecolor (24 or 32 bpp) PNGs.</p><p>
In the main window and in the playbar (see below) you can use images with
`transparency': Regions filled with the color #FF00FF (magenta) are fully
transparent when viewed by <span class="application">MPlayer</span>. This means
that you can even have shaped windows if your X server has the XShape extension.
</p></div><div class="sect2" title="B.1.3. Files"><div class="titlepage"><div><div><h3 class="title"><a name="skin-files"></a>B.1.3. Files</h3></div></div></div><p>
You need the following files to build a skin:
</p><div class="itemizedlist"><ul class="itemizedlist" type="disc"><li class="listitem"><p>
  The configuration file named <a class="link" href="skin-file.html" title="B.2. The skin file">skin</a> tells
  <span class="application">MPlayer</span> how to put different parts of the skin
  together and what to do if you click somewhere in the window.
</p></li><li class="listitem"><p>
  The background image for the main window.
</p></li><li class="listitem"><p>
  Images for the items in the main window (including one or more font
  description files needed to draw labels).
</p></li><li class="listitem"><p>
  The image to be displayed in the subwindow (optional).
</p></li><li class="listitem"><p>
  Two images for the skin menu (they are needed only if you want to create
  a menu).
</p></li></ul></div><p>
  With the exception of the skin configuration file, you can name the other
  files whatever you want (but note that font description files must have
  a <tt class="filename">.fnt</tt> extension).
</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="skin.html">上一页</a> </td><td width="20%" align="center"><a accesskey="u" href="skin.html">上一级</a></td><td width="40%" align="right"> <a accesskey="n" href="skin-file.html">下一页</a></td></tr><tr><td width="40%" align="left" valign="top">附录 B. <span class="application">MPlayer</span> skin format </td><td width="20%" align="center"><a accesskey="h" href="index.html">起始页</a></td><td width="40%" align="right" valign="top"> B.2. The skin file</td></tr></table></div></body></html>