Interface

AtkDocument

Description [src]

interface Atk.Document : GObject.Object

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.

Prerequisite

In order to implement Document, your type must inherit fromGObject.

Implementations

Instance methods

atk_document_get_attribute_value

Retrieves the value of the given attribute_name inside document.

since: 1.12

atk_document_get_attributes

Gets an AtkAttributeSet which describes document-wide attributes as name-value pairs.

since: 1.12

atk_document_get_current_page_number

Retrieves the current page number inside document.

since: 2.12

atk_document_get_document

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.

deprecated: Unknown 

atk_document_get_document_type

Gets a string indicating the document type.

deprecated: Unknown 

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

deprecated: 2.7.90 

atk_document_get_page_count

Retrieves the total number of pages inside document.

since: 2.12

atk_document_get_text_selections

Returns an array of AtkTextSelections within this document.

since: 2.52

atk_document_set_attribute_value

Sets the value for the given attribute_name inside document.

since: 1.12

atk_document_set_text_selections

Makes 1 or more selections within this document denoted by the given array of AtkTextSelections. Any existing physical selection (inside or outside this document) is replaced by the new selections. All objects within the given selection ranges must be descendants of this document. Otherwise FALSE will be returned.

since: 2.52

Signals

Atk.Document::document-attribute-changed

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.

since: 2.52

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

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.

Atk.Document::page-changed

The ‘page-changed’ signal is emitted when the current page of a document changes, e.g. pressing page up/down in a document viewer.

since: 2.12

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.

Interface structure

struct AtkDocumentIface {
  GTypeInterface parent;
  const gchar* (* get_document_type) (
    AtkDocument* document
  );
  gpointer (* get_document) (
    AtkDocument* document
  );
  const gchar* (* get_document_locale) (
    AtkDocument* document
  );
  AtkAttributeSet* (* get_document_attributes) (
    AtkDocument* document
  );
  const gchar* (* get_document_attribute_value) (
    AtkDocument* document,
    const gchar* attribute_name
  );
  gboolean (* set_document_attribute) (
    AtkDocument* document,
    const gchar* attribute_name,
    const gchar* attribute_value
  );
  gint (* get_current_page_number) (
    AtkDocument* document
  );
  gint (* get_page_count) (
    AtkDocument* document
  );
  GArray* (* get_text_selections) (
    AtkDocument* document
  );
  gboolean (* set_text_selections) (
    AtkDocument* document,
    GArray* selections
  );
  
}

No description available.

Interface members
parent
GTypeInterface
 

No description available.

get_document_type
const gchar* (* get_document_type) (
    AtkDocument* document
  )
 

Gets a string indicating the document type. This virtual function is deprecated since 2.12 and it should not be overriden.

get_document
gpointer (* get_document) (
    AtkDocument* document
  )
 

A GObject instance that implements AtkDocumentIface. This virtual method is deprecated since 2.12 and it should not be overriden.

get_document_locale
const gchar* (* get_document_locale) (
    AtkDocument* document
  )
 

Gets locale. This virtual function is deprecated since 2.7.90 and it should not be overriden.

get_document_attributes
AtkAttributeSet* (* get_document_attributes) (
    AtkDocument* document
  )
 

Gets an AtkAttributeSet which describes document-wide attributes as name-value pairs.

get_document_attribute_value
const gchar* (* get_document_attribute_value) (
    AtkDocument* document,
    const gchar* attribute_name
  )
 

Returns a string value assocciated with the named attribute for this document, or NULL.

set_document_attribute
gboolean (* set_document_attribute) (
    AtkDocument* document,
    const gchar* attribute_name,
    const gchar* attribute_value
  )
 

Sets the value of an attribute. Returns TRUE on success, FALSE otherwise.

get_current_page_number
gint (* get_current_page_number) (
    AtkDocument* document
  )
 

Gets the current page number. Since 2.12.

get_page_count
gint (* get_page_count) (
    AtkDocument* document
  )
 

Gets the page count of the document. Since 2.12.

get_text_selections
GArray* (* get_text_selections) (
    AtkDocument* document
  )
 

No description available.

set_text_selections
gboolean (* set_text_selections) (
    AtkDocument* document,
    GArray* selections
  )
 

No description available.

Virtual methods

Atk.Document.get_current_page_number

Retrieves the current page number inside document.

since: 2.12

Atk.Document.get_document

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.

deprecated: Unknown 

Atk.Document.get_document_attribute_value

Retrieves the value of the given attribute_name inside document.

since: 1.12

Atk.Document.get_document_attributes

Gets an AtkAttributeSet which describes document-wide attributes as name-value pairs.

since: 1.12

Atk.Document.get_document_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.

deprecated: 2.7.90 

Atk.Document.get_document_type

Gets a string indicating the document type.

deprecated: Unknown 

Atk.Document.get_page_count

Retrieves the total number of pages inside document.

since: 2.12

Atk.Document.get_text_selections

Returns an array of AtkTextSelections within this document.

since: 2.52

Atk.Document.set_document_attribute

Sets the value for the given attribute_name inside document.

since: 1.12

Atk.Document.set_text_selections

Makes 1 or more selections within this document denoted by the given array of AtkTextSelections. Any existing physical selection (inside or outside this document) is replaced by the new selections. All objects within the given selection ranges must be descendants of this document. Otherwise FALSE will be returned.

since: 2.52