Details
GimpColorSelector_Callback ()
void (*GimpColorSelector_Callback) (gpointer data,
gint r,
gint g,
gint b); |
A function of this type should be called by the color selector each
time the user modifies the selected color.
GimpColorSelector_NewFunc ()
GtkWidget* (*GimpColorSelector_NewFunc) (gint r,
gint g,
gint b,
GimpColorSelector_Callback cb,
gpointer data,
gpointer *selector_data); |
A function of this type is called to create a new instance of the
color selector. The new selector should set its current color to
the RGB triple given (each component is in the range 0 - 255
inclusive, with white at 255,255,255 and black at 0,0,0).
The selector should call cb with argument data each time the
user modifies the selected color.
The selector must return a GtkWidget which implements the color
selection UI. The selector can optionally return selector_data,
an opaque pointer which will be passed in to subsequent invokations
on the selector.
GimpColorSelector_FreeFunc ()
void (*GimpColorSelector_FreeFunc) (gpointer selector_data); |
A function of this type is called when the color selector is no
longer required. This function should *not* free widgets that are
containted within the UI widget returned by new(), since they are
destroyed on behalf of the selector by the caller of this
function.
GimpColorSelector_SetColorFunc ()
void (*GimpColorSelector_SetColorFunc)
(gpointer selector_data,
gint r,
gint g,
gint b,
gboolean set_current); |
A function of this type is called to change the selector's current
color. The required color is specified as in the new() function.
If the set_current parameter is FALSE, then only the old color
should be set - if set_current is TRUE, both the old color and
the current color should be set to the RGB triple given. This
function merely gives a hint to the color selector; the selector
can choose to ignore this information.
struct GimpColorSelectorMethods
struct GimpColorSelectorMethods
{
GimpColorSelector_NewFunc new;
GimpColorSelector_FreeFunc free;
GimpColorSelector_SetColorFunc setcolor;
}; |
GimpColorSelectorID
typedef gpointer GimpColorSelectorID; |
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.
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 ()
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.