php-doc-en/reference/ncurses/functions/ncurses-color-content.xml
2014-09-05 07:44:07 +00:00

104 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
<refentry xml:id="function.ncurses-color-content" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>ncurses_color_content</refname>
<refpurpose>Retrieves RGB components of a color</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<methodsynopsis>
<type>int</type><methodname>ncurses_color_content</methodname>
<methodparam><type>int</type><parameter>color</parameter></methodparam>
<methodparam><type>int</type><parameter role="reference">r</parameter></methodparam>
<methodparam><type>int</type><parameter role="reference">g</parameter></methodparam>
<methodparam><type>int</type><parameter role="reference">b</parameter></methodparam>
</methodsynopsis>
<para>
Retrieves the red, green, and blue components for the given color definition.
Terminal color capabilities must be initialized with
<function>ncurses_start_color</function> prior to calling this function.
</para>
</refsect1>
<refsect1 role="parameters">
&reftitle.parameters;
<para>
<variablelist>
<varlistentry>
<term><parameter>color</parameter></term>
<listitem>
<para>
The number of the color to retrieve information for. May be one of the
pre-defined color constants.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>r</parameter></term>
<listitem>
<para>
A reference to which to return the red component of the color. The value
returned to the reference will be between 0 and 1000.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>g</parameter></term>
<listitem>
<para>
A reference to which to return the green component of the color. The value
returned to the reference will be between 0 and 1000.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>b</parameter></term>
<listitem>
<para>
A reference to which to return the blue component of the color. The value
returned to the reference will be between 0 and 1000.
</para>
</listitem>
</varlistentry>
</variablelist>
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Returns <literal>-1</literal> if the function was successful, and
<literal>0</literal> if ncurses or terminal color capabilities have not been
initialized.
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><function>ncurses_init_color</function></member>
<member><function>ncurses_start_color</function></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->