gimpparasite

Name

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

Synopsis



struct      GimpParasite;
#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
GimpParasite* gimp_parasite_new             (const gchar *name,
                                             guint32 flags,
                                             guint32 size,
                                             const gpointer 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);
const gchar* gimp_parasite_name             (const GimpParasite *parasite);
gulong      gimp_parasite_flags             (const GimpParasite *parasite);
gpointer    gimp_parasite_data              (const GimpParasite *parasite);
glong       gimp_parasite_data_size         (const GimpParasite *parasite);
GimpParasite* gimp_parasite_find            (gchar *name);
gboolean    gimp_parasite_attach            (GimpParasite *parasite);
gboolean    gimp_parasite_detach            (gchar *name);
gboolean    gimp_parasite_list              (gint *num_parasites,
                                             gchar ***parasites);
GimpParasite* gimp_drawable_parasite_find   (gint32 drawable_ID,
                                             gchar *name);
gboolean    gimp_drawable_parasite_attach   (gint32 drawable_ID,
                                             GimpParasite *parasite);
gboolean    gimp_drawable_parasite_detach   (gint32 drawable_ID,
                                             gchar *name);
gboolean    gimp_drawable_parasite_list     (gint32 drawable_ID,
                                             gint *num_parasites,
                                             gchar ***parasites);
GimpParasite* gimp_image_parasite_find      (gint32 image_ID,
                                             gchar *name);
gboolean    gimp_image_parasite_attach      (gint32 image_ID,
                                             GimpParasite *parasite);
gboolean    gimp_image_parasite_detach      (gint32 image_ID,
                                             gchar *name);
gboolean    gimp_image_parasite_list        (gint32 image_ID,
                                             gint *num_parasites,
                                             gchar ***parasites);
void        gimp_attach_new_parasite        (const gchar *name,
                                             gint flags,
                                             gint size,
                                             const gpointer data);
void        gimp_drawable_attach_new_parasite
                                            (gint32 drawable_ID,
                                             const gchar *name,
                                             gint flags,
                                             gint size,
                                             const gpointer data);
void        gimp_image_attach_new_parasite  (gint32 image_ID,
                                             const gchar *name,
                                             gint flags,
                                             gint size,
                                             const gpointer data);

Description

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

Details

struct GimpParasite

struct GimpParasite
{
  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            */
};


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_parasite_new ()

GimpParasite* gimp_parasite_new             (const gchar *name,
                                             guint32 flags,
                                             guint32 size,
                                             const gpointer 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_name ()

const gchar* gimp_parasite_name             (const GimpParasite *parasite);

parasite : 
Returns : 


gimp_parasite_flags ()

gulong      gimp_parasite_flags             (const GimpParasite *parasite);

parasite : 
Returns : 


gimp_parasite_data ()

gpointer    gimp_parasite_data              (const GimpParasite *parasite);

parasite : 
Returns : 


gimp_parasite_data_size ()

glong       gimp_parasite_data_size         (const GimpParasite *parasite);

parasite : 
Returns : 


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_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_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_drawable_parasite_find ()

GimpParasite* gimp_drawable_parasite_find   (gint32 drawable_ID,
                                             gchar *name);

Finds the named parasite in a drawable

Finds and returns the named parasite that was previously attached to a drawable.

drawable_ID : The drawable.
name : The name of the parasite to find.
Returns : The found parasite.


gimp_drawable_parasite_attach ()

gboolean    gimp_drawable_parasite_attach   (gint32 drawable_ID,
                                             GimpParasite *parasite);

Add a parasite to a drawable.

This procedure attaches a parasite to a drawable. It has no return values.

drawable_ID : The drawable.
parasite : The parasite to attach to a drawable.
Returns : TRUE on success.


gimp_drawable_parasite_detach ()

gboolean    gimp_drawable_parasite_detach   (gint32 drawable_ID,
                                             gchar *name);

Removes a parasite from a drawable.

This procedure detaches a parasite from a drawable. It has no return values.

drawable_ID : The drawable.
name : The name of the parasite to detach from a drawable.
Returns : TRUE on success.


gimp_drawable_parasite_list ()

gboolean    gimp_drawable_parasite_list     (gint32 drawable_ID,
                                             gint *num_parasites,
                                             gchar ***parasites);

List all parasites.

Returns a list of all currently attached parasites.

drawable_ID : The drawable.
num_parasites : The number of attached parasites.
parasites : The names of currently attached parasites.
Returns : TRUE on success.


gimp_image_parasite_find ()

GimpParasite* gimp_image_parasite_find      (gint32 image_ID,
                                             gchar *name);

Finds the named parasite in an image

Finds and returns the named parasite that was previously attached to an image.

image_ID : The image.
name : The name of the parasite to find.
Returns : The found parasite.


gimp_image_parasite_attach ()

gboolean    gimp_image_parasite_attach      (gint32 image_ID,
                                             GimpParasite *parasite);

Add a parasite to an image.

This procedure attaches a parasite to an image. It has no return values.

image_ID : The image.
parasite : The parasite to attach to an image.
Returns : TRUE on success.


gimp_image_parasite_detach ()

gboolean    gimp_image_parasite_detach      (gint32 image_ID,
                                             gchar *name);

Removes a parasite from an image.

This procedure detaches a parasite from an image. It has no return values.

image_ID : The image.
name : The name of the parasite to detach from an image.
Returns : TRUE on success.


gimp_image_parasite_list ()

gboolean    gimp_image_parasite_list        (gint32 image_ID,
                                             gint *num_parasites,
                                             gchar ***parasites);

List all parasites.

Returns a list of all currently attached parasites.

image_ID : The image.
num_parasites : The number of attached parasites.
parasites : The names of currently attached parasites.
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 : 


gimp_drawable_attach_new_parasite ()

void        gimp_drawable_attach_new_parasite
                                            (gint32 drawable_ID,
                                             const gchar *name,
                                             gint flags,
                                             gint size,
                                             const gpointer data);

drawable_ID : 
name : 
flags : 
size : 
data : 


gimp_image_attach_new_parasite ()

void        gimp_image_attach_new_parasite  (gint32 image_ID,
                                             const gchar *name,
                                             gint flags,
                                             gint size,
                                             const gpointer data);

image_ID : 
name : 
flags : 
size : 
data : 

See Also

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