* Boston, MA 02111-1307, USA.
*/
-/*
- * component.c : bonobo wrapper for accessible component implementation
- *
- */
-#include <config.h>
-#include <bonobo/Bonobo.h>
+/* component.c : implements the Component interface */
+#include <config.h>
#include <stdio.h>
+#include <libspi/accessible.h>
+#include <libspi/component.h>
-/*
- * This pulls the CORBA definitions for the "Accessibility::Accessible" server
- */
-#include <libspi/Accessibility.h>
-
-/*
- * This pulls the definition for the BonoboObject (Gtk Type)
- */
-#include "component.h"
-#include "accessible.h"
+/* Our parent Gtk object type */
+#define PARENT_TYPE BONOBO_TYPE_OBJECT
-/*
- * Our parent Gtk object type
- */
-#define PARENT_TYPE BONOBO_OBJECT_TYPE
-
-/*
- * A pointer to our parent object class
- */
+/* A pointer to our parent object class */
static GObjectClass *spi_component_parent_class;
/*
}
static void
-accessibility_component_class_init (SpiComponentClass *klass)
+spi_component_class_init (SpiComponentClass *klass)
{
GObjectClass * object_class = (GObjectClass *) klass;
POA_Accessibility_Component__epv *epv = &klass->epv;
}
static void
-accessibility_component_init (SpiComponent *component)
+spi_component_init (SpiComponent *component)
{
}
-GType
-accessibility_component_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo tinfo = {
- sizeof (SpiComponentClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) accessibility_component_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class data */
- sizeof (SpiComponent),
- 0, /* n preallocs */
- (GInstanceInitFunc) accessibility_component_init,
- NULL /* value table */
- };
- /*
- * Bonobo_type_unique auto-generates a load of
- * CORBA structures for us. All derived types must
- * use bonobo_type_unique.
- */
- type = bonobo_type_unique (
- PARENT_TYPE,
- POA_Accessibility_Component__init,
- NULL,
- G_STRUCT_OFFSET (SpiComponentClass, epv),
- &tinfo,
- "SpiAccessibleComponent");
- }
-
- return type;
-}
+BONOBO_TYPE_FUNC_FULL (SpiComponent,
+ Accessibility_Component,
+ PARENT_TYPE,
+ spi_component);
SpiComponent *
spi_component_interface_new (AtkObject *o)
{
- SpiComponent *retval =
- SPI_COMPONENT (g_object_new (accessibility_component_get_type (), NULL));
+ SpiComponent *retval = g_object_new (SPI_COMPONENT_TYPE, NULL);
retval->atko = o;
g_object_ref (o);
return retval;