| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte | 
|---|---|
| License | LGPL-2.1 | 
| Maintainer | Iñaki García Etxebarria | 
| Safe Haskell | Safe-Inferred | 
| Language | Haskell2010 | 
GI.Gtk.Objects.Shortcut
Description
GtkShortcut is the low level object used for managing keyboard shortcuts.
It contains a description of how to trigger the shortcut via a
 ShortcutTrigger and a way to activate the shortcut on a widget
 via ShortcutAction.
The actual work is usually done via ShortcutController, which
 decides if and when to activate a shortcut. Using that controller
 directly however is rarely necessary as various higher level
 convenience APIs exist on GtkWidgets that make it easier to use
 shortcuts in GTK.
Shortcut does provide functionality to make it easy for users
 to work with shortcuts, either by providing informational strings
 for display purposes or by allowing shortcuts to be configured.
Synopsis
- newtype Shortcut = Shortcut (ManagedPtr Shortcut)
- class (GObject o, IsDescendantOf Shortcut o) => IsShortcut o
- toShortcut :: (MonadIO m, IsShortcut o) => o -> m Shortcut
- shortcutGetAction :: (HasCallStack, MonadIO m, IsShortcut a) => a -> m (Maybe ShortcutAction)
- shortcutGetArguments :: (HasCallStack, MonadIO m, IsShortcut a) => a -> m (Maybe GVariant)
- shortcutGetTrigger :: (HasCallStack, MonadIO m, IsShortcut a) => a -> m (Maybe ShortcutTrigger)
- shortcutNew :: (HasCallStack, MonadIO m, IsShortcutTrigger a, IsShortcutAction b) => Maybe a -> Maybe b -> m Shortcut
- shortcutSetAction :: (HasCallStack, MonadIO m, IsShortcut a, IsShortcutAction b) => a -> Maybe b -> m ()
- shortcutSetArguments :: (HasCallStack, MonadIO m, IsShortcut a) => a -> Maybe GVariant -> m ()
- shortcutSetTrigger :: (HasCallStack, MonadIO m, IsShortcut a, IsShortcutTrigger b) => a -> Maybe b -> m ()
- clearShortcutAction :: (MonadIO m, IsShortcut o) => o -> m ()
- constructShortcutAction :: (IsShortcut o, MonadIO m, IsShortcutAction a) => a -> m (GValueConstruct o)
- getShortcutAction :: (MonadIO m, IsShortcut o) => o -> m (Maybe ShortcutAction)
- setShortcutAction :: (MonadIO m, IsShortcut o, IsShortcutAction a) => o -> a -> m ()
- clearShortcutArguments :: (MonadIO m, IsShortcut o) => o -> m ()
- constructShortcutArguments :: (IsShortcut o, MonadIO m) => GVariant -> m (GValueConstruct o)
- getShortcutArguments :: (MonadIO m, IsShortcut o) => o -> m (Maybe GVariant)
- setShortcutArguments :: (MonadIO m, IsShortcut o) => o -> GVariant -> m ()
- clearShortcutTrigger :: (MonadIO m, IsShortcut o) => o -> m ()
- constructShortcutTrigger :: (IsShortcut o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o)
- getShortcutTrigger :: (MonadIO m, IsShortcut o) => o -> m (Maybe ShortcutTrigger)
- setShortcutTrigger :: (MonadIO m, IsShortcut o, IsShortcutTrigger a) => o -> a -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq Shortcut Source # | |
| GObject Shortcut Source # | |
| Defined in GI.Gtk.Objects.Shortcut | |
| ManagedPtrNewtype Shortcut Source # | |
| Defined in GI.Gtk.Objects.Shortcut Methods toManagedPtr :: Shortcut -> ManagedPtr Shortcut | |
| TypedObject Shortcut Source # | |
| Defined in GI.Gtk.Objects.Shortcut | |
| HasParentTypes Shortcut Source # | |
| Defined in GI.Gtk.Objects.Shortcut | |
| IsGValue (Maybe Shortcut) Source # | Convert  | 
| Defined in GI.Gtk.Objects.Shortcut Methods gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Shortcut -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Shortcut) | |
| type ParentTypes Shortcut Source # | |
| Defined in GI.Gtk.Objects.Shortcut | |
class (GObject o, IsDescendantOf Shortcut o) => IsShortcut o Source #
Type class for types which can be safely cast to Shortcut, for instance with toShortcut.
Instances
| (GObject o, IsDescendantOf Shortcut o) => IsShortcut o Source # | |
| Defined in GI.Gtk.Objects.Shortcut | |
toShortcut :: (MonadIO m, IsShortcut o) => o -> m Shortcut Source #
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getAction, getArguments, getData, getProperty, getQdata, getTrigger.
Setters
setAction, setArguments, setData, setDataFull, setProperty, setTrigger.
getAction
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a) | |
| => a | 
 | 
