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 |
GI.Dazzle.Objects.ShortcutController
Description
No description available in the introspection data.
Synopsis
- newtype ShortcutController = ShortcutController (ManagedPtr ShortcutController)
- class (GObject o, IsDescendantOf ShortcutController o) => IsShortcutController o
- toShortcutController :: (MonadIO m, IsShortcutController o) => o -> m ShortcutController
- shortcutControllerAddCommandAction :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> Text -> [ShortcutPhase] -> Text -> m ()
- shortcutControllerAddCommandCallback :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> Text -> [ShortcutPhase] -> Callback -> m ()
- shortcutControllerExecuteCommand :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> m Bool
- shortcutControllerFind :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ShortcutController
- shortcutControllerGetContext :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> m (Maybe ShortcutContext)
- shortcutControllerGetContextForPhase :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> [ShortcutPhase] -> m (Maybe ShortcutContext)
- shortcutControllerGetCurrentChord :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> m (Maybe ShortcutChord)
- shortcutControllerGetManager :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> m ShortcutManager
- shortcutControllerGetWidget :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> m Widget
- shortcutControllerNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ShortcutController
- shortcutControllerRemoveAccel :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> [ShortcutPhase] -> m ()
- shortcutControllerSetContextByName :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Maybe Text -> m ()
- shortcutControllerSetManager :: (HasCallStack, MonadIO m, IsShortcutController a, IsShortcutManager b) => a -> Maybe b -> m ()
- shortcutControllerTryFind :: (HasCallStack, MonadIO m, IsWidget a) => a -> m (Maybe ShortcutController)
- getShortcutControllerContext :: (MonadIO m, IsShortcutController o) => o -> m (Maybe ShortcutContext)
- getShortcutControllerCurrentChord :: (MonadIO m, IsShortcutController o) => o -> m (Maybe ShortcutChord)
- clearShortcutControllerManager :: (MonadIO m, IsShortcutController o) => o -> m ()
- constructShortcutControllerManager :: (IsShortcutController o, MonadIO m, IsShortcutManager a) => a -> m (GValueConstruct o)
- getShortcutControllerManager :: (MonadIO m, IsShortcutController o) => o -> m ShortcutManager
- setShortcutControllerManager :: (MonadIO m, IsShortcutController o, IsShortcutManager a) => o -> a -> m ()
- constructShortcutControllerWidget :: (IsShortcutController o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o)
- getShortcutControllerWidget :: (MonadIO m, IsShortcutController o) => o -> m Widget
- type ShortcutControllerResetCallback = IO ()
- afterShortcutControllerReset :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerResetCallback) -> m SignalHandlerId
- onShortcutControllerReset :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerResetCallback) -> m SignalHandlerId
- type ShortcutControllerSetContextNamedCallback = Text -> IO ()
- afterShortcutControllerSetContextNamed :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerSetContextNamedCallback) -> m SignalHandlerId
- onShortcutControllerSetContextNamed :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerSetContextNamedCallback) -> m SignalHandlerId
Exported types
newtype ShortcutController Source #
Memory-managed wrapper type.
Constructors
ShortcutController (ManagedPtr ShortcutController) |
Instances
class (GObject o, IsDescendantOf ShortcutController o) => IsShortcutController o Source #
Type class for types which can be safely cast to ShortcutController
, for instance with toShortcutController
.
Instances
(GObject o, IsDescendantOf ShortcutController o) => IsShortcutController o Source # | |
Defined in GI.Dazzle.Objects.ShortcutController |
toShortcutController :: (MonadIO m, IsShortcutController o) => o -> m ShortcutController Source #
Cast to ShortcutController
, 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
addCommandAction, addCommandCallback, bindProperty, bindPropertyFull, executeCommand, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, removeAccel, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getContext, getContextForPhase, getCurrentChord, getData, getManager, getProperty, getQdata, getWidget.
Setters
setContextByName, setData, setDataFull, setManager, setProperty.
addCommandAction
shortcutControllerAddCommandAction :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> Text -> [ShortcutPhase] -> Text -> m () Source #
No description available in the introspection data.
addCommandCallback
shortcutControllerAddCommandCallback :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> Text -> [ShortcutPhase] -> Callback -> m () Source #
No description available in the introspection data.
executeCommand
shortcutControllerExecuteCommand Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> Text |
|
-> m Bool | Returns: |
This method will locate and execute the command matching the id command
.
If the command is not found, False
is returned.
find
shortcutControllerFind Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a | |
-> m ShortcutController | Returns: An |
Finds the registered ShortcutController
for a widget.
The controller is created if it does not already exist.
getContext
shortcutControllerGetContext Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> m (Maybe ShortcutContext) | Returns: A |
This function gets the ShortcutController:context property, which
is the current context to dispatch events to. An ShortcutContext
is a group of keybindings that may be activated in response to a
single or series of EventKey
.
Since: 3.26
getContextForPhase
shortcutControllerGetContextForPhase Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> [ShortcutPhase] |
|
-> m (Maybe ShortcutContext) | Returns: A |
Controllers can have a different context for a particular phase, which allows them to activate different keybindings depending if the event in capture, bubble, or dispatch.
Since: 3.26
getCurrentChord
shortcutControllerGetCurrentChord Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> m (Maybe ShortcutChord) | Returns: A |
This method gets the ShortcutController:currentChord property. This is useful if you want to monitor in-progress chord building.
Note that this value will only be valid on the controller for the
toplevel widget (a Window
). Chords are not tracked at the
individual widget controller level.
getManager
shortcutControllerGetManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> m ShortcutManager | Returns: A |
Gets the ShortcutManager
associated with this controller.
Generally, this will look for the root controller's manager as mixing and matching managers in a single window hierarchy is not supported.
getWidget
shortcutControllerGetWidget Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> m Widget | Returns: the widget for the controller |
No description available in the introspection data.
Since: 3.34
new
shortcutControllerNew :: (HasCallStack, MonadIO m, IsWidget a) => a -> m ShortcutController Source #
No description available in the introspection data.
removeAccel
shortcutControllerRemoveAccel :: (HasCallStack, MonadIO m, IsShortcutController a) => a -> Text -> [ShortcutPhase] -> m () Source #
No description available in the introspection data.
setContextByName
shortcutControllerSetContextByName Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a) | |
=> a |
|
-> Maybe Text |
|
-> m () |
Changes the context for the controller to the context matching name
.
Contexts are resolved at runtime through the current theme (and possibly a parent theme if it inherits from one).
Since: 3.26
setManager
shortcutControllerSetManager Source #
Arguments
:: (HasCallStack, MonadIO m, IsShortcutController a, IsShortcutManager b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the ShortcutController:manager property.
If you set this to Nothing
, it will revert to the default ShortcutManager
for the process.
tryFind
shortcutControllerTryFind Source #
Arguments
:: (HasCallStack, MonadIO m, IsWidget a) | |
=> a | |
-> m (Maybe ShortcutController) | Returns: An |
Finds the registered ShortcutController
for a widget.
If no controller is found, Nothing
is returned.
Properties
context
No description available in the introspection data.
getShortcutControllerContext :: (MonadIO m, IsShortcutController o) => o -> m (Maybe ShortcutContext) Source #
Get the value of the “context
” property.
When overloading is enabled, this is equivalent to
get
shortcutController #context
currentChord
No description available in the introspection data.
getShortcutControllerCurrentChord :: (MonadIO m, IsShortcutController o) => o -> m (Maybe ShortcutChord) Source #
Get the value of the “current-chord
” property.
When overloading is enabled, this is equivalent to
get
shortcutController #currentChord
manager
No description available in the introspection data.
clearShortcutControllerManager :: (MonadIO m, IsShortcutController o) => o -> m () Source #
Set the value of the “manager
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#manager
constructShortcutControllerManager :: (IsShortcutController o, MonadIO m, IsShortcutManager a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “manager
” property. This is rarely needed directly, but it is used by new
.
getShortcutControllerManager :: (MonadIO m, IsShortcutController o) => o -> m ShortcutManager Source #
Get the value of the “manager
” property.
When overloading is enabled, this is equivalent to
get
shortcutController #manager
setShortcutControllerManager :: (MonadIO m, IsShortcutController o, IsShortcutManager a) => o -> a -> m () Source #
Set the value of the “manager
” property.
When overloading is enabled, this is equivalent to
set
shortcutController [ #manager:=
value ]
widget
No description available in the introspection data.
constructShortcutControllerWidget :: (IsShortcutController o, MonadIO m, IsWidget a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “widget
” property. This is rarely needed directly, but it is used by new
.
getShortcutControllerWidget :: (MonadIO m, IsShortcutController o) => o -> m Widget Source #
Get the value of the “widget
” property.
When overloading is enabled, this is equivalent to
get
shortcutController #widget
Signals
reset
type ShortcutControllerResetCallback = IO () Source #
This signal is emitted when the shortcut controller is requesting the widget to reset any state it may have regarding the shortcut controller. Such an example might be a modal system that lives outside the controller whose state should be cleared in response to the controller changing modes.
afterShortcutControllerReset :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerResetCallback) -> m SignalHandlerId Source #
Connect a signal handler for the reset signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
shortcutController #reset 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.
onShortcutControllerReset :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerResetCallback) -> m SignalHandlerId Source #
Connect a signal handler for the reset signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
shortcutController #reset callback
setContextNamed
type ShortcutControllerSetContextNamedCallback Source #
This changes the current context on the ShortcutController
to be the
context matching name
. This is found by looking up the context by name
in the active ShortcutTheme
.
afterShortcutControllerSetContextNamed :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerSetContextNamedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the setContextNamed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
shortcutController #setContextNamed 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.
onShortcutControllerSetContextNamed :: (IsShortcutController a, MonadIO m) => a -> ((?self :: a) => ShortcutControllerSetContextNamedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the setContextNamed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
shortcutController #setContextNamed callback