1 #include "MyAtkImplementor.h"
4 static GObjectClass *parent_class = NULL;
6 static AtkObject* my_atk_implementor_ref_accessible(AtkImplementor *implementor)
8 AtkObject *result = ((MyAtkImplementor*)implementor)->accessible;
9 g_object_ref((GObject*)result);
13 static void my_atk_implementor_instance_init(GTypeInstance *instance, gpointer g_class)
15 MyAtkImplementor *self = (MyAtkImplementor*)instance;
17 self->accessible = ATK_OBJECT(g_object_new(ATK_TYPE_OBJECT,NULL));
18 self->is_disposed = FALSE;
21 static void my_atk_implementor_interface_init(gpointer g_iface,gpointer iface_data)
23 AtkImplementorIface *iface = ((AtkImplementorIface*)g_iface);
24 iface->ref_accessible = my_atk_implementor_ref_accessible;
27 static void my_atk_implementor_dispose(GObject *obj)
29 MyAtkImplementor *self = (MyAtkImplementor*)obj;
30 if(!self->is_disposed)
32 g_object_unref(self->accessible);
33 self->is_disposed = TRUE;
35 parent_class->dispose(obj);
38 static void my_atk_implementor_class_init(gpointer g_class,gpointer g_data)
40 MyAtkImplementorClass *klass = MY_ATK_IMPLEMENTOR_CLASS(g_class);
41 parent_class = g_type_class_peek_parent(klass);
44 GType my_atk_implementor_get_type(void)
46 static GType type = 0;
49 static const GTypeInfo typeinfo = {
50 sizeof(MyAtkImplementorClass),
52 NULL, /*base_finalize */
53 my_atk_implementor_class_init,/*class_init*/
54 NULL, /*class_finalize*/
56 sizeof(MyAtkImplementor),
58 my_atk_implementor_instance_init/* instance_init*/
60 type = g_type_register_static(G_TYPE_OBJECT,"MyAtkImplementor",&typeinfo,0);
61 static const GInterfaceInfo interface_info =
63 my_atk_implementor_interface_init, /*interface_init*/
64 NULL, /*interface_finalize*/
65 NULL, /*interface_data*/
67 g_type_add_interface_static(type, ATK_TYPE_IMPLEMENTOR,&interface_info);