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 #include "atksimpleobject.h"
26 static void atk_simple_object_class_init (AtkSimpleObjectClass *klass);
28 static gpointer parent_class = NULL;
31 atk_simple_object_get_type (void)
33 static GType type = 0;
37 static const GTypeInfo tinfo =
39 sizeof (AtkSimpleObjectClass),
40 (GBaseInitFunc) NULL, /* base init */
41 (GBaseFinalizeFunc) NULL, /* base finalize */
42 (GClassInitFunc) atk_simple_object_class_init, /* class init */
43 (GClassFinalizeFunc) NULL, /* class finalize */
44 NULL, /* class data */
45 sizeof (AtkSimpleObject), /* instance size */
47 (GInstanceInitFunc) NULL, /* instance init */
48 NULL /* value table */
51 type = g_type_register_static (ATK_TYPE_OBJECT,
52 "AtkSimpleObject", &tinfo, 0);
58 atk_simple_object_set_name (AtkObject *o, const gchar *name)
60 printf("set name to %s\n", name);
64 static G_CONST_RETURN gchar *
65 atk_simple_object_get_name (AtkObject *o)
67 printf("get name: %s\n", o->name);
73 atk_simple_object_set_description (AtkObject *o, const gchar *desc)
75 printf("set description to %s\n", desc);
76 o->description = desc;
79 static G_CONST_RETURN gchar *
80 atk_simple_object_get_description (AtkObject *o)
82 printf("get description: %s\n", o->description);
83 return (o->description);
87 atk_simple_object_class_init (AtkSimpleObjectClass *klass)
89 AtkObjectClass *oc = ATK_OBJECT_CLASS (klass);
90 parent_class = g_type_class_ref (ATK_TYPE_OBJECT);
91 oc->set_name = atk_simple_object_set_name;
92 oc->get_name = atk_simple_object_get_name;
93 oc->set_description = atk_simple_object_set_description;
94 oc->get_description = atk_simple_object_get_description;
98 atk_simple_object_new ()
101 AtkObject* accessible;
103 object = g_object_new (ATK_TYPE_SIMPLE_OBJECT, NULL);
104 accessible = ATK_OBJECT (object);