summaryrefslogtreecommitdiff
path: root/atspi/atspi-object.c
diff options
context:
space:
mode:
authorMike Gorse <mgorse@novell.com>2010-11-20 10:59:06 -0500
committerMike Gorse <mgorse@novell.com>2010-11-20 10:59:06 -0500
commit585683c4e828aaa1dbb883df9274d14753a58088 (patch)
treee3920da08c8ef8ead088e59314addf36f7e7394b /atspi/atspi-object.c
parent3f65b7902ce9f63a33c76bdc093e02ffa742a50a (diff)
downloadat-spi2-core-585683c4e828aaa1dbb883df9274d14753a58088.tar.gz
Add Hypertext and Hyperlink and some refactoring to support them
AtspiAccessible is now derived from a base class called AtspiObject which defines the object's application and object path, since this is common with AtspiHyperlink.
Diffstat (limited to 'atspi/atspi-object.c')
-rw-r--r--atspi/atspi-object.c50
1 files changed, 50 insertions, 0 deletions
diff --git a/atspi/atspi-object.c b/atspi/atspi-object.c
new file mode 100644
index 00000000..f69d350a
--- /dev/null
+++ b/atspi/atspi-object.c
@@ -0,0 +1,50 @@
+/*
+ * AT-SPI - Assistive Technology Service Provider Interface
+ * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
+ *
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+#include "atspi-private.h"
+
+G_DEFINE_TYPE (AtspiObject, atspi_object, G_TYPE_OBJECT)
+
+static void
+atspi_object_init (AtspiObject *obj)
+{
+}
+
+static void
+atspi_object_finalize (GObject *obj)
+{
+ AtspiObject *aobj = ATSPI_OBJECT (obj);
+
+ if (aobj->app)
+ g_object_unref (aobj->app);
+
+ g_free (aobj->path);
+}
+
+static void
+atspi_object_class_init (AtspiObjectClass *klass)
+{
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+ object_class->finalize = atspi_object_finalize;
+}