gi-gtk-4.0.5: Gtk bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.Gtk.Objects.NamedAction

Description

A GtkShortcutAction that activates an action by name.

Synopsis

Exported types

class (GObject o, IsDescendantOf NamedAction o) => IsNamedAction o Source #

Type class for types which can be safely cast to NamedAction, for instance with toNamedAction.

Instances

Instances details
(GObject o, IsDescendantOf NamedAction o) => IsNamedAction o Source # 
Instance details

Defined in GI.Gtk.Objects.NamedAction

toNamedAction :: (MonadIO m, IsNamedAction o) => o -> m NamedAction Source #

Cast to NamedAction, for types for which this is known to be safe. For general casts, use castTo.

Methods

getActionName

namedActionGetActionName Source #

Arguments

:: (HasCallStack, MonadIO m, IsNamedAction a) 
=> a

self: a named action

-> m Text

Returns: the name of the action to activate

Returns the name of the action that will be activated.

new

namedActionNew Source #

Arguments

:: (HasCallStack, MonadIO m) 
=> Text

name: the detailed name of the action

-> m NamedAction

Returns: a new GtkShortcutAction

Creates an action that when activated, activates the named action on the widget.

It also passes the given arguments to it.

See widgetInsertActionGroup for how to add actions to widgets.

Properties

actionName

The name of the action to activate.

constructNamedActionActionName :: (IsNamedAction o, MonadIO m) => Text -> m (GValueConstruct o) Source #

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

getNamedActionActionName :: (MonadIO m, IsNamedAction o) => o -> m Text Source #

Get the value of the “action-name” property. When overloading is enabled, this is equivalent to

get namedAction #actionName