2 * application.c: implements Application.idl
6 #include <bonobo/Bonobo.h>
7 #include "atksimpleobject.h"
10 * This pulls the CORBA definitions for the "Accessibility::Accessible" server
15 * This pulls the definition for the BonoboObject (GObject Type)
17 #include "application.h"
20 * Our parent Gtk object type
22 #define PARENT_TYPE ACCESSIBLE_TYPE
25 application_class_init (ApplicationClass *klass)
31 application_init (Application *application)
33 ACCESSIBLE (application)->atko = atk_simple_object_new();
37 application_get_type (void)
39 static GType type = 0;
42 static const GTypeInfo tinfo = {
43 sizeof (ApplicationClass),
45 (GBaseFinalizeFunc) NULL,
46 (GClassInitFunc) application_class_init,
47 (GClassFinalizeFunc) NULL,
48 NULL, /* class data */
51 (GInstanceInitFunc) application_init,
52 NULL /* value table */
55 * Here we use bonobo_x_type_unique instead of
56 * gtk_type_unique, this auto-generates a load of
57 * CORBA structures for us. All derived types must
58 * use bonobo_x_type_unique.
60 type = bonobo_x_type_unique (
62 POA_Accessibility_Application__init,
64 G_STRUCT_OFFSET (ApplicationClass, epv),
73 application_new (char *name, char *desc, char *id)
76 APPLICATION (g_object_new (application_get_type (), NULL));
77 atk_object_set_name (ACCESSIBLE (retval)->atko, CORBA_string_dup (name));
78 atk_object_set_description (ACCESSIBLE (retval)->atko, CORBA_string_dup (desc));
79 retval->id = CORBA_string_dup (id);