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
libatk_la_SOURCES = \
atkaction.c \
atkcomponent.c \
+ atkdocument.c \
atkeditabletext.c \
atkhyperlink.c \
atkhypertext.c \
atk.h \
atkaction.h \
atkcomponent.h \
+ atkdocument.h \
atkeditabletext.h \
atkhyperlink.h \
atkhypertext.h \
#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>
--- /dev/null
+/* 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;
+ }
+}
+
--- /dev/null
+/* 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__ */
<!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">
<title>ATK Library</title>
&atk-AtkAction;
&atk-AtkComponent;
+ &atk-AtkDocument;
&atk-AtkEditabletext;
&atk-AtkHyperlink;
&atk-AtkHypertext;
</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
AtkImplementor
AtkImplementorIface
AtkRelationSet
-AtkStateSet
AtkPropertyValues
AtkPropertyChangeHandler
atk_implementor_ref_accessible
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>
@ATK_IMAGE_STOCK:
@ATK_IMAGE_ICON_SET:
+<!-- ##### STRUCT AtkStateSet ##### -->
+<para>
+
+</para>
+
+@parent:
+
<!-- ##### FUNCTION atk_component_get_position_on_screen ##### -->
<para>
@parent:
@relations:
-<!-- ##### STRUCT AtkStateSet ##### -->
-<para>
-
-</para>
-
-@parent:
-
<!-- ##### STRUCT AtkPropertyValues ##### -->
<para>