![]() |
![]() |
![]() |
nautilus-actions Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Implemented Interfaces |
#define NA_OBJECT_TYPE typedef NAObjectPrivate; typedef NAObjectClassPrivate; NAObject; void na_object_object_check_status (const NAObject *object
); gboolean na_object_object_check_status_up (const NAObject *object
); void na_object_object_reset_origin (NAObject *object
,const NAObject *origin
); NAObject * na_object_object_ref (NAObject *object
); void na_object_object_unref (NAObject *object
); void na_object_object_copy (NAObject *target
,const NAObject *source
,gboolean recursive
); void na_object_object_dump (const NAObject *object
); void na_object_object_dump_norec (const NAObject *object
); void na_object_object_dump_tree (GList *tree
); GList * na_object_object_get_hierarchy (const NAObject *object
); void na_object_free_hierarchy (GList *hierarchy
); void na_object_object_debug_invalid (const NAObject *object
,const gchar *reason
);
void na_object_object_check_status (const NAObject *object
);
Recursively checks for the edition status of object
and its childs
(if any).
Internally set some properties which may be requested later. This two-steps check-request let us optimize some work in the UI.
na_object_object_check_status( object )
+- na_iduplicable_check_status( object )
+- get_origin( object )
+- modified_status = v_are_equal( origin, object ) -> interface are_equal()
+- valid_status = v_is_valid( object ) -> interface is_valid()
Note that the recursivity is managed here, so that we can be sure that edition status of childs is actually checked before those of the parent.
|
the NAObject-derived object to be checked. |
gboolean na_object_object_check_status_up (const NAObject *object
);
Checks for modification and validity status of the object
, its
parent, the parent of its parent, etc. up to the top of the hierarchy.
void na_object_object_reset_origin (NAObject *object
,const NAObject *origin
);
Recursively reset origin of object
and its children to origin
(and
its children), so that origin
appears as the actual origin of object
.
The origin of origin
itself is set to NULL.
This only works if origin
has just been duplicated from object
,
and thus we do not have to check if children lists are equal.
|
a NAObject-derived object. |
|
must be a duplication of object .
|
NAObject * na_object_object_ref (NAObject *object
);
Recursively ref the object
and all its children, incrementing their
reference_count by 1.
|
a NAObject-derived object. |
Returns : |
a reference on the pbject .
|
void na_object_object_unref (NAObject *object
);
Recursively unref the object
and all its children, decrementing their
reference_count by 1.
|
a NAObject-derived object. |
void na_object_object_copy (NAObject *target
,const NAObject *source
,gboolean recursive
);
Copies source
to target
.
|
the target NAObject-derived object. |
|
the source NAObject-derived object. |
|
whether the copy should be recursive. |
void na_object_object_dump (const NAObject *object
);
Dumps via g_debug the actual content of the object.
The recursivity is dealt with here. If we let NAObjectItem do this, the dump of NAObjectItem-derived object will be splitted, childs being inserted inside.
na_object_dump()
doesn't modify the reference count of the dumped
object.
|
the NAObject-derived object to be dumped. |
void na_object_object_dump_norec (const NAObject *object
);
Dumps via g_debug the actual content of the object.
This function is not recursive.
|
the NAObject-derived object to be dumped. |
void na_object_object_dump_tree (GList *tree
);
Outputs a brief, hierarchical dump of the provided list.
|
a hierarchical list of NAObject-derived objects. |
GList * na_object_object_get_hierarchy (const NAObject *object
);
|
|
Returns : |
the class hierarchy, from the topmost base class, to the most-derived one. |