Next: , Previous: AtkComponent, Up: Top


4 AtkDocument

The ATK interface which represents the toplevel container for document content.

4.1 Overview

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.

4.2 Usage

— Class: <atk-document>

Derives from <ginterface>.

This class defines no direct slots.

— Signal on <atk-document>: load-complete

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.)

— Signal on <atk-document>: reload

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.

— Signal on <atk-document>: load-stopped

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.

— Function: atk-document-get-document-type (self <atk-document>) ⇒  (ret mchars)
— Method: get-document-type

Gets a string indicating the document type.

document
a <gobject> instance that implements AtkDocumentIface
ret
a string indicating the document type
— Function: atk-document-get-attribute-value (self <atk-document>) (attribute_name mchars) ⇒  (ret mchars)
— Method: get-attribute-value

Returns:

document
a <gobject> instance that implements AtkDocumentIface
attribute-name
a character string representing the name of the attribute whose value is being queried.
ret
a string value associated with the named attribute for this document, or NULL if a value for <attribute-name> has not been specified for this document.

Since ATK 1.12

— Function: atk-document-set-attribute-value (self <atk-document>) (attribute_name mchars) (attribute_value mchars) ⇒  (ret bool)
— Method: set-attribute-value

Returns:

document
a <gobject> instance that implements AtkDocumentIface
attribute-name
a character string representing the name of the attribute whose value is being set.
attribute-value
a string value to be associated with <attribute-name>.
ret
TRUE if <value> is successfully associated with <attribute-name> for this document, FALSE otherwise (e.g. if the document does not allow the attribute to be modified).

Since ATK 1.12

— Function: atk-document-get-locale (self <atk-document>) ⇒  (ret mchars)
— Method: get-locale

Gets a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of the content of this document instance. Individual text substrings or images within this document may have a different locale, see atk_text_get_attributes and atk_image_get_image_locale.

document
a <gobject> instance that implements AtkDocumentIface
ret
a UTF-8 string indicating the POSIX-style LC_MESSAGES locale of the document content as a whole, or NULL if the document content does not specify a locale.