~ubuntu-branches/ubuntu/hoary/gimp/hoary

1 by Sebastien Bacher
Import upstream version 2.2.2
1
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>gimppalettes</title><meta name="generator" content="DocBook XSL Stylesheets V1.66.1"><link rel="start" href="index.html" title="GIMP Library Reference Manual"><link rel="up" href="libgimp-data.html" title="Data Objects"><link rel="prev" href="libgimp-gimppalette.html" title="gimppalette"><link rel="next" href="libgimp-gimppattern.html" title="gimppattern"><meta name="generator" content="GTK-Doc V1.2 (XML mode)"><style type="text/css">
2
        .synopsis, .classsynopsis {
3
            background: #eeeeee;
4
            border: solid 1px #aaaaaa;
5
            padding: 0.5em;
6
        }
7
        .programlisting {
8
            background: #eeeeff;
9
            border: solid 1px #aaaaff;
10
            padding: 0.5em;
11
        }
12
        .variablelist {
13
            padding: 4px;
14
            margin-left: 3em;
15
        }
16
        .navigation {
17
            background: #ffeeee;
18
            border: solid 1px #ffaaaa;
19
            margin-top: 0.5em;
20
            margin-bottom: 0.5em;
21
        }
22
        .navigation a {
23
            color: #770000;
24
        }
25
        .navigation a:visited {
26
            color: #550000;
27
        }
28
        .navigation .title {
29
            font-size: 200%;
30
        }
31
      </style></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"><tr valign="middle"><td><a accesskey="p" href="libgimp-gimppalette.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td><td><a accesskey="u" href="libgimp-data.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td><td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td><th width="100%" align="center">GIMP Library Reference Manual</th><td><a accesskey="n" href="libgimp-gimppattern.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td></tr></table><div class="refentry" lang="en"><a name="libgimp-gimppalettes"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">gimppalettes</span></h2><p>gimppalettes &#8212; Operations related to palettes.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><pre class="synopsis">
32
33
34
35
<a
36
href="../glib/glib-Basic-Types.html#gboolean"
37
>gboolean</a>    <a href="libgimp-gimppalettes.html#gimp-palettes-refresh">gimp_palettes_refresh</a>           (void);
38
<a
39
href="../glib/glib-Basic-Types.html#gchar"
40
>gchar</a>**     <a href="libgimp-gimppalettes.html#gimp-palettes-get-list">gimp_palettes_get_list</a>          (const <a
41
href="../glib/glib-Basic-Types.html#gchar"
42
>gchar</a> *filter,
43
                                             <a
44
href="../glib/glib-Basic-Types.html#gint"
45
>gint</a> *num_palettes);
46
<a
47
href="../glib/glib-Basic-Types.html#gchar"
48
>gchar</a>*      <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette">gimp_palettes_get_palette</a>       (<a
49
href="../glib/glib-Basic-Types.html#gint"
50
>gint</a> *num_colors);
51
<a
52
href="../glib/glib-Basic-Types.html#gboolean"
53
>gboolean</a>    <a href="libgimp-gimppalettes.html#gimp-palettes-set-palette">gimp_palettes_set_palette</a>       (const <a
54
href="../glib/glib-Basic-Types.html#gchar"
55
>gchar</a> *name);
56
<a
57
href="../glib/glib-Basic-Types.html#gchar"
58
>gchar</a>*      <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette-entry">gimp_palettes_get_palette_entry</a> (const <a
59
href="../glib/glib-Basic-Types.html#gchar"
60
>gchar</a> *name,
61
                                             <a
62
href="../glib/glib-Basic-Types.html#gint"
63
>gint</a> entry_num,
64
                                             <a
65
href="../glib/glib-Basic-Types.html#gint"
66
>gint</a> *num_colors,
67
                                             <a
