summaryrefslogtreecommitdiff
path: root/docs/reference/pygtk-gtkcolorselection.xml
blob: 2f0cd263aaa809688a2e3b1e606ba0a4083e3411 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
<?xml version="1.0" standalone="no"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">

<refentry id="class-gtkcolorselection">
  <refnamediv>
    <refname>gtk.ColorSelection</refname>
    <refpurpose>a widget used to select a color.</refpurpose>
  </refnamediv>

  <refsect1>
    <title>Synopsis</title>

    <classsynopsis language="python">
      <ooclass><classname>gtk.ColorSelection</classname></ooclass>
      <ooclass><classname><link
linkend="class-gtkvbox">gtk.VBox</link></classname></ooclass>
      <constructorsynopsis language="python">
	<methodname><link
linkend="constructor-gtkcolorselection">gtk.ColorSelection</link></methodname>
	<methodparam></methodparam>  </constructorsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-has-opacity-control">get_has_opacity_control</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-has-opacity-control">set_has_opacity_control</link></methodname>
	<methodparam><parameter
		       role="keyword">has_opacity</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-has-palette">get_has_palette</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-has-palette">set_has_palette</link></methodname>
	<methodparam><parameter
		       role="keyword">has_palette</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-current-color">set_current_color</link></methodname>
	<methodparam><parameter
		       role="keyword">color</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-current-alpha">set_current_alpha</link></methodname>
	<methodparam><parameter
		       role="keyword">alpha</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-current-color">get_current_color</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-current-alpha">get_current_alpha</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-previous-color">set_previous_color</link></methodname>
	<methodparam><parameter
		       role="keyword">color</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--set-previous-alpha">set_previous_alpha</link></methodname>
	<methodparam><parameter
		       role="keyword">alpha</parameter></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-previous-color">get_previous_color</link></methodname>
	<methodparam></methodparam>
      </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--get-previous-alpha">get_previous_alpha</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
      <methodsynopsis language="python">
	<methodname><link
linkend="method-gtkcolorselection--is-adjusting">is_adjusting</link></methodname>
	<methodparam></methodparam>  </methodsynopsis>
    </classsynopsis>

<programlisting>
<emphasis role="bold">Functions</emphasis>

<methodsynopsis language="python">
    <methodname><link linkend="function-gtk--color-selection-palette-from-string">gtk.color_selection_palette_from_string</link></methodname>
    <methodparam><parameter role="keyword">str</parameter></methodparam>
  </methodsynopsis><methodsynopsis language="python">
    <methodname><link linkend="function-gtk--color-selection-palette-to-string">gtk.color_selection_palette_to_string</link></methodname>
    <methodparam><parameter role="keyword">colors</parameter></methodparam>
  </methodsynopsis></programlisting>

  </refsect1>

  <refsect1>
    <title>Ancestry</title>

    <synopsis>+-- <link linkend="class-gobject">gobject.GObject</link>
  +--<link linkend="class-gtkobject">gtk.Object</link>
    +-- <link linkend="class-gtkwidget">gtk.Widget</link>
      +-- <link linkend="class-gtkcontainer">gtk.Container</link>
        +-- <link linkend="class-gtkbox">gtk.Box</link>
          +-- <link linkend="class-gtkvbox">gtk.VBox</link>
            +-- <link linkend="class-gtkcolorselection">gtk.ColorSelection</link>
