Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A ShortcutAction
that activates an action by name.
Synopsis
- newtype NamedAction = NamedAction (ManagedPtr NamedAction)
- class (GObject o, IsDescendantOf NamedAction o) => IsNamedAction o
- toNamedAction :: (MonadIO m, IsNamedAction o) => o -> m NamedAction
- namedActionGetActionName :: (HasCallStack, MonadIO m, IsNamedAction a) => a -> m Text
- namedActionNew :: (HasCallStack, MonadIO m) => Text -> m NamedAction
- constructNamedActionActionName :: (IsNamedAction o, MonadIO m) => Text -> m (GValueConstruct o)
- getNamedActionActionName :: (MonadIO m, IsNamedAction o) => o -> m Text
Exported types
newtype NamedAction Source #
Memory-managed wrapper type.
Instances
Eq NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction (==) :: NamedAction -> NamedAction -> Bool # (/=) :: NamedAction -> NamedAction -> Bool # | |
IsGValue NamedAction Source # | Convert |
Defined in GI.Gtk.Objects.NamedAction toGValue :: NamedAction -> IO GValue # fromGValue :: GValue -> IO NamedAction # | |
ManagedPtrNewtype NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction | |
TypedObject NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction | |
GObject NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction | |
HasParentTypes NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction | |
type ParentTypes NamedAction Source # | |
Defined in GI.Gtk.Objects.NamedAction |
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
(GObject o, IsDescendantOf NamedAction o) => IsNamedAction o Source # | |
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
Overloaded methods
getActionName
namedActionGetActionName Source #
:: (HasCallStack, MonadIO m, IsNamedAction a) | |
=> a |
|
-> m Text | Returns: the name of the action to activate |
Returns the name of the action that will be activated.
new
:: (HasCallStack, MonadIO m) | |
=> Text |
|
-> m NamedAction | Returns: a new |
Creates an action that when activated, activates the action given by
the detailed name
on the widget passing 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