2 * This file is part of duit.
4 * duit is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation; either version 2.1 of the License, or
7 * (at your option) any later version.
9 * duit 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
12 * GNU Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with duit; if not, write to the Free Software
16 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 // generated automatically - do not change
20 // find conversion definition on APILookup.txt
21 // implement new conversion functionalities on the wrap.utils pakage
24 * Conversion parameters:
25 * inFile = AtkRelationSet.html
27 * outFile = RelationSet
28 * strct = AtkRelationSet
46 * - GPtrArray* -> PtrArray
50 module atk
.RelationSet
;
52 private import atk
.atktypes
;
54 private import lib
.atk
;
56 private import glib
.PtrArray
;
60 * The AtkRelationSet held by an object establishes its relationships with
61 * objects beyond the normal "parent/child" hierarchical relationships that all
62 * user interface objects have. AtkRelationSets establish whether objects are
63 * labelled or controlled by other components, share group membership with other
64 * components (for instance within a radio-button group), or share content which
65 * "flows" between them, among other types of possible relationships.
67 private import gobject
.ObjectG
;
68 public class RelationSet
: ObjectG
71 /** the main Gtk struct */
72 protected AtkRelationSet
* atkRelationSet
;
75 public AtkRelationSet
* getRelationSetStruct()
77 return atkRelationSet
;
81 /** the main Gtk struct as a void* */
82 protected void* getStruct()
84 return cast(void*)atkRelationSet
;
88 * Sets our main struct and passes it to the parent class
90 public this (AtkRelationSet
* atkRelationSet
)
92 super(cast(GObject
*)atkRelationSet
);
93 this.atkRelationSet
= atkRelationSet
;
101 * Creates a new empty relation set.
103 * a new AtkRelationSet
105 public static AtkRelationSet
* atkRelationSetNew()
107 // AtkRelationSet* atk_relation_set_new (void);
108 return atk_relation_set_new();
112 * Determines whether the relation set contains a relation that matches the
119 * TRUE if relationship is the relationship type of a relation
120 * in set, FALSE otherwise
122 public int atkRelationSetContains(AtkRelationType relationship
)
124 // gboolean atk_relation_set_contains (AtkRelationSet *set, AtkRelationType relationship);
125 return atk_relation_set_contains(atkRelationSet
, relationship
);
129 * Removes a relation from the relation set.
130 * This function unref's the AtkRelation so it will be deleted unless there
131 * is another reference to it.
137 public void atkRelationSetRemove(AtkRelation
* relation
)
139 // void atk_relation_set_remove (AtkRelationSet *set, AtkRelation *relation);
140 atk_relation_set_remove(atkRelationSet
, relation
);
144 * Add a new relation to the current relation set if it is not already
146 * This function ref's the AtkRelation so the caller of this function
147 * should unref it to ensure that it will be destroyed when the AtkRelationSet
154 public void atkRelationSetAdd(AtkRelation
* relation
)
156 // void atk_relation_set_add (AtkRelationSet *set, AtkRelation *relation);
157 atk_relation_set_add(atkRelationSet
, relation
);
161 * Determines the number of relations in a relation set.
165 * an integer representing the number of relations in the set.
167 public int atkRelationSetGetNRelations()
169 // gint atk_relation_set_get_n_relations (AtkRelationSet *set);
170 return atk_relation_set_get_n_relations(atkRelationSet
);
174 * Determines the relation at the specified position in the relation set.
178 * a gint representing a position in the set, starting from 0.
180 * a AtkRelation, which is the relation at position i in the set.
182 public AtkRelation
* atkRelationSetGetRelation(int i
)
184 // AtkRelation* atk_relation_set_get_relation (AtkRelationSet *set, gint i);
185 return atk_relation_set_get_relation(atkRelationSet
, i
);
189 * Finds a relation that matches the specified type.
195 * an AtkRelation, which is a relation matching the specified type.
197 public AtkRelation
* atkRelationSetGetRelationByType(AtkRelationType relationship
)
199 // AtkRelation* atk_relation_set_get_relation_by_type (AtkRelationSet *set, AtkRelationType relationship);
200 return atk_relation_set_get_relation_by_type(atkRelationSet
, relationship
);
204 * Add a new relation of the specified type with the specified target to
205 * the current relation set if the relation set does not contain a relation
206 * of that type. If it is does contain a relation of that typea the target
207 * is added to the relation.
216 public void atkRelationSetAddRelationByType(AtkRelationType relationship
, AtkObject
* target
)
218 // void atk_relation_set_add_relation_by_type (AtkRelationSet *set, AtkRelationType relationship, AtkObject *target);
219 atk_relation_set_add_relation_by_type(atkRelationSet
, relationship
, target
);