</synopsis>

  </refsect1>

  <refsect1 id="properties-gtkcolorselection">
    <title>gtk.ColorSelection Properties</title>

    <para><link linkend="properties-gtkobject">gtk.Object Properties</link></para>
    <para><link linkend="properties-gtkwidget">gtk.Widget Properties</link></para>
    <para><link linkend="properties-gtkcontainer">gtk.Container Properties</link></para>
    <para><link linkend="properties-gtkbox">gtk.Box Properties</link></para>

    <blockquote role="properties">
      <informaltable pgwide="1" frame="none">
	<tgroup cols="3">
	  <colspec column="1" colwidth="1in"/>
	  <colspec column="2" colwidth="1in"/>
	  <colspec column="3" colwidth="3.5in"/>
	  <tbody>

            <row valign="top">
              <entry>"current-alpha"</entry>
              <entry>Read/Write</entry>
              <entry>The current opacity value (0 fully transparent, 65535 fully
              opaque)</entry>
            </row>

            <row valign="top">
              <entry>"current-color"</entry>
              <entry>Read/Write</entry>
              <entry>The current color as a <link
              linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link></entry>
            </row>

            <row valign="top">
              <entry>"has-opacity-control"</entry>
              <entry>Read/Write</entry>
              <entry>If <literal>True</literal>, the color selector should allow
              setting opacity</entry>
            </row>

            <row valign="top">
              <entry>"has-palette"</entry>
              <entry>Read/Write</entry>
              <entry>If <literal>True</literal>, a palette should be used</entry>
            </row>

          </tbody>
        </tgroup>
      </informaltable>
    </blockquote>

  </refsect1>

  <refsect1 id="style-properties-gtkcolorselection">
    <title>gtk.ColorSelection Style Properties</title>

    <para><link linkend="style-properties-gtkwidget">gtk.Widget Style Properties</link></para>

  </refsect1>

  <refsect1 id="child-properties-gtkcolorselection">
    <title>gtk.ColorSelection Child Properties</title>

    <para><link linkend="child-properties-gtkbox">gtk.Box Child Properties</link></para>

  </refsect1>

  <refsect1 id="signal-prototypes-gtkcolorselection">
    <title>gtk.ColorSelection Signal Prototypes</title>

    <para><link linkend="signal-prototypes-gobject">gobject.GObject Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkobject">gtk.Object Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkwidget">gtk.Widget Signal Prototypes</link></para>
    <para><link linkend="signal-prototypes-gtkcontainer">gtk.Container Signal Prototypes</link></para>

    <variablelist>
      <varlistentry>
        <term>"<link
linkend="signal-gtkcolorselection--color-changed">color-changed</link>"</term>
        <listitem>
          <methodsynopsis
	    language="python"><methodname>callback</methodname>
            <methodparam><parameter>colorselection</parameter>
            </methodparam>
            <methodparam><parameter>user_param1</parameter>
            </methodparam>
            <methodparam><parameter>...</parameter>
            </methodparam>
          </methodsynopsis>
        </listitem>
      </varlistentry>
    </variablelist>

  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>The <link
linkend="class-gtkcolorselection"><classname>gtk.ColorSelection</classname></link> 
is a widget that is used to select a color. It consists of a color wheel and
entry boxes for color parameters such as hue, saturation, value, red, green,
blue, and color name and optionally an opacity control and/or a color
palette. It is found on the standard color selection dialog box <link
linkend="class-gtkcolorselectiondialog"><classname>gtk.ColorSelectionDialog</classname></link>. 
The color wheel can be manipulated to set a new color or new entries can be
made in the entry boxes. The new color is displayed next to the previous
color. An eyedropper button is available to allow the selection of a color
from a pixel location on the display.</para>

  </refsect1>

  <refsect1 id="constructor-gtkcolorselection">
    <title>Constructor</title>

    <programlisting><constructorsynopsis language="python">
	<methodname>gtk.ColorSelection</methodname>
	<methodparam></methodparam>  </constructorsynopsis></programlisting>
    <variablelist>
      <varlistentry>
	<term><emphasis>Returns</emphasis>&nbsp;:</term>
	<listitem><simpara>a new <link
linkend="class-gtkcolorselection"><classname>gtk.ColorSelection</classname></link></simpara></listitem>
      </varlistentry>
    </variablelist>

    <para>Creates a new <link
linkend="class-gtkcolorselection"><classname>gtk.ColorSelection</classname></link> 
widget.</para>

  </refsect1>

  <refsect1>
    <title>Methods</title>

    <refsect2 id="method-gtkcolorselection--get-has-opacity-control">
      <title>gtk.ColorSelection.get_has_opacity_control</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_has_opacity_control</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the
<parameter>colorsel</parameter> has an opacity control;
<literal>False</literal> if it doesn't.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_opacity</methodname>() method determines
whether the colorselection is displaying an opacity control.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-has-opacity-control">
      <title>gtk.ColorSelection.set_has_opacity_control</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_has_opacity_control</methodname>
	  <methodparam><parameter
			 role="keyword">has_opacity</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">has_opacity</parameter>&nbsp;:</term>
	  <listitem><simpara>If <literal>True</literal> the colorselection
