interface. Based on patch from Neo Liu <nian.liu@sun.com>.
+2006-09-14 Bill Haneman <bill.haneman@sun.com>
+
+ * atk/docs/atkdocument.sgml:
+ Update docs to include signals, and revise description.
+
+ Following code changes from Neo Liu <nian.lui@sun.com>
+
+ * atkdocument.c:
+ (atk_document_base_init): New, add signals
+ "load_complete", "load_stopped", "reload".
+
+ * atknoopobject;c:
+ (atk_no_op_object_get_type): Add 'AtkDocument'
+ interface type to this test AtkObject class.
+
2006-09-19 Sunil Mohan Adapa <sunil@atc.tcs.co.in>
* configure.in: Added "te" to ALL_LINGUAS
#include "atkdocument.h"
+enum {
+ LOAD_COMPLETE,
+ RELOAD,
+ LOAD_STOPPED,
+ LAST_SIGNAL
+};
+
+static void atk_document_base_init (AtkDocumentIface *class);
+
+static guint atk_document_signals[LAST_SIGNAL] = {0};
+
GType
atk_document_get_type (void)
{
static const GTypeInfo tinfo =
{
sizeof (AtkDocumentIface),
- (GBaseInitFunc) NULL,
+ (GBaseInitFunc) atk_document_base_init,
(GBaseFinalizeFunc) NULL,
};
return type;
}
+static void
+atk_document_base_init (AtkDocumentIface *class)
+{
+ static gboolean initialized = FALSE;
+ if (!initialized)
+ {
+ atk_document_signals[LOAD_COMPLETE] =
+ g_signal_new ("load_complete",
+ ATK_TYPE_DOCUMENT,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ atk_document_signals[RELOAD] =
+ g_signal_new ("reload",
+ ATK_TYPE_DOCUMENT,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ atk_document_signals[LOAD_STOPPED] =
+ g_signal_new ("load_stopped",
+ ATK_TYPE_DOCUMENT,
+ G_SIGNAL_RUN_LAST,
+ 0,
+ (GSignalAccumulator) NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ initialized = TRUE;
+ }
+}
+
/**
* atk_document_get_document_type:
* @document: a #GObject instance that implements AtkDocumentIface
gboolean ( *set_document_attribute) (AtkDocument *document,
const gchar *attribute_name,
const gchar *attribute_value);
+
AtkFunction pad1;
AtkFunction pad2;
AtkFunction pad3;
NULL
};
+ static const GInterfaceInfo atk_document_info =
+ {
+ (GInterfaceInitFunc) NULL,
+ (GInterfaceFinalizeFunc) NULL,
+ NULL
+ };
type = g_type_register_static (ATK_TYPE_OBJECT,
"AtkNoOpObject", &tinfo, 0);
&atk_hypertext_info);
g_type_add_interface_static (type, ATK_TYPE_VALUE,
&atk_value_info);
+ g_type_add_interface_static (type, ATK_TYPE_DOCUMENT,
+ &atk_document_info);
}
return type;
}
atk
+<!-- ##### SIGNAL AtkDocument:: ##### -->
+<para>
+The 'reload' signal is emitted when
+</para>
+
+@atkdocument: the object which received the signal.
+@arg1:
+
AtkDocument
<!-- ##### SECTION Short_Description ##### -->
-The ATK interface which allows access to a DOM associated with on object.
+The ATK interface which represents the toplevel container for document content.
<!-- ##### SECTION Long_Description ##### -->
<para>
-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.
+The AtkDocument interface should be supported by any object whose content is a
+representation or view of a document. The AtkDocument interface should appear
+on the toplevel container for the document content; however AtkDocument
+instances may be nested (i.e. an AtkDocument may be a descendant of another
+AtkDocument) in those cases where one document contains "embedded content"
+which can reasonably be considered a document in its own right.
</para>
<!-- ##### SECTION See_Also ##### -->
</para>
+<!-- ##### SIGNAL AtkDocument::load-complete ##### -->
+<para>
+The 'load-complete' signal is emitted when a pending load of a static
+document has completed. This signal is to be expected by ATK clients
+if and when AtkDocument implementors expose ATK_STATE_BUSY. If the state
+of an AtkObject which implements AtkDocument does not include ATK_STATE_BUSY,
+it should be safe for clients to assume that the AtkDocument's static contents
+are fully loaded into the container. (Dynamic document contents should
+be exposed via other signals.)
+</para>
+
+@atkdocument: the object which received the signal.
+
+<!-- ##### SIGNAL AtkDocument::load-stopped ##### -->
+<para>
+The 'load-stopped' signal is emitted when a pending load of document contents
+is cancelled, paused, or otherwise interrupted by the user or application
+logic. It should not however be
+emitted while waiting for a resource (for instance while blocking on a file or
+network read) unless a user-significant timeout has occurred.
+</para>
+
+@atkdocument: the object which received the signal.
+
+<!-- ##### SIGNAL AtkDocument::reload ##### -->
+<para>
+The 'reload' signal is emitted when the contents of a document is refreshed
+from its source. Once 'reload' has been emitted, a matching 'load-complete'
+or 'load-stopped' signal should follow, which clients may await before
+interrogating ATK for the latest document content.
+</para>
+
+@atkdocument: the object which received the signal.
+
<!-- ##### FUNCTION atk_document_get_document_type ##### -->
<para>