1
<?xml version="1.0" encoding="UTF-8" ?>
2
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
3
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
5
<refentry id="libgimp-gimppalette">
7
<refentrytitle role="top_of_page" id="libgimp-gimppalette.top_of_page">gimppalette</refentrytitle>
8
<manvolnum>3</manvolnum>
9
<refmiscinfo>LIBGIMP Library</refmiscinfo>
13
<refname>gimppalette</refname>
14
<refpurpose>Functions operating on a single palette.</refpurpose>
17
<refsynopsisdiv id="libgimp-gimppalette.synopsis" role="synopsis">
18
<title role="synopsis.title">Synopsis</title>
21
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-new">gimp_palette_new</link> (const <link linkend="gchar">gchar</link> *name);
22
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-duplicate">gimp_palette_duplicate</link> (const <link linkend="gchar">gchar</link> *name);
23
<link linkend="gchar">gchar</link>* <link linkend="gimp-palette-rename">gimp_palette_rename</link> (const <link linkend="gchar">gchar</link> *name,
24
const <link linkend="gchar">gchar</link> *new_name);
25
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-delete">gimp_palette_delete</link> (const <link linkend="gchar">gchar</link> *name);
26
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-info">gimp_palette_get_info</link> (const <link linkend="gchar">gchar</link> *name,
27
<link linkend="gint">gint</link> *num_colors);
28
<link linkend="GimpRGB">GimpRGB</link>* <link linkend="gimp-palette-get-colors">gimp_palette_get_colors</link> (const <link linkend="gchar">gchar</link> *name,
29
<link linkend="gint">gint</link> *num_colors);
30
<link linkend="gint">gint</link> <link linkend="gimp-palette-get-columns">gimp_palette_get_columns</link> (const <link linkend="gchar">gchar</link> *name);
31
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-columns">gimp_palette_set_columns</link> (const <link linkend="gchar">gchar</link> *name,
32
<link linkend="gint">gint</link> columns);
33
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-add-entry">gimp_palette_add_entry</link> (const <link linkend="gchar">gchar</link> *name,
34
const <link linkend="gchar">gchar</link> *entry_name,
35
const <link linkend="GimpRGB">GimpRGB</link> *color,
36
<link linkend="gint">gint</link> *entry_num);
37
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-delete-entry">gimp_palette_delete_entry</link> (const <link linkend="gchar">gchar</link> *name,
38
<link linkend="gint">gint</link> entry_num);
39
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-get-color">gimp_palette_entry_get_color</link> (const <link linkend="gchar">gchar</link> *name,
40
<link linkend="gint">gint</link> entry_num,
41
<link linkend="GimpRGB">GimpRGB</link> *color);
42
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-set-color">gimp_palette_entry_set_color</link> (const <link linkend="gchar">gchar</link> *name,
43
<link linkend="gint">gint</link> entry_num,
44
const <link linkend="GimpRGB">GimpRGB</link> *color);
45
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-get-name">gimp_palette_entry_get_name</link> (const <link linkend="gchar">gchar</link> *name,
46
<link linkend="gint">gint</link> entry_num,
47
<link linkend="gchar">gchar</link> **entry_name);
48
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-entry-set-name">gimp_palette_entry_set_name</link> (const <link linkend="gchar">gchar</link> *name,
49
<link linkend="gint">gint</link> entry_num,
50
const <link linkend="gchar">gchar</link> *entry_name);
51
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-foreground">gimp_palette_get_foreground</link> (<link linkend="GimpRGB">GimpRGB</link> *foreground);
52
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-get-background">gimp_palette_get_background</link> (<link linkend="GimpRGB">GimpRGB</link> *background);
53
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-foreground">gimp_palette_set_foreground</link> (const <link linkend="GimpRGB">GimpRGB</link> *foreground);
54
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-background">gimp_palette_set_background</link> (const <link linkend="GimpRGB">GimpRGB</link> *background);
55
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-set-default-colors">gimp_palette_set_default_colors</link> (void);
56
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-swap-colors">gimp_palette_swap_colors</link> (void);
57
<link linkend="gboolean">gboolean</link> <link linkend="gimp-palette-is-editable">gimp_palette_is_editable</link> (const <link linkend="gchar">gchar</link> *name);
69
<refsect1 id="libgimp-gimppalette.description" role="desc">
70
<title role="desc.title">Description</title>
72
Functions operating on a single palette.
76
<refsect1 id="libgimp-gimppalette.details" role="details">
77
<title role="details.title">Details</title>
78
<refsect2 id="gimp-palette-new" role="function" condition="since:GIMP 2.2">
79
<title>gimp_palette_new ()</title>
80
<indexterm zone="gimp-palette-new" role="GIMP 2.2"><primary sortas="gimp_palette_new">gimp_palette_new</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_new (const <link linkend="gchar">gchar</link> *name);</programlisting>
85
This procedure creates a new, uninitialized palette</para>
87
</para><variablelist role="params">
88
<varlistentry><term><parameter>name</parameter> :</term>
89
<listitem><simpara> The requested name of the new palette.
90
</simpara></listitem></varlistentry>
91
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The actual new palette name.
93
</simpara></listitem></varlistentry>
94
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
95
<refsect2 id="gimp-palette-duplicate" role="function" condition="since:GIMP 2.2">
96
<title>gimp_palette_duplicate ()</title>
97
<indexterm zone="gimp-palette-duplicate" role="GIMP 2.2"><primary sortas="gimp_palette_duplicate">gimp_palette_duplicate</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_duplicate (const <link linkend="gchar">gchar</link> *name);</programlisting>
102
This procedure creates an identical palette by a different name</para>
104
</para><variablelist role="params">
105
<varlistentry><term><parameter>name</parameter> :</term>
106
<listitem><simpara> The palette name.
107
</simpara></listitem></varlistentry>
108
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The name of the palette's copy.
110
</simpara></listitem></varlistentry>
111
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
112
<refsect2 id="gimp-palette-rename" role="function" condition="since:GIMP 2.2">
113
<title>gimp_palette_rename ()</title>
114
<indexterm zone="gimp-palette-rename" role="GIMP 2.2"><primary sortas="gimp_palette_rename">gimp_palette_rename</primary></indexterm><programlisting><link linkend="gchar">gchar</link>* gimp_palette_rename (const <link linkend="gchar">gchar</link> *name,
115
const <link linkend="gchar">gchar</link> *new_name);</programlisting>
120
This procedure renames a palette</para>
122
</para><variablelist role="params">
123
<varlistentry><term><parameter>name</parameter> :</term>
124
<listitem><simpara> The palette name.
125
</simpara></listitem></varlistentry>
126
<varlistentry><term><parameter>new_name</parameter> :</term>
127
<listitem><simpara> The new name of the palette.
128
</simpara></listitem></varlistentry>
129
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The actual new name of the palette.
131
</simpara></listitem></varlistentry>
132
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
133
<refsect2 id="gimp-palette-delete" role="function" condition="since:GIMP 2.2">
134
<title>gimp_palette_delete ()</title>
135
<indexterm zone="gimp-palette-delete" role="GIMP 2.2"><primary sortas="gimp_palette_delete">gimp_palette_delete</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_delete (const <link linkend="gchar">gchar</link> *name);</programlisting>
140
This procedure deletes a palette</para>
142
</para><variablelist role="params">
143
<varlistentry><term><parameter>name</parameter> :</term>
144
<listitem><simpara> The palette name.
145
</simpara></listitem></varlistentry>
146
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
148
</simpara></listitem></varlistentry>
149
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
150
<refsect2 id="gimp-palette-get-info" role="function" condition="since:GIMP 2.2">
151
<title>gimp_palette_get_info ()</title>
152
<indexterm zone="gimp-palette-get-info" role="GIMP 2.2"><primary sortas="gimp_palette_get_info">gimp_palette_get_info</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_info (const <link linkend="gchar">gchar</link> *name,
153
<link linkend="gint">gint</link> *num_colors);</programlisting>
155
Retrieve information about the specified palette.
158
This procedure retrieves information about the specified palette.
159
This includes the name, and the number of colors.</para>
161
</para><variablelist role="params">
162
<varlistentry><term><parameter>name</parameter> :</term>
163
<listitem><simpara> The palette name.
164
</simpara></listitem></varlistentry>
165
<varlistentry><term><parameter>num_colors</parameter> :</term>
166
<listitem><simpara> The number of colors in the palette.
167
</simpara></listitem></varlistentry>
168
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
170
</simpara></listitem></varlistentry>
171
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
172
<refsect2 id="gimp-palette-get-colors" role="function" condition="since:GIMP 2.6">
173
<title>gimp_palette_get_colors ()</title>
174
<indexterm zone="gimp-palette-get-colors" role="GIMP 2.6"><primary sortas="gimp_palette_get_colors">gimp_palette_get_colors</primary></indexterm><programlisting><link linkend="GimpRGB">GimpRGB</link>* gimp_palette_get_colors (const <link linkend="gchar">gchar</link> *name,
175
<link linkend="gint">gint</link> *num_colors);</programlisting>
177
Gets all colors from the specified palette.
180
This procedure retrieves all color entries of the specified palette.</para>
182
</para><variablelist role="params">
183
<varlistentry><term><parameter>name</parameter> :</term>
184
<listitem><simpara> The palette name.
185
</simpara></listitem></varlistentry>
186
<varlistentry><term><parameter>num_colors</parameter> :</term>
187
<listitem><simpara> Length of the colors array.
188
</simpara></listitem></varlistentry>
189
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The colors in the palette.
191
</simpara></listitem></varlistentry>
192
</variablelist><para role="since">Since GIMP 2.6</para></refsect2>
193
<refsect2 id="gimp-palette-get-columns" role="function" condition="since:GIMP 2.4">
194
<title>gimp_palette_get_columns ()</title>
195
<indexterm zone="gimp-palette-get-columns" role="GIMP 2.4"><primary sortas="gimp_palette_get_columns">gimp_palette_get_columns</primary></indexterm><programlisting><link linkend="gint">gint</link> gimp_palette_get_columns (const <link linkend="gchar">gchar</link> *name);</programlisting>
197
Retrieves the number of columns to use to display this palette
200
This procedures retrieves the prefered number of columns to use when
201
the palette is being displayed.</para>
203
</para><variablelist role="params">
204
<varlistentry><term><parameter>name</parameter> :</term>
205
<listitem><simpara> The palette name.
206
</simpara></listitem></varlistentry>
207
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> The number of columns used to display this palette.
209
</simpara></listitem></varlistentry>
210
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
211
<refsect2 id="gimp-palette-set-columns" role="function" condition="since:GIMP 2.4">
212
<title>gimp_palette_set_columns ()</title>
213
<indexterm zone="gimp-palette-set-columns" role="GIMP 2.4"><primary sortas="gimp_palette_set_columns">gimp_palette_set_columns</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_columns (const <link linkend="gchar">gchar</link> *name,
214
<link linkend="gint">gint</link> columns);</programlisting>
216
Sets the number of columns to use when displaying the palette
219
This procedures allows to control how many colors are shown per row
220
when the palette is being displayed. This value can only be changed
221
if the palette is writable. The maximum allowed value is 64.</para>
223
</para><variablelist role="params">
224
<varlistentry><term><parameter>name</parameter> :</term>
225
<listitem><simpara> The palette name.
226
</simpara></listitem></varlistentry>
227
<varlistentry><term><parameter>columns</parameter> :</term>
228
<listitem><simpara> The new number of columns.
229
</simpara></listitem></varlistentry>
230
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
232
</simpara></listitem></varlistentry>
233
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>
234
<refsect2 id="gimp-palette-add-entry" role="function" condition="since:GIMP 2.2">
235
<title>gimp_palette_add_entry ()</title>
236
<indexterm zone="gimp-palette-add-entry" role="GIMP 2.2"><primary sortas="gimp_palette_add_entry">gimp_palette_add_entry</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_add_entry (const <link linkend="gchar">gchar</link> *name,
237
const <link linkend="gchar">gchar</link> *entry_name,
238
const <link linkend="GimpRGB">GimpRGB</link> *color,
239
<link linkend="gint">gint</link> *entry_num);</programlisting>
241
Adds a palette entry to the specified palette.
244
This procedure adds an entry to the specifed palette. It returns an
245
error if the entry palette does not exist.</para>
247
</para><variablelist role="params">
248
<varlistentry><term><parameter>name</parameter> :</term>
249
<listitem><simpara> The palette name.
250
</simpara></listitem></varlistentry>
251
<varlistentry><term><parameter>entry_name</parameter> :</term>
252
<listitem><simpara> The name of the entry.
253
</simpara></listitem></varlistentry>
254
<varlistentry><term><parameter>color</parameter> :</term>
255
<listitem><simpara> The new entry's color color.
256
</simpara></listitem></varlistentry>
257
<varlistentry><term><parameter>entry_num</parameter> :</term>
258
<listitem><simpara> The index of the added entry.
259
</simpara></listitem></varlistentry>
260
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
262
</simpara></listitem></varlistentry>
263
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
264
<refsect2 id="gimp-palette-delete-entry" role="function" condition="since:GIMP 2.2">
265
<title>gimp_palette_delete_entry ()</title>
266
<indexterm zone="gimp-palette-delete-entry" role="GIMP 2.2"><primary sortas="gimp_palette_delete_entry">gimp_palette_delete_entry</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_delete_entry (const <link linkend="gchar">gchar</link> *name,
267
<link linkend="gint">gint</link> entry_num);</programlisting>
269
Deletes a palette entry from the specified palette.
272
This procedure deletes an entry from the specifed palette. It
273
returns an error if the entry palette does not exist.</para>
275
</para><variablelist role="params">
276
<varlistentry><term><parameter>name</parameter> :</term>
277
<listitem><simpara> The palette name.
278
</simpara></listitem></varlistentry>
279
<varlistentry><term><parameter>entry_num</parameter> :</term>
280
<listitem><simpara> The index of the added entry.
281
</simpara></listitem></varlistentry>
282
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
284
</simpara></listitem></varlistentry>
285
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
286
<refsect2 id="gimp-palette-entry-get-color" role="function" condition="since:GIMP 2.2">
287
<title>gimp_palette_entry_get_color ()</title>
288
<indexterm zone="gimp-palette-entry-get-color" role="GIMP 2.2"><primary sortas="gimp_palette_entry_get_color">gimp_palette_entry_get_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_get_color (const <link linkend="gchar">gchar</link> *name,
289
<link linkend="gint">gint</link> entry_num,
290
<link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
292
Gets the specified palette entry from the specified palette.
295
This procedure retrieves the color of the zero-based entry specifed
296
for the specified palette. It returns an error if the entry does not
299
</para><variablelist role="params">
300
<varlistentry><term><parameter>name</parameter> :</term>
301
<listitem><simpara> The palette name.
302
</simpara></listitem></varlistentry>
303
<varlistentry><term><parameter>entry_num</parameter> :</term>
304
<listitem><simpara> The entry to retrieve.
305
</simpara></listitem></varlistentry>
306
<varlistentry><term><parameter>color</parameter> :</term>
307
<listitem><simpara> The color requested.
308
</simpara></listitem></varlistentry>
309
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
311
</simpara></listitem></varlistentry>
312
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
313
<refsect2 id="gimp-palette-entry-set-color" role="function" condition="since:GIMP 2.2">
314
<title>gimp_palette_entry_set_color ()</title>
315
<indexterm zone="gimp-palette-entry-set-color" role="GIMP 2.2"><primary sortas="gimp_palette_entry_set_color">gimp_palette_entry_set_color</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_set_color (const <link linkend="gchar">gchar</link> *name,
316
<link linkend="gint">gint</link> entry_num,
317
const <link linkend="GimpRGB">GimpRGB</link> *color);</programlisting>
319
Sets the specified palette entry in the specified palette.
322
This procedure sets the color of the zero-based entry specifed for
323
the specified palette. It returns an error if the entry does not
326
</para><variablelist role="params">
327
<varlistentry><term><parameter>name</parameter> :</term>
328
<listitem><simpara> The palette name.
329
</simpara></listitem></varlistentry>
330
<varlistentry><term><parameter>entry_num</parameter> :</term>
331
<listitem><simpara> The entry to retrieve.
332
</simpara></listitem></varlistentry>
333
<varlistentry><term><parameter>color</parameter> :</term>
334
<listitem><simpara> The new color.
335
</simpara></listitem></varlistentry>
336
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
338
</simpara></listitem></varlistentry>
339
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
340
<refsect2 id="gimp-palette-entry-get-name" role="function" condition="since:GIMP 2.2">
341
<title>gimp_palette_entry_get_name ()</title>
342
<indexterm zone="gimp-palette-entry-get-name" role="GIMP 2.2"><primary sortas="gimp_palette_entry_get_name">gimp_palette_entry_get_name</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_get_name (const <link linkend="gchar">gchar</link> *name,
343
<link linkend="gint">gint</link> entry_num,
344
<link linkend="gchar">gchar</link> **entry_name);</programlisting>
346
Gets the specified palette entry from the specified palette.
349
This procedure retrieves the name of the zero-based entry specifed
350
for the specified palette. It returns an error if the entry does not
353
</para><variablelist role="params">
354
<varlistentry><term><parameter>name</parameter> :</term>
355
<listitem><simpara> The palette name.
356
</simpara></listitem></varlistentry>
357
<varlistentry><term><parameter>entry_num</parameter> :</term>
358
<listitem><simpara> The entry to retrieve.
359
</simpara></listitem></varlistentry>
360
<varlistentry><term><parameter>entry_name</parameter> :</term>
361
<listitem><simpara> The name requested.
362
</simpara></listitem></varlistentry>
363
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
365
</simpara></listitem></varlistentry>
366
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
367
<refsect2 id="gimp-palette-entry-set-name" role="function" condition="since:GIMP 2.2">
368
<title>gimp_palette_entry_set_name ()</title>
369
<indexterm zone="gimp-palette-entry-set-name" role="GIMP 2.2"><primary sortas="gimp_palette_entry_set_name">gimp_palette_entry_set_name</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_entry_set_name (const <link linkend="gchar">gchar</link> *name,
370
<link linkend="gint">gint</link> entry_num,
371
const <link linkend="gchar">gchar</link> *entry_name);</programlisting>
373
Sets the specified palette entry in the specified palette.
376
This procedure sets the name of the zero-based entry specifed for
377
the specified palette. It returns an error if the entry does not
380
</para><variablelist role="params">
381
<varlistentry><term><parameter>name</parameter> :</term>
382
<listitem><simpara> The palette name.
383
</simpara></listitem></varlistentry>
384
<varlistentry><term><parameter>entry_num</parameter> :</term>
385
<listitem><simpara> The entry to retrieve.
386
</simpara></listitem></varlistentry>
387
<varlistentry><term><parameter>entry_name</parameter> :</term>
388
<listitem><simpara> The new name.
389
</simpara></listitem></varlistentry>
390
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
392
</simpara></listitem></varlistentry>
393
</variablelist><para role="since">Since GIMP 2.2</para></refsect2>
394
<refsect2 id="gimp-palette-get-foreground" role="function" condition="deprecated:">
395
<title>gimp_palette_get_foreground ()</title>
396
<indexterm zone="gimp-palette-get-foreground" role="deprecated"><primary sortas="gimp_palette_get_foreground">gimp_palette_get_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_foreground (<link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
397
<warning><para><literal>gimp_palette_get_foreground</literal> is deprecated and should not be used in newly-written code.</para></warning>
399
Get the current GIMP foreground color.
402
This procedure retrieves the current GIMP foreground color. The
403
foreground color is used in a variety of tools such as paint tools,
404
blending, and bucket fill.</para>
406
</para><variablelist role="params">
407
<varlistentry><term><parameter>foreground</parameter> :</term>
408
<listitem><simpara> The foreground color.
409
</simpara></listitem></varlistentry>
410
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
411
</simpara></listitem></varlistentry>
412
</variablelist></refsect2>
413
<refsect2 id="gimp-palette-get-background" role="function" condition="deprecated:">
414
<title>gimp_palette_get_background ()</title>
415
<indexterm zone="gimp-palette-get-background" role="deprecated"><primary sortas="gimp_palette_get_background">gimp_palette_get_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_get_background (<link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
416
<warning><para><literal>gimp_palette_get_background</literal> is deprecated and should not be used in newly-written code.</para></warning>
418
Get the current GIMP background color.
421
This procedure retrieves the current GIMP background color. The
422
background color is used in a variety of tools such as blending,
423
erasing (with non-alpha images), and image filling.</para>
425
</para><variablelist role="params">
426
<varlistentry><term><parameter>background</parameter> :</term>
427
<listitem><simpara> The background color.
428
</simpara></listitem></varlistentry>
429
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
430
</simpara></listitem></varlistentry>
431
</variablelist></refsect2>
432
<refsect2 id="gimp-palette-set-foreground" role="function" condition="deprecated:">
433
<title>gimp_palette_set_foreground ()</title>
434
<indexterm zone="gimp-palette-set-foreground" role="deprecated"><primary sortas="gimp_palette_set_foreground">gimp_palette_set_foreground</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_foreground (const <link linkend="GimpRGB">GimpRGB</link> *foreground);</programlisting>
435
<warning><para><literal>gimp_palette_set_foreground</literal> is deprecated and should not be used in newly-written code.</para></warning>
437
Set the current GIMP foreground color.
440
This procedure sets the current GIMP foreground color. After this is
441
set, operations which use foreground such as paint tools, blending,
442
and bucket fill will use the new value.</para>
444
</para><variablelist role="params">
445
<varlistentry><term><parameter>foreground</parameter> :</term>
446
<listitem><simpara> The foreground color.
447
</simpara></listitem></varlistentry>
448
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
449
</simpara></listitem></varlistentry>
450
</variablelist></refsect2>
451
<refsect2 id="gimp-palette-set-background" role="function" condition="deprecated:">
452
<title>gimp_palette_set_background ()</title>
453
<indexterm zone="gimp-palette-set-background" role="deprecated"><primary sortas="gimp_palette_set_background">gimp_palette_set_background</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_background (const <link linkend="GimpRGB">GimpRGB</link> *background);</programlisting>
454
<warning><para><literal>gimp_palette_set_background</literal> is deprecated and should not be used in newly-written code.</para></warning>
456
Set the current GIMP background color.
459
This procedure sets the current GIMP background color. After this is
460
set, operations which use background such as blending, filling
461
images, clearing, and erasing (in non-alpha images) will use the new
464
</para><variablelist role="params">
465
<varlistentry><term><parameter>background</parameter> :</term>
466
<listitem><simpara> The background color.
467
</simpara></listitem></varlistentry>
468
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
469
</simpara></listitem></varlistentry>
470
</variablelist></refsect2>
471
<refsect2 id="gimp-palette-set-default-colors" role="function" condition="deprecated:">
472
<title>gimp_palette_set_default_colors ()</title>
473
<indexterm zone="gimp-palette-set-default-colors" role="deprecated"><primary sortas="gimp_palette_set_default_colors">gimp_palette_set_default_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_set_default_colors (void);</programlisting>
474
<warning><para><literal>gimp_palette_set_default_colors</literal> is deprecated and should not be used in newly-written code.</para></warning>
476
Set the current GIMP foreground and background colors to black and
480
This procedure sets the current GIMP foreground and background
481
colors to their initial default values, black and white.</para>
483
</para><variablelist role="params">
484
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
485
</simpara></listitem></varlistentry>
486
</variablelist></refsect2>
487
<refsect2 id="gimp-palette-swap-colors" role="function" condition="deprecated:">
488
<title>gimp_palette_swap_colors ()</title>
489
<indexterm zone="gimp-palette-swap-colors" role="deprecated"><primary sortas="gimp_palette_swap_colors">gimp_palette_swap_colors</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_swap_colors (void);</programlisting>
490
<warning><para><literal>gimp_palette_swap_colors</literal> is deprecated and should not be used in newly-written code.</para></warning>
492
Swap the current GIMP foreground and background colors.
495
This procedure swaps the current GIMP foreground and background
496
colors, so that the new foreground color becomes the old background
497
color and vice versa.</para>
499
</para><variablelist role="params">
500
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE on success.
501
</simpara></listitem></varlistentry>
502
</variablelist></refsect2>
503
<refsect2 id="gimp-palette-is-editable" role="function" condition="since:GIMP 2.4">
504
<title>gimp_palette_is_editable ()</title>
505
<indexterm zone="gimp-palette-is-editable" role="GIMP 2.4"><primary sortas="gimp_palette_is_editable">gimp_palette_is_editable</primary></indexterm><programlisting><link linkend="gboolean">gboolean</link> gimp_palette_is_editable (const <link linkend="gchar">gchar</link> *name);</programlisting>
507
Tests if palette can be edited
510
Returns TRUE if you have permission to change the palette</para>
512
</para><variablelist role="params">
513
<varlistentry><term><parameter>name</parameter> :</term>
514
<listitem><simpara> The palette name.
515
</simpara></listitem></varlistentry>
516
<varlistentry><term><emphasis>Returns</emphasis> :</term><listitem><simpara> TRUE if the palette can be edited.
518
</simpara></listitem></varlistentry>
519
</variablelist><para role="since">Since GIMP 2.4</para></refsect2>