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 |
No description available in the introspection data.
Synopsis
- newtype KeyEvent = KeyEvent (ManagedPtr KeyEvent)
- class (BoxedPtr o, TypedObject o, IsDescendantOf KeyEvent o) => IsKeyEvent o
- toKeyEvent :: (MonadIO m, IsKeyEvent o) => o -> m KeyEvent
- keyEventGetConsumedModifiers :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m [ModifierType]
- keyEventGetKeycode :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m Word32
- keyEventGetKeyval :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m Word32
- keyEventGetLayout :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m Word32
- keyEventGetLevel :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m Word32
- keyEventGetMatch :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m (Bool, Word32, [ModifierType])
- keyEventIsModifier :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> m Bool
- keyEventMatches :: (HasCallStack, MonadIO m, IsKeyEvent a) => a -> Word32 -> [ModifierType] -> m KeyMatch
Exported types
Memory-managed wrapper type.
Instances
Eq KeyEvent Source # | |
ManagedPtrNewtype KeyEvent Source # | |
Defined in GI.Gdk.Objects.KeyEvent toManagedPtr :: KeyEvent -> ManagedPtr KeyEvent # | |
BoxedPtr KeyEvent Source # | |
Defined in GI.Gdk.Objects.KeyEvent boxedPtrCopy :: KeyEvent -> IO KeyEvent # boxedPtrFree :: KeyEvent -> IO () # | |
TypedObject KeyEvent Source # | |
Defined in GI.Gdk.Objects.KeyEvent | |
HasParentTypes KeyEvent Source # | |
Defined in GI.Gdk.Objects.KeyEvent | |
type ParentTypes KeyEvent Source # | |
Defined in GI.Gdk.Objects.KeyEvent |
class (BoxedPtr o, TypedObject o, IsDescendantOf KeyEvent o) => IsKeyEvent o Source #
Type class for types which can be safely cast to KeyEvent
, for instance with toKeyEvent
.
Instances
(BoxedPtr o, TypedObject o, IsDescendantOf KeyEvent o) => IsKeyEvent o Source # | |
Defined in GI.Gdk.Objects.KeyEvent |
toKeyEvent :: (MonadIO m, IsKeyEvent o) => o -> m KeyEvent Source #
Methods
Overloaded methods
getConsumedModifiers
keyEventGetConsumedModifiers Source #
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m [ModifierType] | Returns: the consumed modifiers or |
Extracts the consumed modifiers from a key event.
getKeycode
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m Word32 | Returns: the keycode of |
Extracts the keycode from a key event.
getKeyval
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m Word32 | Returns: the keyval of |
Extracts the keyval from a key event.
getLayout
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m Word32 | Returns: the layout of |
Extracts the layout from a key event.
getLevel
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m Word32 | Returns: the shift level of |
Extracts the shift level from a key event.
getMatch
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m (Bool, Word32, [ModifierType]) | Returns: |
Gets a keyval and modifier combination that will cause
keyEventMatches
to successfully match the given event.
isModifier
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> m Bool | Returns: |
Extracts whether the key event is for a modifier key.
matches
:: (HasCallStack, MonadIO m, IsKeyEvent a) | |
=> a |
|
-> Word32 |
|
-> [ModifierType] |
|
-> m KeyMatch | Returns: a GdkKeyMatch value describing whether |
Matches a key event against a keyboard shortcut that is specified as a keyval and modifiers. Partial matches are possible where the combination matches if the currently active group is ignored.
Note that we ignore Caps Lock for matching.