Description
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.
Details
struct GtkColorSelection
struct GtkColorSelection; |
The GtkColorSelection struct contains private data only,
and should be accessed using the functions below.
gtk_color_selection_new ()
Creates a new GtkColorSelection.
gtk_color_selection_set_update_policy ()
Warning |
gtk_color_selection_set_update_policy is deprecated and should not be used in newly-written code. |
Sets the policy controlling when the color_changed signals are emitted.
The available policies are:
GTK_UPDATE_CONTINUOUS - signals are sent continuously as the color
selection changes.
GTK_UPDATE_DISCONTINUOUS - signals are sent only when the mouse
button is released.
GTK_UPDATE_DELAYED - signals are sent when the mouse button is
released or when the mouse has been motionless for a period of
time.
gtk_color_selection_set_has_opacity_control ()
Sets the colorsel to use or not use opacity.
gtk_color_selection_get_has_opacity_control ()
Determines whether the colorsel has an opacity control.
gtk_color_selection_set_has_palette ()
Shows and hides the palette based upon the value of has_palette.
gtk_color_selection_get_has_palette ()
Determines whether the color selector has a color palette.
gtk_color_selection_get_current_alpha ()
Returns the maximum number of palette colors.
gtk_color_selection_set_current_alpha ()
Sets the current opacity to be alpha. The first time this is called, it will
also set the original opacity to be alpha too.
gtk_color_selection_get_current_color ()
Sets color to be the current color in the GtkColorSelection widget.
gtk_color_selection_set_current_color ()
Sets the current color to be color. The first time this is called, it will
also set the original color to be color too.
gtk_color_selection_get_previous_alpha ()
Returns the previous alpha value.
gtk_color_selection_set_previous_alpha ()
Sets the 'previous' alpha to be alpha. This function should be called with
some hesitations, as it might seem confusing to have that alpha change.
gtk_color_selection_get_previous_color ()
Fills color in with the original color value.
gtk_color_selection_set_previous_color ()
Sets the 'previous' color to be color. This function should be called with
some hesitations, as it might seem confusing to have that color change.
Calling gtk_color_selection_set_current_color() will also set this color the first
time it is called.
gtk_color_selection_is_adjusting ()
Gets the current state of the colorsel.
gtk_color_selection_palette_from_string ()
Parses a color palette string; the string is a colon-separated
list of color names readable by gdk_color_parse().
gtk_color_selection_palette_to_string ()
gchar* gtk_color_selection_palette_to_string
(const GdkColor *colors,
gint n_colors); |
Encodes a palette as a string, useful for persistent storage.
gtk_color_selection_set_change_palette_hook ()
Installs a global function to be called whenever the user tries to
modify the palette in a color selection. This function should save
the new palette contents, and update the GtkSettings property
"gtk-color-palette" so all GtkColorSelection widgets will be modified.
GtkColorSelectionChangePaletteFunc ()
void (*GtkColorSelectionChangePaletteFunc)
(const GdkColor *colors,
gint n_colors); |
gtk_color_selection_set_color ()
Warning |
gtk_color_selection_set_color is deprecated and should not be used in newly-written code. |
Sets the current color to be color. The first time this is called, it will
also set the original color to be color too.
This function is deprecated, use gtk_color_selection_set_current_color() instead.
gtk_color_selection_get_color ()
Warning |
gtk_color_selection_get_color is deprecated and should not be used in newly-written code. |
Sets color to be the current color in the GtkColorSelection widget.
This function is deprecated, use gtk_color_selection_get_current_color() instead.