68
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
69
>GimpRGB</a> *color);
70
</pre></div><div class="refsect1" lang="en"><a name="id2644988"></a><h2>Description</h2><p>
71
Operations related to palettes.
72
</p></div><div class="refsect1" lang="en"><a name="id2644997"></a><h2>Details</h2><div class="refsect2" lang="en"><a name="id2645003"></a><h3><a name="gimp-palettes-refresh"></a>gimp_palettes_refresh ()</h3><a class="indexterm" name="id2645011"></a><pre class="programlisting"><a
73
href="../glib/glib-Basic-Types.html#gboolean"
74
>gboolean</a>    gimp_palettes_refresh           (void);</pre><p>
75
Refreshes current palettes. This function always succeeds.
76
</p><p>
77
This procedure retrieves all palettes currently in the user's
78
palette path and updates the palette dialogs accordingly.</p><p>
79
80
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
81
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2645048"></a><h3><a name="gimp-palettes-get-list"></a>gimp_palettes_get_list ()</h3><a class="indexterm" name="id2653140"></a><pre class="programlisting"><a
82
href="../glib/glib-Basic-Types.html#gchar"
83
>gchar</a>**     gimp_palettes_get_list          (const <a
84
href="../glib/glib-Basic-Types.html#gchar"
85
>gchar</a> *filter,
86
                                             <a
87
href="../glib/glib-Basic-Types.html#gint"
88
>gint</a> *num_palettes);</pre><p>
89
Retrieves a list of all of the available palettes
90
</p><p>
91
This procedure returns a complete listing of available palettes.
92
Each name returned can be used as input to the command
93
'gimp_context_set_palette'.</p><p>
94
95
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>filter</tt></i> :</span></td><td> An optional regular expression used to filter the list.
96
</td></tr><tr><td><span class="term"><i class="parameter"><tt>num_palettes</tt></i> :</span></td><td> The number of palettes in the list.
97
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The list of palette names.
98
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2653212"></a><h3><a name="gimp-palettes-get-palette"></a>gimp_palettes_get_palette ()</h3><a class="indexterm" name="id2653220"></a><pre class="programlisting"><a
99
href="../glib/glib-Basic-Types.html#gchar"
100
>gchar</a>*      gimp_palettes_get_palette       (<a
101
href="../glib/glib-Basic-Types.html#gint"
102
>gint</a> *num_colors);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">gimp_palettes_get_palette</tt> is deprecated and should not be used in newly-written code.</p></div><p>
103
This procedure is deprecated! Use <a href="libgimp-gimpcontext.html#gimp-context-get-palette"><tt class="function">gimp_context_get_palette()</tt></a>
104
instead.</p><p>
105
106
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>num_colors</tt></i> :</span></td><td> The palette num_colors.
107
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The palette name.
108
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2652274"></a><h3><a name="gimp-palettes-set-palette"></a>gimp_palettes_set_palette ()</h3><a class="indexterm" name="id2652282"></a><pre class="programlisting"><a
109
href="../glib/glib-Basic-Types.html#gboolean"
110
>gboolean</a>    gimp_palettes_set_palette       (const <a
111
href="../glib/glib-Basic-Types.html#gchar"
112
>gchar</a> *name);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">gimp_palettes_set_palette</tt> is deprecated and should not be used in newly-written code.</p></div><p>
113
This procedure is deprecated! Use <a href="libgimp-gimpcontext.html#gimp-context-set-palette"><tt class="function">gimp_context_set_palette()</tt></a> instead.</p><p>
114
115
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i> :</span></td><td> The palette name.
116
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> TRUE on success.
117
</td></tr></tbody></table></div></div><hr><div class="refsect2" lang="en"><a name="id2652342"></a><h3><a name="gimp-palettes-get-palette-entry"></a>gimp_palettes_get_palette_entry ()</h3><a class="indexterm" name="id2652351"></a><pre class="programlisting"><a
118
href="../glib/glib-Basic-Types.html#gchar"
119
>gchar</a>*      gimp_palettes_get_palette_entry (const <a
120
href="../glib/glib-Basic-Types.html#gchar"
121
>gchar</a> *name,
122
                                             <a
123
href="../glib/glib-Basic-Types.html#gint"
124
>gint</a> entry_num,
125
                                             <a
126
href="../glib/glib-Basic-Types.html#gint"
127
>gint</a> *num_colors,
128
                                             <a
129
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
130
>GimpRGB</a> *color);</pre><div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Warning</h3><p><tt class="literal">gimp_palettes_get_palette_entry</tt> is deprecated and should not be used in newly-written code.</p></div><p>
131
This procedure is deprecated! Use <a href="libgimp-gimppalette.html#gimp-palette-entry-get-color"><tt class="function">gimp_palette_entry_get_color()</tt></a>
132
instead.</p><p>
133
134
</p><div class="variablelist"><table border="0"><col align="left" valign="top"><tbody><tr><td><span class="term"><i class="parameter"><tt>name</tt></i> :</span></td><td> The palette name (\"\" means currently active palette).
135
</td></tr><tr><td><span class="term"><i class="parameter"><tt>entry_num</tt></i> :</span></td><td> The entry to retrieve.
136
</td></tr><tr><td><span class="term"><i class="parameter"><tt>num_colors</tt></i> :</span></td><td> The palette num_colors.
137
</td></tr><tr><td><span class="term"><i class="parameter"><tt>color</tt></i> :</span></td><td> The color requested.
138
</td></tr><tr><td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td><td> The palette name.
139
</td></tr></tbody></table></div></div></div></div><table class="navigation" width="100%" summary="Navigation footer" cellpadding="2" cellspacing="0"><tr valign="middle"><td align="left"><a accesskey="p" href="libgimp-gimppalette.html"><b>&lt;&lt; gimppalette</b></a></td><td align="right"><a accesskey="n" href="libgimp-gimppattern.html"><b>gimppattern &gt;&gt;</b></a></td></tr></table></body></html>