summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkcolorsel.sgml
blob: f3152384c1a1cb08705e61b7d0531ebc22e37661 (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
<!-- ##### SECTION Title ##### -->
GtkColorSelection

<!-- ##### SECTION Short_Description ##### -->
a widget used to select a color.

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkColorSelection is a widget that is used to select 
a color.  It consists of a color wheel and number of sliders
and entry boxes for color parameters such as hue, saturation,
value, red, green, blue, and opacity.  It is found on the standard 
color selection dialog box #GtkColorSelectionDialog.
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### STRUCT GtkColorSelection ##### -->
<para>
The #GtkColorSelection-struct struct contains private data only, 
and should be accessed using the functions below.
</para>


<!-- ##### FUNCTION gtk_color_selection_new ##### -->
<para>
Create a new #GtkColorSelection.
</para>

@Returns: a #GtkColorSelection.


<!-- ##### FUNCTION gtk_color_selection_set_update_policy ##### -->
<para>
Sets the policy controlling when the color_changed signals are emitted.
The available policies are:
<itemizedlist>
<listitem>
<para>
%GTK_UPDATE_CONTINUOUS - signals are sent continuously as the color
selection changes.
</para>
</listitem>
<listitem>
<para>
%GTK_UPDATE_DISCONTINUOUS - signals are sent only when the mouse 
button is released.
</para>
</listitem>
<listitem>
<para>
%GTK_UPDATE_DELAYED - signals are sent when the mouse button is
released or when the mouse has been motionless for a period of
time.
</para>
</listitem>
</itemizedlist>
</para>

@colorsel: a #GtkColorSelection.
@policy: a #GtkUpdateType value indicating the desired policy.


<!-- ##### FUNCTION gtk_color_selection_set_opacity ##### -->
<para>
Controls whether opacity can be set with the #GtkColorSelection.
If this functionality is enabled, the necessary additional widgets
are added to the #GtkColorSelection and the opacity value can be
retrieved via the fourth value in the color array returned by
the gtk_color_selection_get_color() function.
</para>

@colorsel: a #GtkColorSelection.
@use_opacity: a boolean indicating whether the opacity selection
is enabled.


<!-- ##### FUNCTION gtk_color_selection_set_color ##### -->
<para>
Sets the color in the #GtkColorSelection.  The widgets are updated
to reflect the new color.
</para>

@colorsel: a #GtkColorSelection.
@color: a color array consisting of 4 gfloat values for red, green,
blue, and opacity.


<!-- ##### FUNCTION gtk_color_selection_get_color ##### -->
<para>
Retrieve the currently selected color value.
</para>

@colorsel: a #GtkColorSelection
@color: a color array consisting of 4 gfloat values for red, green,
blue, and opacity.


<!-- ##### SIGNAL GtkColorSelection::color-changed ##### -->
<para>
This signal is emitted when the color changes in the #GtkColorSelection
according to its update policy.
</para>

@colorselection: the object which received the signal.