alternative to assert
[gtkD.git] / gtkD / src / atk / GObjectAccessible.d
blobd4e308b1e5ed1fbf10ed63a5461ec82073fe393e
1 /*
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 = AtkGObjectAccessible.html
26 * outPack = atk
27 * outFile = GObjectAccessible
28 * strct = AtkGObjectAccessible
29 * realStrct=
30 * ctorStrct=
31 * clss = GObjectAccessible
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - atk_gobject_accessible
40 * omit structs:
41 * omit prefixes:
42 * omit code:
43 * imports:
44 * - gobject.ObjectG
45 * structWrap:
46 * - GObject* -> ObjectG
47 * module aliases:
48 * local aliases:
51 module atk.GObjectAccessible;
53 version(noAssert)
55 version(Tango)
57 import tango.io.Stdout; // use the tango loging?
61 private import gtkc.atktypes;
63 private import gtkc.atk;
66 private import gobject.ObjectG;
71 /**
72 * Description
73 * This object class is derived from AtkObject. It can be used as a basis for
74 * implementing accessible objects for GObjects which are not derived from
75 * GtkWidget. One example of its use is in providing an accessible object
76 * for GnomeCanvasItem in the GAIL library.
78 private import atk.ObjectAtk;
79 public class GObjectAccessible : ObjectAtk
82 /** the main Gtk struct */
83 protected AtkGObjectAccessible* atkGObjectAccessible;
86 public AtkGObjectAccessible* getGObjectAccessibleStruct()
88 return atkGObjectAccessible;
92 /** the main Gtk struct as a void* */
93 protected void* getStruct()
95 return cast(void*)atkGObjectAccessible;
98 /**
99 * Sets our main struct and passes it to the parent class
101 public this (AtkGObjectAccessible* atkGObjectAccessible)
103 version(noAssert)
105 if ( atkGObjectAccessible is null )
107 int zero = 0;
108 version(Tango)
110 Stdout("struct atkGObjectAccessible is null on constructor").newline;
112 else
114 printf("struct atkGObjectAccessible is null on constructor");
116 zero = zero / zero;
119 else
121 assert(atkGObjectAccessible !is null, "struct atkGObjectAccessible is null on constructor");
123 super(cast(AtkObject*)atkGObjectAccessible);
124 this.atkGObjectAccessible = atkGObjectAccessible;
132 * Gets the accessible object for the specified obj.
133 * obj:
134 * a GObject
135 * Returns:
136 * a AtkObject which is the accessible object for the obj
138 public static AtkObject* _ForObject(ObjectG obj)
140 // AtkObject* atk_gobject_accessible_for_object (GObject *obj);
141 return atk_gobject_accessible_for_object((obj is null) ? null : obj.getObjectGStruct());
145 * Gets the GObject for which obj is the accessible object.
146 * obj:
147 * a AtkObject
148 * Returns:
149 * a GObject which is the object for which obj is the accessible objedct
151 public ObjectG _GetObject()
153 // GObject* atk_gobject_accessible_get_object (AtkGObjectAccessible *obj);
154 return new ObjectG( atk_gobject_accessible_get_object(atkGObjectAccessible) );