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 = atk-AtkStateSet.html
56 import tango
.io
.Stdout
; // use the tango loging?
60 private import gtkc
.atktypes
;
62 private import gtkc
.atk
;
65 private import glib
.Str
;
72 * An AtkStateSet determines a component's state set. It is composed of a set
78 /** the main Gtk struct */
79 protected AtkStateSet
* atkStateSet
;
82 public AtkStateSet
* getStateSetStruct()
88 /** the main Gtk struct as a void* */
89 protected void* getStruct()
91 return cast(void*)atkStateSet
;
95 * Sets our main struct and passes it to the parent class
97 public this (AtkStateSet
* atkStateSet
)
101 if ( atkStateSet
is null )
106 Stdout("struct atkStateSet is null on constructor").newline
;
110 printf("struct atkStateSet is null on constructor");
117 assert(atkStateSet
!is null, "struct atkStateSet is null on constructor");
119 this.atkStateSet
= atkStateSet
;
126 * Creates a new empty state set.
132 // AtkStateSet* atk_state_set_new (void);
133 this(cast(AtkStateSet
*)atk_state_set_new() );
137 * Checks whether the state set is empty, i.e. has no states set.
141 * TRUE if set has no states set, otherwise FALSE
145 // gboolean atk_state_set_is_empty (AtkStateSet *set);
146 return atk_state_set_is_empty(atkStateSet
);
150 * Add a new state for the specified type to the current state set if
151 * it is not already present.
157 * TRUE if the state for type is not already in set.
159 public int addState(AtkStateType type
)
161 // gboolean atk_state_set_add_state (AtkStateSet *set, AtkStateType type);
162 return atk_state_set_add_state(atkStateSet
, type
);
166 * Add the states for the specified types to the current state set.
170 * an array of AtkStateType
172 * The number of elements in the array
174 public void addStates(AtkStateType
* types
, int nTypes
)
176 // void atk_state_set_add_states (AtkStateSet *set, AtkStateType *types, gint n_types);
177 atk_state_set_add_states(atkStateSet
, types
, nTypes
);
181 * Removes all states from the state set.
185 public void clearStates()
187 // void atk_state_set_clear_states (AtkStateSet *set);
188 atk_state_set_clear_states(atkStateSet
);
192 * Checks whether the state for the specified type is in the specified set.
198 * TRUE if type is the state type is in set.
200 public int containsState(AtkStateType type
)
202 // gboolean atk_state_set_contains_state (AtkStateSet *set, AtkStateType type);
203 return atk_state_set_contains_state(atkStateSet
, type
);
207 * Checks whether the states for all the specified types are in the
212 * an array of AtkStateType
214 * The number of elements in the array
216 * TRUE if all the states for type are in set.
218 public int containsStates(AtkStateType
* types
, int nTypes
)
220 // gboolean atk_state_set_contains_states (AtkStateSet *set, AtkStateType *types, gint n_types);
221 return atk_state_set_contains_states(atkStateSet
, types
, nTypes
);
225 * Removes the state for the specified type from the state set.
231 * TRUE if type was the state type is in set.
233 public int removeState(AtkStateType type
)
235 // gboolean atk_state_set_remove_state (AtkStateSet *set, AtkStateType type);
236 return atk_state_set_remove_state(atkStateSet
, type
);
240 * Constructs the intersection of the two sets, returning NULL if the
241 * intersection is empty.
245 * another AtkStateSet
247 * a new AtkStateSet which is the intersection of the two sets.
249 public AtkStateSet
* andSets(AtkStateSet
* compareSet
)
251 // AtkStateSet* atk_state_set_and_sets (AtkStateSet *set, AtkStateSet *compare_set);
252 return atk_state_set_and_sets(atkStateSet
, compareSet
);
256 * Constructs the union of the two sets.
260 * another AtkStateSet
262 * a new AtkStateSet which is the union of the two sets,
263 * returning NULL is empty.
265 public AtkStateSet
* orSets(AtkStateSet
* compareSet
)
267 // AtkStateSet* atk_state_set_or_sets (AtkStateSet *set, AtkStateSet *compare_set);
268 return atk_state_set_or_sets(atkStateSet
, compareSet
);
272 * Constructs the exclusive-or of the two sets, returning NULL is empty.
273 * The set returned by this operation contains the states in exactly
274 * one of the two sets.
278 * another AtkStateSet
280 * a new AtkStateSet which contains the states which are
281 * in exactly one of the two sets.
283 public AtkStateSet
* xorSets(AtkStateSet
* compareSet
)
285 // AtkStateSet* atk_state_set_xor_sets (AtkStateSet *set, AtkStateSet *compare_set);
286 return atk_state_set_xor_sets(atkStateSet
, compareSet
);