Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
An interface used for objects which implement linking between multiple resource or content locations, or multiple 'markers' within a single document. A Hypertext instance is associated with one or more Hyperlinks, which are associated with particular offsets within the Hypertext's included content. While this interface is derived from Text, there is no requirement that Hypertext instances have textual content; they may implement Image as well, and Hyperlinks need not have non-zero text offsets.
Synopsis
- newtype Hypertext = Hypertext (ManagedPtr Hypertext)
- noHypertext :: Maybe Hypertext
- class (GObject o, IsDescendantOf Hypertext o) => IsHypertext o
- toHypertext :: (MonadIO m, IsHypertext o) => o -> m Hypertext
- hypertextGetLink :: (HasCallStack, MonadIO m, IsHypertext a) => a -> Int32 -> m Hyperlink
- hypertextGetLinkIndex :: (HasCallStack, MonadIO m, IsHypertext a) => a -> Int32 -> m Int32
- hypertextGetNLinks :: (HasCallStack, MonadIO m, IsHypertext a) => a -> m Int32
- type C_HypertextLinkSelectedCallback = Ptr () -> Int32 -> Ptr () -> IO ()
- type HypertextLinkSelectedCallback = Int32 -> IO ()
- afterHypertextLinkSelected :: (IsHypertext a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId
- genClosure_HypertextLinkSelected :: MonadIO m => HypertextLinkSelectedCallback -> m (GClosure C_HypertextLinkSelectedCallback)
- mk_HypertextLinkSelectedCallback :: C_HypertextLinkSelectedCallback -> IO (FunPtr C_HypertextLinkSelectedCallback)
- noHypertextLinkSelectedCallback :: Maybe HypertextLinkSelectedCallback
- onHypertextLinkSelected :: (IsHypertext a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId
- wrap_HypertextLinkSelectedCallback :: HypertextLinkSelectedCallback -> C_HypertextLinkSelectedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Hypertext Source # | |
GObject Hypertext Source # | |
Defined in GI.Atk.Interfaces.Hypertext gobjectType :: IO GType # | |
IsGValue Hypertext Source # | Convert |
HasParentTypes Hypertext Source # | |
Defined in GI.Atk.Interfaces.Hypertext | |
type ParentTypes Hypertext Source # | |
Defined in GI.Atk.Interfaces.Hypertext |
class (GObject o, IsDescendantOf Hypertext o) => IsHypertext o Source #
Type class for types which can be safely cast to Hypertext
, for instance with toHypertext
.
Instances
(GObject o, IsDescendantOf Hypertext o) => IsHypertext o Source # | |
Defined in GI.Atk.Interfaces.Hypertext |
toHypertext :: (MonadIO m, IsHypertext o) => o -> m Hypertext Source #
Methods
Overloaded methods
getLink
:: (HasCallStack, MonadIO m, IsHypertext a) | |
=> a |
|
-> Int32 |
|
-> m Hyperlink | Returns: the link in this hypertext document at
index |
Gets the link in this hypertext document at index
linkIndex
getLinkIndex
hypertextGetLinkIndex Source #
:: (HasCallStack, MonadIO m, IsHypertext a) | |
=> a |
|
-> Int32 |
|
-> m Int32 | Returns: an index into the array of hyperlinks in |
Gets the index into the array of hyperlinks that is associated with
the character specified by charIndex
.
getNLinks
:: (HasCallStack, MonadIO m, IsHypertext a) | |
=> a |
|
-> m Int32 | Returns: the number of links within this hypertext document |
Gets the number of links within this hypertext document.
Signals
linkSelected
type C_HypertextLinkSelectedCallback = Ptr () -> Int32 -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type HypertextLinkSelectedCallback Source #
The "link-selected" signal is emitted by an AtkHyperText object when one of the hyperlinks associated with the object is selected.
afterHypertextLinkSelected :: (IsHypertext a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the linkSelected signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
hypertext #linkSelected callback
genClosure_HypertextLinkSelected :: MonadIO m => HypertextLinkSelectedCallback -> m (GClosure C_HypertextLinkSelectedCallback) Source #
Wrap the callback into a GClosure
.
mk_HypertextLinkSelectedCallback :: C_HypertextLinkSelectedCallback -> IO (FunPtr C_HypertextLinkSelectedCallback) Source #
Generate a function pointer callable from C code, from a C_HypertextLinkSelectedCallback
.
noHypertextLinkSelectedCallback :: Maybe HypertextLinkSelectedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
HypertextLinkSelectedCallback
onHypertextLinkSelected :: (IsHypertext a, MonadIO m) => a -> HypertextLinkSelectedCallback -> m SignalHandlerId Source #
Connect a signal handler for the linkSelected signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
hypertext #linkSelected callback