| -> m (Maybe ShortcutAction) | Returns: the action | 
Gets the action that is activated by this shortcut.
getArguments
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a) | |
| => a | 
 | 
| -> m (Maybe GVariant) | Returns: the arguments | 
Gets the arguments that are passed when activating the shortcut.
getTrigger
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a) | |
| => a | 
 | 
| -> m (Maybe ShortcutTrigger) | Returns: the trigger used | 
Gets the trigger used to trigger self.
new
Arguments
| :: (HasCallStack, MonadIO m, IsShortcutTrigger a, IsShortcutAction b) | |
| => Maybe a | 
 | 
| -> Maybe b | 
 | 
| -> m Shortcut | Returns: a new  | 
Creates a new Shortcut that is triggered by trigger and then activates
 action.
setAction
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a, IsShortcutAction b) | |
| => a | 
 | 
| -> Maybe b | 
 | 
| -> m () | 
Sets the new action for self to be action.
setArguments
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a) | |
| => a | 
 | 
| -> Maybe GVariant | 
 | 
| -> m () | 
Sets the arguments to pass when activating the shortcut.
setTrigger
Arguments
| :: (HasCallStack, MonadIO m, IsShortcut a, IsShortcutTrigger b) | |
| => a | 
 | 
| -> Maybe b | 
 | 
| -> m () | 
Sets the new trigger for self to be trigger.
Properties
action
The action that gets activated by this shortcut.
clearShortcutAction :: (MonadIO m, IsShortcut o) => o -> m () Source #
Set the value of the “action” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #action
constructShortcutAction :: (IsShortcut o, MonadIO m, IsShortcutAction a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “action” property. This is rarely needed directly, but it is used by new.
getShortcutAction :: (MonadIO m, IsShortcut o) => o -> m (Maybe ShortcutAction) Source #
Get the value of the “action” property.
 When overloading is enabled, this is equivalent to
get shortcut #action
setShortcutAction :: (MonadIO m, IsShortcut o, IsShortcutAction a) => o -> a -> m () Source #
Set the value of the “action” property.
 When overloading is enabled, this is equivalent to
setshortcut [ #action:=value ]
arguments
Arguments passed to activation.
clearShortcutArguments :: (MonadIO m, IsShortcut o) => o -> m () Source #
Set the value of the “arguments” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #arguments
constructShortcutArguments :: (IsShortcut o, MonadIO m) => GVariant -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “arguments” property. This is rarely needed directly, but it is used by new.
getShortcutArguments :: (MonadIO m, IsShortcut o) => o -> m (Maybe GVariant) Source #
Get the value of the “arguments” property.
 When overloading is enabled, this is equivalent to
get shortcut #arguments
setShortcutArguments :: (MonadIO m, IsShortcut o) => o -> GVariant -> m () Source #
Set the value of the “arguments” property.
 When overloading is enabled, this is equivalent to
setshortcut [ #arguments:=value ]
trigger
The trigger that triggers this shortcut.
clearShortcutTrigger :: (MonadIO m, IsShortcut o) => o -> m () Source #
Set the value of the “trigger” property to Nothing.
 When overloading is enabled, this is equivalent to
clear #trigger
constructShortcutTrigger :: (IsShortcut o, MonadIO m, IsShortcutTrigger a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct with valid value for the “trigger” property. This is rarely needed directly, but it is used by new.
getShortcutTrigger :: (MonadIO m, IsShortcut o) => o -> m (Maybe ShortcutTrigger) Source #
Get the value of the “trigger” property.
 When overloading is enabled, this is equivalent to
get shortcut #trigger
setShortcutTrigger :: (MonadIO m, IsShortcut o, IsShortcutTrigger a) => o -> a -> m () Source #
Set the value of the “trigger” property.
 When overloading is enabled, this is equivalent to
setshortcut [ #trigger:=value ]