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 = AtkRegistry.html
55 import tango
.io
.Stdout
; // use the tango loging?
59 private import gtkc
.atktypes
;
61 private import gtkc
.atk
;
70 * The AtkRegistry is normally used to create appropriate ATK "peers" for user
71 * interface components. Application developers usually need only interact with
72 * the AtkRegistry by associating appropriate ATK implementation classes with
73 * GObject classes via the atk_registry_set_factory_type call, passing the
74 * appropriate GType for application custom widget classes.
76 private import gobject
.ObjectG
;
77 public class Registry
: ObjectG
80 /** the main Gtk struct */
81 protected AtkRegistry
* atkRegistry
;
84 public AtkRegistry
* getRegistryStruct()
90 /** the main Gtk struct as a void* */
91 protected void* getStruct()
93 return cast(void*)atkRegistry
;
97 * Sets our main struct and passes it to the parent class
99 public this (AtkRegistry
* atkRegistry
)
103 if ( atkRegistry
is null )
108 Stdout("struct atkRegistry is null on constructor").newline
;
112 printf("struct atkRegistry is null on constructor");
119 assert(atkRegistry
!is null, "struct atkRegistry is null on constructor");
121 super(cast(GObject
*)atkRegistry
);
122 this.atkRegistry
= atkRegistry
;
130 * Associate an AtkObjectFactory subclass with a GType. Note:
131 * The associated factory_type will thereafter be responsible for
132 * the creation of new AtkObject implementations for instances
133 * appropriate for type.
135 * the AtkRegistry in which to register the type association
139 * an AtkObjectFactory type to associate with type. Must
140 * implement AtkObject appropriate for type.
142 public void setFactoryType(GType type
, GType factoryType
)
144 // void atk_registry_set_factory_type (AtkRegistry *registry, GType type, GType factory_type);
145 atk_registry_set_factory_type(atkRegistry
, type
, factoryType
);
149 * Provides a GType indicating the AtkObjectFactory subclass
150 * associated with type.
154 * a GType with which to look up the associated AtkObjectFactory
157 * a GType associated with type type
159 public GType
getFactoryType(GType type
)
161 // GType atk_registry_get_factory_type (AtkRegistry *registry, GType type);
162 return atk_registry_get_factory_type(atkRegistry
, type
);
166 * Gets an AtkObjectFactory appropriate for creating AtkObjects
167 * appropriate for type.
171 * a GType with which to look up the associated AtkObjectFactory
173 * an AtkObjectFactory appropriate for creating AtkObjects
174 * appropriate for type.
176 public AtkObjectFactory
* getFactory(GType type
)
178 // AtkObjectFactory* atk_registry_get_factory (AtkRegistry *registry, GType type);
179 return atk_registry_get_factory(atkRegistry
, type
);
183 * Gets a default implementation of the AtkObjectFactory/type
185 * Note: For most toolkit maintainers, this will be the correct
186 * registry for registering new AtkObject factories. Following
187 * a call to this function, maintainers may call atk_registry_set_factory_type()
188 * to associate an AtkObjectFactory subclass with the GType of objects
189 * for whom accessibility information will be provided.
191 * a default implementation of the AtkObjectFactory/type
194 public static AtkRegistry
* atkGetDefaultRegistry()
196 // AtkRegistry* atk_get_default_registry (void);
197 return atk_get_default_registry();