GimpTagged

GimpTagged

Synopsis

                    GimpTagged;
struct              GimpTaggedInterface;
void                gimp_tagged_add_tag                 (GimpTagged *tagged,
                                                         GimpTag *tag);
void                gimp_tagged_remove_tag              (GimpTagged *tagged,
                                                         GimpTag *tag);
GList *             gimp_tagged_get_tags                (GimpTagged *tagged);
void                gimp_tagged_set_tags                (GimpTagged *tagged,
                                                         GList *tags);
gchar *             gimp_tagged_get_identifier          (GimpTagged *tagged);
gchar *             gimp_tagged_get_checksum            (GimpTagged *tagged);
gboolean            gimp_tagged_has_tag                 (GimpTagged *tagged,
                                                         GimpTag *tag);

Object Hierarchy

  GInterface
   +----GimpTaggedInterface

Known Implementations

GimpTaggedInterface is implemented by GimpBrush, GimpBrushClipboard, GimpBrushGenerated, GimpBrushPipe, GimpCurve, GimpData, GimpDynamics, GimpGradient, GimpPalette, GimpPattern, GimpPatternClipboard and GimpToolPreset.

Signals

  "tag-added"                                      : Run Last
  "tag-removed"                                    : Run Last

Description

Details

GimpTagged

typedef struct _GimpTagged GimpTagged;


struct GimpTaggedInterface

struct GimpTaggedInterface;


gimp_tagged_add_tag ()

void                gimp_tagged_add_tag                 (GimpTagged *tagged,
                                                         GimpTag *tag);

Adds tag to the tagged object. The GimpTagged::tag-added signal is emitted if and only if the tag was not already assigned to this object.

tagged :

an object that implements the GimpTagged interface

tag :

a GimpTag

gimp_tagged_remove_tag ()

void                gimp_tagged_remove_tag              (GimpTagged *tagged,
                                                         GimpTag *tag);

Removes tag from the tagged object. The GimpTagged::tag-removed signal is emitted if and only if the tag was actually assigned to this object.

tagged :

an object that implements the GimpTagged interface

tag :

a GimpTag

gimp_tagged_get_tags ()

GList *             gimp_tagged_get_tags                (GimpTagged *tagged);

Returns the list of tags assigned to this object. The returned GList is owned by the tagged object and must not be modified or destroyed.

tagged :

an object that implements the GimpTagged interface

Returns :

a list of tags

gimp_tagged_set_tags ()

void                gimp_tagged_set_tags                (GimpTagged *tagged,
                                                         GList *tags);

Sets the list of tags assigned to this object. The passed list of tags is copied and should be freed by the caller.

tagged :

an object that implements the GimpTagged interface

tags :

a list of tags

gimp_tagged_get_identifier ()

gchar *             gimp_tagged_get_identifier          (GimpTagged *tagged);

Returns an identifier string which uniquely identifies the tagged object. Two different objects must have unique identifiers but may have the same checksum (which will be the case if one object is a copy of the other). The identifier must be the same across sessions, so for example an instance pointer cannot be used as an identifier.

tagged :

an object that implements the GimpTagged interface

Returns :

a newly allocated string containing unique identifier of the object. It must be freed using g_free.

gimp_tagged_get_checksum ()

gchar *             gimp_tagged_get_checksum            (GimpTagged *tagged);

Returns the checksum of the tagged object. It is used to remap the tags for an object for which the identifier has changed, for example if the user has renamed a data file since the last session.

If the object does not want to support such remapping (objects not stored in file for example) it can return NULL.

tagged :

an object that implements the GimpTagged interface

Returns :

checksum string if object needs identifier remapping, NULL otherwise. Returned string must be freed with #g_free().

gimp_tagged_has_tag ()

gboolean            gimp_tagged_has_tag                 (GimpTagged *tagged,
                                                         GimpTag *tag);

tagged :

an object that implements the GimpTagged interface

tag :

a GimpTag

Returns :

TRUE if the object has tag, FALSE otherwise.

Signal Details

The "tag-added" signal

void                user_function                      (GimpTaggedInterface *gimptaggedinterface,
                                                        GimpTag             *arg1,
                                                        gpointer             user_data)                : Run Last

gimptaggedinterface :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "tag-removed" signal

void                user_function                      (GimpTaggedInterface *gimptaggedinterface,
                                                        GimpTag             *arg1,
                                                        gpointer             user_data)                : Run Last

gimptaggedinterface :

the object which received the signal.

user_data :

user data set when the signal handler was connected.