2 * This file is part of gtkD.
4 * gtkD 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 * gtkD 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 gtkD; 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
51 module atk
.RelationSet
;
57 import tango
.io
.Stdout
; // use the tango loging?
61 private import gtkc
.atktypes
;
63 private import gtkc
.atk
;
66 private import glib
.PtrArray
;
73 * The AtkRelationSet held by an object establishes its relationships with
74 * objects beyond the normal "parent/child" hierarchical relationships that all
75 * user interface objects have. AtkRelationSets establish whether objects are
76 * labelled or controlled by other components, share group membership with other
77 * components (for instance within a radio-button group), or share content which
78 * "flows" between them, among other types of possible relationships.
80 private import gobject
.ObjectG
;
81 public class RelationSet
: ObjectG
84 /** the main Gtk struct */
85 protected AtkRelationSet
* atkRelationSet
;
88 public AtkRelationSet
* getRelationSetStruct()
90 return atkRelationSet
;
94 /** the main Gtk struct as a void* */
95 protected void* getStruct()
97 return cast(void*)atkRelationSet
;
101 * Sets our main struct and passes it to the parent class
103 public this (AtkRelationSet
* atkRelationSet
)
107 if ( atkRelationSet
is null )
112 Stdout("struct atkRelationSet is null on constructor").newline
;
116 printf("struct atkRelationSet is null on constructor");
123 assert(atkRelationSet
!is null, "struct atkRelationSet is null on constructor");
125 super(cast(GObject
*)atkRelationSet
);
126 this.atkRelationSet
= atkRelationSet
;
134 * Creates a new empty relation set.
136 * a new AtkRelationSet
138 public static AtkRelationSet
* atkRelationSetNew()
140 // AtkRelationSet* atk_relation_set_new (void);
141 return atk_relation_set_new();
145 * Determines whether the relation set contains a relation that matches the
152 * TRUE if relationship is the relationship type of a relation
153 * in set, FALSE otherwise
155 public int atkRelationSetContains(AtkRelationType relationship
)
157 // gboolean atk_relation_set_contains (AtkRelationSet *set, AtkRelationType relationship);
158 return atk_relation_set_contains(atkRelationSet
, relationship
);
162 * Removes a relation from the relation set.
163 * This function unref's the AtkRelation so it will be deleted unless there
164 * is another reference to it.
170 public void atkRelationSetRemove(AtkRelation
* relation
)
172 // void atk_relation_set_remove (AtkRelationSet *set, AtkRelation *relation);
173 atk_relation_set_remove(atkRelationSet
, relation
);
177 * Add a new relation to the current relation set if it is not already
179 * This function ref's the AtkRelation so the caller of this function
180 * should unref it to ensure that it will be destroyed when the AtkRelationSet
187 public void atkRelationSetAdd(AtkRelation
* relation
)
189 // void atk_relation_set_add (AtkRelationSet *set, AtkRelation *relation);
190 atk_relation_set_add(atkRelationSet
, relation
);
194 * Determines the number of relations in a relation set.
198 * an integer representing the number of relations in the set.
200 public int atkRelationSetGetNRelations()
202 // gint atk_relation_set_get_n_relations (AtkRelationSet *set);
203 return atk_relation_set_get_n_relations(atkRelationSet
);
207 * Determines the relation at the specified position in the relation set.
211 * a gint representing a position in the set, starting from 0.
213 * a AtkRelation, which is the relation at position i in the set.
215 public AtkRelation
* atkRelationSetGetRelation(int i
)
217 // AtkRelation* atk_relation_set_get_relation (AtkRelationSet *set, gint i);
218 return atk_relation_set_get_relation(atkRelationSet
, i
);
222 * Finds a relation that matches the specified type.
228 * an AtkRelation, which is a relation matching the specified type.
230 public AtkRelation
* atkRelationSetGetRelationByType(AtkRelationType relationship
)
232 // AtkRelation* atk_relation_set_get_relation_by_type (AtkRelationSet *set, AtkRelationType relationship);
233 return atk_relation_set_get_relation_by_type(atkRelationSet
, relationship
);
237 * Add a new relation of the specified type with the specified target to
238 * the current relation set if the relation set does not contain a relation
239 * of that type. If it is does contain a relation of that typea the target
240 * is added to the relation.
249 public void atkRelationSetAddRelationByType(AtkRelationType relationship
, AtkObject
* target
)
251 // void atk_relation_set_add_relation_by_type (AtkRelationSet *set, AtkRelationType relationship, AtkObject *target);
252 atk_relation_set_add_relation_by_type(atkRelationSet
, relationship
, target
);