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

Contents

- Exported types
- Methods
  - new

Description

Invokes a callback.

Synopsis

- newtype CallbackAction = CallbackAction (ManagedPtr CallbackAction)
- class (GObject o, IsDescendantOf CallbackAction o) => IsCallbackAction o
- toCallbackAction :: (MonadIO m, IsCallbackAction o) => o -> m CallbackAction
- callbackActionNew :: (HasCallStack, MonadIO m) => ShortcutFunc -> m CallbackAction

# Exported types

newtype CallbackAction Source #

Memory-managed wrapper type.

Constructors

CallbackAction (ManagedPtr CallbackAction) |

#### Instances

Instances details

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

class (GObject o, IsDescendantOf CallbackAction o) => IsCallbackAction o Source #

Type class for types which can be safely cast to `CallbackAction`, for instance with `toCallbackAction`.

#### Instances

Instances details

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

toCallbackAction :: (MonadIO m, IsCallbackAction o) => o -> m CallbackAction Source #

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

activate, bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, print, ref, refSink, runDispose, stealData, stealQdata, thawNotify, toString, unref, watchClosure.

#### Getters

getData, getProperty, getQdata.

#### Setters

setData, setDataFull, setProperty.

## new

callbackActionNew Source #

Arguments

:: (HasCallStack, MonadIO m) |
=> ShortcutFunc | `callback`: the callback to call when the action is activated
-> m CallbackAction | Returns: A new shortcut action

Create a custom action that calls the given `callback` when activated.