4
4
<meta http-equiv="Content-Type" content="text/html; charset=US-ASCII">
5
5
<title>gimppalettes</title>
6
<meta name="generator" content="DocBook XSL Stylesheets V1.68.1">
6
<meta name="generator" content="DocBook XSL Stylesheets V1.72.0">
7
7
<link rel="start" href="index.html" title="GIMP Library Reference Manual">
8
8
<link rel="up" href="libgimp-data.html" title="Data Objects">
9
9
<link rel="prev" href="libgimp-gimppalette.html" title="gimppalette">
10
10
<link rel="next" href="libgimp-gimppattern.html" title="gimppattern">
11
<meta name="generator" content="GTK-Doc V1.7 (XML mode)">
11
<meta name="generator" content="GTK-Doc V1.8 (XML mode)">
12
12
<link rel="stylesheet" href="style.css" type="text/css">
13
<link rel="part" href="gimpdefinitions.html" title="Part I. GIMP Constants">
14
<link rel="part" href="libgimp.html" title="Part II. GIMP Library">
13
<link rel="part" href="libgimp.html" title="Part I. GIMP Library">
15
14
<link rel="chapter" href="libgimp-general.html" title="Functions not Related to Specific Images">
16
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and all their Properties">
15
<link rel="chapter" href="libgimp-image.html" title="Manupulating Images and their Properties">
17
16
<link rel="chapter" href="libgimp-data.html" title="Data Objects">
18
17
<link rel="chapter" href="libgimp-selectors.html" title="Controlling the Core's Selection Dialogs">
19
<link rel="part" href="libgimpui.html" title="Part III. GIMP User Interface Library">
18
<link rel="part" href="libgimpui.html" title="Part II. GIMP User Interface Library">
20
19
<link rel="chapter" href="libgimpui-hierarchy.html" title="Object Hierarchy">
20
<link rel="index" href="libgimp-index.html" title="Index">
21
<link rel="index" href="libgimp-index-new-in-2-2.html" title="Index of new symbols in GIMP 2.2">
22
<link rel="index" href="libgimp-index-new-in-2-4.html" title="Index of new symbols in GIMP 2.4">
23
<link rel="index" href="libgimp-index-deprecated.html" title="Index of deprecated symbols">
22
25
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
23
26
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
28
31
<th width="100%" align="center">GIMP Library Reference Manual</th>
29
32
<td><a accesskey="n" href="libgimp-gimppattern.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
31
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2538384" class="shortcut">Top</a>
34
<tr><td colspan="5" class="shortcuts"><nobr><a href="#id2581276" class="shortcut">Top</a>
33
<a href="#id2639362" class="shortcut">Description</a></nobr></td></tr>
36
<a href="#id2690206" class="shortcut">Description</a></nobr></td></tr>
35
38
<div class="refentry" lang="en">
36
39
<a name="libgimp-gimppalettes"></a><div class="titlepage"></div>
37
40
<div class="refnamediv"><table width="100%"><tr>
40
<a name="id2538384"></a><span class="refentrytitle">gimppalettes</span>
43
<a name="id2581276"></a><span class="refentrytitle">gimppalettes</span>
42
45
<p>gimppalettes — Operations related to palettes.</p>
52
gboolean <a href="libgimp-gimppalettes.html#gimp-palettes-refresh">gimp_palettes_refresh</a> (void);
53
gchar** <a href="libgimp-gimppalettes.html#gimp-palettes-get-list">gimp_palettes_get_list</a> (const gchar *filter,
55
gchar* <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette">gimp_palettes_get_palette</a> (gint *num_colors);
56
gboolean <a href="libgimp-gimppalettes.html#gimp-palettes-set-palette">gimp_palettes_set_palette</a> (const gchar *name);
57
gchar* <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette-entry">gimp_palettes_get_palette_entry</a> (const gchar *name,
55
gboolean <a href="libgimp-gimppalettes.html#gimp-palettes-refresh">gimp_palettes_refresh</a> (void);
56
gchar** <a href="libgimp-gimppalettes.html#gimp-palettes-get-list">gimp_palettes_get_list</a> (const gchar *filter,
58
gchar* <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette">gimp_palettes_get_palette</a> (gint *num_colors);
59
gboolean <a href="libgimp-gimppalettes.html#gimp-palettes-set-palette">gimp_palettes_set_palette</a> (const gchar *name);
60
gchar* <a href="libgimp-gimppalettes.html#gimp-palettes-get-palette-entry">gimp_palettes_get_palette_entry</a> (const gchar *name,
61
64
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
62
65
>GimpRGB</a> *color);
65
68
<div class="refsect1" lang="en">
66
<a name="id2639362"></a><h2>Description</h2>
69
<a name="id2690206"></a><h2>Description</h2>
68
71
Operations related to palettes.
71
74
<div class="refsect1" lang="en">
72
<a name="id2639377"></a><h2>Details</h2>
75
<a name="id2690222"></a><h2>Details</h2>
73
76
<div class="refsect2" lang="en">
74
<a name="id2639388"></a><h3>
77
<a name="id2690232"></a><h3>
75
78
<a name="gimp-palettes-refresh"></a>gimp_palettes_refresh ()</h3>
76
<a class="indexterm" name="id2639399"></a><pre class="programlisting">gboolean gimp_palettes_refresh (void);</pre>
79
<a class="indexterm" name="id2690243"></a><pre class="programlisting">gboolean gimp_palettes_refresh (void);</pre>
78
81
Refreshes current palettes. This function always succeeds.
86
89
<div class="variablelist"><table border="0">
87
90
<col align="left" valign="top">
90
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
92
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
91
93
<td> TRUE on success.
97
99
<div class="refsect2" lang="en">
98
<a name="id2638722"></a><h3>
100
<a name="id2690289"></a><h3>
99
101
<a name="gimp-palettes-get-list"></a>gimp_palettes_get_list ()</h3>
100
<a class="indexterm" name="id2638732"></a><pre class="programlisting">gchar** gimp_palettes_get_list (const gchar *filter,
101
gint *num_palettes);</pre>
102
<a class="indexterm" name="id2690300"></a><pre class="programlisting">gchar** gimp_palettes_get_list (const gchar *filter,
103
gint *num_palettes);</pre>
103
105
Retrieves a list of all of the available palettes
106
108
This procedure returns a complete listing of available palettes.
107
109
Each name returned can be used as input to the command
108
'gimp_context_set_palette'.</p>
110
<a href="libgimp-gimpcontext.html#gimp-context-set-palette"><code class="function">gimp_context_set_palette()</code></a>.</p>
113
115
<col align="left" valign="top">
117
<span class="term"><em class="parameter"><code>filter</code></em> :</span></td>
118
<td><span class="term"><em class="parameter"><code>filter</code></em> :</span></td>
118
119
<td> An optional regular expression used to filter the list.
123
<span class="term"><em class="parameter"><code>num_palettes</code></em> :</span></td>
123
<td><span class="term"><em class="parameter"><code>num_palettes</code></em> :</span></td>
124
124
<td> The number of palettes in the list.
129
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
128
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
130
129
<td> The list of palette names.
137
136
<div class="refsect2" lang="en">
138
<a name="id2638819"></a><h3>
137
<a name="id2671605"></a><h3>
139
138
<a name="gimp-palettes-get-palette"></a>gimp_palettes_get_palette ()</h3>
140
<a class="indexterm" name="id2638832"></a><pre class="programlisting">gchar* gimp_palettes_get_palette (gint *num_colors);</pre>
139
<a class="indexterm" name="id2671619"></a><pre class="programlisting">gchar* gimp_palettes_get_palette (gint *num_colors);</pre>
141
140
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
142
141
<h3 class="title">Warning</h3>
143
142
<p><code class="literal">gimp_palettes_get_palette</code> is deprecated and should not be used in newly-written code.</p>
152
151
<col align="left" valign="top">
156
<span class="term"><em class="parameter"><code>num_colors</code></em> :</span></td>
154
<td><span class="term"><em class="parameter"><code>num_colors</code></em> :</span></td>
157
155
<td> The palette num_colors.
162
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
159
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
163
160
<td> The palette name.
170
167
<div class="refsect2" lang="en">
171
<a name="id2638911"></a><h3>
168
<a name="id2671699"></a><h3>
172
169
<a name="gimp-palettes-set-palette"></a>gimp_palettes_set_palette ()</h3>
173
<a class="indexterm" name="id2638925"></a><pre class="programlisting">gboolean gimp_palettes_set_palette (const gchar *name);</pre>
170
<a class="indexterm" name="id2693496"></a><pre class="programlisting">gboolean gimp_palettes_set_palette (const gchar *name);</pre>
174
171
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
175
172
<h3 class="title">Warning</h3>
176
173
<p><code class="literal">gimp_palettes_set_palette</code> is deprecated and should not be used in newly-written code.</p>
184
181
<col align="left" valign="top">
188
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
184
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
189
185
<td> The palette name.
194
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
189
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
195
190
<td> TRUE on success.
202
197
<div class="refsect2" lang="en">
203
<a name="id2631458"></a><h3>
198
<a name="id2693577"></a><h3>
204
199
<a name="gimp-palettes-get-palette-entry"></a>gimp_palettes_get_palette_entry ()</h3>
205
<a class="indexterm" name="id2631472"></a><pre class="programlisting">gchar* gimp_palettes_get_palette_entry (const gchar *name,
200
<a class="indexterm" name="id2693590"></a><pre class="programlisting">gchar* gimp_palettes_get_palette_entry (const gchar *name,
209
204
href="../libgimpcolor/libgimpcolor-GimpRGB.html#GimpRGB"
210
205
>GimpRGB</a> *color);</pre>
211
206
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
222
217
<col align="left" valign="top">
226
<span class="term"><em class="parameter"><code>name</code></em> :</span></td>
220
<td><span class="term"><em class="parameter"><code>name</code></em> :</span></td>
227
221
<td> The palette name (\"\" means currently active palette).
232
<span class="term"><em class="parameter"><code>entry_num</code></em> :</span></td>
225
<td><span class="term"><em class="parameter"><code>entry_num</code></em> :</span></td>
233
226
<td> The entry to retrieve.
238
<span class="term"><em class="parameter"><code>num_colors</code></em> :</span></td>
230
<td><span class="term"><em class="parameter"><code>num_colors</code></em> :</span></td>
239
231
<td> The palette num_colors.
244
<span class="term"><em class="parameter"><code>color</code></em> :</span></td>
235
<td><span class="term"><em class="parameter"><code>color</code></em> :</span></td>
245
236
<td> The color requested.
250
<span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
240
<td><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></td>
251
241
<td> The palette name.