| GIMP Library Reference Manual |
|---|
gimp — Main functions needed for building a GIMP plug-in. This header includes all other GIMP Library headers.
#define GIMPVARgchar * gimp_version (void); extern guint gimp_major_version; extern guint gimp_minor_version; extern guint gimp_micro_version; #define gimp_get_data #define gimp_get_data_size #define gimp_set_data void (*GimpInitProc) (void); void (*GimpQuitProc) (void); void (*GimpQueryProc) (void); void (*GimpRunProc) (gchar *name,gint nparams, GimpParam *param,gint *nreturn_vals, GimpParam **return_vals); struct GimpPlugInInfo; struct GimpParamDef; struct GimpParamColor; struct GimpParamRegion; union GimpParamData; struct GimpParam; #define MAIN ()gint gimp_main (gint argc,gchar *argv[]);gint32 gimp_default_display (void); void gimp_install_procedure (gchar *name,gchar *blurb,gchar *help,gchar *author,gchar *copyright,gchar *date,gchar *menu_path,gchar *image_types,gint type,gint nparams,gint nreturn_vals, GimpParamDef *params, GimpParamDef *return_vals); void gimp_install_temp_proc (gchar *name,gchar *blurb,gchar *help,gchar *author,gchar *copyright,gchar *date,gchar *menu_path,gchar *image_types,gint type,gint nparams,gint nreturn_vals, GimpParamDef *params, GimpParamDef *return_vals, GimpRunProc run_proc); void gimp_uninstall_temp_proc (gchar *name); GimpParam* gimp_run_procedure (gchar *name,gint *nreturn_vals, ...); GimpParam* gimp_run_procedure2 (gchar *name,gint *nreturn_vals,gint nparams, GimpParam *params); void gimp_destroy_params (GimpParam *params,gint nparams); void gimp_destroy_paramdefs (GimpParamDef *paramdefs,gint nparams);gdouble gimp_gamma (void);gboolean gimp_install_cmap (void);gint gimp_min_colors (void);gboolean gimp_show_tool_tips (void);gchar * gimp_get_progname (void); void set_gimp_PLUG_IN_INFO_PTR (GimpPlugInInfo*);GimpParasite * gimp_parasite_find (gchar *name);gboolean gimp_parasite_list (gint *num_parasites,gchar ***parasites);gboolean gimp_parasite_attach (GimpParasite *parasite);gboolean gimp_parasite_detach (gchar *name); void gimp_attach_new_parasite (constgchar *name,gint flags,gint size, constgpointer data);
Main functions needed for building a GIMP plug-in. This header includes all other GIMP Library headers.
gchar * gimp_version (void);
Returns the host gimp version.
This procedure returns the version number of the currently running gimp.
| Returns : | The gimp version. |
void (*GimpRunProc) (gchar *name,gint nparams, GimpParam *param,gint *nreturn_vals, GimpParam **return_vals);
| name : | |
| nparams : | |
| param : | |
| nreturn_vals : | |
| return_vals : |
struct GimpPlugInInfo {
/* called when the gimp application initially starts up */
GimpInitProc init_proc;
/* called when the gimp application exits */
GimpQuitProc quit_proc;
/* called by the gimp so that the plug-in can inform the
* gimp of what it does. (ie. installing a procedure database
* procedure).
*/
GimpQueryProc query_proc;
/* called to run a procedure the plug-in installed in the
* procedure database.
*/
GimpRunProc run_proc;
};
union GimpParamData
{
gint32 d_int32;
gint16 d_int16;
gint8 d_int8;
gdouble d_float;
gchar *d_string;
gint32 *d_int32array;
gint16 *d_int16array;
gint8 *d_int8array;
gdouble *d_floatarray;
gchar **d_stringarray;
GimpRGB d_color;
GimpParamRegion d_region;
gint32 d_display;
gint32 d_image;
gint32 d_layer;
gint32 d_layer_mask;
gint32 d_channel;
gint32 d_drawable;
gint32 d_selection;
gint32 d_boundary;
gint32 d_path;
gint32 d_unit;
GimpParasite d_parasite;
gint32 d_tattoo;
GimpPDBStatusType d_status;
};
#define MAIN()
A macro that expands to the appropriate
To use this macro, simply place a line that contains just the code MAIN() at the toplevel of your file. No semicolon should be used.
void gimp_install_procedure (gchar *name,gchar *blurb,gchar *help,gchar *author,gchar *copyright,gchar *date,gchar *menu_path,gchar *image_types,gint type,gint nparams,gint nreturn_vals, GimpParamDef *params, GimpParamDef *return_vals);
| name : | |
| blurb : | |
| help : | |
| author : | |
| copyright : | |
| date : | |
| menu_path : | |
| image_types : | |
| type : | |
| nparams : | |
| nreturn_vals : | |
| params : | |
| return_vals : |
void gimp_install_temp_proc (gchar *name,gchar *blurb,gchar *help,gchar *author,gchar *copyright,gchar *date,gchar *menu_path,gchar *image_types,gint type,gint nparams,gint nreturn_vals, GimpParamDef *params, GimpParamDef *return_vals, GimpRunProc run_proc);
| name : | |
| blurb : | |
| help : | |
| author : | |
| copyright : | |
| date : | |
| menu_path : | |
| image_types : | |
| type : | |
| nparams : | |
| nreturn_vals : | |
| params : | |
| return_vals : | |
| run_proc : |
GimpParam* gimp_run_procedure (gchar *name,gint *nreturn_vals, ...);
| name : | |
| nreturn_vals : | |
| ... : | |
| Returns : |
GimpParam* gimp_run_procedure2 (gchar *name,gint *nreturn_vals,gint nparams, GimpParam *params);
| name : | |
| nreturn_vals : | |
| nparams : | |
| params : | |
| Returns : |
void gimp_destroy_params (GimpParam *params,gint nparams);
| params : | |
| nparams : |
void gimp_destroy_paramdefs (GimpParamDef *paramdefs,gint nparams);
| paramdefs : | |
| nparams : |
GimpParasite * gimp_parasite_find (gchar *name);
Finds the named parasite.
Finds and returns the named parasite that was previously attached to the gimp.
| name : | The name of the parasite to find. |
| Returns : | The found parasite. |
gboolean gimp_parasite_list (gint *num_parasites,gchar ***parasites);
List all parasites.
Returns a list of all currently attached parasites.
| num_parasites : | The number of attached parasites. |
| parasites : | The names of currently attached parasites. |
| Returns : | TRUE on success. |
gboolean gimp_parasite_attach (GimpParasite *parasite);
Add a parasite to the gimp.
This procedure attaches a parasite to the gimp. It has no return values.
| parasite : | The parasite to attach to the gimp. |
| Returns : | TRUE on success. |
gboolean gimp_parasite_detach (gchar *name);
Removes a parasite from the gimp.
This procedure detaches a parasite from the gimp. It has no return values.
| name : | The name of the parasite to detach from the gimp. |
| Returns : | TRUE on success. |
void gimp_attach_new_parasite (constgchar *name,gint flags,gint size, constgpointer data);
Convenience function that creates a parasite and attaches it to the GIMP.
See Also: gimp_parasite_attach()
| name : | the name of the |
| flags : | the flags set on the |
| size : | the size of the parasite data in bytes. |
| data : | a pointer to the data attached with the |
| << Part II. GIMP Library | gimpbrushes >> |