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;
void (*GimpColorSelectorFinishedCB) (gpointer finished_data);
#define GIMP_COLOR_SELECTOR_SIZE
#define GIMP_COLOR_SELECTOR_BAR_SIZE
GimpColorSelectorID gimp_color_selector_register
(const gchar *name,
const gchar *help_page,
GimpColorSelectorMethods *methods);
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 ()
GimpColorSelectorNewFunc ()
GimpColorSelectorFreeFunc ()
void (*GimpColorSelectorFreeFunc) (gpointer selector_data); |
GimpColorSelectorSetColorFunc ()
GimpColorSelectorSetChannelFunc ()
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; |
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_SIZE
#define GIMP_COLOR_SELECTOR_SIZE 150 |
GIMP_COLOR_SELECTOR_BAR_SIZE
#define GIMP_COLOR_SELECTOR_BAR_SIZE 15 |
gimp_color_selector_register ()
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.
gimp_color_selector_unregister ()
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.