## 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

## 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);

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

### gimp_parasite_free ()

    void                gimp_parasite_free                  (GimpParasite *parasite);

`parasite` : |

### gimp_parasite_copy ()

    GimpParasite*       gimp_parasite_copy                  (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_compare ()

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

`a` : |
`b` : |
Returns : |

### gimp_parasite_is_type ()

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

`parasite` : |
`name` : |
Returns : |

### gimp_parasite_is_persistent ()

    gboolean            gimp_parasite_is_persistent         (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_is_undoable ()

    gboolean            gimp_parasite_is_undoable           (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_has_flag ()

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

`parasite` : |
`flag` : |
Returns : |

### gimp_parasite_flags ()

    gulong              gimp_parasite_flags                 (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_name ()

    const gchar*        gimp_parasite_name                  (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_data ()

    gconstpointer       gimp_parasite_data                  (const GimpParasite *parasite);

`parasite` : |
Returns : |

### gimp_parasite_data_size ()

    glong               gimp_parasite_data_size             (const GimpParasite *parasite);

`parasite` : |
Returns : |

### 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)

## See Also

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