1 /* This file contains both declaration and definition of the TestSimpleChild class
2 * derived from AtkObject. The TestSimpleChild instances can be used as children by
3 * the TestSimpleSelection and TestSimpleTable instances.
6 #include "test-simple-child.h"
9 test_simple_child_get_type (void);
11 static GObjectClass *parent_class_simple_child = NULL;
13 /******************************************************************/
15 /******************************************************************/
17 simple_child_instance_init (GTypeInstance *instance, gpointer g_class)
19 TestSimpleChild *self = (TestSimpleChild *)instance;
21 self->disposed = FALSE;
22 self->id = -1; /* invalid ID value by default */
26 test_simple_child_dispose (GObject *obj)
28 TestSimpleChild *self = (TestSimpleChild *)obj;
35 /* Make sure dispose does not run twice. */
36 self->disposed = TRUE;
38 /* Chain up to the parent class */
39 G_OBJECT_CLASS (parent_class_simple_child)->dispose (obj);
43 test_simple_child_finalize (GObject *obj)
45 TestSimpleChild *self = (TestSimpleChild *)obj;
48 /*free (self->pdata->descr);
49 g_free (self->pdata);*/
52 /* Chain up to the parent class */
53 G_OBJECT_CLASS (parent_class_simple_child)->finalize (obj);
57 test_simple_child_class_init (gpointer g_class, gpointer g_class_data)
59 GObjectClass *gobject_class = G_OBJECT_CLASS (g_class);
60 TestSimpleChildClass *klass = TEST_SIMPLE_CHILD_CLASS (g_class);
62 gobject_class->dispose = test_simple_child_dispose;
63 gobject_class->finalize = test_simple_child_finalize;
65 parent_class_simple_child = g_type_class_peek_parent (klass);
69 test_simple_child_get_type (void)
71 static GType type = 0;
74 static const GTypeInfo info =
76 sizeof (TestSimpleChildClass),
78 NULL, /* base_finalize */
79 test_simple_child_class_init, /* class_init */
80 NULL, /* class_finalize */
81 NULL, /* class_data */
82 sizeof (TestSimpleChild),
84 simple_child_instance_init /* instance_init */
87 type = g_type_register_static (ATK_TYPE_OBJECT,
88 "TestSimpleChildType",