uTools-Manuals/docs/php/ncurses_pair_content.html
2019-04-28 19:00:34 +08:00

107 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Retrieves foreground and background colors of a color pair</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.ncurses-pair-content" class="refentry">
<div class="refnamediv">
<h1 class="refname">ncurses_pair_content</h1>
<p class="verinfo">(PHP 4 &gt;= 4.3.0, PHP 5 &lt; 5.3.0, PECL ncurses &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">ncurses_pair_content</span> &mdash; <span class="dc-title">Retrieves foreground and background colors of a color pair</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.ncurses-pair-content-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>ncurses_pair_content</strong></span>
( <span class="methodparam"><span class="type">int</span> <code class="parameter">$pair</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$f</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter reference">&$b</code></span>
) : <span class="type">int</span></div>
<p class="para rdfs-comment">
Retrieves the foreground and background colors that constitute the given
color pair. Terminal color capabilities must be initialized with
<span class="function"><a href="ncurses_start_color.html" class="function">ncurses_start_color()</a></span> prior to calling this function.
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.ncurses-pair-content-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">pair</code></dt>
<dd>
<p class="para">
The number of the color pair to retrieve information for.
</p>
</dd>
<dt>
<code class="parameter">f</code></dt>
<dd>
<p class="para">
A reference to which to return the foreground color of the color
pair. The information returned will be a color number referring to
one of the
<a href="ncurses.colorconsts.html" class="link">pre-defined colors</a> or a
color defined previously by
<span class="function"><a href="ncurses_init_color.html" class="function">ncurses_init_color()</a></span> if the terminal supports
color changing.
</p>
</dd>
<dt>
<code class="parameter">b</code></dt>
<dd>
<p class="para">
A reference to which to return the background color of the color
pair. The information returned will be a color number referring to
one of the
<a href="ncurses.colorconsts.html" class="link">pre-defined colors</a> or a
color defined previously by
<span class="function"><a href="ncurses_init_color.html" class="function">ncurses_init_color()</a></span> if the terminal supports
color changing.
</p>
</dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.ncurses-pair-content-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
Returns <em>-1</em> if the function was successful, and
<em>0</em> if ncurses or terminal color capabilities have
not been initialized.
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.ncurses-pair-content-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="ncurses_init_pair.html" class="function" rel="rdfs-seeAlso">ncurses_init_pair()</a> - Define a color pair</span></li>
<li class="member"><span class="function"><a href="ncurses_start_color.html" class="function" rel="rdfs-seeAlso">ncurses_start_color()</a> - Initializes color functionality</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>