* Boston, MA 02111-1307, USA.
*/
+#if defined(ATK_DISABLE_SINGLE_INCLUDES) && !defined (__ATK_H_INSIDE__) && !defined (ATK_COMPILATION)
+#error "Only <atk/atk.h> can be included directly."
+#endif
+
#ifndef __ATK_RELATION_H__
#define __ATK_RELATION_H__
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
+G_BEGIN_DECLS
#include <glib-object.h>
+#include <atk/atkrelationtype.h>
+#include <atk/atkversion.h>
/*
* An AtkRelation describes a relation between the object and one or more
* are defined as an AtkRelationSet, which is a set of AtkRelations.
*/
-/**
- *AtkRelationType:
- *@ATK_RELATION_NULL:
- *@ATK_RELATION_CONTROLLED_BY: Indicates an object controlled by one or more target objects.
- *@ATK_RELATION_CONTROLLER_FOR: Indicates an object is an controller for one or more target objects.
- *@ATK_RELATION_LABEL_FOR: Indicates an object is a label for one or more target objects.
- *@ATK_RELATION_LABELLED_BY: Indicates an object is labelled by one or more target objects.
- *@ATK_RELATION_MEMBER_OF: Indicates an object is a member of a group of one or more target objects.
- *@ATK_RELATION_NODE_CHILD_OF: Indicates an object is a cell in a treetable which is displayed because a cell in the same column is expanded and identifies that cell.
- *@ATK_RELATION_LAST_DEFINED:
- *
- *Describes the type of the relation
- **/
-typedef enum
-{
- ATK_RELATION_NULL = 0,
- ATK_RELATION_CONTROLLED_BY,
- ATK_RELATION_CONTROLLER_FOR,
- ATK_RELATION_LABEL_FOR,
- ATK_RELATION_LABELLED_BY,
- ATK_RELATION_MEMBER_OF,
- ATK_RELATION_NODE_CHILD_OF,
- ATK_RELATION_LAST_DEFINED
-} AtkRelationType;
-
#define ATK_TYPE_RELATION (atk_relation_get_type ())
#define ATK_RELATION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_RELATION, AtkRelation))
#define ATK_RELATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_RELATION, AtkRelationClass))
typedef struct _AtkRelation AtkRelation;
typedef struct _AtkRelationClass AtkRelationClass;
-
struct _AtkRelation
{
GObject parent;
GObjectClass parent;
};
+ATK_AVAILABLE_IN_ALL
GType atk_relation_get_type (void);
+ATK_AVAILABLE_IN_ALL
AtkRelationType atk_relation_type_register (const gchar *name);
-G_CONST_RETURN gchar* atk_relation_type_get_name (AtkRelationType type);
+ATK_AVAILABLE_IN_ALL
+const gchar* atk_relation_type_get_name (AtkRelationType type);
+ATK_AVAILABLE_IN_ALL
AtkRelationType atk_relation_type_for_name (const gchar *name);
/*
* Create a new relation for the specified key and the specified list
* of targets.
*/
+ATK_AVAILABLE_IN_ALL
AtkRelation* atk_relation_new (AtkObject **targets,
gint n_targets,
AtkRelationType relationship);
/*
* Returns the type of a relation.
*/
+ATK_AVAILABLE_IN_ALL
AtkRelationType atk_relation_get_relation_type (AtkRelation *relation);
/*
* Returns the target list of a relation.
*/
+ATK_AVAILABLE_IN_ALL
GPtrArray* atk_relation_get_target (AtkRelation *relation);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
+ATK_AVAILABLE_IN_ALL
+void atk_relation_add_target (AtkRelation *relation,
+ AtkObject *target);
+ATK_AVAILABLE_IN_ALL
+gboolean atk_relation_remove_target (AtkRelation *relation,
+ AtkObject *target);
+
+G_END_DECLS
#endif /* __ATK_RELATION_H__ */