2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001 Sun Microsystems 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.
24 * application.c: implements Application.idl
28 #include <bonobo/Bonobo.h>
29 #include "atksimpleobject.h"
32 * This pulls the CORBA definitions for the "Accessibility::Accessible" server
34 #include <libspi/Accessibility.h>
37 * This pulls the definition for the BonoboObject (GObject Type)
39 #include "application.h"
42 * Our parent Gtk object type
44 #define PARENT_TYPE ACCESSIBLE_TYPE
47 application_class_init (ApplicationClass *klass)
53 application_init (Application *application)
55 ACCESSIBLE (application)->atko = atk_simple_object_new();
59 application_get_type (void)
61 static GType type = 0;
64 static const GTypeInfo tinfo = {
65 sizeof (ApplicationClass),
67 (GBaseFinalizeFunc) NULL,
68 (GClassInitFunc) application_class_init,
69 (GClassFinalizeFunc) NULL,
70 NULL, /* class data */
73 (GInstanceInitFunc) application_init,
74 NULL /* value table */
77 * Bonobo_type_unique auto-generates a load of
78 * CORBA structures for us. All derived types must
79 * use bonobo_type_unique.
81 type = bonobo_type_unique (
83 POA_Accessibility_Application__init,
85 G_STRUCT_OFFSET (ApplicationClass, epv),
94 application_new (char *name, char *desc, char *id)
97 APPLICATION (g_object_new (application_get_type (), NULL));
98 atk_object_set_name (ACCESSIBLE (retval)->atko, CORBA_string_dup (name));
99 atk_object_set_description (ACCESSIBLE (retval)->atko, CORBA_string_dup (desc));
100 retval->id = CORBA_string_dup (id);