Interface
GtkColorChooser
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
.
Prerequisite
In order to implement ColorChooser, your type must inherit from
GObject
.
Instance methods
gtk_color_chooser_add_palette
Adds a palette to the color chooser.
gtk_color_chooser_get_rgba
Gets the currently-selected color.
gtk_color_chooser_get_use_alpha
Returns whether the color chooser shows the alpha channel.
gtk_color_chooser_set_rgba
Sets the color.
gtk_color_chooser_set_use_alpha
Sets whether or not the color chooser should use the alpha channel.
Properties
Gtk.ColorChooser:rgba
The currently selected color, as a GdkRGBA
struct.
Gtk.ColorChooser:use-alpha
Whether colors may have alpha (translucency).
Signals
Gtk.ColorChooser::color-activated
Emitted when a color is activated from the color chooser.
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,
int colors_per_line,
int n_colors,
GdkRGBA* colors
);
void (* color_activated) (
GtkColorChooser* chooser,
const GdkRGBA* color
);
}
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. |
Virtual methods
Gtk.ColorChooser.add_palette
Adds a palette to the color chooser.
Gtk.ColorChooser.color_activated
Gtk.ColorChooser.get_rgba
Gets the currently-selected color.
Gtk.ColorChooser.set_rgba
Sets the color.