GIMP Library Reference Manual
<<< Previous Page | Home | Up | Next Page >>>

# gimp

## Name

gimp -- Main functions needed for building a GIMP plug-in. This header includes all other GIMP Library headers.

## Synopsis

    #define     GIMPVAR
    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);
    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        (const gchar *name,
                                                 gint flags,
                                                 gint size,
                                                 const gpointer data);

## Description

Main functions needed for building a GIMP plug-in. This header includes all other GIMP Library headers.

## Details

### GIMPVAR

    #define     GIMPVAR

### gimp_major_version

    extern guint gimp_major_version;

### gimp_minor_version

    extern guint gimp_minor_version;

### gimp_micro_version

    extern guint gimp_micro_version;

### gimp_get_data

    #define gimp_get_data         gimp_procedural_db_get_data

### gimp_get_data_size

    #define gimp_get_data_size    gimp_procedural_db_get_data_size

Returns : |

### gimp_set_data

    #define gimp_set_data         gimp_procedural_db_set_data

### GimpInitProc ()

    void        (*GimpInitProc)                 (void);

### GimpQuitProc ()

    void        (*GimpQuitProc)                 (void);

### GimpQueryProc ()

    void        (*GimpQueryProc)                (void);

### GimpRunProc ()

    void        (*GimpRunProc)                  (gchar *name,
                                                 gint nparams,
                                                 GimpParam *param,
                                                 gint *nreturn_vals,
                                                 GimpParam **return_vals);

`name` : |
`nparams` : |
`param` : |
`nreturn_vals` : |
`return_vals` : |

### struct GimpPlugInInfo

    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;
    };

### struct GimpParamDef

    struct GimpParamDef
    {
      GimpPDBArgType  type;
      gchar          *name;
      gchar          *description;
    };

### struct GimpParamColor

    struct GimpParamColor;

### struct GimpParamRegion

    struct GimpParamRegion
    {
      gint32 x;
      gint32 y;
      gint32 width;
      gint32 height;
    };

### union GimpParamData

    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;
    };

### struct GimpParam

    struct GimpParam
    {
      GimpPDBArgType type;
      GimpParamData  data;
    };

### MAIN()

    #define     MAIN()

### gimp_main ()

    gint        gimp_main                       (gint argc,
                                                 gchar *argv[]);

`argc` : |
`argv` : |
Returns : |

### gimp_default_display ()

    gint32      gimp_default_display            (void);

Returns : |

### gimp_install_procedure ()

    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` : |

### gimp_install_temp_proc ()

    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` : |

### gimp_uninstall_temp_proc ()

    void        gimp_uninstall_temp_proc        (gchar *name);

`name` : |

### gimp_run_procedure ()

    GimpParam*  gimp_run_procedure              (gchar *name,
                                                 gint *nreturn_vals,
                                                 ...);

`name` : |
`nreturn_vals` : |
`...` : |
Returns : |

### gimp_run_procedure2 ()

    GimpParam*  gimp_run_procedure2             (gchar *name,
                                                 gint *nreturn_vals,
                                                 gint nparams,
                                                 GimpParam *params);

`name` : |
`nreturn_vals` : |
`nparams` : |
`params` : |
Returns : |

### gimp_destroy_params ()

    void        gimp_destroy_params             (GimpParam *params,
                                                 gint nparams);

`params` : |
`nparams` : |

### gimp_destroy_paramdefs ()

    void        gimp_destroy_paramdefs          (GimpParamDef *paramdefs,
                                                 gint nparams);

`paramdefs` : |
`nparams` : |

### gimp_gamma ()

    gdouble     gimp_gamma                      (void);

Returns : |

### gimp_install_cmap ()

    gboolean    gimp_install_cmap               (void);

Returns : |

### gimp_min_colors ()

    gint        gimp_min_colors                 (void);

Returns : |

### gimp_get_progname ()

    gchar*      gimp_get_progname               (void);

Returns : |

### set_gimp_PLUG_IN_INFO_PTR ()

    void        set_gimp_PLUG_IN_INFO_PTR       (GimpPlugInInfo*);

`Param1` : |

### gimp_parasite_find ()

    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.

### gimp_parasite_list ()

    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.

### gimp_parasite_attach ()

    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.

### gimp_parasite_detach ()

    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.

### gimp_attach_new_parasite ()

    void        gimp_attach_new_parasite        (const gchar *name,
                                                 gint flags,
                                                 gint size,
                                                 const gpointer data);

`name` : |
`flags` : |
`size` : |
`data` : |

<<< Previous Page | Home | Up | Next Page >>>
GIMP Library | gimpbrushes