GIMP Widgets Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# GimpColorArea

## Name

GimpColorArea --

## Synopsis

    struct      GimpColorArea;
    enum        GimpColorAreaType;
    GtkWidget*  gimp_color_area_new             (const GimpRGB *color,
                                                 GimpColorAreaType type,
                                                 GdkModifierType drag_mask);
    void        gimp_color_area_set_color       (GimpColorArea *area,
                                                 const GimpRGB *color);
    void        gimp_color_area_get_color       (GimpColorArea *area,
                                                 GimpRGB *color);
    gboolean    gimp_color_area_has_alpha       (GimpColorArea *area);
    void        gimp_color_area_set_type        (GimpColorArea *area,
                                                 GimpColorAreaType type);

## Description

## Details

### struct GimpColorArea

    struct GimpColorArea
    {
      GtkDrawingArea       parent_instance;

      /*< private >*/
      guchar              *buf;
      guint                width;
      guint                height;
      guint                rowstride;

      GimpColorAreaType    type;
      GimpRGB              color;

      gboolean             needs_render;
    };

### enum GimpColorAreaType

    typedef enum
    {
      GIMP_COLOR_AREA_FLAT = 0,
      GIMP_COLOR_AREA_SMALL_CHECKS,
      GIMP_COLOR_AREA_LARGE_CHECKS
    } GimpColorAreaType;

### gimp_color_area_new ()

    GtkWidget*  gimp_color_area_new             (const GimpRGB *color,
                                                 GimpColorAreaType type,
                                                 GdkModifierType drag_mask);

Creates a new GimpColorArea widget.

This returns a preview area showing the color. It handles color DND. If the color changes, the "color_changed" signal is emitted.

`color` : | A pointer to a GimpRGB struct.
`type` : | The type of color area to create.
`drag_mask` : | The event_mask that should trigger drags.
Returns : | Pointer to the new GimpColorArea widget.

### gimp_color_area_set_color ()

    void        gimp_color_area_set_color       (GimpColorArea *area,
                                                 const GimpRGB *color);

`area` : | Pointer to a GimpColorArea.
`color` : |

### gimp_color_area_get_color ()

    void        gimp_color_area_get_color       (GimpColorArea *area,
                                                 GimpRGB *color);

`area` : |
`color` : |

### gimp_color_area_has_alpha ()

    gboolean    gimp_color_area_has_alpha       (GimpColorArea *area);

`area` : |
Returns : |

### gimp_color_area_set_type ()

    void        gimp_color_area_set_type        (GimpColorArea *area,
                                                 GimpColorAreaType type);

`area` : |
`type` : |

<<< Previous Page | Home | Up | Next Page >>>
GimpChainButton | GimpColorButton