GnomeColorPicker

Name

GnomeColorPicker -- 

Synopsis


#include <libgnomeui/libgnomeui.h>


struct      GnomeColorPicker;
GtkWidget*  gnome_color_picker_new          (void);
void        gnome_color_picker_set_d        (GnomeColorPicker *cp,
                                             gdouble r,
                                             gdouble g,
                                             gdouble b,
                                             gdouble a);
void        gnome_color_picker_get_d        (GnomeColorPicker *cp,
                                             gdouble *r,
                                             gdouble *g,
                                             gdouble *b,
                                             gdouble *a);
void        gnome_color_picker_set_i8       (GnomeColorPicker *cp,
                                             guint8 r,
                                             guint8 g,
                                             guint8 b,
                                             guint8 a);
void        gnome_color_picker_get_i8       (GnomeColorPicker *cp,
                                             guint8 *r,
                                             guint8 *g,
                                             guint8 *b,
                                             guint8 *a);
void        gnome_color_picker_set_i16      (GnomeColorPicker *cp,
                                             gushort r,
                                             gushort g,
                                             gushort b,
                                             gushort a);
void        gnome_color_picker_get_i16      (GnomeColorPicker *cp,
                                             gushort *r,
                                             gushort *g,
                                             gushort *b,
                                             gushort *a);
void        gnome_color_picker_set_dither   (GnomeColorPicker *cp,
                                             gboolean dither);
gboolean    gnome_color_picker_get_dither   (GnomeColorPicker *cp);
void        gnome_color_picker_set_use_alpha
                                            (GnomeColorPicker *cp,
                                             gboolean use_alpha);
gboolean    gnome_color_picker_get_use_alpha
                                            (GnomeColorPicker *cp);
void        gnome_color_picker_set_title    (GnomeColorPicker *cp,
                                             const gchar *title);
const char* gnome_color_picker_get_title    (GnomeColorPicker *cp);


Object Hierarchy


  GObject
   +----GtkObject
         +----GtkWidget
               +----GtkContainer
                     +----GtkBin
                           +----GtkButton
                                 +----GnomeColorPicker

Properties


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

Signal Prototypes


"color-set" void        user_function      (GnomeColorPicker *colorpicker,
                                            guint arg1,
                                            guint arg2,
                                            guint arg3,
                                            guint arg4,
                                            gpointer user_data);

Description

Details

struct GnomeColorPicker

struct GnomeColorPicker;


gnome_color_picker_new ()

GtkWidget*  gnome_color_picker_new          (void);

Creates a new GNOME 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.


gnome_color_picker_set_d ()

void        gnome_color_picker_set_d        (GnomeColorPicker *cp,
                                             gdouble r,
                                             gdouble g,
                                             gdouble b,
                                             gdouble a);

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


gnome_color_picker_get_d ()

void        gnome_color_picker_get_d        (GnomeColorPicker *cp,
                                             gdouble *r,
                                             gdouble *g,
                                             gdouble *b,
                                             gdouble *a);

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


gnome_color_picker_set_i8 ()

void        gnome_color_picker_set_i8       (GnomeColorPicker *cp,
                                             guint8 r,
                                             guint8 g,
                                             guint8 b,
                                             guint8 a);

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


gnome_color_picker_get_i8 ()

void        gnome_color_picker_get_i8       (GnomeColorPicker *cp,
                                             guint8 *r,
                                             guint8 *g,
                                             guint8 *b,
                                             guint8 *a);

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


gnome_color_picker_set_i16 ()

void        gnome_color_picker_set_i16      (GnomeColorPicker *cp,
                                             gushort r,
                                             gushort g,
                                             gushort b,
                                             gushort a);

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


gnome_color_picker_get_i16 ()

void        gnome_color_picker_get_i16      (GnomeColorPicker *cp,
                                             gushort *r,
                                             gushort *g,
                                             gushort *b,
                                             gushort *a);

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


gnome_color_picker_set_dither ()

void        gnome_color_picker_set_dither   (GnomeColorPicker *cp,
                                             gboolean dither);

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


gnome_color_picker_get_dither ()

gboolean    gnome_color_picker_get_dither   (GnomeColorPicker *cp);

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


gnome_color_picker_set_use_alpha ()

void        gnome_color_picker_set_use_alpha
                                            (GnomeColorPicker *cp,
                                             gboolean use_alpha);

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


gnome_color_picker_get_use_alpha ()

gboolean    gnome_color_picker_get_use_alpha
                                            (GnomeColorPicker *cp);

Does the picker use the alpha channel?


gnome_color_picker_set_title ()

void        gnome_color_picker_set_title    (GnomeColorPicker *cp,
                                             const gchar *title);

Sets the title for the color selection dialog.


gnome_color_picker_get_title ()

const char* gnome_color_picker_get_title    (GnomeColorPicker *cp);

Gets the title of the color selection dialog.

Properties

"dither" (gboolean : Read / Write)

Whether or not to dither to color

"use-alpha" (gboolean : Read / Write)

Whether or not to give the color an alpha value

"title" (gchararray : Read / Write)

The title to give to the color picker

"red" (guint : Read / Write)

The amount of red in the chosen color

"green" (guint : Read / Write)

The amount of green in the chosen color

"blue" (guint : Read / Write)

The amount of blue in the chosen color

"alpha" (guint : Read / Write)

The alpha value of the chosen color

Signals

The "color-set" signal

void        user_function                  (GnomeColorPicker *colorpicker,
                                            guint arg1,
                                            guint arg2,
                                            guint arg3,
                                            guint arg4,
                                            gpointer user_data);