MateColorPicker

## MateColorPicker MateColorPicker |

## Synopsis

    #include <libmateui/libmateui.h>

    struct              MateColorPicker;
    GtkWidget *         mate_color_picker_new              (void);
    void                mate_color_picker_set_d            (MateColorPicker *cp,
                                                             gdouble r,
                                                             gdouble g,
                                                             gdouble b,
                                                             gdouble a);
    void                mate_color_picker_get_d            (MateColorPicker *cp,
                                                             gdouble *r,
                                                             gdouble *g,
                                                             gdouble *b,
                                                             gdouble *a);
    void                mate_color_picker_set_i8           (MateColorPicker *cp,
                                                             guint8 r,
                                                             guint8 g,
                                                             guint8 b,
                                                             guint8 a);
    void                mate_color_picker_get_i8           (MateColorPicker *cp,
                                                             guint8 *r,
                                                             guint8 *g,
                                                             guint8 *b,
                                                             guint8 *a);
    void                mate_color_picker_set_i16          (MateColorPicker *cp,
                                                             gushort r,
                                                             gushort g,
                                                             gushort b,
                                                             gushort a);
    void                mate_color_picker_get_i16          (MateColorPicker *cp,
                                                             gushort *r,
                                                             gushort *g,
                                                             gushort *b,
                                                             gushort *a);
    void                mate_color_picker_set_dither       (MateColorPicker *cp,
                                                             gboolean dither);
    gboolean            mate_color_picker_get_dither       (MateColorPicker *cp);
    void                mate_color_picker_set_use_alpha    (MateColorPicker *cp,
                                                             gboolean use_alpha);
    gboolean            mate_color_picker_get_use_alpha    (MateColorPicker *cp);
    void                mate_color_picker_set_title        (MateColorPicker *cp,
                                                             const gchar *title);
    const char *        mate_color_picker_get_title        (MateColorPicker *cp);

## Object Hierarchy

      GObject
       +----GInitiallyUnowned
             +----GtkObject
                   +----GtkWidget
                         +----GtkContainer
                               +----GtkBin
                                     +----GtkButton
                                           +----MateColorPicker

## Implemented Interfaces

MateColorPicker implements AtkImplementorIface, GtkBuildable and GtkActivatable.

## Properties

      "alpha"                    guint                 : Read / Write
      "blue"                     guint                 : Read / Write
      "dither"                   gboolean              : Read / Write
      "green"                    guint                 : Read / Write
      "red"                      guint                 : Read / Write
      "title"                    gchar*                : Read / Write
      "use-alpha"                gboolean              : Read / Write

## Signals

      "color-set"                                      : Run First

## Description

## Details

### struct MateColorPicker

    struct MateColorPicker;

### Warning

`MateColorPicker` is deprecated and should not be used in newly-written code.

### mate_color_picker_new ()

    GtkWidget *         mate_color_picker_new              (void);

### Warning

`mate_color_picker_new` is deprecated and should not be used in newly-written code.

Creates a new MATE color picker widget. This returns a widget in the form of a small button containing a swatch representing the current selected color. When the button is clicked, a color-selection dialog will open, allowing the user to select a color. The swatch will be updated to reflect the new color when the user finishes.

Returns : | Pointer to new MATE color picker widget.

### mate_color_picker_set_d ()

    void                mate_color_picker_set_d            (MateColorPicker *cp,
                                                             gdouble r,
                                                             gdouble g,
                                                             gdouble b,
                                                             gdouble a);

### Warning

`mate_color_picker_set_d` is deprecated and should not be used in newly-written code.

Set color shown in the color picker widget using floating point values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Red color component, values are in [0.0, 1.0]
`g` : | Green color component, values are in [0.0, 1.0]
`b` : | Blue color component, values are in [0.0, 1.0]
`a` : | Alpha component, values are in [0.0, 1.0]

### mate_color_picker_get_d ()

    void                mate_color_picker_get_d            (MateColorPicker *cp,
                                                             gdouble *r,
                                                             gdouble *g,
                                                             gdouble *b,
                                                             gdouble *a);

### Warning

`mate_color_picker_get_d` is deprecated and should not be used in newly-written code.

Retrieve color currently selected in the color picker widget in the form of floating point values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Output location of red color component, values are in [0.0, 1.0]
`g` : | Output location of green color component, values are in [0.0, 1.0]
`b` : | Output location of blue color component, values are in [0.0, 1.0]
`a` : | Output location of alpha color component, values are in [0.0, 1.0]

### mate_color_picker_set_i8 ()

    void                mate_color_picker_set_i8           (MateColorPicker *cp,
                                                             guint8 r,
                                                             guint8 g,
                                                             guint8 b,
                                                             guint8 a);

### Warning

`mate_color_picker_set_i8` is deprecated and should not be used in newly-written code.

Set color shown in the color picker widget using 8-bit integer values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Red color component, values are in [0, 255]
`g` : | Green color component, values are in [0, 255]
`b` : | Blue color component, values are in [0, 255]
`a` : | Alpha component, values are in [0, 255]

### mate_color_picker_get_i8 ()

    void                mate_color_picker_get_i8           (MateColorPicker *cp,
                                                             guint8 *r,
                                                             guint8 *g,
                                                             guint8 *b,
                                                             guint8 *a);

### Warning

`mate_color_picker_get_i8` is deprecated and should not be used in newly-written code.

