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 = AtkObjectFactory.html
27 * outFile = ObjectFactory
28 * strct = AtkObjectFactory
31 * clss = ObjectFactory
39 * - atk_object_factory_
46 * - GObject* -> ObjectG
51 module atk
.ObjectFactory
;
57 import tango
.io
.Stdout
; // use the tango loging?
61 private import gtkc
.atktypes
;
63 private import gtkc
.atk
;
66 private import gobject
.ObjectG
;
73 * This class is the base object class for a factory used to create an
74 * accessible object for a specific GType. The function
75 * atk_registry_set_factory_type() is normally called to store
76 * in the registry the factory type to be used to create an accessible of a
79 private import gobject
.ObjectG
;
80 public class ObjectFactory
: ObjectG
83 /** the main Gtk struct */
84 protected AtkObjectFactory
* atkObjectFactory
;
87 public AtkObjectFactory
* getObjectFactoryStruct()
89 return atkObjectFactory
;
93 /** the main Gtk struct as a void* */
94 protected void* getStruct()
96 return cast(void*)atkObjectFactory
;
100 * Sets our main struct and passes it to the parent class
102 public this (AtkObjectFactory
* atkObjectFactory
)
106 if ( atkObjectFactory
is null )
111 Stdout("struct atkObjectFactory is null on constructor").newline
;
115 printf("struct atkObjectFactory is null on constructor");
122 assert(atkObjectFactory
!is null, "struct atkObjectFactory is null on constructor");
124 super(cast(GObject
*)atkObjectFactory
);
125 this.atkObjectFactory
= atkObjectFactory
;
133 * Provides an AtkObject that implements an accessibility interface
136 * The AtkObjectFactory associated with obj's
141 * an AtkObject that implements an accessibility interface
144 public AtkObject
* createAccessible(ObjectG obj
)
146 // AtkObject* atk_object_factory_create_accessible (AtkObjectFactory *factory, GObject *obj);
147 return atk_object_factory_create_accessible(atkObjectFactory
, (obj
is null) ?
null : obj
.getObjectGStruct());
151 * Gets the GType of the accessible which is created by the factory.
153 * an AtkObjectFactory
155 * the type of the accessible which is created by the factory.
156 * The value G_TYPE_INVALID is returned if no type if found.
158 public GType
getAccessibleType()
160 // GType atk_object_factory_get_accessible_type (AtkObjectFactory *factory);
161 return atk_object_factory_get_accessible_type(atkObjectFactory
);
165 * Inform factory that it is no longer being used to create
166 * accessibles. When called, factory may need to inform
167 * AtkObjects which it has created that they need to be re-instantiated.
168 * Note: primarily used for runtime replacement of AtkObjectFactorys
169 * in object registries.
171 * an AtkObjectFactory to invalidate
175 public void invalidate()
177 // void atk_object_factory_invalidate (AtkObjectFactory *factory);
178 atk_object_factory_invalidate(atkObjectFactory
);