| Copyright | Will Thompson and Iñaki García Etxebarria |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.Atk.Interfaces.Document
Description
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.
Synopsis
- newtype Document = Document (ManagedPtr Document)
- class (GObject o, IsDescendantOf Document o) => IsDocument o
- toDocument :: (MonadIO m, IsDocument o) => o -> m Document
- type family ResolveDocumentMethod (t :: Symbol) o where ...
- data DocumentGetAttributeValueMethodInfo
- documentGetAttributeValue :: (HasCallStack, MonadIO m, IsDocument a) => a -> Text -> m (Maybe Text)
- data DocumentGetAttributesMethodInfo
- documentGetAttributes :: (HasCallStack, MonadIO m, IsDocument a) => a -> m [Ptr ()]
- data DocumentGetCurrentPageNumberMethodInfo
- documentGetCurrentPageNumber :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Int32
- data DocumentGetDocumentMethodInfo
- documentGetDocument :: (HasCallStack, MonadIO m, IsDocument a) => a -> m (Ptr ())
- data DocumentGetDocumentTypeMethodInfo
- documentGetDocumentType :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Text
- data DocumentGetLocaleMethodInfo
- documentGetLocale :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Text
- data DocumentGetPageCountMethodInfo
- documentGetPageCount :: (HasCallStack, MonadIO m, IsDocument a) => a -> m Int32
- data DocumentGetTextSelectionsMethodInfo
- documentGetTextSelections :: (HasCallStack, MonadIO m, IsDocument a) => a -> m [TextSelection]
- data DocumentSetAttributeValueMethodInfo
- documentSetAttributeValue :: (HasCallStack, MonadIO m, IsDocument a) => a -> Text -> Text -> m Bool
- data DocumentSetTextSelectionsMethodInfo
- documentSetTextSelections :: (HasCallStack, MonadIO m, IsDocument a) => a -> [TextSelection] -> m Bool
- type DocumentDocumentAttributeChangedCallback = Text -> Text -> IO ()
- data DocumentDocumentAttributeChangedSignalInfo
- afterDocumentDocumentAttributeChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentDocumentAttributeChangedCallback) -> m SignalHandlerId
- onDocumentDocumentAttributeChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentDocumentAttributeChangedCallback) -> m SignalHandlerId
- type DocumentLoadCompleteCallback = IO ()
- data DocumentLoadCompleteSignalInfo
- afterDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadCompleteCallback) -> m SignalHandlerId
- onDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadCompleteCallback) -> m SignalHandlerId
- type DocumentLoadStoppedCallback = IO ()
- data DocumentLoadStoppedSignalInfo
- afterDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadStoppedCallback) -> m SignalHandlerId
- onDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadStoppedCallback) -> m SignalHandlerId
- type DocumentPageChangedCallback = Int32 -> IO ()
- data DocumentPageChangedSignalInfo
- afterDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentPageChangedCallback) -> m SignalHandlerId
- onDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentPageChangedCallback) -> m SignalHandlerId
- type DocumentReloadCallback = IO ()
- data DocumentReloadSignalInfo
- afterDocumentReload :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentReloadCallback) -> m SignalHandlerId
- onDocumentReload :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentReloadCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Constructors
| Document (ManagedPtr Document) |
Instances
class (GObject o, IsDescendantOf Document o) => IsDocument o Source #
Type class for types which can be safely cast to Document, for instance with toDocument.
Instances
| (GObject o, IsDescendantOf Document o) => IsDocument o Source # | |
Defined in GI.Atk.Interfaces.Document | |
toDocument :: (MonadIO m, IsDocument o) => o -> m Document Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAttributeValue, getAttributes, getCurrentPageNumber, getData, getDocument, getDocumentType, getLocale, getPageCount, getProperty, getQdata, getTextSelections.
Setters
setAttributeValue, setData, setDataFull, setProperty, setTextSelections.
type family ResolveDocumentMethod (t :: Symbol) o where ... Source #
Equations
getAttributeValue
data DocumentGetAttributeValueMethodInfo Source #
Instances
| (signature ~ (Text -> m (Maybe Text)), MonadIO m, IsDocument a) => OverloadedMethod DocumentGetAttributeValueMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetAttributeValueMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
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 |
Retrieves the value of the given attributeName inside document.
Since: 1.12
getAttributes
data DocumentGetAttributesMethodInfo Source #
Instances
| (signature ~ m [Ptr ()], MonadIO m, IsDocument a) => OverloadedMethod DocumentGetAttributesMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetAttributesMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
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
data DocumentGetCurrentPageNumberMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m, IsDocument a) => OverloadedMethod DocumentGetCurrentPageNumberMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetCurrentPageNumberMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
documentGetCurrentPageNumber Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Int32 | Returns: the current page number inside |
Retrieves the current page number inside document.
Since: 2.12
getDocument
data DocumentGetDocumentMethodInfo Source #
Instances
| (signature ~ m (Ptr ()), MonadIO m, IsDocument a) => OverloadedMethod DocumentGetDocumentMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetDocumentMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
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
data DocumentGetDocumentTypeMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsDocument a) => OverloadedMethod DocumentGetDocumentTypeMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetDocumentTypeMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
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
data DocumentGetLocaleMethodInfo Source #
Instances
| (signature ~ m Text, MonadIO m, IsDocument a) => OverloadedMethod DocumentGetLocaleMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetLocaleMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
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
data DocumentGetPageCountMethodInfo Source #
Instances
| (signature ~ m Int32, MonadIO m, IsDocument a) => OverloadedMethod DocumentGetPageCountMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetPageCountMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m Int32 | Returns: total page count of |
Retrieves the total number of pages inside document.
Since: 2.12
getTextSelections
data DocumentGetTextSelectionsMethodInfo Source #
Instances
| (signature ~ m [TextSelection], MonadIO m, IsDocument a) => OverloadedMethod DocumentGetTextSelectionsMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentGetTextSelectionsMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
documentGetTextSelections Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> m [TextSelection] | Returns: a GArray of AtkTextSelection structures representing the selection. |
Returns an array of AtkTextSelections within this document.
Since: 2.52
setAttributeValue
data DocumentSetAttributeValueMethodInfo Source #
Instances
| (signature ~ (Text -> Text -> m Bool), MonadIO m, IsDocument a) => OverloadedMethod DocumentSetAttributeValueMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentSetAttributeValueMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
documentSetAttributeValue Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> Text |
|
| -> Text |
|
| -> m Bool | Returns: |
Sets the value for the given attributeName inside document.
Since: 1.12
setTextSelections
data DocumentSetTextSelectionsMethodInfo Source #
Instances
| (signature ~ ([TextSelection] -> m Bool), MonadIO m, IsDocument a) => OverloadedMethod DocumentSetTextSelectionsMethodInfo a signature Source # | |
Defined in GI.Atk.Interfaces.Document Methods overloadedMethod :: a -> signature # | |
| OverloadedMethodInfo DocumentSetTextSelectionsMethodInfo (a :: Type) Source # | |
Defined in GI.Atk.Interfaces.Document Methods | |
documentSetTextSelections Source #
Arguments
| :: (HasCallStack, MonadIO m, IsDocument a) | |
| => a |
|
| -> [TextSelection] |
|
| -> m Bool | Returns: TRUE if the selection was made successfully; FALSE otherwise. |
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
documentAttributeChanged
type DocumentDocumentAttributeChangedCallback Source #
Arguments
| = Text |
|
| -> Text |
|
| -> IO () |
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
data DocumentDocumentAttributeChangedSignalInfo Source #
Instances
| SignalInfo DocumentDocumentAttributeChangedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Document Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DocumentDocumentAttributeChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType DocumentDocumentAttributeChangedSignalInfo Source # | |||||
afterDocumentDocumentAttributeChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentDocumentAttributeChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the documentAttributeChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after document #documentAttributeChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onDocumentDocumentAttributeChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentDocumentAttributeChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the documentAttributeChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on document #documentAttributeChanged callback
loadComplete
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.)
data DocumentLoadCompleteSignalInfo Source #
Instances
| SignalInfo DocumentLoadCompleteSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Document Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DocumentLoadCompleteSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType DocumentLoadCompleteSignalInfo Source # | |||||
afterDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadCompleteCallback) -> m SignalHandlerId Source #
Connect a signal handler for the loadComplete signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after document #loadComplete callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onDocumentLoadComplete :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadCompleteCallback) -> m SignalHandlerId Source #
Connect a signal handler for the loadComplete signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on document #loadComplete callback
loadStopped
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.
data DocumentLoadStoppedSignalInfo Source #
Instances
| SignalInfo DocumentLoadStoppedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Document Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DocumentLoadStoppedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType DocumentLoadStoppedSignalInfo Source # | |||||
afterDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadStoppedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the loadStopped signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after document #loadStopped callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onDocumentLoadStopped :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentLoadStoppedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the loadStopped signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on document #loadStopped callback
pageChanged
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
data DocumentPageChangedSignalInfo Source #
Instances
| SignalInfo DocumentPageChangedSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Document Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DocumentPageChangedSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType DocumentPageChangedSignalInfo Source # | |||||
afterDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentPageChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pageChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after document #pageChanged callback
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onDocumentPageChanged :: (IsDocument a, MonadIO m) => a -> ((?self :: a) => DocumentPageChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the pageChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on document #pageChanged callback
reload
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.
data DocumentReloadSignalInfo Source #
Instances
| SignalInfo DocumentReloadSignalInfo Source # | |||||
Defined in GI.Atk.Interfaces.Document Associated Types
Methods connectSignal :: GObject o => o -> (o -> HaskellCallbackType DocumentReloadSignalInfo) -> SignalConnectMode -> Maybe Text -> IO SignalHandlerId # | |||||
| type HaskellCallbackType DocumentReloadSignalInfo Source # | |||||
afterDocumentReload :: (IsDocument a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self parameter.
Note that this requires activating the ImplicitParams GHC extension.
onDocumentReload :: (IsDocument a, MonadIO m) => a -> ((?self :: 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