gi-dazzle-1.0.2: libdazzle bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Dazzle.Objects.ShortcutController

Description

No description available in the introspection data.

Synopsis

Exported types

newtype ShortcutController Source #

Memory-managed wrapper type.

Constructors

ShortcutController (ManagedPtr ShortcutController) 

Instances

Instances details
Eq ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

GObject ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

ManagedPtrNewtype ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

TypedObject ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

Methods

glibType :: IO GType

HasParentTypes ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

IsGValue (Maybe ShortcutController) Source #

Convert ShortcutController to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.Dazzle.Objects.ShortcutController

type ParentTypes ShortcutController Source # 
Instance details

Defined in GI.Dazzle.Objects.ShortcutController

type ParentTypes ShortcutController = '[Object]

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

Instances details
(GObject o, IsDescendantOf ShortcutController o) => IsShortcutController o Source # 
Instance details

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

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

self: a ShortcutController

-> Text

command: the id of the command

-> m Bool

Returns: True if the command was found and executed.

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 ShortcutController or Nothing.

Finds the registered ShortcutController for a widget.

The controller is created if it does not already exist.

getContext

shortcutControllerGetContext Source #

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

self: a ShortcutController

-> [ShortcutPhase]

phase: the phase for the shorcut delivery

-> m (Maybe ShortcutContext)

Returns: A ShortcutContext or Nothing.

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 #

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 #

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

self: a ShortcutController

-> 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

self: a ShortcutController

-> Maybe Text

name: The name of the context

-> 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

self: a ShortcutController

-> Maybe b

manager: A ShortcutManager or Nothing

-> 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 ShortcutController or Nothing.

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 #

Arguments

 = Text

name: The name of the context

-> IO () 

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