## gimpparasite

gimpparasite — Arbitrary pieces of data which can be attached to various GIMP objects.

## Synopsis

                        GimpParasite;
    GimpParasite *      gimp_parasite_new                   (const gchar *name,
                                                             guint32 flags,
                                                             guint32 size,
                                                             gconstpointer data);
    void                gimp_parasite_free                  (GimpParasite *parasite);
    GimpParasite *      gimp_parasite_copy                  (const GimpParasite *parasite);
    gboolean            gimp_parasite_compare               (const GimpParasite *a,
                                                             const GimpParasite *b);
    gboolean            gimp_parasite_is_type               (const GimpParasite *parasite,
                                                             const gchar *name);
    gboolean            gimp_parasite_is_persistent         (const GimpParasite *parasite);
    gboolean            gimp_parasite_is_undoable           (const GimpParasite *parasite);
    gboolean            gimp_parasite_has_flag              (const GimpParasite *parasite,
                                                             gulong flag);
    gulong              gimp_parasite_flags                 (const GimpParasite *parasite);
    const gchar *       gimp_parasite_name                  (const GimpParasite *parasite);
    gconstpointer       gimp_parasite_data                  (const GimpParasite *parasite);
    glong               gimp_parasite_data_size             (const GimpParasite *parasite);
    #define             GIMP_PARASITE_PERSISTENT
    #define             GIMP_PARASITE_UNDOABLE
    #define             GIMP_PARASITE_ATTACH_PARENT
    #define             GIMP_PARASITE_PARENT_PERSISTENT
    #define             GIMP_PARASITE_PARENT_UNDOABLE
    #define             GIMP_PARASITE_ATTACH_GRANDPARENT
    #define             GIMP_PARASITE_GRANDPARENT_PERSISTENT
    #define             GIMP_PARASITE_GRANDPARENT_UNDOABLE
    #define             GIMP_TYPE_PARASITE
    #define             GIMP_TYPE_PARAM_PARASITE
    #define             GIMP_IS_PARAM_SPEC_PARASITE         (pspec)
    GParamSpec *        gimp_param_spec_parasite            (const gchar *name,
                                                             const gchar *nick,
                                                             const gchar *blurb,
                                                             GParamFlags flags);
    #define             GIMP_VALUE_HOLDS_PARASITE           (value)

## Description

Arbitrary pieces of data which can be attached to various GIMP objects.

## Details

### GimpParasite

    typedef struct {
      gchar    *name;   /* The name of the parasite. USE A UNIQUE PREFIX! */
      guint32   flags;  /* save Parasite in XCF file, etc.                */
      guint32   size;   /* amount of data                                 */
      gpointer  data;   /* a pointer to the data.  plugin is              *
                         * responsible for tracking byte order            */
    } GimpParasite;

### gimp_parasite_new ()

    GimpParasite *      gimp_parasite_new                   (const gchar *name,
                                                             guint32 flags,
                                                             guint32 size,
                                                             gconstpointer data);

### gimp_parasite_free ()

    void                gimp_parasite_free                  (GimpParasite *parasite);

### gimp_parasite_copy ()

    GimpParasite *      gimp_parasite_copy                  (const GimpParasite *parasite);

### gimp_parasite_compare ()

    gboolean            gimp_parasite_compare               (const GimpParasite *a,
                                                             const GimpParasite *b);

### gimp_parasite_is_type ()

    gboolean            gimp_parasite_is_type               (const GimpParasite *parasite,
                                                             const gchar *name);

### gimp_parasite_is_persistent ()

    gboolean            gimp_parasite_is_persistent         (const GimpParasite *parasite);

### gimp_parasite_is_undoable ()

    gboolean            gimp_parasite_is_undoable           (const GimpParasite *parasite);

### gimp_parasite_has_flag ()

    gboolean            gimp_parasite_has_flag              (const GimpParasite *parasite,
                                                             gulong flag);

### gimp_parasite_flags ()

    gulong              gimp_parasite_flags                 (const GimpParasite *parasite);

### gimp_parasite_name ()

    const gchar *       gimp_parasite_name                  (const GimpParasite *parasite);

### gimp_parasite_data ()

    gconstpointer       gimp_parasite_data                  (const GimpParasite *parasite);

### gimp_parasite_data_size ()

    glong               gimp_parasite_data_size             (const GimpParasite *parasite);

### GIMP_PARASITE_PERSISTENT

    #define GIMP_PARASITE_PERSISTENT 1

### GIMP_PARASITE_UNDOABLE

    #define GIMP_PARASITE_UNDOABLE   2

### GIMP_PARASITE_ATTACH_PARENT

    #define GIMP_PARASITE_ATTACH_PARENT     (0x80 << 8)

### GIMP_PARASITE_PARENT_PERSISTENT

    #define GIMP_PARASITE_PARENT_PERSISTENT (GIMP_PARASITE_PERSISTENT << 8)

### GIMP_PARASITE_PARENT_UNDOABLE

    #define GIMP_PARASITE_PARENT_UNDOABLE   (GIMP_PARASITE_UNDOABLE << 8)

### GIMP_PARASITE_ATTACH_GRANDPARENT

    #define GIMP_PARASITE_ATTACH_GRANDPARENT     (0x80 << 16)

### GIMP_PARASITE_GRANDPARENT_PERSISTENT

    #define GIMP_PARASITE_GRANDPARENT_PERSISTENT (GIMP_PARASITE_PERSISTENT << 16)

### GIMP_PARASITE_GRANDPARENT_UNDOABLE

    #define GIMP_PARASITE_GRANDPARENT_UNDOABLE   (GIMP_PARASITE_UNDOABLE << 16)

### GIMP_TYPE_PARASITE

    #define GIMP_TYPE_PARASITE               (gimp_parasite_get_type ())

### GIMP_TYPE_PARAM_PARASITE

    #define GIMP_TYPE_PARAM_PARASITE           (gimp_param_parasite_get_type ())

### GIMP_IS_PARAM_SPEC_PARASITE()

    #define GIMP_IS_PARAM_SPEC_PARASITE(pspec) (G_TYPE_CHECK_INSTANCE_TYPE ((pspec), GIMP_TYPE_PARAM_PARASITE))

### gimp_param_spec_parasite ()

    GParamSpec *        gimp_param_spec_parasite            (const gchar *name,
                                                             const gchar *nick,
                                                             const gchar *blurb,
                                                             GParamFlags flags);

### GIMP_VALUE_HOLDS_PARASITE()

    #define GIMP_VALUE_HOLDS_PARASITE(value) (G_TYPE_CHECK_VALUE_TYPE ((value), GIMP_TYPE_PARASITE))

## See Also

gimp_image_parasite_attach(), `gimp_drawable_parasite_attach()`, `gimp_parasite_attach()` and their related functions.