added use of non-preemptive keylistener to simple-at test.
[platform/core/uifw/at-spi2-atk.git] / libspi / base.c
1 #include <libspi/base.h>
2
3 /* A pointer to our parent object class */
4 static GObjectClass *spi_base_parent_class;
5
6 static void
7 spi_base_dispose (GObject *object)
8 {
9         SpiBase *base = SPI_BASE (object);
10
11         if (base->atko) {
12                 g_object_unref (base->atko);
13                 base->atko = NULL;
14         }
15
16         spi_base_parent_class->dispose (object);
17 }
18
19 static void
20 spi_base_class_init (GObjectClass *klass)
21 {
22         spi_base_parent_class = g_type_klass_peek_parent (klass);
23
24         klass->dispose = spi_base_dispose;
25 }
26
27 static void
28 spi_base_init (SpiBase *base)
29 {
30 }
31
32 BONOBO_TYPE_FUNC (SpiBase, BONOBO_TYPE_OBJECT, spi_base);
33
34 gpointer
35 spi_base_construct (SpiBase   *base,
36                     AtkObject *o)
37 {
38         g_return_val_if_fail (ATK_IS_OBJECT (o), NULL);
39         g_return_val_if_fail (SPI_IS_BASE (base), NULL);
40
41         base->atko = g_object_ref (o);
42 }
43
44 AtkObject *
45 spi_base_get_atk_object (SpiBase *base)
46 {
47         g_return_val_if_fail (SPI_IS_BASE (base), NULL);
48
49         return base->atko;
50 }