will display the opacity control.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_has_opacity_control</methodname>() method
sets the "has-opacity-control" property to the value of
<parameter>has_opacity</parameter>. If <parameter>has_opacity</parameter> is
<literal>True</literal> the colorselection will display the opacity control
slider and entry box; otherwise the opacity control is not displayed.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--get-has-palette">
      <title>gtk.ColorSelection.get_has_palette</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_has_palette</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the selector has a
palette; <literal>False</literal> if it hasn't.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_has_palette</methodname>() method returns
the value of the "has-palette" property that determines whether the color
selector displays a color palette.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-has-palette">
      <title>gtk.ColorSelection.set_has_palette</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_has_palette</methodname>
	  <methodparam><parameter
			 role="keyword">has_palette</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter
role="keyword">has_palette</parameter>&nbsp;:</term>
	  <listitem><simpara>If <literal>True</literal> the color palette is
displayed.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_has_palette</methodname>() method sets the
"has-palette" property to the value of <parameter>has_palette</parameter>.
If <parameter>has_palette</parameter> is True the palette will be displayed;
otherwise the palette will be hidden.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-current-color">
      <title>gtk.ColorSelection.set_current_color</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_current_color</methodname>
	  <methodparam><parameter
			 role="keyword">color</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">color</parameter>&nbsp;:</term>
	  <listitem><simpara>A <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> to set
the current color with.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_current_color</methodname>() method sets the
current color to the value of <parameter>color</parameter>.  The first time
this is called, it will also set the previous color to the value of
<parameter>color</parameter> too.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-current-alpha">
      <title>gtk.ColorSelection.set_current_alpha</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_current_alpha</methodname>
	  <methodparam><parameter
			 role="keyword">alpha</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">alpha</parameter>&nbsp;:</term>
	  <listitem><simpara>an integer between 0 and
65535.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_current_alpha</methodname>() method sets the
"current-alpha" property (the opacity) to the value of alpha. The alpha
(opacity) is displayed in the range of 0 to 255 in the colorselection.  The
first time this is called, it will also set the previous opacity to the
value of <parameter>alpha</parameter> too.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--get-current-color">
      <title>gtk.ColorSelection.get_current_color</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_current_color</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link>
representing the current color.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_current_color</methodname>() method
retrieves the current color in the colorselection.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--get-current-alpha">
      <title>gtk.ColorSelection.get_current_alpha</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_current_alpha</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>the current alpha value in the range 0 to
65535.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_current_alpha</methodname>() method returns
the value of the "current_alpha" property that controls the opacity
value.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-previous-color">
      <title>gtk.ColorSelection.set_previous_color</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_previous_color</methodname>
	  <methodparam><parameter
			 role="keyword">color</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">color</parameter>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> to set
the previous color with.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>set_previous_color</methodname>() method sets
the 'previous' color to the value of <parameter>color</parameter>.
Applications usually do not call this method. The first time <link
linkend="method-gtkcolorselection--set-current-color"><methodname>set_current_color</methodname>()</link> 
the 'previous' color will be set.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--set-previous-alpha">
      <title>gtk.ColorSelection.set_previous_alpha</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>set_previous_alpha</methodname>
	  <methodparam><parameter
			 role="keyword">alpha</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">alpha</parameter>&nbsp;:</term>
	  <listitem><simpara>an integer between 0 and
65535.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The set_previous_alpha() method sets the 'previous' alpha to the
value of <parameter>alpha</parameter>. Applications usually do not call this
method. The first time <link
linkend="method-gtkcolorselection--set-current-alpha"><methodname>set_current_alpha</methodname>()</link> 
the 'previous' alpha will be set.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--get-previous-color">
      <title>gtk.ColorSelection.get_previous_color</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_previous_color</methodname>
	  <methodparam></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> with
the previous color value.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>get_previous_color</methodname>() method
retrieves the previous color value.</para>

    </refsect2>


    <refsect2 id="method-gtkcolorselection--get-previous-alpha">
      <title>gtk.ColorSelection.get_previous_alpha</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>get_previous_alpha</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>an integer between 0 and
