attribute for this document, or null if a value for attribute_name has not been specified for this document.
atk.document_mixin
Module for [Document] interface mixin
Templates 2
The ATK interface which represents the toplevel container for document content.
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.
Retrieves the value of the given attribute_name inside document.
Parameters
attributeName | a character string representing the name of the attribute whose value is being queried. |
Returns
Retrieves the current page number inside document.
Returns
not implemented, not know by the implementor, or irrelevant.
Gets a [xlib.types.void*] 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
Deprecated
the document. Use it directly, or one of its children, as an instance of the DOM.
Gets a string indicating the document type.
Returns
Deprecated
ask for the document type if it applies.
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.
Returns
locale of the document content as a whole, or NULL if the document content does not specify a locale.
Deprecated
Retrieves the total number of pages inside document.
Returns
not know by the implementor or irrelevant.
Sets the value for the given attribute_name inside document.
Parameters
attributeName | a character string representing the name of the attribute whose value is being set. |
attributeValue | a string value to be associated with attribute_name. |
Returns
with attribute_name for this document, and false if if the document does not allow the attribute to be modified
Connect to DocumentAttributeChanged signal.
The "document-attribute-changed" signal should be emitted when there is a change to one of the document attributes returned by atk_document_get_attributes.
Parameters
callback | signal callback delegate or function to connect void callback(string arg1, string arg2, atk.document.Document document) arg1 the name of the attribute being modified, or null if not available. (optional) arg2 the attribute's new value, or null if not available. (optional) document the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to LoadComplete signal.
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.)
Parameters
callback | signal callback delegate or function to connect void callback(atk.document.Document document) document the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to LoadStopped signal.
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.
Parameters
callback | signal callback delegate or function to connect void callback(atk.document.Document document) document the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to PageChanged signal.
The 'page-changed' signal is emitted when the current page of a document changes, e.g. pressing page up/down in a document viewer.
Parameters
callback | signal callback delegate or function to connect void callback(int pageNumber, atk.document.Document document) pageNumber the new page number. If this value is unknown or not applicable, -1 should be provided. (optional) document the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |
Returns
Connect to Reload signal.
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.
Parameters
callback | signal callback delegate or function to connect void callback(atk.document.Document document) document the instance the signal is connected to (optional) |
after | Yes.After to execute callback after default handler, No.After to execute before (default) |