⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 skin-overview.html

📁 MPlayer-mingw32-1.0rc2.zip 经典播放器源码
💻 HTML
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>C.1.聽Overview</title><link rel="stylesheet" href="default.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.73.2"><link rel="start" href="index.html" title="MPlayer - The Movie Player"><link rel="up" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="prev" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="next" href="skin-file.html" title="C.2.聽The skin file"><link rel="preface" href="howtoread.html" title="How to read this documentation"><link rel="chapter" href="intro.html" title="Chapter聽1.聽Introduction"><link rel="chapter" href="install.html" title="Chapter聽2.聽Installation"><link rel="chapter" href="usage.html" title="Chapter聽3.聽Usage"><link rel="chapter" href="cd-dvd.html" title="Chapter聽4.聽CD/DVD usage"><link rel="chapter" href="faq.html" title="Chapter聽5.聽Frequently Asked Questions"><link rel="chapter" href="containers.html" title="Chapter聽6.聽Containers"><link rel="chapter" href="codecs.html" title="Chapter聽7.聽Codecs"><link rel="chapter" href="video.html" title="Chapter聽8.聽Video output devices"><link rel="chapter" href="audio.html" title="Chapter聽9.聽Audio output devices"><link rel="chapter" href="tv.html" title="Chapter聽10.聽TV"><link rel="chapter" href="radio.html" title="Chapter聽11.聽Radio"><link rel="chapter" href="ports.html" title="Chapter聽12.聽Ports"><link rel="chapter" href="mencoder.html" title="Chapter聽13.聽Basic usage of MEncoder"><link rel="chapter" href="encoding-guide.html" title="Chapter聽14.聽Encoding with MEncoder"><link rel="appendix" href="bugreports.html" title="Appendix聽A.聽How to report bugs"><link rel="appendix" href="bugs.html" title="Appendix聽B.聽Known bugs"><link rel="appendix" href="skin.html" title="Appendix聽C.聽MPlayer skin format"><link rel="appendix" href="history.html" title="Appendix聽D.聽History"><link rel="subsection" href="skin-overview.html#skin-overview-directories" title="C.1.1.聽Directories"><link rel="subsection" href="skin-overview.html#skin-overview-formats" title="C.1.2.聽Image formats"><link rel="subsection" href="skin-overview.html#skin-overview-components" title="C.1.3.聽Skin components"><link rel="subsection" href="skin-overview.html#skin-files" title="C.1.4.聽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">C.1.聽Overview</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="skin.html">Prev</a>聽</td><th width="60%" align="center">Appendix聽C.聽<span class="application">MPlayer</span> skin format</th><td width="20%" align="right">聽<a accesskey="n" href="skin-file.html">Next</a></td></tr></table><hr></div><div class="sect1" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="skin-overview"></a>C.1.聽Overview</h2></div></div></div><p>
It does not really have anything to do with the skin format, but you should
know that <span class="application">MPlayer</span> has
<span class="bold"><strong>no</strong></span> builtin skin, so
<span class="bold"><strong>at least one skin must be installed in order to be able
to use the GUI.</strong></span>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="skin-overview-directories"></a>C.1.1.聽Directories</h3></div></div></div><p>
The directories searched for skins are (in order):
</p><div class="orderedlist"><ol type="1"><li><p>
  <tt class="filename">$(DATADIR)/skins/</tt>
</p></li><li><p>
  <tt class="filename">$(PREFIX)/share/mplayer/skins/</tt>
</p></li><li><p>
  <tt class="filename">~/.mplayer/skins/</tt>
</p></li></ol></div><p>
</p><p>
Note that the first path may vary according to the way
<span class="application">MPlayer</span> was configured (see the
<tt class="option">--prefix</tt> and <tt class="option">--datadir</tt>
arguments of the <span class="command"><strong>configure</strong></span> script).
</p><p>
Every skin is installed into its own directory under one of the directories
listed above, for example:
</p><pre class="screen">$(PREFIX)/share/mplayer/skins/default/</pre><p>
</p></div><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="skin-overview-formats"></a>C.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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="skin-overview-components"></a>C.1.3.聽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="C.2.1.聽Main window and playbar">main window</a>, the
<a class="link" href="skin-file.html#skin-file-subwindow" title="C.2.2.聽Subwindow">subwindow</a>, the
<a class="link" href="skin-file.html#skin-file-main" title="C.2.1.聽Main window and playbar">playbar</a>, and the
<a class="link" href="skin-file.html#skin-file-menu" title="C.2.3.聽Skin menu">skin menu</a> (which can be activated
by a right click).

</p><div class="itemizedlist"><ul type="disc"><li><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="C.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" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</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="C.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><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><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="C.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="C.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" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="skin-files"></a>C.1.4.聽Files</h3></div></div></div><p>
You need the following files to build a skin:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  The configuration file named <a class="link" href="skin-file.html" title="C.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><p>
  The background image for the main window.
</p></li><li><p>
  Images for the items in the main window (including one or more font
  description files needed to draw labels).
</p></li><li><p>
  The image to be displayed in the subwindow (optional).
</p></li><li><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">Prev</a>聽</td><td width="20%" align="center"><a accesskey="u" href="skin.html">Up</a></td><td width="40%" align="right">聽<a accesskey="n" href="skin-file.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Appendix聽C.聽<span class="application">MPlayer</span> skin format聽</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">聽C.2.聽The skin file</td></tr></table></div></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -