|
mate-desktop 1.29.2
Library with common API for various MATE modules
|
#include "config.h"#include "private.h"#include <math.h>#include <string.h>#include <gdk/gdkx.h>#include <gdk/gdkkeysyms.h>#include <gtk/gtk.h>#include <glib/gi18n-lib.h>#include "mate-colorsel.h"#include "mate-hsv.h"Data Structures | |
| struct | _MateColorSelectionPrivate |
Macros | |
| #define | DEFAULT_COLOR_PALETTE "#ef2929:#fcaf3e:#fce94f:#8ae234:#729fcf:#ad7fa8:#e9b96e:#888a85:#eeeeec:#cc0000:#f57900:#edd400:#73d216:#3465a4:#75507b:#c17d11:#555753:#d3d7cf:#a40000:#ce5c00:#c4a000:#4e9a06:#204a87:#5c3566:#8f5902:#2e3436:#babdb6:#000000:#2e3436:#555753:#888a85:#babdb6:#d3d7cf:#eeeeec:#f3f3f3:#ffffff" |
| #define | GTK_CUSTOM_PALETTE_WIDTH 9 |
| #define | GTK_CUSTOM_PALETTE_HEIGHT 4 |
| #define | SIZE_OF_COLOR_PALETTE (GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT * 8) |
| #define | CUSTOM_PALETTE_ENTRY_WIDTH 20 |
| #define | CUSTOM_PALETTE_ENTRY_HEIGHT 20 |
| #define | DROPPER_WIDTH 16 |
| #define | DROPPER_HEIGHT 16 |
| #define | DROPPER_STRIDE 64 |
| #define | DROPPER_X_HOT 2 |
| #define | DROPPER_Y_HOT 16 |
| #define | CHECK_SIZE 16 |
| #define | BIG_STEP 20 |
| #define | SCALE(i) (i / 65535.) |
| #define | UNSCALE(d) ((guint16)(d * 65535 + 0.5)) |
| #define | INTENSITY(r, g, b) ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) |
Enumerations | |
| enum | { COLOR_CHANGED , LAST_SIGNAL } |
| enum | { PROP_0 , PROP_HAS_PALETTE , PROP_HAS_OPACITY_CONTROL , PROP_CURRENT_RGBA , PROP_CURRENT_ALPHA , PROP_HEX_STRING } |
| enum | { COLORSEL_RED = 0 , COLORSEL_GREEN = 1 , COLORSEL_BLUE = 2 , COLORSEL_OPACITY = 3 , COLORSEL_HUE , COLORSEL_SATURATION , COLORSEL_VALUE , COLORSEL_NUM_CHANNELS } |
Functions | |
| static void | mate_color_selection_dispose (GObject *object) |
| static void | mate_color_selection_finalize (GObject *object) |
| static void | update_color (MateColorSelection *colorsel) |
| static void | mate_color_selection_set_property (GObject *object, guint prop_id, const GValue *value, GParamSpec *pspec) |
| static void | mate_color_selection_get_property (GObject *object, guint prop_id, GValue *value, GParamSpec *pspec) |
| static void | mate_color_selection_realize (GtkWidget *widget) |
| static void | mate_color_selection_unrealize (GtkWidget *widget) |
| static void | mate_color_selection_show_all (GtkWidget *widget) |
| static gboolean | mate_color_selection_grab_broken (GtkWidget *widget, GdkEventGrabBroken *event) |
| static void | mate_color_selection_set_palette_color (MateColorSelection *colorsel, gint index, GdkRGBA *color) |
| mate_color_selection_set_palette_color: @colorsel: a MateColorSelection. | |
| static void | default_noscreen_change_palette_func (const GdkRGBA *colors, gint n_colors) |
| static void | default_change_palette_func (GdkScreen *screen, const GdkRGBA *colors, gint n_colors) |
| static void | make_control_relations (AtkObject *atk_obj, GtkWidget *widget) |
| static void | make_all_relations (AtkObject *atk_obj, MateColorSelectionPrivate *priv) |
| static void | hsv_changed (GtkWidget *hsv, gpointer data) |
| static void | get_screen_color (GtkWidget *button) |
| static void | adjustment_changed (GtkAdjustment *adjustment, gpointer data) |
| static void | opacity_entry_changed (GtkWidget *opacity_entry, gpointer data) |
| static void | hex_changed (GtkWidget *hex_entry, gpointer data) |
| static gboolean | hex_focus_out (GtkWidget *hex_entry, GdkEventFocus *event, gpointer data) |
| static void | color_sample_new (MateColorSelection *colorsel) |
| static void | make_label_spinbutton (MateColorSelection *colorsel, GtkWidget **spinbutton, gchar *text, GtkWidget *grid, gint i, gint j, gint channel_type, const gchar *tooltip) |
| static void | make_palette_frame (MateColorSelection *colorsel, GtkWidget *grid, gint i, gint j) |
| static void | set_selected_palette (MateColorSelection *colorsel, int x, int y) |
| static void | set_focus_line_attributes (GtkWidget *drawing_area, cairo_t *cr, gint *focus_width) |
| static gboolean | mouse_press (GtkWidget *invisible, GdkEventButton *event, gpointer data) |
| static void | palette_change_notify_instance (GObject *object, GParamSpec *pspec, gpointer data) |
| static void | update_palette (MateColorSelection *colorsel) |
| static void | shutdown_eyedropper (GtkWidget *widget) |
| static void | mate_color_selection_class_init (MateColorSelectionClass *klass) |
| static void | mate_color_selection_init (MateColorSelection *colorsel) |
| static void | color_sample_draw_sample (MateColorSelection *colorsel, cairo_t *cr, int which) |
| static void | color_sample_update_samples (MateColorSelection *colorsel) |
| static void | set_color_internal (MateColorSelection *colorsel, gdouble *color) |
| static void | set_color_icon (GdkDragContext *context, gdouble *colors) |
| static void | color_sample_drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer data) |
| static void | color_sample_drag_end (GtkWidget *widget, GdkDragContext *context, gpointer data) |
| static void | color_sample_drop_handle (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, gpointer data) |
| static void | color_sample_drag_handle (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer data) |
| static gboolean | color_old_sample_draw (GtkWidget *da, cairo_t *cr, MateColorSelection *colorsel) |
| static gboolean | color_cur_sample_draw (GtkWidget *da, cairo_t *cr, MateColorSelection *colorsel) |
| static void | color_sample_setup_dnd (MateColorSelection *colorsel, GtkWidget *sample) |
| static void | update_tooltips (MateColorSelection *colorsel) |
| static void | palette_get_color (GtkWidget *drawing_area, gdouble *color) |
| static void | palette_paint (GtkWidget *drawing_area, cairo_t *cr, gpointer data) |
| static void | palette_drag_begin (GtkWidget *widget, GdkDragContext *context, gpointer data) |
| static void | palette_drag_handle (GtkWidget *widget, GdkDragContext *context, GtkSelectionData *selection_data, guint info, guint time, gpointer data) |
| static void | palette_drag_end (GtkWidget *widget, GdkDragContext *context, gpointer data) |
| static GdkRGBA * | get_current_colors (MateColorSelection *colorsel) |
| static void | palette_change_color (GtkWidget *drawing_area, MateColorSelection *colorsel, gdouble *color) |
| static void | palette_set_color (GtkWidget *drawing_area, MateColorSelection *colorsel, gdouble *color) |
| static gboolean | palette_draw (GtkWidget *drawing_area, cairo_t *cr, gpointer data) |
| static void | save_color_selected (GtkWidget *menuitem, gpointer data) |
| static void | do_popup (MateColorSelection *colorsel, GtkWidget *drawing_area, const GdkEvent *trigger_event) |
| static gboolean | palette_enter (GtkWidget *drawing_area, GdkEventCrossing *event, gpointer data) |
| static gboolean | palette_leave (GtkWidget *drawing_area, GdkEventCrossing *event, gpointer data) |
| static gboolean | _gtk_button_event_triggers_context_menu (GdkEventButton *event) |
| static gboolean | palette_press (GtkWidget *drawing_area, GdkEventButton *event, gpointer data) |
| static gboolean | palette_release (GtkWidget *drawing_area, GdkEventButton *event, gpointer data) |
| static void | palette_drop_handle (GtkWidget *widget, GdkDragContext *context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint time, gpointer data) |
| static gint | palette_activate (GtkWidget *widget, GdkEventKey *event, gpointer data) |
| static gboolean | palette_popup (GtkWidget *widget, gpointer data) |
| static GtkWidget * | palette_new (MateColorSelection *colorsel) |
| static GdkCursor * | make_picker_cursor (GdkScreen *screen) |
| static void | grab_color_at_mouse (GdkScreen *screen, GdkDevice *device, gint x_root, gint y_root, gpointer data) |
| static void | mouse_motion (GtkWidget *invisible, GdkEventMotion *event, gpointer data) |
| static gboolean | mouse_release (GtkWidget *invisible, GdkEventButton *event, gpointer data) |
| static gboolean | key_press (GtkWidget *invisible, GdkEventKey *event, gpointer data) |
| static double | scale_round (double val, double factor) |
| 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 *rgba) |
| 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_set_color (MateColorSelection *colorsel, gdouble *color) |
| mate_color_selection_set_color: @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_get_color (MateColorSelection *colorsel, gdouble *color) |
| mate_color_selection_get_color: @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. | |
Variables | |
| static guint | color_selection_signals [LAST_SIGNAL] = { 0 } |
| static MateColorSelectionChangePaletteFunc | noscreen_change_palette_hook = default_noscreen_change_palette_func |
| static MateColorSelectionChangePaletteWithScreenFunc | change_palette_hook = default_change_palette_func |
| static gchar | color_palette [SIZE_OF_COLOR_PALETTE] = { 0 } |
| static const guchar | dropper_bits [] |
| #define BIG_STEP 20 |
| #define CHECK_SIZE 16 |
| #define CUSTOM_PALETTE_ENTRY_HEIGHT 20 |
| #define CUSTOM_PALETTE_ENTRY_WIDTH 20 |
| #define DEFAULT_COLOR_PALETTE "#ef2929:#fcaf3e:#fce94f:#8ae234:#729fcf:#ad7fa8:#e9b96e:#888a85:#eeeeec:#cc0000:#f57900:#edd400:#73d216:#3465a4:#75507b:#c17d11:#555753:#d3d7cf:#a40000:#ce5c00:#c4a000:#4e9a06:#204a87:#5c3566:#8f5902:#2e3436:#babdb6:#000000:#2e3436:#555753:#888a85:#babdb6:#d3d7cf:#eeeeec:#f3f3f3:#ffffff" |
| #define DROPPER_HEIGHT 16 |
| #define DROPPER_STRIDE 64 |
| #define DROPPER_WIDTH 16 |
| #define DROPPER_X_HOT 2 |
| #define DROPPER_Y_HOT 16 |
| #define GTK_CUSTOM_PALETTE_HEIGHT 4 |
| #define GTK_CUSTOM_PALETTE_WIDTH 9 |
| #define INTENSITY | ( | r, | |
| g, | |||
| b | |||
| ) | ((r) * 0.30 + (g) * 0.59 + (b) * 0.11) |
| #define SCALE | ( | i | ) | (i / 65535.) |
| #define SIZE_OF_COLOR_PALETTE (GTK_CUSTOM_PALETTE_WIDTH * GTK_CUSTOM_PALETTE_HEIGHT * 8) |
| #define UNSCALE | ( | d | ) | ((guint16)(d * 65535 + 0.5)) |
| anonymous enum |
| anonymous enum |
|
static |
Referenced by palette_press().
|
static |
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, MATE_COLOR_SELECTION, _MateColorSelection::private_data, and update_color().
Referenced by make_label_spinbutton(), and mate_color_selection_init().
|
static |
References color_sample_draw_sample().
Referenced by color_sample_new().
|
static |
References color_sample_draw_sample().
Referenced by color_sample_new().
|
static |
References _MateColorSelectionPrivate::color, _MateColorSelectionPrivate::old_color, _MateColorSelectionPrivate::old_sample, _MateColorSelection::private_data, and set_color_icon().
Referenced by color_sample_setup_dnd().
|
static |
Referenced by color_sample_setup_dnd().
|
static |
References _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_OPACITY, COLORSEL_RED, _MateColorSelectionPrivate::has_opacity, _MateColorSelectionPrivate::old_color, _MateColorSelectionPrivate::old_sample, and _MateColorSelection::private_data.
Referenced by color_sample_setup_dnd().
|
static |
References CHECK_SIZE, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_OPACITY, COLORSEL_RED, _MateColorSelectionPrivate::cur_sample, _MateColorSelectionPrivate::has_opacity, _MateColorSelectionPrivate::old_color, _MateColorSelectionPrivate::old_sample, _MateColorSelection::private_data, and _MateColorSelectionPrivate::sample_area.
Referenced by color_cur_sample_draw(), and color_old_sample_draw().
|
static |
References _MateColorSelectionPrivate::cur_sample, _MateColorSelection::private_data, and set_color_internal().
Referenced by color_sample_setup_dnd().
|
static |
References color_cur_sample_draw(), color_old_sample_draw(), color_sample_setup_dnd(), _MateColorSelectionPrivate::cur_sample, _MateColorSelectionPrivate::old_sample, _MateColorSelection::private_data, _MateColorSelectionPrivate::sample_area, and update_tooltips().
Referenced by mate_color_selection_init().
|
static |
References color_sample_drag_begin(), color_sample_drag_end(), color_sample_drag_handle(), color_sample_drop_handle(), _MateColorSelectionPrivate::cur_sample, and _MateColorSelection::private_data.
Referenced by color_sample_new().
|
static |
|
static |
References color_palette, mate_color_selection_palette_to_string(), and SIZE_OF_COLOR_PALETTE.
Referenced by default_noscreen_change_palette_func(), and palette_change_color().
|
static |
References default_change_palette_func().
Referenced by palette_change_color().
|
static |
References save_color_selected().
Referenced by palette_popup(), and palette_press().
|
static |
References color_palette, DEFAULT_COLOR_PALETTE, GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, mate_color_selection_palette_from_string(), and SIZE_OF_COLOR_PALETTE.
Referenced by palette_change_color(), and update_palette().
|
static |
References _MateColorSelectionPrivate::dropper_grab_widget, _MateColorSelectionPrivate::grab_time, _MateColorSelectionPrivate::has_grab, key_press(), make_picker_cursor(), mouse_press(), and _MateColorSelection::private_data.
Referenced by mate_color_selection_init().
|
static |
References _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelection::private_data, SCALE, and update_color().
Referenced by key_press(), mouse_motion(), and mouse_release().
|
static |
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::hex_entry, MATE_COLOR_SELECTION, _MateColorSelection::private_data, and update_color().
Referenced by hex_focus_out(), and mate_color_selection_init().
|
static |
References hex_changed().
Referenced by mate_color_selection_init().
|
static |
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, MATE_COLOR_SELECTION, MATE_HSV, mate_hsv_get_color(), _MateColorSelection::private_data, and update_color().
Referenced by mate_color_selection_init().
|
static |
References BIG_STEP, grab_color_at_mouse(), key_press(), mouse_press(), and shutdown_eyedropper().
Referenced by get_screen_color(), key_press(), and mouse_press().
|
static |
References _MateColorSelectionPrivate::blue_spinbutton, _MateColorSelectionPrivate::green_spinbutton, _MateColorSelectionPrivate::hue_spinbutton, make_control_relations(), _MateColorSelectionPrivate::red_spinbutton, _MateColorSelectionPrivate::sat_spinbutton, and _MateColorSelectionPrivate::val_spinbutton.
Referenced by mate_color_selection_init().
|
static |
Referenced by make_all_relations().
|
static |
References adjustment_changed(), COLORSEL_HUE, COLORSEL_SATURATION, and COLORSEL_VALUE.
Referenced by mate_color_selection_init().
|
static |
References _MateColorSelectionPrivate::custom_palette, CUSTOM_PALETTE_ENTRY_HEIGHT, CUSTOM_PALETTE_ENTRY_WIDTH, palette_new(), and _MateColorSelection::private_data.
Referenced by mate_color_selection_init().
|
static |
References dropper_bits, DROPPER_HEIGHT, DROPPER_STRIDE, DROPPER_WIDTH, DROPPER_X_HOT, and DROPPER_Y_HOT.
Referenced by get_screen_color().
|
static |
References COLOR_CHANGED, color_selection_signals, mate_color_selection_dispose(), mate_color_selection_finalize(), mate_color_selection_get_property(), mate_color_selection_grab_broken(), mate_color_selection_realize(), mate_color_selection_set_property(), mate_color_selection_show_all(), mate_color_selection_unrealize(), PROP_CURRENT_ALPHA, PROP_CURRENT_RGBA, PROP_HAS_OPACITY_CONTROL, PROP_HAS_PALETTE, and PROP_HEX_STRING.
|
static |
References _MateColorSelectionPrivate::dropper_grab_widget, MATE_COLOR_SELECTION, and _MateColorSelection::private_data.
Referenced by mate_color_selection_class_init().
|
static |
Referenced by mate_color_selection_class_init().
| 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.
|
static |
References _MateColorSelectionPrivate::hex_entry, MATE_COLOR_SELECTION, mate_color_selection_get_current_alpha(), mate_color_selection_get_current_rgba(), mate_color_selection_get_has_opacity_control(), mate_color_selection_get_has_palette(), _MateColorSelection::private_data, PROP_CURRENT_ALPHA, PROP_CURRENT_RGBA, PROP_HAS_OPACITY_CONTROL, PROP_HAS_PALETTE, and PROP_HEX_STRING.
Referenced by mate_color_selection_class_init().
|
static |
References shutdown_eyedropper().
Referenced by mate_color_selection_class_init().
|
static |
References _mate_desktop_init_i18n(), adjustment_changed(), _MateColorSelectionPrivate::blue_spinbutton, _MateColorSelectionPrivate::changing, color_sample_new(), COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_OPACITY, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::custom_palette, _MateColorSelectionPrivate::default_alpha_set, _MateColorSelectionPrivate::default_set, get_screen_color(), _MateColorSelectionPrivate::green_spinbutton, GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, _MateColorSelectionPrivate::has_opacity, _MateColorSelectionPrivate::has_palette, hex_changed(), _MateColorSelectionPrivate::hex_entry, hex_focus_out(), hsv_changed(), _MateColorSelectionPrivate::hue_spinbutton, make_all_relations(), make_label_spinbutton(), make_palette_frame(), MATE_HSV, mate_hsv_new(), mate_hsv_set_metrics(), _MateColorSelectionPrivate::opacity_entry, opacity_entry_changed(), _MateColorSelectionPrivate::opacity_label, _MateColorSelectionPrivate::opacity_slider, _MateColorSelectionPrivate::palette_frame, _MateColorSelection::private_data, _MateColorSelectionPrivate::red_spinbutton, _MateColorSelectionPrivate::sample_area, _MateColorSelectionPrivate::sat_spinbutton, set_selected_palette(), _MateColorSelectionPrivate::triangle_colorsel, and _MateColorSelectionPrivate::val_spinbutton.
| 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().
|
static |
References MATE_COLOR_SELECTION, palette_change_notify_instance(), _MateColorSelection::private_data, _MateColorSelectionPrivate::settings_connection, and update_palette().
Referenced by mate_color_selection_class_init().
| 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().
|
static |
mate_color_selection_set_palette_color: @colorsel: a MateColorSelection.
@index: the color index of the palette. @color: A #GdkRGBA to set the palette with.
Sets the palette located at @index to have @color as its color.
References _MateColorSelectionPrivate::custom_palette, GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, MATE_IS_COLOR_SELECTION, palette_set_color(), and _MateColorSelection::private_data.
Referenced by update_palette().
| 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.
|
static |
References MATE_COLOR_SELECTION, mate_color_selection_set_current_alpha(), mate_color_selection_set_current_rgba(), mate_color_selection_set_has_opacity_control(), mate_color_selection_set_has_palette(), PROP_CURRENT_ALPHA, PROP_CURRENT_RGBA, PROP_HAS_OPACITY_CONTROL, and PROP_HAS_PALETTE.
Referenced by mate_color_selection_class_init().
|
static |
Referenced by mate_color_selection_class_init().
|
static |
References MATE_COLOR_SELECTION, _MateColorSelection::private_data, and _MateColorSelectionPrivate::settings_connection.
Referenced by mate_color_selection_class_init().
|
static |
References grab_color_at_mouse().
Referenced by mouse_press(), and mouse_release().
|
static |
References key_press(), mouse_motion(), mouse_press(), and mouse_release().
Referenced by get_screen_color(), key_press(), and mouse_press().
|
static |
References grab_color_at_mouse(), mouse_motion(), mouse_release(), and shutdown_eyedropper().
Referenced by mouse_press(), and mouse_release().
|
static |
References _MateColorSelectionPrivate::changing, MATE_COLOR_SELECTION, _MateColorSelectionPrivate::opacity_entry, _MateColorSelectionPrivate::opacity_slider, _MateColorSelection::private_data, and update_color().
Referenced by mate_color_selection_init().
|
static |
References MATE_COLOR_SELECTION, palette_get_color(), and set_color_internal().
Referenced by palette_new().
|
static |
References change_palette_hook, _MateColorSelectionPrivate::custom_palette, default_change_palette_func(), default_noscreen_change_palette_func(), get_current_colors(), GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, MATE_IS_COLOR_SELECTION, noscreen_change_palette_hook, and _MateColorSelection::private_data.
Referenced by palette_drop_handle(), and save_color_selected().
|
static |
References MATE_COLOR_SELECTION, and update_palette().
Referenced by mate_color_selection_realize().
|
static |
References palette_get_color(), and set_color_icon().
Referenced by palette_set_color().
|
static |
Referenced by palette_new().
|
static |
References COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_RED, and palette_get_color().
Referenced by palette_set_color().
|
static |
|
static |
References MATE_COLOR_SELECTION, palette_change_color(), and set_color_internal().
Referenced by palette_new().
|
static |
Referenced by palette_new().
|
static |
|
static |
Referenced by palette_new().
|
static |
References palette_activate(), palette_drag_end(), palette_draw(), palette_drop_handle(), palette_enter(), palette_leave(), palette_popup(), palette_press(), and palette_release().
Referenced by make_palette_frame().
|
static |
References palette_get_color(), and set_focus_line_attributes().
Referenced by palette_draw().
|
static |
References do_popup(), and MATE_COLOR_SELECTION.
Referenced by palette_new().
|
static |
References _gtk_button_event_triggers_context_menu(), do_popup(), and MATE_COLOR_SELECTION.
Referenced by palette_new().
|
static |
References MATE_COLOR_SELECTION, palette_get_color(), and set_color_internal().
Referenced by palette_new().
|
static |
References palette_drag_begin(), and palette_drag_handle().
Referenced by mate_color_selection_set_palette_color().
|
static |
References _MateColorSelectionPrivate::color, MATE_COLOR_SELECTION, palette_change_color(), and _MateColorSelection::private_data.
Referenced by do_popup().
|
static |
Referenced by mate_color_selection_palette_to_string(), and update_color().
|
static |
References COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_RED, and UNSCALE.
Referenced by color_sample_drag_begin(), and palette_drag_begin().
|
static |
References _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_NUM_CHANNELS, COLORSEL_OPACITY, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::default_alpha_set, _MateColorSelectionPrivate::default_set, _MateColorSelectionPrivate::old_color, _MateColorSelection::private_data, and update_color().
Referenced by color_sample_drop_handle(), mate_color_selection_new(), mate_color_selection_set_color(), palette_activate(), palette_drop_handle(), and palette_release().
|
static |
References INTENSITY, and palette_get_color().
Referenced by palette_paint().
|
static |
References _MateColorSelectionPrivate::custom_palette, and _MateColorSelection::private_data.
Referenced by mate_color_selection_init().
|
static |
|
static |
References _MateColorSelectionPrivate::blue_spinbutton, _MateColorSelectionPrivate::changing, _MateColorSelectionPrivate::color, COLOR_CHANGED, color_sample_update_samples(), color_selection_signals, COLORSEL_BLUE, COLORSEL_GREEN, COLORSEL_HUE, COLORSEL_OPACITY, COLORSEL_RED, COLORSEL_SATURATION, COLORSEL_VALUE, _MateColorSelectionPrivate::green_spinbutton, _MateColorSelectionPrivate::hex_entry, _MateColorSelectionPrivate::hue_spinbutton, MATE_HSV, mate_hsv_set_color(), _MateColorSelectionPrivate::opacity_entry, _MateColorSelectionPrivate::opacity_slider, _MateColorSelection::private_data, _MateColorSelectionPrivate::red_spinbutton, _MateColorSelectionPrivate::sat_spinbutton, scale_round(), _MateColorSelectionPrivate::triangle_colorsel, and _MateColorSelectionPrivate::val_spinbutton.
Referenced by adjustment_changed(), grab_color_at_mouse(), hex_changed(), hsv_changed(), mate_color_selection_set_current_alpha(), mate_color_selection_set_current_rgba(), opacity_entry_changed(), and set_color_internal().
|
static |
References get_current_colors(), GTK_CUSTOM_PALETTE_HEIGHT, GTK_CUSTOM_PALETTE_WIDTH, and mate_color_selection_set_palette_color().
Referenced by mate_color_selection_realize(), and palette_change_notify_instance().
|
static |
|
static |
Referenced by mate_color_selection_set_change_palette_with_screen_hook(), and palette_change_color().
|
static |
Referenced by default_change_palette_func(), and get_current_colors().
|
static |
Referenced by mate_color_selection_class_init(), and update_color().
|
static |
Referenced by make_picker_cursor().
|
static |
Referenced by mate_color_selection_set_change_palette_hook(), and palette_change_color().