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.
23 /* relation.c : implements the Relation interface */
27 #include <libspi/relation.h>
29 /* Static function declarations */
32 spi_relation_class_init (SpiRelationClass *klass);
34 spi_relation_init (SpiRelation *relation);
36 spi_relation_finalize (GObject *obj);
38 impl_getURI (PortableServer_Servant _servant,
39 const CORBA_long i, CORBA_Environment * ev);
41 impl__get_n_anchors (PortableServer_Servant _servant,
42 CORBA_Environment * ev);
44 impl__get_startIndex (PortableServer_Servant _servant,
45 CORBA_Environment * ev);
47 impl__get_endIndex (PortableServer_Servant _servant,
48 CORBA_Environment * ev);
49 static Accessibility_Accessible
50 impl_getObject (PortableServer_Servant _servant,
52 CORBA_Environment * ev);
54 impl_isValid (PortableServer_Servant _servant,
55 CORBA_Environment * ev);
57 static GObjectClass *parent_class;
60 spi_relation_get_type (void)
62 static GType type = 0;
65 static const GTypeInfo tinfo = {
66 sizeof (SpiRelationClass),
68 (GBaseFinalizeFunc) NULL,
69 (GClassInitFunc) spi_relation_class_init,
70 (GClassFinalizeFunc) NULL,
71 NULL, /* class data */
74 (GInstanceInitFunc) spi_relation_init,
75 NULL /* value table */
79 * Bonobo_type_unique auto-generates a load of
80 * CORBA structures for us. All derived types must
81 * use bonobo_type_unique.
83 type = bonobo_type_unique (
85 POA_Accessibility_Relation__init,
87 G_STRUCT_OFFSET (SpiRelationClass, epv),
89 "SpiAccessibleRelation");
96 spi_relation_class_init (SpiRelationClass *klass)
98 GObjectClass * object_class = (GObjectClass *) klass;
99 POA_Accessibility_Relation__epv *epv = &klass->epv;
100 parent_class = g_type_class_peek_parent (klass);
102 object_class->finalize = spi_relation_finalize;
104 epv->getRelationType = NULL; /* TODO: finish me! */
105 epv->getNTargets = NULL;
106 epv->getTarget = NULL;
110 spi_relation_init (SpiRelation *relation)
115 spi_relation_finalize (GObject *obj)
117 SpiRelation *relation = SPI_RELATION(obj);
118 g_object_unref (relation->relation);
119 relation->relation = NULL;
120 parent_class->finalize (obj);
124 spi_relation_new (AtkRelation *obj)
126 SpiRelation *new_relation =
127 SPI_RELATION (g_object_new (SPI_RELATION_TYPE, NULL));
128 new_relation->relation = obj;