Updated the atk docs for several files, particularly for enumerations.
[platform/upstream/atk.git] / atk / atkrelation.h
1 /* ATK -  Accessibility Toolkit
2  * Copyright 2001 Sun Microsystems Inc.
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17  * Boston, MA 02111-1307, USA.
18  */
19
20 #ifndef __ATK_RELATION_H__
21 #define __ATK_RELATION_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif /* __cplusplus */
26
27 #include <glib-object.h>
28 /**
29  *AtkRelationType:
30  *@ATK_RELATION_NULL:
31  *@ATK_RELATION_CONTROLLED_BY:
32  *@ATK_RELATION_CONTROLLER_FOR:
33  *@ATK_RELATION_LABEL_FOR:
34  *@ATK_RELATION_LABELLED_BY:
35  *@ATK_RELATION_MEMBER_OF:
36  *@ATK_RELATION_LAST_DEFINED:
37  * 
38  *The possible types of an #AtkRelation
39  **/
40 typedef enum
41 {
42   ATK_RELATION_NULL = 0,
43   ATK_RELATION_CONTROLLED_BY,
44   ATK_RELATION_CONTROLLER_FOR,
45   ATK_RELATION_LABEL_FOR,
46   ATK_RELATION_LABELLED_BY,
47   ATK_RELATION_MEMBER_OF,
48   ATK_RELATION_LAST_DEFINED
49 } AtkRelationType;
50
51 #define ATK_TYPE_RELATION                         (atk_relation_get_type ())
52 #define ATK_RELATION(obj)                         (G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_RELATION, AtkRelation))
53 #define ATK_RELATION_CLASS(klass)                 (G_TYPE_CHECK_CLASS_CAST ((klass), ATK_TYPE_RELATION, AtkRelationClass))
54 #define ATK_IS_RELATION(obj)                      (G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_RELATION))
55 #define ATK_IS_RELATION_CLASS(klass)              (G_TYPE_CHECK_CLASS_TYPE ((klass), ATK_TYPE_RELATION))
56 #define ATK_RELATION_GET_CLASS(obj)               (G_TYPE_INSTANCE_GET_CLASS ((obj), ATK_TYPE_RELATION, AtkRelationClass))
57
58 typedef struct _AtkRelation            AtkRelation;
59 typedef struct _AtkRelationClass       AtkRelationClass;
60
61
62 struct _AtkRelation
63 {
64   GObject parent;
65
66   GPtrArray       *target;
67   AtkRelationType relationship;
68 };
69
70 struct _AtkRelationClass
71 {
72   GObjectClass parent;
73 };
74
75 GType atk_relation_get_type (void);
76
77 AtkRelationType atk_relation_type_register            (const gchar *name);
78
79 /*
80  * Create a new relation for the specified key and the specified list
81  * of targets.
82  */
83 AtkRelation*    atk_relation_new                      (AtkObject       **targets,
84                                                        gint            n_targets,
85                                                        AtkRelationType relationship);
86 /*
87  * Returns the type of a relation.
88  */
89 AtkRelationType atk_relation_get_relation_type        (AtkRelation     *relation);
90 /*
91  * Returns the target list of a relation.
92  */
93 GPtrArray*      atk_relation_get_target               (AtkRelation     *relation);
94
95 #ifdef __cplusplus
96 }
97 #endif /* __cplusplus */
98
99 #endif /* __ATK_RELATION_H__ */