Wrote the README_GIT file to be a proper tutorial on git, repo.or.cz and gtkD.
[gtkD.git] / gtkD / src / atk / ObjectFactory.d
bloba110b7915e67a23032c85aa970f9094ad7b7ce71
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 = AtkObjectFactory.html
26 * outPack = atk
27 * outFile = ObjectFactory
28 * strct = AtkObjectFactory
29 * realStrct=
30 * ctorStrct=
31 * clss = ObjectFactory
32 * interf =
33 * class Code: No
34 * interface Code: No
35 * template for:
36 * extend =
37 * implements:
38 * prefixes:
39 * - atk_object_factory_
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.ObjectFactory;
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 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
77 * particular GType.
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;
99 /**
100 * Sets our main struct and passes it to the parent class
102 public this (AtkObjectFactory* atkObjectFactory)
104 version(noAssert)
106 if ( atkObjectFactory is null )
108 int zero = 0;
109 version(Tango)
111 Stdout("struct atkObjectFactory is null on constructor").newline;
113 else
115 printf("struct atkObjectFactory is null on constructor");
117 zero = zero / zero;
120 else
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
134 * on behalf of obj
135 * factory:
136 * The AtkObjectFactory associated with obj's
137 * object type
138 * obj:
139 * a GObject
140 * Returns:
141 * an AtkObject that implements an accessibility interface
142 * on behalf of obj
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.
152 * factory:
153 * an AtkObjectFactory
154 * Returns:
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.
170 * factory:
171 * an AtkObjectFactory to invalidate
172 * See Also
173 * AtkRegistry
175 public void invalidate()
177 // void atk_object_factory_invalidate (AtkObjectFactory *factory);
178 atk_object_factory_invalidate(atkObjectFactory);