Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Web editor state.
WebKitEditorState represents the state of a WebView
editor.
Use webViewGetEditorState
to get the WebKitEditorState
of a WebView
.
Since: 2.10
Synopsis
- newtype EditorState = EditorState (ManagedPtr EditorState)
- class (GObject o, IsDescendantOf EditorState o) => IsEditorState o
- toEditorState :: (MonadIO m, IsEditorState o) => o -> m EditorState
- editorStateGetTypingAttributes :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Word32
- editorStateIsCopyAvailable :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Bool
- editorStateIsCutAvailable :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Bool
- editorStateIsPasteAvailable :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Bool
- editorStateIsRedoAvailable :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Bool
- editorStateIsUndoAvailable :: (HasCallStack, MonadIO m, IsEditorState a) => a -> m Bool
- getEditorStateTypingAttributes :: (MonadIO m, IsEditorState o) => o -> m Word32
- type EditorStateChangedCallback = IO ()
- afterEditorStateChanged :: (IsEditorState a, MonadIO m) => a -> ((?self :: a) => EditorStateChangedCallback) -> m SignalHandlerId
- onEditorStateChanged :: (IsEditorState a, MonadIO m) => a -> ((?self :: a) => EditorStateChangedCallback) -> m SignalHandlerId
Exported types
newtype EditorState Source #
Memory-managed wrapper type.
EditorState (ManagedPtr EditorState) |
Instances
Eq EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState (==) :: EditorState -> EditorState -> Bool # (/=) :: EditorState -> EditorState -> Bool # | |
GObject EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState | |
ManagedPtrNewtype EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState toManagedPtr :: EditorState -> ManagedPtr EditorState | |
TypedObject EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState | |
HasParentTypes EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState | |
IsGValue (Maybe EditorState) Source # | Convert |
Defined in GI.WebKit.Objects.EditorState gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe EditorState -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe EditorState) | |
type ParentTypes EditorState Source # | |
Defined in GI.WebKit.Objects.EditorState type ParentTypes EditorState = '[Object] |
class (GObject o, IsDescendantOf EditorState o) => IsEditorState o Source #
Type class for types which can be safely cast to EditorState
, for instance with toEditorState
.
Instances
(GObject o, IsDescendantOf EditorState o) => IsEditorState o Source # | |
Defined in GI.WebKit.Objects.EditorState |
toEditorState :: (MonadIO m, IsEditorState o) => o -> m EditorState Source #
Cast to EditorState
, for types for which this is known to be safe. For general casts, use castTo
.
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isCopyAvailable, isCutAvailable, isFloating, isPasteAvailable, isRedoAvailable, isUndoAvailable, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getProperty, getQdata, getTypingAttributes.
Setters
getTypingAttributes
editorStateGetTypingAttributes Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Word32 | Returns: a bitmask of |
Gets the typing attributes at the current cursor position.
If there is a selection, this returns the typing attributes of the selected text. Note that in case of a selection, typing attributes are considered active only when they are present throughout the selection.
Since: 2.10
isCopyAvailable
editorStateIsCopyAvailable Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether a copy command can be issued.
Since: 2.20
isCutAvailable
editorStateIsCutAvailable Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether a cut command can be issued.
Since: 2.20
isPasteAvailable
editorStateIsPasteAvailable Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether a paste command can be issued.
Since: 2.20
isRedoAvailable
editorStateIsRedoAvailable Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether a redo command can be issued.
Since: 2.20
isUndoAvailable
editorStateIsUndoAvailable Source #
:: (HasCallStack, MonadIO m, IsEditorState a) | |
=> a |
|
-> m Bool | Returns: |
Gets whether an undo command can be issued.
Since: 2.20
Properties
typingAttributes
Bitmask of EditorTypingAttributes
flags.
See editorStateGetTypingAttributes
for more information.
Since: 2.10
getEditorStateTypingAttributes :: (MonadIO m, IsEditorState o) => o -> m Word32 Source #
Get the value of the “typing-attributes
” property.
When overloading is enabled, this is equivalent to
get
editorState #typingAttributes
Signals
changed
type EditorStateChangedCallback = IO () Source #
Emitted when the WebKitEdtorState
is changed.
Since: 2.44
afterEditorStateChanged :: (IsEditorState a, MonadIO m) => a -> ((?self :: a) => EditorStateChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
editorState #changed 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.
onEditorStateChanged :: (IsEditorState a, MonadIO m) => a -> ((?self :: a) => EditorStateChangedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
editorState #changed callback