2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Ximian Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
23 /* base.c: the base object managing an AtkObject proxy */
27 #include <libspi/libspi.h>
29 /* Our parent Gtk object type */
30 #define PARENT_TYPE BONOBO_TYPE_OBJECT
32 /* A pointer to our parent object class */
33 static GObjectClass *spi_base_parent_class;
36 * Implemented GObject::dispose
39 spi_base_object_dispose (GObject *gobject)
41 SpiBase *object = SPI_BASE (gobject);
45 g_assert (G_IS_OBJECT (object->gobj));
46 g_object_unref (object->gobj);
50 spi_base_parent_class->dispose (gobject);
54 spi_base_class_init (SpiBaseClass *klass)
56 GObjectClass * object_class = (GObjectClass *) klass;
58 spi_base_parent_class = g_type_class_peek_parent (klass);
60 object_class->dispose = spi_base_object_dispose;
64 spi_base_init (SpiBase *object)
69 BONOBO_TYPE_FUNC (SpiBase, PARENT_TYPE, spi_base);
72 spi_base_construct (SpiBase *object, GObject *gobject)
74 g_assert (G_IS_OBJECT (gobject));
75 object->gobj = g_object_ref (gobject);
79 spi_base_construct_default (SpiBase *object)
81 object->gobj = g_object_new (G_TYPE_OBJECT, NULL);
85 spi_base_get_gobject (SpiBase *object)