Interface
GtkColorChooser
since: 3.4
Description [src]
interface Gtk.ColorChooser : GObject.Object
GtkColorChooser
is an interface that is implemented by widgets
for choosing colors. Depending on the situation, colors may be
allowed to have alpha (translucency).
In GTK+, the main widgets that implement this interface are
GtkColorChooserWidget
, GtkColorChooserDialog
and GtkColorButton
.
Available since: 3.4
Prerequisite
In order to implement ColorChooser, your type must inherit fromGObject
.
Instance methods
gtk_color_chooser_add_palette
Adds a palette to the color chooser. If orientation
is horizontal,
the colors are grouped in rows, with colors_per_line
colors
in each row. If horizontal
is FALSE
, the colors are grouped
in columns instead.
since: 3.4
gtk_color_chooser_get_use_alpha
Returns whether the color chooser shows the alpha channel.
since: 3.4
gtk_color_chooser_set_use_alpha
Sets whether or not the color chooser should use the alpha channel.
since: 3.4
Properties
Gtk.ColorChooser:rgba
The ::rgba property contains the currently selected color,
as a GdkRGBA
struct. The property can be set to change
the current selection programmatically.
since: 3.4
Gtk.ColorChooser:use-alpha
When ::use-alpha is TRUE
, colors may have alpha (translucency)
information. When it is FALSE
, the GdkRGBA
struct obtained
via the GtkColorChooser:rgba
property will be forced to have
alpha == 1.
since: 3.4
Signals
Gtk.ColorChooser::color-activated
Emitted when a color is activated from the color chooser. This usually happens when the user clicks a color swatch, or a color is selected and the user presses one of the keys Space, Shift+Space, Return or Enter.
since: 3.4
Interface structure
struct GtkColorChooserInterface {
GTypeInterface base_interface;
void (* get_rgba) (
GtkColorChooser* chooser,
GdkRGBA* color
);
void (* set_rgba) (
GtkColorChooser* chooser,
const GdkRGBA* color
);
void (* add_palette) (
GtkColorChooser* chooser,
GtkOrientation orientation,
gint colors_per_line,
gint n_colors,
GdkRGBA* colors
);
void (* color_activated) (
GtkColorChooser* chooser,
const GdkRGBA* color
);
gpointer padding;
}
No description available.
Interface members
base_interface |
|
No description available. |
|
get_rgba |
|
No description available. |
|
set_rgba |
|
No description available. |
|
add_palette |
|
No description available. |
|
color_activated |
|
No description available. |
|
padding |
|
No description available. |
Virtual methods
Gtk.ColorChooser.add_palette
Adds a palette to the color chooser. If orientation
is horizontal,
the colors are grouped in rows, with colors_per_line
colors
in each row. If horizontal
is FALSE
, the colors are grouped
in columns instead.
since: 3.4