| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Atk.Interfaces.Document
Contents
Description
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.
Synopsis
- newtype Document = Document (ManagedPtr Document)
- noDocument :: Maybe Document
- class GObject o => IsDocument o
- toDocument :: (MonadIO m, IsDocument o) => o -> m Document
- documentGetAttributeValue :: (HasCallStack, MonadIO m, IsDocument a) => a -> Text -> m (Maybe Text)
- documentGetAttributes :: (HasCallStack, MonadIO m, IsDocument a) => a -> m [Ptr ()]
- documentGetCurrentPageNumber :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Int32
- documentGetDocument :: (HasCallStack, MonadIO m, IsDocument a) => a -> m (Ptr ())
- documentGetDocumentType :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Text
- documentGetLocale :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Text
- documentGetPageCount :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Int32
- documentSetAttributeValue :: (HasCallStack, MonadIO m, IsDocument a) => a -> Text -> Text -> m Bool
- type C_DocumentLoadCompleteCallback = Ptr () -> Ptr () -> IO ()
- type DocumentLoadCompleteCallback = IO ()
- afterDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
- genClosure_DocumentLoadComplete :: DocumentLoadCompleteCallback -> IO Closure
- mk_DocumentLoadCompleteCallback :: C_DocumentLoadCompleteCallback -> IO (FunPtr C_DocumentLoadCompleteCallback)
- noDocumentLoadCompleteCallback :: Maybe DocumentLoadCompleteCallback
- onDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId
- wrap_DocumentLoadCompleteCallback :: DocumentLoadCompleteCallback -> C_DocumentLoadCompleteCallback
- type C_DocumentLoadStoppedCallback = Ptr () -> Ptr () -> IO ()
- type DocumentLoadStoppedCallback = IO ()
- afterDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
- genClosure_DocumentLoadStopped :: DocumentLoadStoppedCallback -> IO Closure
- mk_DocumentLoadStoppedCallback :: C_DocumentLoadStoppedCallback -> IO (FunPtr C_DocumentLoadStoppedCallback)
- noDocumentLoadStoppedCallback :: Maybe DocumentLoadStoppedCallback
- onDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId
- wrap_DocumentLoadStoppedCallback :: DocumentLoadStoppedCallback -> C_DocumentLoadStoppedCallback
- type C_DocumentPageChangedCallback = Ptr () -> Int32 -> Ptr () -> IO ()
- type DocumentPageChangedCallback = Int32 -> IO ()
- afterDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
- genClosure_DocumentPageChanged :: DocumentPageChangedCallback -> IO Closure
- mk_DocumentPageChangedCallback :: C_DocumentPageChangedCallback -> IO (FunPtr C_DocumentPageChangedCallback)
- noDocumentPageChangedCallback :: Maybe DocumentPageChangedCallback
- onDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId
- wrap_DocumentPageChangedCallback :: DocumentPageChangedCallback -> C_DocumentPageChangedCallback
- type C_DocumentReloadCallback = Ptr () -> Ptr () -> IO ()
- type DocumentReloadCallback = IO ()
- afterDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
- genClosure_DocumentReload :: DocumentReloadCallback -> IO Closure
- mk_DocumentReloadCallback :: C_DocumentReloadCallback -> IO (FunPtr C_DocumentReloadCallback)
- noDocumentReloadCallback :: Maybe DocumentReloadCallback
- onDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId
- wrap_DocumentReloadCallback :: DocumentReloadCallback -> C_DocumentReloadCallback
Exported types
Memory-managed wrapper type.
Constructors
| Document (ManagedPtr Document) |
Instances
| GObject Document Source # | |
Defined in GI.Atk.Interfaces.Document Methods gobjectType :: Document -> IO GType # | |
| IsObject Document Source # | |
Defined in GI.Atk.Interfaces.Document | |
| IsDocument Document Source # | |
Defined in GI.Atk.Interfaces.Document | |
class GObject o => IsDocument o Source #
Type class for types which can be safely cast to Document, for instance with toDocument.
Instances
| (GObject a, (UnknownAncestorError Document a :: Constraint)) => IsDocument a Source # | |
Defined in GI.Atk.Interfaces.Document | |
| IsDocument Document Source # | |
Defined in GI.Atk.Interfaces.Document | |
| IsDocument NoOpObject Source # | |
Defined in GI.Atk.Objects.NoOpObject | |
toDocument :: (MonadIO m, IsDocument o) => o -> m Document Source #
Methods
getAttributeValue
documentGetAttributeValue Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> Text |
|
| -> m (Maybe Text) | Returns: a string value associated with the named
attribute for this document, or NULL if a value for
|
No description available in the introspection data.
Since: 1.12
getAttributes
documentGetAttributes Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m [Ptr ()] | Returns: An AtkAttributeSet containing the explicitly set name-value-pair attributes associated with this document as a whole. |
Gets an AtkAttributeSet which describes document-wide attributes as name-value pairs.
Since: 1.12
getCurrentPageNumber
documentGetCurrentPageNumber Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Int32 | Returns: current page number inside |
No description available in the introspection data.
Since: 2.12
getDocument
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m (Ptr ()) | Returns: a |
Deprecated: Since 2.12. document is already a representation ofthe document. Use it directly, or one of its children, as aninstance of the DOM.
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.
getDocumentType
documentGetDocumentType Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Text | Returns: a string indicating the document type |
Deprecated: Since 2.12. Please use documentGetAttributes toask for the document type if it applies.
Gets a string indicating the document type.
getLocale
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Text | 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. |
Deprecated: (Since version 2.7.90)Please use objectGetObjectLocale instead.
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.
getPageCount
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Int32 | Returns: total page count of |
No description available in the introspection data.
Since: 2.12
setAttributeValue
documentSetAttributeValue Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> Text |
|
| -> Text |
|
| -> m Bool | Returns: TRUE if |
No description available in the introspection data.
Since: 1.12
Signals
loadComplete
type C_DocumentLoadCompleteCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DocumentLoadCompleteCallback = IO () Source #
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.)
afterDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId Source #
Connect a signal handler for the “load-complete” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after document #loadComplete callback
genClosure_DocumentLoadComplete :: DocumentLoadCompleteCallback -> IO Closure Source #
Wrap the callback into a Closure.
mk_DocumentLoadCompleteCallback :: C_DocumentLoadCompleteCallback -> IO (FunPtr C_DocumentLoadCompleteCallback) Source #
Generate a function pointer callable from C code, from a C_DocumentLoadCompleteCallback.
noDocumentLoadCompleteCallback :: Maybe DocumentLoadCompleteCallback Source #
A convenience synonym for .Nothing :: Maybe DocumentLoadCompleteCallback
onDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> DocumentLoadCompleteCallback -> m SignalHandlerId Source #
Connect a signal handler for the “load-complete” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on document #loadComplete callback
wrap_DocumentLoadCompleteCallback :: DocumentLoadCompleteCallback -> C_DocumentLoadCompleteCallback Source #
Wrap a DocumentLoadCompleteCallback into a C_DocumentLoadCompleteCallback.
loadStopped
type C_DocumentLoadStoppedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DocumentLoadStoppedCallback = IO () Source #
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.
afterDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “load-stopped” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after document #loadStopped callback
genClosure_DocumentLoadStopped :: DocumentLoadStoppedCallback -> IO Closure Source #
Wrap the callback into a Closure.
mk_DocumentLoadStoppedCallback :: C_DocumentLoadStoppedCallback -> IO (FunPtr C_DocumentLoadStoppedCallback) Source #
Generate a function pointer callable from C code, from a C_DocumentLoadStoppedCallback.
noDocumentLoadStoppedCallback :: Maybe DocumentLoadStoppedCallback Source #
A convenience synonym for .Nothing :: Maybe DocumentLoadStoppedCallback
onDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> DocumentLoadStoppedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “load-stopped” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on document #loadStopped callback
wrap_DocumentLoadStoppedCallback :: DocumentLoadStoppedCallback -> C_DocumentLoadStoppedCallback Source #
Wrap a DocumentLoadStoppedCallback into a C_DocumentLoadStoppedCallback.
pageChanged
type C_DocumentPageChangedCallback = Ptr () -> Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DocumentPageChangedCallback Source #
Arguments
| = Int32 |
|
| -> IO () |
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
afterDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “page-changed” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after document #pageChanged callback
genClosure_DocumentPageChanged :: DocumentPageChangedCallback -> IO Closure Source #
Wrap the callback into a Closure.
mk_DocumentPageChangedCallback :: C_DocumentPageChangedCallback -> IO (FunPtr C_DocumentPageChangedCallback) Source #
Generate a function pointer callable from C code, from a C_DocumentPageChangedCallback.
noDocumentPageChangedCallback :: Maybe DocumentPageChangedCallback Source #
A convenience synonym for .Nothing :: Maybe DocumentPageChangedCallback
onDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> DocumentPageChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the “page-changed” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on document #pageChanged callback
wrap_DocumentPageChangedCallback :: DocumentPageChangedCallback -> C_DocumentPageChangedCallback Source #
Wrap a DocumentPageChangedCallback into a C_DocumentPageChangedCallback.
reload
type C_DocumentReloadCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DocumentReloadCallback = IO () Source #
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.
afterDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId Source #
Connect a signal handler for the “reload” signal, to be run after the default handler.
When overloading is enabled, this is equivalent to
after document #reload callback
genClosure_DocumentReload :: DocumentReloadCallback -> IO Closure Source #
Wrap the callback into a Closure.
mk_DocumentReloadCallback :: C_DocumentReloadCallback -> IO (FunPtr C_DocumentReloadCallback) Source #
Generate a function pointer callable from C code, from a C_DocumentReloadCallback.
noDocumentReloadCallback :: Maybe DocumentReloadCallback Source #
A convenience synonym for .Nothing :: Maybe DocumentReloadCallback
onDocumentReload :: (IsDocument a, MonadIO m) => a -> DocumentReloadCallback -> m SignalHandlerId Source #
Connect a signal handler for the “reload” signal, to be run before the default handler.
When overloading is enabled, this is equivalent to
on document #reload callback