Retrieve color currently selected in the color picker widget in the form of 8-bit integer values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Output location of red color component, values are in [0, 255]
`g` : | Output location of green color component, values are in [0, 255]
`b` : | Output location of blue color component, values are in [0, 255]
`a` : | Output location of alpha color component, values are in [0, 255]

### mate_color_picker_set_i16 ()

    void                mate_color_picker_set_i16          (MateColorPicker *cp,
                                                             gushort r,
                                                             gushort g,
                                                             gushort b,
                                                             gushort a);

### Warning

`mate_color_picker_set_i16` is deprecated and should not be used in newly-written code.

Set color shown in the color picker widget using 16-bit integer values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Red color component, values are in [0, 65535]
`g` : | Green color component, values are in [0, 65535]
`b` : | Blue color component, values are in [0, 65535]
`a` : | Alpha component, values are in [0, 65535]

### mate_color_picker_get_i16 ()

    void                mate_color_picker_get_i16          (MateColorPicker *cp,
                                                             gushort *r,
                                                             gushort *g,
                                                             gushort *b,
                                                             gushort *a);

### Warning

`mate_color_picker_get_i16` is deprecated and should not be used in newly-written code.

Retrieve color currently selected in the color picker widget in the form of 16-bit integer values.

`cp` : | Pointer to MATE color picker widget.
`r` : | Output location of red color component, values are in [0, 65535]
`g` : | Output location of green color component, values are in [0, 65535]
`b` : | Output location of blue color component, values are in [0, 65535]
`a` : | Output location of alpha color component, values are in [0, 65535]

### mate_color_picker_set_dither ()

    void                mate_color_picker_set_dither       (MateColorPicker *cp,
                                                             gboolean dither);

### Warning

`mate_color_picker_set_dither` is deprecated and should not be used in newly-written code.

Sets whether the picker should dither the color sample or just paint a solid rectangle.

`cp` : | Pointer to MATE color picker widget.
`dither` : | `TRUE` if color sample should be dithered, `FALSE` if not.

### mate_color_picker_get_dither ()

    gboolean            mate_color_picker_get_dither       (MateColorPicker *cp);

### Warning

`mate_color_picker_get_dither` is deprecated and should not be used in newly-written code.

Does the picker dither the color sample or just paint a solid rectangle.

`cp` : | Pointer to MATE color picker widget.
Returns : | `TRUE` if color sample is dithered, `FALSE` if not.

### mate_color_picker_set_use_alpha ()

    void                mate_color_picker_set_use_alpha    (MateColorPicker *cp,
                                                             gboolean use_alpha);

### Warning

`mate_color_picker_set_use_alpha` is deprecated and should not be used in newly-written code.

Sets whether or not the picker should use the alpha channel.

`cp` : | Pointer to MATE color picker widget.
`use_alpha` : | `TRUE` if color sample should use alpha channel, `FALSE` if not.

### mate_color_picker_get_use_alpha ()

    gboolean            mate_color_picker_get_use_alpha    (MateColorPicker *cp);

### Warning

`mate_color_picker_get_use_alpha` is deprecated and should not be used in newly-written code.

Does the picker use the alpha channel?

`cp` : | Pointer to MATE color picker widget.
Returns : | `TRUE` if color sample uses alpha channel, `FALSE` if not.

### mate_color_picker_set_title ()

    void                mate_color_picker_set_title        (MateColorPicker *cp,
                                                             const gchar *title);

### Warning

`mate_color_picker_set_title` is deprecated and should not be used in newly-written code.

Sets the title for the color selection dialog.

`cp` : | Pointer to MATE color picker widget.
`title` : | String containing new window title.

### mate_color_picker_get_title ()

    const char *        mate_color_picker_get_title        (MateColorPicker *cp);

### Warning

`mate_color_picker_get_title` is deprecated and should not be used in newly-written code.

Gets the title of the color selection dialog.

`cp` : | Pointer to MATE color picker widget.
Returns : | An internal string, do not free the return value

## Property Details

### The `"alpha"` property

      "alpha"                    guint                 : Read / Write

The alpha value of the chosen color.

Allowed values: <= 255

Default value: 0

### The `"blue"` property

      "blue"                     guint                 : Read / Write

The amount of blue in the chosen color.

Allowed values: <= 255

Default value: 0

### The `"dither"` property

      "dither"                   gboolean              : Read / Write

Whether or not to dither to color.

Default value: TRUE

### The `"green"` property

      "green"                    guint                 : Read / Write

The amount of green in the chosen color.

Allowed values: <= 255

Default value: 0

### The `"red"` property

      "red"                      guint                 : Read / Write

The amount of red in the chosen color.

Allowed values: <= 255

Default value: 0

### The `"title"` property

      "title"                    gchar*                : Read / Write

The title to give to the color picker.

Default value: NULL

### The `"use-alpha"` property

      "use-alpha"                gboolean              : Read / Write

Whether or not to give the color an alpha value.

Default value: FALSE

## Signal Details

### The `"color-set"` signal

    void                user_function                      (MateColorPicker *colorpicker,
                                                            guint             arg1,
                                                            guint             arg2,
                                                            guint             arg3,
                                                            guint             arg4,
                                                            gpointer          user_data)        : Run First

`colorpicker` : | the object which received the signal.
`arg1` : |
`arg2` : |
`arg3` : |
`arg4` : |
`user_data` : | user data set when the signal handler was connected.