#ifndef __ATK_RELATION_SET_H__
#define __ATK_RELATION_SET_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
+G_BEGIN_DECLS
#include <glib-object.h>
#include <atk/atkobject.h>
{
GObject parent;
- GArray *relations;
+ GPtrArray *relations;
};
struct _AtkRelationSetClass
{
GObjectClass parent;
+
+ AtkFunction pad1;
+ AtkFunction pad2;
};
+ATK_AVAILABLE_IN_ALL
GType atk_relation_set_get_type (void);
-AtkRelationType atk_relation_type_register (const gchar *name);
-
-/*
- * Create a new relation set.
- */
-AtkRelationSet* atk_relation_set_new (void);
-/*
- * Returns whether the relation set contains a relation that matches the
- * specified type.
- */
+ATK_AVAILABLE_IN_ALL
+AtkRelationSet* atk_relation_set_new (void);
+ATK_AVAILABLE_IN_ALL
gboolean atk_relation_set_contains (AtkRelationSet *set,
AtkRelationType relationship);
-/*
- * Remove a relation from the from the relation set.
- */
+ATK_AVAILABLE_IN_ALL
+gboolean atk_relation_set_contains_target (AtkRelationSet *set,
+ AtkRelationType relationship,
+ AtkObject *target);
+ATK_AVAILABLE_IN_ALL
void atk_relation_set_remove (AtkRelationSet *set,
AtkRelation *relation);
-/*
- * Add a new relation to the current relation set if it is not already
- * present.
- */
+ATK_AVAILABLE_IN_ALL
void atk_relation_set_add (AtkRelationSet *set,
AtkRelation *relation);
-/*
- * Returns the number of relations in a relation set.
- */
+ATK_AVAILABLE_IN_ALL
gint atk_relation_set_get_n_relations (AtkRelationSet *set);
-/*
- * Returns the relation at the specified position in the relation set.
- */
+ATK_AVAILABLE_IN_ALL
AtkRelation* atk_relation_set_get_relation (AtkRelationSet *set,
gint i);
-/*
- * Returns a relation that matches the specified type.
- */
+ATK_AVAILABLE_IN_ALL
AtkRelation* atk_relation_set_get_relation_by_type (AtkRelationSet *set,
AtkRelationType relationship);
+ATK_AVAILABLE_IN_ALL
+void atk_relation_set_add_relation_by_type (AtkRelationSet *set,
+ AtkRelationType relationship,
+ AtkObject *target);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
+G_END_DECLS
#endif /* __ATK_RELATION_SET_H__ */