Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
GtkEventControllerKey
is an event controller that provides access
to key events.
Synopsis
- newtype EventControllerKey = EventControllerKey (ManagedPtr EventControllerKey)
- class (GObject o, IsDescendantOf EventControllerKey o) => IsEventControllerKey o
- toEventControllerKey :: (MonadIO m, IsEventControllerKey o) => o -> m EventControllerKey
- eventControllerKeyForward :: (HasCallStack, MonadIO m, IsEventControllerKey a, IsWidget b) => a -> b -> m Bool
- eventControllerKeyGetGroup :: (HasCallStack, MonadIO m, IsEventControllerKey a) => a -> m Word32
- eventControllerKeyGetImContext :: (HasCallStack, MonadIO m, IsEventControllerKey a) => a -> m (Maybe IMContext)
- eventControllerKeyNew :: (HasCallStack, MonadIO m) => m EventControllerKey
- eventControllerKeySetImContext :: (HasCallStack, MonadIO m, IsEventControllerKey a, IsIMContext b) => a -> Maybe b -> m ()
- type EventControllerKeyImUpdateCallback = IO ()
- afterEventControllerKeyImUpdate :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyImUpdateCallback) -> m SignalHandlerId
- onEventControllerKeyImUpdate :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyImUpdateCallback) -> m SignalHandlerId
- type EventControllerKeyKeyPressedCallback = Word32 -> Word32 -> [ModifierType] -> IO Bool
- afterEventControllerKeyKeyPressed :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyPressedCallback) -> m SignalHandlerId
- onEventControllerKeyKeyPressed :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyPressedCallback) -> m SignalHandlerId
- type EventControllerKeyKeyReleasedCallback = Word32 -> Word32 -> [ModifierType] -> IO ()
- afterEventControllerKeyKeyReleased :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyReleasedCallback) -> m SignalHandlerId
- onEventControllerKeyKeyReleased :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyReleasedCallback) -> m SignalHandlerId
- type EventControllerKeyModifiersCallback = [ModifierType] -> IO Bool
- afterEventControllerKeyModifiers :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyModifiersCallback) -> m SignalHandlerId
- onEventControllerKeyModifiers :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyModifiersCallback) -> m SignalHandlerId
Exported types
newtype EventControllerKey Source #
Memory-managed wrapper type.
Instances
Eq EventControllerKey Source # | |
Defined in GI.Gtk.Objects.EventControllerKey (==) :: EventControllerKey -> EventControllerKey -> Bool # (/=) :: EventControllerKey -> EventControllerKey -> Bool # | |
GObject EventControllerKey Source # | |
Defined in GI.Gtk.Objects.EventControllerKey | |
ManagedPtrNewtype EventControllerKey Source # | |
TypedObject EventControllerKey Source # | |
Defined in GI.Gtk.Objects.EventControllerKey | |
HasParentTypes EventControllerKey Source # | |
Defined in GI.Gtk.Objects.EventControllerKey | |
IsGValue (Maybe EventControllerKey) Source # | Convert |
Defined in GI.Gtk.Objects.EventControllerKey gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe EventControllerKey -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe EventControllerKey) # | |
type ParentTypes EventControllerKey Source # | |
Defined in GI.Gtk.Objects.EventControllerKey |
class (GObject o, IsDescendantOf EventControllerKey o) => IsEventControllerKey o Source #
Type class for types which can be safely cast to EventControllerKey
, for instance with toEventControllerKey
.
Instances
(GObject o, IsDescendantOf EventControllerKey o) => IsEventControllerKey o Source # | |
Defined in GI.Gtk.Objects.EventControllerKey |
toEventControllerKey :: (MonadIO m, IsEventControllerKey o) => o -> m EventControllerKey Source #
Cast to EventControllerKey
, 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, forward, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, reset, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCurrentEvent, getCurrentEventDevice, getCurrentEventState, getCurrentEventTime, getData, getGroup, getImContext, getName, getPropagationLimit, getPropagationPhase, getProperty, getQdata, getWidget.
Setters
setData, setDataFull, setImContext, setName, setPropagationLimit, setPropagationPhase, setProperty, setStaticName.
forward
eventControllerKeyForward Source #
:: (HasCallStack, MonadIO m, IsEventControllerKey a, IsWidget b) | |
=> a |
|
-> b |
|
-> m Bool | Returns: whether the |
Forwards the current event of this controller
to a widget
.
This function can only be used in handlers for the EventControllerKey::keyPressed, EventControllerKey::keyReleased or EventControllerKey::modifiers signals.
getGroup
eventControllerKeyGetGroup Source #
:: (HasCallStack, MonadIO m, IsEventControllerKey a) | |
=> a |
|
-> m Word32 | Returns: the key group |
Gets the key group of the current event of this controller
.
See keyEventGetLayout
.
getImContext
eventControllerKeyGetImContext Source #
:: (HasCallStack, MonadIO m, IsEventControllerKey a) | |
=> a |
|
-> m (Maybe IMContext) | Returns: the |
Gets the input method context of the key controller
.
new
eventControllerKeyNew Source #
:: (HasCallStack, MonadIO m) | |
=> m EventControllerKey | Returns: a new |
Creates a new event controller that will handle key events.
setImContext
eventControllerKeySetImContext Source #
:: (HasCallStack, MonadIO m, IsEventControllerKey a, IsIMContext b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets the input method context of the key controller
.
Signals
imUpdate
type EventControllerKeyImUpdateCallback = IO () Source #
Emitted whenever the input method context filters away
a keypress and prevents the controller
receiving it.
See eventControllerKeySetImContext
and
iMContextFilterKeypress
.
afterEventControllerKeyImUpdate :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyImUpdateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the imUpdate signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
eventControllerKey #imUpdate 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.
onEventControllerKeyImUpdate :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyImUpdateCallback) -> m SignalHandlerId Source #
Connect a signal handler for the imUpdate signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
eventControllerKey #imUpdate callback
keyPressed
type EventControllerKeyKeyPressedCallback Source #
= Word32 |
|
-> Word32 |
|
-> [ModifierType] |
|
-> IO Bool | Returns: |
Emitted whenever a key is pressed.
afterEventControllerKeyKeyPressed :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyPressedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keyPressed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
eventControllerKey #keyPressed 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.
onEventControllerKeyKeyPressed :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyPressedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keyPressed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
eventControllerKey #keyPressed callback
keyReleased
type EventControllerKeyKeyReleasedCallback Source #
= Word32 |
|
-> Word32 |
|
-> [ModifierType] |
|
-> IO () |
Emitted whenever a key is released.
afterEventControllerKeyKeyReleased :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyReleasedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keyReleased signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
eventControllerKey #keyReleased 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.
onEventControllerKeyKeyReleased :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyKeyReleasedCallback) -> m SignalHandlerId Source #
Connect a signal handler for the keyReleased signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
eventControllerKey #keyReleased callback
modifiers
type EventControllerKeyModifiersCallback Source #
= [ModifierType] |
|
-> IO Bool | Returns: whether to ignore modifiers |
Emitted whenever the state of modifier keys and pointer buttons change.
afterEventControllerKeyModifiers :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyModifiersCallback) -> m SignalHandlerId Source #
Connect a signal handler for the modifiers signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
eventControllerKey #modifiers 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.
onEventControllerKeyModifiers :: (IsEventControllerKey a, MonadIO m) => a -> ((?self :: a) => EventControllerKeyModifiersCallback) -> m SignalHandlerId Source #
Connect a signal handler for the modifiers signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
eventControllerKey #modifiers callback