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

Contents

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

Description

Triggers when a specific mnemonic is pressed.

Mnemonics require a *mnemonic modifier* (typically <kbd>Alt</kbd>) to be pressed together with the mnemonic key.

Synopsis

- newtype MnemonicTrigger = MnemonicTrigger (ManagedPtr MnemonicTrigger)
- class (GObject o, IsDescendantOf MnemonicTrigger o) => IsMnemonicTrigger o
- toMnemonicTrigger :: (MonadIO m, IsMnemonicTrigger o) => o -> m MnemonicTrigger
- mnemonicTriggerGetKeyval :: (HasCallStack, MonadIO m, IsMnemonicTrigger a) => a -> m Word32
- mnemonicTriggerNew :: (HasCallStack, MonadIO m) => Word32 -> m MnemonicTrigger
- constructMnemonicTriggerKeyval :: (IsMnemonicTrigger o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getMnemonicTriggerKeyval :: (MonadIO m, IsMnemonicTrigger o) => o -> m Word32

# Exported types

newtype MnemonicTrigger Source #

Memory-managed wrapper type.

Constructors

MnemonicTrigger (ManagedPtr MnemonicTrigger) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf MnemonicTrigger o) => IsMnemonicTrigger o Source #

Type class for types which can be safely cast to `MnemonicTrigger`, for instance with `toMnemonicTrigger`.

#### Instances

Instances details

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

toMnemonicTrigger :: (MonadIO m, IsMnemonicTrigger o) => o -> m MnemonicTrigger Source #

Cast to `MnemonicTrigger`, 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, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## getKeyval

mnemonicTriggerGetKeyval Source #

Arguments

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

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

## new

mnemonicTriggerNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> Word32 | `keyval`: The keyval to trigger for
-> m MnemonicTrigger | Returns: A new `GtkShortcutTrigger`

Creates a `GtkShortcutTrigger` that will trigger whenever the key with the given `keyval` is pressed and mnemonics have been activated.

Mnemonics are activated by calling code when a key event with the right modifiers is detected.

# Properties

## keyval

The key value for the trigger.

constructMnemonicTriggerKeyval :: (IsMnemonicTrigger 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`.

getMnemonicTriggerKeyval :: (MonadIO m, IsMnemonicTrigger o) => o -> m Word32 Source #

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

    get mnemonicTrigger #keyval