summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Cameron <bcameron@src.gnome.org>2001-06-29 14:06:36 +0000
committerBrian Cameron <bcameron@src.gnome.org>2001-06-29 14:06:36 +0000
commit65e40b09f61bdf40cc873b161275b44218b0573f (patch)
tree56e8060fb5830ceef5e3974f8604c95e5f4ff17f
parentb1e1ffcfc4f5375b84f13e91c6dfea0aedbcf445 (diff)
downloadatk-65e40b09f61bdf40cc873b161275b44218b0573f.tar.gz
Added new atk document interface.
-rw-r--r--ChangeLog6
-rw-r--r--atk/Makefile.am2
-rwxr-xr-xatk/atk.h1
-rwxr-xr-xatk/atkdocument.c99
-rwxr-xr-xatk/atkdocument.h62
-rw-r--r--docs/atk-docs.sgml2
-rw-r--r--docs/atk-sections.txt19
-rw-r--r--docs/tmpl/atk-unused.sgml7
-rw-r--r--docs/tmpl/atkobject.sgml7
9 files changed, 196 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 08727dc..7e8aad4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
2001-06-28 Brian Cameron <brian.cameron@sun.com>
+ * atk/Makefile.am atk/atk.h atk/atkdocument.c atk/atkdocument.h
+ docs/atk-docs.sgml docs/atk-sections.txt docs/tmpl/atk-unused.sgml
+ docs/tmpl/atkobject.sgml
+ Added new atk document interface.
+
+2001-06-28 Brian Cameron <brian.cameron@sun.com>
* atk/atkcomponent.c atk/atkcomponent.h atk/atkimage.c
atk/atkimage.h atk/atktext.c atk/atktext.h atk/atkutil.h
Updated so that functions that take screen coords as
diff --git a/atk/Makefile.am b/atk/Makefile.am
index 3d5daca..ddd3ce1 100644
--- a/atk/Makefile.am
+++ b/atk/Makefile.am
@@ -4,6 +4,7 @@ lib_LTLIBRARIES = libatk.la
libatk_la_SOURCES = \
atkaction.c \
atkcomponent.c \
+ atkdocument.c \
atkeditabletext.c \
atkhyperlink.c \
atkhypertext.c \
@@ -42,6 +43,7 @@ libatkinclude_HEADERS = \
atk.h \
atkaction.h \
atkcomponent.h \
+ atkdocument.h \
atkeditabletext.h \
atkhyperlink.h \
atkhypertext.h \
diff --git a/atk/atk.h b/atk/atk.h
index 15b9c83..d3b22c2 100755
--- a/atk/atk.h
+++ b/atk/atk.h
@@ -20,6 +20,7 @@
#include <atk/atkobject.h>
#include <atk/atkaction.h>
#include <atk/atkcomponent.h>
+#include <atk/atkdocument.h>
#include <atk/atkeditabletext.h>
#include <atk/atkhyperlink.h>
#include <atk/atkhypertext.h>
diff --git a/atk/atkdocument.c b/atk/atkdocument.c
new file mode 100755
index 0000000..ae90ff0
--- /dev/null
+++ b/atk/atkdocument.c
@@ -0,0 +1,99 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser 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 "atkdocument.h"
+
+GType
+atk_document_get_type ()
+{
+ static GType type = 0;
+
+ if (!type) {
+ static const GTypeInfo tinfo =
+ {
+ sizeof (AtkDocumentIface),
+ (GBaseInitFunc) NULL,
+ (GBaseFinalizeFunc) NULL,
+
+ };
+
+ type = g_type_register_static (G_TYPE_INTERFACE, "AtkDocument", &tinfo, 0);
+ }
+
+ return type;
+}
+
+/**
+ * atk_document_get_document_type:
+ * @document: a #GObject instance that implements AtkDocumentIface
+ *
+ * Gets a string indicating the document type.
+ *
+ * Returns: a string indicating the document type
+ **/
+G_CONST_RETURN gchar*
+atk_document_get_document_type (AtkDocument *document)
+{
+ AtkDocumentIface *iface;
+
+ g_return_val_if_fail (document != NULL, NULL);
+ g_return_val_if_fail (ATK_IS_DOCUMENT (document), NULL);
+
+ iface = ATK_DOCUMENT_GET_IFACE (document);
+
+ if (iface->get_document_type)
+ {
+ return (iface->get_document_type) (document);
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
+/**
+ * atk_document_get_document:
+ * @document: a #GObject instance that implements AtkDocumentIface
+ *
+ * Gets a %gpointer that points to an instance of the DOM. It is
+ * up to the caller to check atk_document_get_type to determine
+ * how to cast this pointer.
+ *
+ * Returns: a %gpointer that points to an instance of the DOM.
+ **/
+gpointer
+atk_document_get_document (AtkDocument *document)
+{
+ AtkDocumentIface *iface;
+
+ g_return_val_if_fail (document != NULL, NULL);
+ g_return_val_if_fail (ATK_IS_DOCUMENT (document), NULL);
+
+ iface = ATK_DOCUMENT_GET_IFACE (document);
+
+ if (iface->get_document)
+ {
+ return (iface->get_document) (document);
+ }
+ else
+ {
+ return NULL;
+ }
+}
+
diff --git a/atk/atkdocument.h b/atk/atkdocument.h
new file mode 100755
index 0000000..6813237
--- /dev/null
+++ b/atk/atkdocument.h
@@ -0,0 +1,62 @@
+/* ATK - Accessibility Toolkit
+ * Copyright 2001 Sun Microsystems 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.
+ */
+
+#ifndef __ATK_DOCUMENT_H__
+#define __ATK_DOCUMENT_H__
+
+#include <atk/atkobject.h>
+#include <atk/atkutil.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif /* __cplusplus */
+
+/*
+ * The AtkDocument interface should be supported by any object that has an
+ * associated document object model (DOM). This interface provides the
+ * standard mechanism allowing an assistive technology access to the DOM.
+ */
+
+#define ATK_TYPE_DOCUMENT (atk_document_get_type ())
+#define ATK_IS_DOCUMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATK_TYPE_DOCUMENT)
+#define ATK_DOCUMENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATK_TYPE_DOCUMENT, AtkDocument)
+#define ATK_DOCUMENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATK_TYPE_DOCUMENT, AtkDocumentIface))
+
+#ifndef _TYPEDEF_ATK_DOCUMENT_
+#define _TYPEDEF_ATK_DOCUMENT_
+typedef struct _AtkDocument AtkDocument;
+#endif
+typedef struct _AtkDocumentIface AtkDocumentIface;
+
+struct _AtkDocumentIface
+{
+ GTypeInterface parent;
+ G_CONST_RETURN gchar* ( *get_document_type) (AtkDocument *document);
+ gpointer ( *get_document) (AtkDocument *document);
+};
+
+GType atk_document_get_type (void);
+
+G_CONST_RETURN gchar* atk_document_get_document_type (AtkDocument *document);
+gpointer atk_document_get_document (AtkDocument *document);
+
+#ifdef __cplusplus
+}
+#endif /* __cplusplus */
+#endif /* __ATK_DOCUMENT_H__ */
diff --git a/docs/atk-docs.sgml b/docs/atk-docs.sgml
index cf44911..07773dc 100644
--- a/docs/atk-docs.sgml
+++ b/docs/atk-docs.sgml
@@ -1,6 +1,7 @@
<!doctype book PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
<!entity atk-AtkAction SYSTEM "sgml/atkaction.sgml">
<!entity atk-AtkComponent SYSTEM "sgml/atkcomponent.sgml">
+<!entity atk-AtkDocument SYSTEM "sgml/atkdocument.sgml">
<!entity atk-AtkEditabletext SYSTEM "sgml/atkeditabletext.sgml">
<!entity atk-AtkHyperlink SYSTEM "sgml/atkhyperlink.sgml">
<!entity atk-AtkHypertext SYSTEM "sgml/atkhypertext.sgml">
@@ -31,6 +32,7 @@
<title>ATK Library</title>
&atk-AtkAction;
&atk-AtkComponent;
+ &atk-AtkDocument;
&atk-AtkEditabletext;
&atk-AtkHyperlink;
&atk-AtkHypertext;
diff --git a/docs/atk-sections.txt b/docs/atk-sections.txt
index 4ce21e4..5901d18 100644
--- a/docs/atk-sections.txt
+++ b/docs/atk-sections.txt
@@ -41,6 +41,21 @@ atk_component_get_type
</SECTION>
<SECTION>
+<FILE>atkdocument</FILE>
+<TITLE>AtkDocument</TITLE>
+AtkDocument
+AtkDocumentIface
+atk_document_get_document_type
+atk_document_get_document
+<SUBSECTION Standard>
+ATK_DOCUMENT
+ATK_IS_DOCUMENT
+ATK_TYPE_DOCUMENT
+ATK_DOCUMENT_GET_IFACE
+atk_document_get_type
+</SECTION>
+
+<SECTION>
<FILE>atkeditabletext</FILE>
<TITLE>AtkEditableText</TITLE>
AtkEditableText
@@ -130,7 +145,6 @@ atk_role_register
AtkImplementor
AtkImplementorIface
AtkRelationSet
-AtkStateSet
AtkPropertyValues
AtkPropertyChangeHandler
atk_implementor_ref_accessible
@@ -154,14 +168,15 @@ ATK_OBJECT
ATK_IS_OBJECT
ATK_TYPE_OBJECT
ATK_IMPLEMENTOR_GET_IFACE
-atk_object_get_type
ATK_OBJECT_CLASS
ATK_IS_OBJECT_CLASS
ATK_OBJECT_GET_CLASS
ATK_TYPE_IMPLEMENTOR
ATK_IS_IMPLEMENTOR
ATK_IMPLEMENTOR
+AtkStateSet
atk_implementor_get_type
+atk_object_get_type
</SECTION>
<SECTION>
diff --git a/docs/tmpl/atk-unused.sgml b/docs/tmpl/atk-unused.sgml
index 5a00683..5f40b42 100644
--- a/docs/tmpl/atk-unused.sgml
+++ b/docs/tmpl/atk-unused.sgml
@@ -38,6 +38,13 @@ atk
@ATK_IMAGE_STOCK:
@ATK_IMAGE_ICON_SET:
+<!-- ##### STRUCT AtkStateSet ##### -->
+<para>
+
+</para>
+
+@parent:
+
<!-- ##### FUNCTION atk_component_get_position_on_screen ##### -->
<para>
diff --git a/docs/tmpl/atkobject.sgml b/docs/tmpl/atkobject.sgml
index 20271c8..9b1cb09 100644
--- a/docs/tmpl/atkobject.sgml
+++ b/docs/tmpl/atkobject.sgml
@@ -124,13 +124,6 @@ of the other ATK interfaces:
@parent:
@relations:
-<!-- ##### STRUCT AtkStateSet ##### -->
-<para>
-
-</para>
-
-@parent:
-
<!-- ##### STRUCT AtkPropertyValues ##### -->
<para>