|
mate-desktop 1.29.2
Library with common API for various MATE modules
|
#include <glib.h>#include <gtk/gtk.h>Data Structures | |
| struct | _MateColorSelection |
| struct | _MateColorSelectionClass |
Macros | |
| #define | MATE_TYPE_COLOR_SELECTION (mate_color_selection_get_type ()) |
| #define | MATE_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_COLOR_SELECTION, MateColorSelection)) |
| #define | MATE_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_COLOR_SELECTION, MateColorSelectionClass)) |
| #define | MATE_IS_COLOR_SELECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_COLOR_SELECTION)) |
| #define | MATE_IS_COLOR_SELECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_COLOR_SELECTION)) |
| #define | MATE_COLOR_SELECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_COLOR_SELECTION, MateColorSelectionClass)) |
Typedefs | |
| typedef struct _MateColorSelection | MateColorSelection |
| typedef struct _MateColorSelectionClass | MateColorSelectionClass |
| typedef struct _MateColorSelectionPrivate | MateColorSelectionPrivate |
| typedef void(* | MateColorSelectionChangePaletteFunc) (const GdkRGBA *colors, gint n_colors) |
| typedef void(* | MateColorSelectionChangePaletteWithScreenFunc) (GdkScreen *screen, const GdkRGBA *colors, gint n_colors) |
Functions | |
| GType | mate_color_selection_get_type (void) |
| GtkWidget * | mate_color_selection_new (void) |
| mate_color_selection_new: | |
| gboolean | mate_color_selection_get_has_opacity_control (MateColorSelection *colorsel) |
| mate_color_selection_get_has_opacity_control: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_has_opacity_control (MateColorSelection *colorsel, gboolean has_opacity) |
| mate_color_selection_set_has_opacity_control: @colorsel: a MateColorSelection. | |
| gboolean | mate_color_selection_get_has_palette (MateColorSelection *colorsel) |
| mate_color_selection_get_has_palette: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_has_palette (MateColorSelection *colorsel, gboolean has_palette) |
| mate_color_selection_set_has_palette: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_current_rgba (MateColorSelection *colorsel, const GdkRGBA *color) |
| mate_color_selection_set_current_rgba: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_current_alpha (MateColorSelection *colorsel, guint16 alpha) |
| mate_color_selection_set_current_alpha: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_get_current_rgba (MateColorSelection *colorsel, GdkRGBA *color) |
| mate_color_selection_get_current_rgba: @colorsel: a MateColorSelection. | |
| guint16 | mate_color_selection_get_current_alpha (MateColorSelection *colorsel) |
| mate_color_selection_get_current_alpha: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_previous_color (MateColorSelection *colorsel, const GdkRGBA *color) |
| mate_color_selection_set_previous_color: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_set_previous_alpha (MateColorSelection *colorsel, guint16 alpha) |
| mate_color_selection_set_previous_alpha: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_get_previous_color (MateColorSelection *colorsel, GdkRGBA *color) |
| mate_color_selection_get_previous_color: @colorsel: a MateColorSelection. | |
| guint16 | mate_color_selection_get_previous_alpha (MateColorSelection *colorsel) |
| mate_color_selection_get_previous_alpha: @colorsel: a MateColorSelection. | |
| gboolean | mate_color_selection_is_adjusting (MateColorSelection *colorsel) |
| mate_color_selection_is_adjusting: @colorsel: a MateColorSelection. | |
| gboolean | mate_color_selection_palette_from_string (const gchar *str, GdkRGBA **colors, gint *n_colors) |
| mate_color_selection_palette_from_string: @str: a string encoding a color palette. | |
| gchar * | mate_color_selection_palette_to_string (const GdkRGBA *colors, gint n_colors) |
| mate_color_selection_palette_to_string: @colors: (array length=n_colors): an array of colors. | |
| MateColorSelectionChangePaletteFunc | mate_color_selection_set_change_palette_hook (MateColorSelectionChangePaletteFunc func) |
| mate_color_selection_set_change_palette_hook: @func: a function to call when the custom palette needs saving. | |
| MateColorSelectionChangePaletteWithScreenFunc | mate_color_selection_set_change_palette_with_screen_hook (MateColorSelectionChangePaletteWithScreenFunc func) |
| mate_color_selection_set_change_palette_with_screen_hook: @func: a function to call when the custom palette needs saving. | |
| void | mate_color_selection_set_color (MateColorSelection *colorsel, gdouble *color) |
| mate_color_selection_set_color: @colorsel: a MateColorSelection. | |
| void | mate_color_selection_get_color (MateColorSelection *colorsel, gdouble *color) |
| mate_color_selection_get_color: @colorsel: a MateColorSelection. | |
| #define MATE_COLOR_SELECTION | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_CAST ((obj), MATE_TYPE_COLOR_SELECTION, MateColorSelection)) |
| #define MATE_COLOR_SELECTION_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_CAST ((klass), MATE_TYPE_COLOR_SELECTION, MateColorSelectionClass)) |
| #define MATE_COLOR_SELECTION_GET_CLASS | ( | obj | ) | (G_TYPE_INSTANCE_GET_CLASS ((obj), MATE_TYPE_COLOR_SELECTION, MateColorSelectionClass)) |
| #define MATE_IS_COLOR_SELECTION | ( | obj | ) | (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MATE_TYPE_COLOR_SELECTION)) |
| #define MATE_IS_COLOR_SELECTION_CLASS | ( | klass | ) | (G_TYPE_CHECK_CLASS_TYPE ((klass), MATE_TYPE_COLOR_SELECTION)) |
| #define MATE_TYPE_COLOR_SELECTION (mate_color_selection_get_type ()) |
| typedef struct _MateColorSelection MateColorSelection |
| typedef void(* MateColorSelectionChangePaletteFunc) (const GdkRGBA *colors, gint n_colors) |
| typedef void(* MateColorSelectionChangePaletteWithScreenFunc) (GdkScreen *screen, const GdkRGBA *colors, gint n_colors) |
| typedef struct _MateColorSelectionClass MateColorSelectionClass |
| typedef struct _MateColorSelectionPrivate MateColorSelectionPrivate |
| void mate_color_selection_get_color | ( | MateColorSelection * | colorsel, |
| gdouble * | color | ||
| ) |
mate_color_selection_get_color: @colorsel: a MateColorSelection.
@color: an array of 4 #gdouble to fill in with the current color.
Sets @color to be the current color in the MateColorSelection widget.
Deprecated: 2.0: Use mate_color_selection_get_current_color() instead.
References _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_OPACITY, COLORSEL_RED, _MateColorSelectionPrivate::has_opacity, MATE_IS_COLOR_SELECTION, and _MateColorSelection::private_data.
| guint16 mate_color_selection_get_current_alpha | ( | MateColorSelection * | colorsel | ) |
mate_color_selection_get_current_alpha: @colorsel: a MateColorSelection.
Returns the current alpha value.
Return value: an integer between 0 and 65535.
References _MateColorSelectionPrivate::color, COLORSEL_OPACITY, _MateColorSelectionPrivate::has_opacity, MATE_IS_COLOR_SELECTION, _MateColorSelection::private_data, and UNSCALE.
Referenced by mate_color_selection_get_property().
| void mate_color_selection_get_current_rgba | ( | MateColorSelection * | colorsel, |
| GdkRGBA * | color | ||
| ) |
mate_color_selection_get_current_rgba: @colorsel: a MateColorSelection.
@color: (out): a #GdkRGBA to fill in with the current color.
Sets @color to be the current color in the MateColorSelection widget.
References _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_RED, MATE_IS_COLOR_SELECTION, and _MateColorSelection::private_data.
Referenced by copy_color(), and mate_color_selection_get_property().
| gboolean mate_color_selection_get_has_opacity_control | ( | MateColorSelection * | colorsel | ) |
mate_color_selection_get_has_opacity_control: @colorsel: a MateColorSelection.
Determines whether the colorsel has an opacity control.
Return value: TRUE if the @colorsel has an opacity control. FALSE if it does't.
References _MateColorSelectionPrivate::has_opacity, MATE_IS_COLOR_SELECTION, and _MateColorSelection::private_data.
Referenced by mate_color_selection_get_property().
| gboolean mate_color_selection_get_has_palette | ( | MateColorSelection * | colorsel | ) |
mate_color_selection_get_has_palette: @colorsel: a MateColorSelection.
Determines whether the color selector has a color palette.
Return value: TRUE if the selector has a palette. FALSE if it hasn't.
References _MateColorSelectionPrivate::has_palette, MATE_IS_COLOR_SELECTION, and _MateColorSelection::private_data.
Referenced by mate_color_selection_get_property().
| guint16 mate_color_selection_get_previous_alpha | ( | MateColorSelection * | colorsel | ) |
mate_color_selection_get_previous_alpha: @colorsel: a MateColorSelection.
Returns the previous alpha value.
Return value: an integer between 0 and 65535.
References COLORSEL_OPACITY, _MateColorSelectionPrivate::has_opacity, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, _MateColorSelection::private_data, and UNSCALE.
| void mate_color_selection_get_previous_color | ( | MateColorSelection * | colorsel, |
| GdkRGBA * | color | ||
| ) |
mate_color_selection_get_previous_color: @colorsel: a MateColorSelection.
@color: (out): a #GdkRGBA to fill in with the original color value.
Fills @color in with the original color value.
References COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_RED, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, and _MateColorSelection::private_data.
| GType mate_color_selection_get_type | ( | void | ) |
| gboolean mate_color_selection_is_adjusting | ( | MateColorSelection * | colorsel | ) |
mate_color_selection_is_adjusting: @colorsel: a MateColorSelection.
Gets the current state of the @colorsel.
Return value: TRUE if the user is currently dragging a color around, and FALSE if the selection has stopped.
References MATE_HSV, mate_hsv_is_adjusting(), MATE_IS_COLOR_SELECTION, _MateColorSelection::private_data, and _MateColorSelectionPrivate::triangle_colorsel.
| GtkWidget * mate_color_selection_new | ( | void | ) |
mate_color_selection_new:
Creates a new MateColorSelection.
Return value: a new MateColorSelection
References _MateColorSelectionPrivate::default_alpha_set, _MateColorSelectionPrivate::default_set, mate_color_selection_set_has_opacity_control(), MATE_TYPE_COLOR_SELECTION, _MateColorSelection::private_data, and set_color_internal().
Referenced by mate_color_selection_dialog_init().
| gboolean mate_color_selection_palette_from_string | ( | const gchar * | str, |
| GdkRGBA ** | colors, | ||
| gint * | n_colors | ||
| ) |
mate_color_selection_palette_from_string: @str: a string encoding a color palette.
@colors: (out) (array length=n_colors): return location for allocated array of #GdkRGBA. @n_colors: return location for length of array.
Parses a color palette string; the string is a colon-separated list of color names readable by gdk_color_parse().
Return value: TRUE if a palette was successfully parsed.
Referenced by get_current_colors().
| gchar * mate_color_selection_palette_to_string | ( | const GdkRGBA * | colors, |
| gint | n_colors | ||
| ) |
mate_color_selection_palette_to_string: @colors: (array length=n_colors): an array of colors.
@n_colors: length of the array.
Encodes a palette as a string, useful for persistent storage.
Return value: allocated string encoding the palette.
References scale_round().
Referenced by default_change_palette_func().
| MateColorSelectionChangePaletteFunc mate_color_selection_set_change_palette_hook | ( | MateColorSelectionChangePaletteFunc | func | ) |
mate_color_selection_set_change_palette_hook: @func: a function to call when the custom palette needs saving.
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 MateColorSelection widgets will be modified.
Return value: the previous change palette hook (that was replaced).
Deprecated: 2.4: This function does not work in multihead environments. Use mate_color_selection_set_change_palette_with_screen_hook() instead.
References noscreen_change_palette_hook.
| MateColorSelectionChangePaletteWithScreenFunc mate_color_selection_set_change_palette_with_screen_hook | ( | MateColorSelectionChangePaletteWithScreenFunc | func | ) |
mate_color_selection_set_change_palette_with_screen_hook: @func: a function to call when the custom palette needs saving.
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 MateColorSelection widgets will be modified.
Return value: the previous change palette hook (that was replaced).
Since: 1.9.1
References change_palette_hook.
| void mate_color_selection_set_color | ( | MateColorSelection * | colorsel, |
| gdouble * | color | ||
| ) |
mate_color_selection_set_color: @colorsel: a MateColorSelection.
@color: an array of 4 doubles specifying the red, green, blue and opacity to set the current color to.
Sets the current color to be @color. The first time this is called, it will also set the original color to be @color too.
Deprecated: 2.0: Use mate_color_selection_set_current_color() instead.
References MATE_IS_COLOR_SELECTION, and set_color_internal().
| void mate_color_selection_set_current_alpha | ( | MateColorSelection * | colorsel, |
| guint16 | alpha | ||
| ) |
mate_color_selection_set_current_alpha: @colorsel: a MateColorSelection.
@alpha: an integer between 0 and 65535.
Sets the current opacity to be @alpha. The first time this is called, it will also set the original opacity to be @alpha too.
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_NUM_CHANNELS, COLORSEL_OPACITY, _MateColorSelectionPrivate::default_alpha_set, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, _MateColorSelection::private_data, SCALE, and update_color().
Referenced by mate_color_selection_set_property().
| void mate_color_selection_set_current_rgba | ( | MateColorSelection * | colorsel, |
| const GdkRGBA * | rgba | ||
| ) |
mate_color_selection_set_current_rgba: @colorsel: a MateColorSelection.
@color: A #GdkRGBA to set the current color with.
Sets the current color to be @color. The first time this is called, it will also set the original color to be @color too.
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_NUM_CHANNELS, COLORSEL_OPACITY, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::default_set, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, _MateColorSelection::private_data, and update_color().
Referenced by mate_color_selection_set_property().
| void mate_color_selection_set_has_opacity_control | ( | MateColorSelection * | colorsel, |
| gboolean | has_opacity | ||
| ) |
mate_color_selection_set_has_opacity_control: @colorsel: a MateColorSelection.
@has_opacity: TRUE if @colorsel can set the opacity, FALSE otherwise.
Sets the @colorsel to use or not use opacity.
References color_sample_update_samples(), _MateColorSelectionPrivate::has_opacity, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::opacity_entry, _MateColorSelectionPrivate::opacity_label, _MateColorSelectionPrivate::opacity_slider, and _MateColorSelection::private_data.
Referenced by mate_color_selection_dialog_init(), mate_color_selection_new(), and mate_color_selection_set_property().
| void mate_color_selection_set_has_palette | ( | MateColorSelection * | colorsel, |
| gboolean | has_palette | ||
| ) |
mate_color_selection_set_has_palette: @colorsel: a MateColorSelection.
@has_palette: TRUE if palette is to be visible, FALSE otherwise.
Shows and hides the palette based upon the value of @has_palette.
References _MateColorSelectionPrivate::has_palette, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::palette_frame, _MateColorSelection::private_data, and update_tooltips().
Referenced by main(), mate_color_selection_dialog_init(), and mate_color_selection_set_property().
| void mate_color_selection_set_previous_alpha | ( | MateColorSelection * | colorsel, |
| guint16 | alpha | ||
| ) |
mate_color_selection_set_previous_alpha: @colorsel: a MateColorSelection.
@alpha: an integer between 0 and 65535.
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.
References _MateColorSelectionPrivate::changing, color_sample_update_samples(), COLORSEL_OPACITY, _MateColorSelectionPrivate::default_alpha_set, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, _MateColorSelection::private_data, and SCALE.
| void mate_color_selection_set_previous_color | ( | MateColorSelection * | colorsel, |
| const GdkRGBA * | color | ||
| ) |
mate_color_selection_set_previous_color: @colorsel: a MateColorSelection.
@color: a #GdkRGBA to set the previous color with.
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 mate_color_selection_set_current_color() will also set this color the first time it is called.
References _MateColorSelectionPrivate::changing, color_sample_update_samples(), COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::default_set, MATE_IS_COLOR_SELECTION, _MateColorSelectionPrivate::old_color, and _MateColorSelection::private_data.