gi-gtk4-4.0.12: Gtk 4.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gtk.Objects.KeyvalTrigger

Contents

- Exported types
- Methods
  - getKeyval
  - getModifiers
  - new
- Properties
  - keyval
  - modifiers

Description

Triggers when a specific keyval and modifiers are pressed.

Synopsis

- newtype KeyvalTrigger = KeyvalTrigger (ManagedPtr KeyvalTrigger)
- class (GObject o, IsDescendantOf KeyvalTrigger o) => IsKeyvalTrigger o
- toKeyvalTrigger :: (MonadIO m, IsKeyvalTrigger o) => o -> m KeyvalTrigger
- keyvalTriggerGetKeyval :: (HasCallStack, MonadIO m, IsKeyvalTrigger a) => a -> m Word32
- keyvalTriggerGetModifiers :: (HasCallStack, MonadIO m, IsKeyvalTrigger a) => a -> m [ModifierType]
- keyvalTriggerNew :: (HasCallStack, MonadIO m) => Word32 -> [ModifierType] -> m KeyvalTrigger
- constructKeyvalTriggerKeyval :: (IsKeyvalTrigger o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getKeyvalTriggerKeyval :: (MonadIO m, IsKeyvalTrigger o) => o -> m Word32
- constructKeyvalTriggerModifiers :: (IsKeyvalTrigger o, MonadIO m) => [ModifierType] -> m (GValueConstruct o)
- getKeyvalTriggerModifiers :: (MonadIO m, IsKeyvalTrigger o) => o -> m [ModifierType]

# Exported types

newtype KeyvalTrigger Source #

Memory-managed wrapper type.

Constructors

KeyvalTrigger (ManagedPtr KeyvalTrigger) |

#### Instances

Instances details

Eq KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger Methods (==) :: KeyvalTrigger -> KeyvalTrigger -> Bool Source # (/=) :: KeyvalTrigger -> KeyvalTrigger -> Bool Source #
GObject KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger
ManagedPtrNewtype KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger Methods toManagedPtr :: KeyvalTrigger -> ManagedPtr KeyvalTrigger Source #
TypedObject KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger Methods glibType :: IO GType Source #
HasParentTypes KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger
IsGValue (Maybe KeyvalTrigger) Source # | Convert `KeyvalTrigger` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe KeyvalTrigger -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe KeyvalTrigger) Source #
type ParentTypes KeyvalTrigger Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger type ParentTypes KeyvalTrigger = '[ShortcutTrigger, Object]

class (GObject o, IsDescendantOf KeyvalTrigger o) => IsKeyvalTrigger o Source #

Type class for types which can be safely cast to `KeyvalTrigger`, for instance with `toKeyvalTrigger`.

#### Instances

Instances details

(GObject o, IsDescendantOf KeyvalTrigger o) => IsKeyvalTrigger o Source # |
Instance details Defined in GI.Gtk.Objects.KeyvalTrigger

toKeyvalTrigger :: (MonadIO m, IsKeyvalTrigger o) => o -> m KeyvalTrigger Source #

Cast to `KeyvalTrigger`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, compare, equal, forceFloating, freezeNotify, getv, hash, isFloating, notify, notifyByPspec, print, printLabel, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toLabel, toString, trigger, unref, watchClosure.

#### Getters

getData, getKeyval, getModifiers, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getKeyval

keyvalTriggerGetKeyval Source #

Arguments

:: (HasCallStack, MonadIO m, IsKeyvalTrigger a) |
=> a | `self`: a keyval `GtkShortcutTrigger`
-> m Word32 | Returns: the keyval

Gets the keyval that must be pressed to succeed triggering `self`.

## getModifiers

keyvalTriggerGetModifiers Source #

Arguments

:: (HasCallStack, MonadIO m, IsKeyvalTrigger a) |
=> a | `self`: a keyval `GtkShortcutTrigger`
-> m [ModifierType] | Returns: the modifiers

Gets the modifiers that must be present to succeed triggering `self`.

## new

keyvalTriggerNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `keyval`: The keyval to trigger for
-> [ModifierType] | `modifiers`: the modifiers that need to be present
-> m KeyvalTrigger | Returns: A new `GtkShortcutTrigger`

Creates a `GtkShortcutTrigger` that will trigger whenever the key with the given `keyval` and `modifiers` is pressed.

# Properties

## keyval

The key value for the trigger.

constructKeyvalTriggerKeyval :: (IsKeyvalTrigger o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`keyval`” property. This is rarely needed directly, but it is used by `new`.

getKeyvalTriggerKeyval :: (MonadIO m, IsKeyvalTrigger o) => o -> m Word32 Source #

Get the value of the “`keyval`” property. When overloading is enabled, this is equivalent to

    get keyvalTrigger #keyval

## modifiers

The key modifiers for the trigger.

constructKeyvalTriggerModifiers :: (IsKeyvalTrigger o, MonadIO m) => [ModifierType] -> m (GValueConstruct o) Source #

Construct a `GValueConstruct` with valid value for the “`modifiers`” property. This is rarely needed directly, but it is used by `new`.

getKeyvalTriggerModifiers :: (MonadIO m, IsKeyvalTrigger o) => o -> m [ModifierType] Source #

Get the value of the “`modifiers`” property. When overloading is enabled, this is equivalent to

    get keyvalTrigger #modifiers