gimpcolorselector

Name

gimpcolorselector -- Functions and definitiions for creating a pluggable GIMP color selector module.

Synopsis



void        (*GimpColorSelectorCallback)    (gpointer data,
                                             const GimpHSV *hsv,
                                             const GimpRGB *rgb);
GtkWidget*  (*GimpColorSelectorNewFunc)     (const GimpHSV *hsv,
                                             const GimpRGB *rgb,
                                             gboolean show_alpha,
                                             GimpColorSelectorCallback cb,
                                             gpointer data,
                                             gpointer *selector_data);
void        (*GimpColorSelectorFreeFunc)    (gpointer selector_data);
void        (*GimpColorSelectorSetColorFunc)
                                            (gpointer selector_data,
                                             const GimpHSV *hsv,
                                             const GimpRGB *rgb);
void        (*GimpColorSelectorSetChannelFunc)
                                            (gpointer selector_data,
                                             GimpColorSelectorChannelType type);
struct      GimpColorSelectorMethods;
typedef     GimpColorSelectorID;
enum        GimpColorSelectorChannelType;
GimpColorSelectorID gimp_color_selector_register
                                            (const gchar *name,
                                             const gchar *help_page,
                                             GimpColorSelectorMethods *methods);
void        (*GimpColorSelectorFinishedCB)  (gpointer finished_data);
gboolean    gimp_color_selector_unregister  (GimpColorSelectorID selector_id,
                                             GimpColorSelectorFinishedCB finished_cb,
                                             gpointer finished_data);

Description

Functions and definitiions for creating a pluggable GIMP color selector module.

Details

GimpColorSelectorCallback ()

void        (*GimpColorSelectorCallback)    (gpointer data,
                                             const GimpHSV *hsv,
                                             const GimpRGB *rgb);


GimpColorSelectorNewFunc ()

GtkWidget*  (*GimpColorSelectorNewFunc)     (const GimpHSV *hsv,
                                             const GimpRGB *rgb,
                                             gboolean show_alpha,
                                             GimpColorSelectorCallback cb,
                                             gpointer data,
                                             gpointer *selector_data);


GimpColorSelectorFreeFunc ()

void        (*GimpColorSelectorFreeFunc)    (gpointer selector_data);


GimpColorSelectorSetColorFunc ()

void        (*GimpColorSelectorSetColorFunc)
                                            (gpointer selector_data,
                                             const GimpHSV *hsv,
                                             const GimpRGB *rgb);


GimpColorSelectorSetChannelFunc ()

void        (*GimpColorSelectorSetChannelFunc)
                                            (gpointer selector_data,
                                             GimpColorSelectorChannelType type);


struct GimpColorSelectorMethods

struct GimpColorSelectorMethods
{
  GimpColorSelectorNewFunc        new;
  GimpColorSelectorFreeFunc       free;

  GimpColorSelectorSetColorFunc   set_color;
  GimpColorSelectorSetChannelFunc set_channel;
};


GimpColorSelectorID

typedef gpointer GimpColorSelectorID;


enum GimpColorSelectorChannelType

typedef enum
{
  GIMP_COLOR_SELECTOR_HUE,
  GIMP_COLOR_SELECTOR_SATURATION,
  GIMP_COLOR_SELECTOR_VALUE,
  GIMP_COLOR_SELECTOR_RED,
  GIMP_COLOR_SELECTOR_GREEN,
  GIMP_COLOR_SELECTOR_BLUE,
  GIMP_COLOR_SELECTOR_ALPHA
} GimpColorSelectorChannelType;


gimp_color_selector_register ()

GimpColorSelectorID gimp_color_selector_register
                                            (const gchar *name,
                                             const gchar *help_page,
                                             GimpColorSelectorMethods *methods);

Register a color selector. Returns an identifier for the color selector on success, or NULL if the name is already in use. Both the name and methods table are internalised, so may be g_free()'d after this call.


GimpColorSelectorFinishedCB ()

void        (*GimpColorSelectorFinishedCB)  (gpointer finished_data);

A function of this type will be called once all instances of a color selector have finished after the selector module called gimp_color_selector_unregister().


gimp_color_selector_unregister ()

gboolean    gimp_color_selector_unregister  (GimpColorSelectorID selector_id,
                                             GimpColorSelectorFinishedCB finished_cb,
                                             gpointer finished_data);

Remove the selector id from active service. New instances of the selector will not be created, but existing ones are allowed to continue. If finished_cb is non-NULL, it will be called once all instances have finished. The callback could be used to unload dynamiclly loaded code, for example.

See Also

GModule

libgimp-gimpmodule