GimpObject

GimpObject

Synopsis

                    GimpObject;
                    GimpObjectPrivate;
void                gimp_object_set_name                (GimpObject *object,
                                                         const gchar *name);
const gchar *       gimp_object_get_name                (gconstpointer object);
void                gimp_object_set_name_safe           (GimpObject *object,
                                                         const gchar *name);
void                gimp_object_set_static_name         (GimpObject *object,
                                                         const gchar *name);
void                gimp_object_take_name               (GimpObject *object,
                                                         gchar *name);
void                gimp_object_name_changed            (GimpObject *object);
void                gimp_object_name_free               (GimpObject *object);
gint                gimp_object_name_collate            (GimpObject *object1,
                                                         GimpObject *object2);
gint64              gimp_object_get_memsize             (GimpObject *object,
                                                         gint64 *gui_size);

Object Hierarchy

  GObject
   +----GimpObject
         +----GimpActionFactory
         +----GimpPaintCore
         +----GimpViewable
         +----GimpTool
         +----GimpStroke
         +----GimpCanvasItem
         +----GimpContainer
         +----GimpDataFactory
         +----GimpDialogFactory
         +----GimpDisplay
         +----GimpDynamicsOutput
         +----Gimp
         +----GimpGrid
         +----GimpIdTable
         +----GimpImageMap
         +----GimpItemTree
         +----GimpMenuFactory
         +----GimpMultiWindowStrategy
         +----GimpParasiteList
         +----GimpPDB
         +----GimpPlugInDef
         +----GimpPlugIn
         +----GimpPlugInManager
         +----GimpProcedure
         +----GimpProjection
         +----GimpSessionInfo
         +----GimpSingleWindowStrategy
         +----GimpTagCache
         +----GimpText
         +----GimpToolControl
         +----GimpTreeHandler

Known Derived Interfaces

GimpObject is required by GimpPickableInterface.

Properties

  "name"                     gchar*                : Read / Write / Construct

Signals

  "disconnect"                                     : Run First
  "name-changed"                                   : Run First

Description

Details

GimpObject

typedef struct _GimpObject GimpObject;


GimpObjectPrivate

typedef struct _GimpObjectPrivate GimpObjectPrivate;


gimp_object_set_name ()

void                gimp_object_set_name                (GimpObject *object,
                                                         const gchar *name);

Sets the object's name. Takes care of freeing the old name and emitting the ::name_changed signal if the old and new name differ.

object :

a GimpObject

name :

the object's new name

gimp_object_get_name ()

const gchar *       gimp_object_get_name                (gconstpointer object);

This function gives access to the name of a GimpObject. The returned name belongs to the object and must not be freed.

object :

a GimpObject

Returns :

a pointer to the object's name

gimp_object_set_name_safe ()

void                gimp_object_set_name_safe           (GimpObject *object,
                                                         const gchar *name);

A safe version of gimp_object_set_name() that takes care of handling newlines and overly long names. The actual name set may be different to the name you pass.

object :

a GimpObject

name :

the object's new name

gimp_object_set_static_name ()

void                gimp_object_set_static_name         (GimpObject *object,
                                                         const gchar *name);


gimp_object_take_name ()

void                gimp_object_take_name               (GimpObject *object,
                                                         gchar *name);


gimp_object_name_changed ()

void                gimp_object_name_changed            (GimpObject *object);

Causes the ::name-changed signal to be emitted.

object :

a GimpObject

gimp_object_name_free ()

void                gimp_object_name_free               (GimpObject *object);

Frees the name of object and sets the name pointer to NULL. Also takes care of the normalized name that the object might be caching.

In general you should be using gimp_object_set_name() instead. But if you ever need to free the object name but don't want the ::name-changed signal to be emitted, then use this function. Never ever free the object name directly!

object :

a GimpObject

gimp_object_name_collate ()

gint                gimp_object_name_collate            (GimpObject *object1,
                                                         GimpObject *object2);

Compares two object names for ordering using the linguistically correct rules for the current locale. It caches the normalized version of the object name to speed up subsequent calls.

object1 :

a GimpObject

object2 :

another GimpObject

Returns :

-1 if object1 compares before object2, 0 if they compare equal, 1 if object1 compares after object2.

gimp_object_get_memsize ()

gint64              gimp_object_get_memsize             (GimpObject *object,
                                                         gint64 *gui_size);

Property Details

The "name" property

  "name"                     gchar*                : Read / Write / Construct

Default value: NULL

Signal Details

The "disconnect" signal

void                user_function                      (GimpObject *gimpobject,
                                                        gpointer    user_data)       : Run First

gimpobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.

The "name-changed" signal

void                user_function                      (GimpObject *gimpobject,
                                                        gpointer    user_data)       : Run First

gimpobject :

the object which received the signal.

user_data :

user data set when the signal handler was connected.