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

Contents

- Exported types
- Methods
  - getFirst
  - getSecond
  - new
  - newv
- Properties
  - first
  - second

Description

Combines two shortcut triggers.

The `GtkAlternativeTrigger` triggers when either of the two trigger.

This can be cascaded to combine more than two triggers.

Synopsis

- newtype AlternativeTrigger = AlternativeTrigger (ManagedPtr AlternativeTrigger)
- class (GObject o, IsDescendantOf AlternativeTrigger o) => IsAlternativeTrigger o
- toAlternativeTrigger :: (MonadIO m, IsAlternativeTrigger o) => o -> m AlternativeTrigger
- alternativeTriggerGetFirst :: (HasCallStack, MonadIO m, IsAlternativeTrigger a) => a -> m ShortcutTrigger
- alternativeTriggerGetSecond :: (HasCallStack, MonadIO m, IsAlternativeTrigger a) => a -> m ShortcutTrigger
- alternativeTriggerNew :: (HasCallStack, MonadIO m, IsShortcutTrigger a, IsShortcutTrigger b) => a -> b -> m AlternativeTrigger
- alternativeTriggerNewv :: (HasCallStack, MonadIO m) => [ShortcutTrigger] -> m AlternativeTrigger
- constructAlternativeTriggerFirst :: (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o)
- getAlternativeTriggerFirst :: (MonadIO m, IsAlternativeTrigger o) => o -> m ShortcutTrigger
- constructAlternativeTriggerSecond :: (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o)
- getAlternativeTriggerSecond :: (MonadIO m, IsAlternativeTrigger o) => o -> m ShortcutTrigger

# Exported types

newtype AlternativeTrigger Source #

Memory-managed wrapper type.

Constructors

AlternativeTrigger (ManagedPtr AlternativeTrigger) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf AlternativeTrigger o) => IsAlternativeTrigger o Source #

Type class for types which can be safely cast to `AlternativeTrigger`, for instance with `toAlternativeTrigger`.

#### Instances

Instances details

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

toAlternativeTrigger :: (MonadIO m, IsAlternativeTrigger o) => o -> m AlternativeTrigger Source #

Cast to `AlternativeTrigger`, 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, itemsChanged, notify, notifyByPspec, print, printLabel, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toLabel, toString, trigger, unref, watchClosure.

#### Getters

getData, getFirst, getItem, getItemType, getNItems, getProperty, getQdata, getSecond.

#### Setters

setData, setDataFull, setProperty.

## getFirst

alternativeTriggerGetFirst Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlternativeTrigger a) |
=> a | `self`: an alternative `GtkShortcutTrigger`
-> m ShortcutTrigger | Returns: the first alternative trigger

Gets the first of the two alternative triggers that may trigger `self`.

`alternativeTriggerGetSecond` will return the other one.

## getSecond

alternativeTriggerGetSecond Source #

Arguments

:: (HasCallStack, MonadIO m, IsAlternativeTrigger a) |
=> a | `self`: an alternative `GtkShortcutTrigger`
-> m ShortcutTrigger | Returns: the second alternative trigger

Gets the second of the two alternative triggers that may trigger `self`.

`alternativeTriggerGetFirst` will return the other one.

## new

alternativeTriggerNew Source #

Arguments

:: (HasCallStack, MonadIO m, IsShortcutTrigger a, IsShortcutTrigger b) |
=> a | `first`: The first trigger that may trigger
-> b | `second`: The second trigger that may trigger
-> m AlternativeTrigger | Returns: a new `GtkShortcutTrigger`

Creates a `GtkShortcutTrigger` that will trigger whenever either of the two given triggers gets triggered.

Note that nesting is allowed, so if you want more than two alternative, create a new alternative trigger for each option.

## newv

alternativeTriggerNewv Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> [ShortcutTrigger] | `triggers`: the triggers
-> m AlternativeTrigger | Returns: a new `GtkShortcutTrigger`

Creates a `GtkShortcutTrigger` that will trigger whenever any of the given triggers gets triggered.

Since: 4.24

# Properties

## first

The first `GtkShortcutTrigger` to check.

constructAlternativeTriggerFirst :: (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o) Source #

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

getAlternativeTriggerFirst :: (MonadIO m, IsAlternativeTrigger o) => o -> m ShortcutTrigger Source #

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

    get alternativeTrigger #first

## second

The second `GtkShortcutTrigger` to check.

constructAlternativeTriggerSecond :: (IsAlternativeTrigger o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o) Source #

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

getAlternativeTriggerSecond :: (MonadIO m, IsAlternativeTrigger o) => o -> m ShortcutTrigger Source #

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

    get alternativeTrigger #second