1 #include "atksimpleobject.h"
3 static void atk_simple_object_class_init (AtkSimpleObjectClass *klass);
5 static gpointer parent_class = NULL;
8 atk_simple_object_get_type (void)
10 static GType type = 0;
14 static const GTypeInfo tinfo =
16 sizeof (AtkSimpleObjectClass),
17 (GBaseInitFunc) NULL, /* base init */
18 (GBaseFinalizeFunc) NULL, /* base finalize */
19 (GClassInitFunc) atk_simple_object_class_init, /* class init */
20 (GClassFinalizeFunc) NULL, /* class finalize */
21 NULL, /* class data */
22 sizeof (AtkSimpleObject), /* instance size */
24 (GInstanceInitFunc) NULL, /* instance init */
25 NULL /* value table */
28 type = g_type_register_static (ATK_TYPE_OBJECT,
29 "AtkSimpleObject", &tinfo, 0);
35 atk_simple_object_set_name (AtkObject *o, const gchar *name)
37 printf("set name to %s\n", name);
41 static G_CONST_RETURN gchar *
42 atk_simple_object_get_name (AtkObject *o)
44 printf("get name: %s\n", o->name);
50 atk_simple_object_set_description (AtkObject *o, const gchar *desc)
52 printf("set description to %s\n", desc);
53 o->description = desc;
56 static G_CONST_RETURN gchar *
57 atk_simple_object_get_description (AtkObject *o)
59 printf("get description: %s\n", o->description);
60 return (o->description);
64 atk_simple_object_class_init (AtkSimpleObjectClass *klass)
66 AtkObjectClass *oc = ATK_OBJECT_CLASS (klass);
67 parent_class = g_type_class_ref (ATK_TYPE_OBJECT);
68 oc->set_name = atk_simple_object_set_name;
69 oc->get_name = atk_simple_object_get_name;
70 oc->set_description = atk_simple_object_set_description;
71 oc->get_description = atk_simple_object_get_description;
75 atk_simple_object_new ()
78 AtkObject* accessible;
80 object = g_object_new (ATK_TYPE_SIMPLE_OBJECT, NULL);
81 accessible = ATK_OBJECT (object);