*
* Copyright 2001, 2002 Sun Microsystems Inc.,
* Copyright 2001, 2002 Ximian, Inc.
+ * Copyright 2010, 2011 Novell, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* atspi_relation_get_relation_type:
* @obj: a pointer to the #AtspiRelation object to query.
*
- * Get the type of relationship represented by an #AtspiRelation.
+ * Gets the type of relationship represented by an #AtspiRelation.
*
* Returns: an #AtspiRelationType indicating the type of relation
* encapsulated in this #AtspiRelation object.
* atspi_relation_get_n_targets:
* @obj: a pointer to the #AtspiRelation object to query.
*
- * Get the number of objects which this relationship has as its
- * target objects (the subject is the #Accessible from which this
+ * Gets the number of objects which this relationship has as its
+ * target objects (the subject is the #AtspiAccessible from which this
* #AtspiRelation originated).
*
- * Returns: a short integer indicating how many target objects which the
- * originating #Accessible object has the #AtspiRelation
+ * Returns: a #gint indicating how many target objects which the
+ * originating #AtspiAccessible object has the #AtspiRelation
* relationship with.
**/
gint
/**
* atspi_relation_get_target:
* @obj: a pointer to the #AtspiRelation object to query.
- * @i: a (zero-index) integer indicating which (of possibly several) target is requested.
+ * @i: a (zero-index) #gint indicating which (of possibly several) target is requested.
*
- * Get the @i-th target of a specified #AtspiRelation relationship.
+ * Gets the @i-th target of a specified #AtspiRelation relationship.
*
* Returns: (transfer full): an #AtspiAccessible which is the @i-th object
* with which the originating #AtspiAccessible has relationship
while (dbus_message_iter_get_arg_type (&iter_array) != DBUS_TYPE_INVALID)
{
AtspiAccessible *accessible;
- GArray *new_array;
accessible = _atspi_dbus_return_accessible_from_iter (&iter_array);
- new_array = g_array_append_val (relation->targets, accessible);
- if (new_array)
- relation->targets = new_array;
+ relation->targets = g_array_append_val (relation->targets, accessible);
/* Iter was moved already, so no need to call dbus_message_iter_next */
}
return relation;
}
static void
-atspi_relation_finalize (GObject *obj)
+atspi_relation_finalize (GObject *object)
{
- AtspiRelation *relation = ATSPI_RELATION (obj);
+ AtspiRelation *relation = ATSPI_RELATION (object);
gint i;
for (i = 0; i < relation->targets->len; i++)
g_object_unref (g_array_index (relation->targets, AtspiAccessible *, i));
g_array_free (relation->targets, TRUE);
+
+ G_OBJECT_CLASS (atspi_relation_parent_class)->finalize (object);
}
static void