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

📄 skin-file.html

📁 MPlayer-mingw32-1.0rc2.zip 经典播放器源码
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><title>C.2.聽The skin file</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-overview.html" title="C.1.聽Overview"><link rel="next" href="skin-fonts.html" title="C.3.聽Fonts"><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-file.html#skin-file-main" title="C.2.1.聽Main window and playbar"><link rel="subsection" href="skin-file.html#skin-file-subwindow" title="C.2.2.聽Subwindow"><link rel="subsection" href="skin-file.html#skin-file-menu" title="C.2.3.聽Skin menu"></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.2.聽The skin file</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="skin-overview.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-fonts.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-file"></a>C.2.聽The skin file</h2></div></div></div><p>
As mentioned above, this is the skin configuration file. It is line oriented;
comment lines start with a '<code class="literal">;</code>' character at the beginning of
the line (only spaces and tabs are allowed before the '<code class="literal">;</code>').
</p><p>
The file is made up of sections. Each section describes the skin for an
application and has the following form:
</p><pre class="programlisting">
section = <em class="replaceable"><code>section name</code></em>
.
.
.
end
</pre><p>
</p><p>
Currently there is only one application, so you need only one section: its name
is <span class="bold"><strong>movieplayer</strong></span>.
</p><p>
Within this section each window is described by a block of the following form:
</p><pre class="programlisting">
window = <em class="replaceable"><code>window name</code></em>
.
.
.
end
</pre><p>
</p><p>
where <em class="replaceable"><code>window name</code></em> can be one of these strings:
</p><div class="itemizedlist"><ul type="disc"><li><p>
  <span class="bold"><strong>main</strong></span> - for the main window
</p></li><li><p>
  <span class="bold"><strong>sub</strong></span> - for the subwindow
</p></li><li><p>
  <span class="bold"><strong>menu</strong></span> - for the skin menu
</p></li><li><p>
  <span class="bold"><strong>playbar</strong></span> - playbar
</p></li></ul></div><p>
</p><p>
(The sub and menu blocks are optional - you do not need to create a menu or
decorate the subwindow.)
</p><p>
Within a window block, you can define each item for the window by a line in
this form:
</p><pre class="programlisting">item = parameter</pre><p>
Where <code class="literal">item</code> is a string that identifies the type of the GUI
item, <code class="literal">parameter</code> is a numeric or textual value (or a list of
values separated by commas).
</p><p>
Putting the above together, the whole file looks something like this:
</p><pre class="programlisting">
section = movieplayer
  window = main
  ; ... items for main window ...
  end

  window = sub
  ; ... items for subwindow ...
  end

  window = menu
  ; ... items for menu ...
  end

  window = playbar
  ; ... items for playbar ...
  end
end
</pre><p>
</p><p>
The name of an image file must be given without leading directories - images
are searched for in the <tt class="filename">skins</tt> directory.
You may (but you need not) specify the extension of the file. If the file does
not exist, <span class="application">MPlayer</span> tries to load the file
<tt class="filename">&lt;filename&gt;.&lt;ext&gt;</tt>, where <code class="literal">png</code>
and <code class="literal">PNG</code> are tried for <tt class="filename">&lt;ext&gt;</tt>
(in this order). The first matching file will be used.
</p><p>
Here is an example to make this clear. Suppose that you have an image called
<tt class="filename">main.png</tt> that you use for the main window:
</p><pre class="programlisting">base = main, -1, -1</pre><p>
<span class="application">MPlayer</span> tries to load <tt class="filename">main</tt>,
<tt class="filename">main.png</tt>, <tt class="filename">main.PNG</tt> files.
</p><p>
Finally some words about positioning. The main window and the subwindow can be
placed in the different corners of the screen by giving <code class="literal">X</code>
and <code class="literal">Y</code> coordinates. <code class="literal">0</code> is top or left,
<code class="literal">-1</code> is center and <code class="literal">-2</code> is right or bottom, as
shown in this illustration:
</p><div class="informalfigure"><pre class="screen">
(0, 0)----(-1, 0)----(-2, 0)
  |          |          |
  |          |          |
(0,-1)----(-1,-1)----(-2,-1)
  |          |          |
  |          |          |
(0,-2)----(-1,-2)----(-2,-2)
</pre></div><p>
</p><div class="sect2" lang="en"><div class="titlepage"><div><div><h3 class="title"><a name="skin-file-main"></a>C.2.1.聽Main window and playbar</h3></div></div></div><p>
Below is the list of entries that can be used in the
'<code class="literal">window = main</code>' ... '<code class="literal">end</code>',
and the '<code class="literal">window = playbar</code>' ... '<code class="literal">end</code>'
blocks.
</p><div class="variablelist"><dl><dt><span class="term"><code class="literal">
  <a name="skin-main-base"></a>base = image, X, Y
  </code></span></dt><dd><p>
  Lets you specify the background image to be used for the main window.
  The window will appear at the given <code class="literal">X,Y</code> position on
  the screen The window will have the size of the image.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  These coordinates do not currently work for the display window.
  </p></div><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p>Transparent regions in the image (colored #FF00FF) appear black
  on X servers without the XShape extension. The image's width must be dividable
  by 8.</p></div></dd><dt><span class="term"><code class="literal">
  <a name="skin-button"></a>button = image, X, Y, width, height, message
  </code></span></dt><dd><p>
  Place a button of <code class="literal">width</code> * <code class="literal">height</code> size at
  position <code class="literal">X,Y</code>. The specified <code class="literal">message</code> is
  generated when the button is clicked. The image given by
  <code class="literal">image</code> must have three parts below each other (according to
  the possible states of the button), like this:
  </p><div class="informalfigure"><pre class="screen">
+------------+
|  pressed   |
+------------+
|  released  |
+------------+
|  disabled  |
+------------+</pre></div></dd><dt><span class="term"><code class="literal">
  <a name="skin-decoration"></a>decoration = enable|disable
  </code></span></dt><dd><p>
  Enable or disable window manager decoration of the main window. Default is
  <span class="bold"><strong>disable</strong></span>.
  </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
  This doesn't work for the display window, there is no need to.
  </p></div></dd><dt><span class="term"><code class="literal">
  <a name="skin-hpotmeter"></a>hpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message
  </code></span></dt><dd><p>
  </p></dd><dt><span class="term"><code class="literal">
  <a name="skin-vpotmeter"></a>vpotmeter = button, bwidth, bheight, phases, numphases, default, X, Y, width, height, message
  </code></span></dt><dd><p>
  Place a horizontal (hpotmeter) or vertical (vpotmeter) potmeter of
  <code class="literal">width</code> * <code class="literal">height</code> size at position
  <code class="literal">X,Y</code>. The image can be divided into different parts for the

⌨️ 快捷键说明

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