* Returns: 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.
- * Virtual: get_document_locale
**/
const gchar *
atk_document_get_locale (AtkDocument *document)
* Returns: (transfer none): An AtkAttributeSet containing the explicitly
* set name-value-pair attributes associated with this document
* as a whole.
- * Virtual: get_document_attributes
**/
AtkAttributeSet *
atk_document_get_attributes (AtkDocument *document)
* Returns: 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.
- * Virtual: get_document_attribute_value
*/
const gchar *
atk_document_get_attribute_value (AtkDocument *document,
* Returns: 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).
- * Virtual: set_document_attribute
*/
gboolean
atk_document_set_attribute_value (AtkDocument *document,
return FALSE;
}
}
+
+/**
+ * atk_document_get_current_page_number:
+ * @document: the #AtkDocument
+ *
+ * Since: 2.12
+ *
+ * Returns: current page number inside @document. -1 if not
+ * implemented, not know by the implementor or irrelevant.
+ */
+gint
+atk_document_get_current_page_number (AtkDocument *document)
+{
+ AtkDocumentIface *iface;
+
+ g_return_val_if_fail (ATK_IS_DOCUMENT (document), FALSE);
+
+ iface = ATK_DOCUMENT_GET_IFACE (document);
+
+ if (iface->get_current_page_number)
+ {
+ return (iface->get_current_page_number) (document);
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+/**
+ * atk_document_get_page_count:
+ * @document: the #AtkDocument
+ *
+ * Since: 2.12
+ *
+ * Returns: total page count of @document. -1 if not implemented, not
+ * know by the implementor or irrelevant.
+ */
+gint
+atk_document_get_page_count (AtkDocument *document)
+{
+ AtkDocumentIface *iface;
+
+ g_return_val_if_fail (ATK_IS_DOCUMENT (document), FALSE);
+
+ iface = ATK_DOCUMENT_GET_IFACE (document);
+
+ if (iface->get_page_count)
+ {
+ return (iface->get_page_count) (document);
+ }
+ else
+ {
+ return -1;
+ }
+}