65535.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The get_previous_alpha() method returns the previous alpha
value.</para>

    </refsect2>

    <refsect2 id="method-gtkcolorselection--is-adjusting">
      <title>gtk.ColorSelection.is_adjusting</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>is_adjusting</methodname>
	  <methodparam></methodparam>  </methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara><literal>True</literal> if the user is
currently dragging a color around, and <literal>False</literal> if the
selection has stopped.</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <methodname>is_adjusting</methodname>() method retrieves the
current state of the colorselection. If True the user is in the process of
changing the current color.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Functions</title>

    <refsect2 id="function-gtk--color-selection-palette-from-string">
      <title>gtk.color_selection_palette_from_string</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.color_selection_palette_from_string</methodname>
	  <methodparam><parameter
			 role="keyword">str</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">str</parameter>&nbsp;:</term>
	  <listitem><simpara>the string containing the list of
colors</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a list of <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> objects
or <literal>None</literal> if the conversion fails</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The
<function>gtk.color_selection_palette_from_string</function>() function
returns a list of <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> objects
corresponding to the color specifications in the string specified by
<parameter>str</parameter>. str is a colon-separated list of color names
readable by <link
linkend="function-gdk--color-parse"><function>gtk.gtk.color_parse</function>()</link>. 
If <parameter>str</parameter> cannot be converted to a list of color this
function returns <literal>None</literal>.</para>

    </refsect2>

    <refsect2 id="function-gtk--color-selection-palette-to-string">
      <title>gtk.color_selection_palette_to_string</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>gtk.color_selection_palette_to_string</methodname>
	  <methodparam><parameter
			 role="keyword">colors</parameter></methodparam>
	</methodsynopsis></programlisting>
      <variablelist>
	<varlistentry>
	  <term><parameter role="keyword">colors</parameter>&nbsp;:</term>
	  <listitem><simpara>a list or tuple of <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link>
objects</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><emphasis>Returns</emphasis>&nbsp;:</term>
	  <listitem><simpara>a string containing a colon-separated list of
<parameter>colors</parameter></simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The <function>gtk.color_selection_palette_to_string</function>()
function returns a string containing a colon-separated list of the
representation of the <link
linkend="class-gdkcolor"><classname>gtk.gdk.Color</classname></link> objects
in <parameter>colors</parameter>.</para>

      <para>This function is useful to save a special palette of colors for
a <link
linkend="class-gtkcolorselection"><classname>gtk.ColorSelection</classname></link> 
as a string that can later be used by calling the <link
linkend="method-gobject--set-property"><methodname>gobject.set_property</methodname>()</link> 
method to set the "gtk-color-palette" property on the default <link
linkend="class-gtksettings"><classname>gtk.Settings</classname></link>
returned from the <link
linkend="function-gtk--settings-get-default"><function>gtk.settings_get_default</function>()</link>) 
function.</para>

    </refsect2>

  </refsect1>

  <refsect1>
    <title>Signals</title>

    <refsect2 id="signal-gtkcolorselection--color-changed">
      <title>The "color-changed" gtk.ColorSelection Signal</title>

      <programlisting><methodsynopsis language="python">
	  <methodname>callback</methodname>
	  <methodparam><parameter>colorselection</parameter></methodparam>
	  <methodparam><parameter>user_param1</parameter></methodparam>
	  <methodparam><parameter>...</parameter></methodparam>
	</methodsynopsis></programlisting>

      <variablelist>
	<varlistentry>
	  <term><parameter>colorselection</parameter>&nbsp;:</term>
	  <listitem><simpara>the colorselection that received the
signal</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>user_param1</parameter>&nbsp;:</term>
          <listitem><simpara>the first user parameter (if any) specified
with the <link
linkend="method-gobject--connect"><methodname>connect</methodname>()</link>
method</simpara></listitem>
	</varlistentry>
	<varlistentry>
	  <term><parameter>...</parameter>&nbsp;:</term>
	  <listitem><simpara>additional user parameters (if
any)</simpara></listitem>
	</varlistentry>
      </variablelist>

      <para>The "color-changed" signal is emitted when the current color in
the colorselection changes.</para>

    </refsect2>

  </refsect1>

</refentry>