Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (inaki@blueleaf.cc) |
Safe Haskell | None |
Language | Haskell2010 |
No description available in the introspection data.
Synopsis
- newtype ContextMenuItem = ContextMenuItem (ManagedPtr ContextMenuItem)
- class (GObject o, IsDescendantOf ContextMenuItem o) => IsContextMenuItem o
- toContextMenuItem :: (MonadIO m, IsContextMenuItem o) => o -> m ContextMenuItem
- noContextMenuItem :: Maybe ContextMenuItem
- contextMenuItemGetAction :: (HasCallStack, MonadIO m, IsContextMenuItem a) => a -> m (Maybe Action)
- contextMenuItemGetGaction :: (HasCallStack, MonadIO m, IsContextMenuItem a) => a -> m (Maybe Action)
- contextMenuItemGetStockAction :: (HasCallStack, MonadIO m, IsContextMenuItem a) => a -> m ContextMenuAction
- contextMenuItemGetSubmenu :: (HasCallStack, MonadIO m, IsContextMenuItem a) => a -> m (Maybe ContextMenu)
- contextMenuItemIsSeparator :: (HasCallStack, MonadIO m, IsContextMenuItem a) => a -> m Bool
- contextMenuItemNew :: (HasCallStack, MonadIO m, IsAction a) => a -> m ContextMenuItem
- contextMenuItemNewFromGaction :: (HasCallStack, MonadIO m, IsAction a) => a -> Text -> Maybe GVariant -> m ContextMenuItem
- contextMenuItemNewFromStockAction :: (HasCallStack, MonadIO m) => ContextMenuAction -> m ContextMenuItem
- contextMenuItemNewFromStockActionWithLabel :: (HasCallStack, MonadIO m) => ContextMenuAction -> Text -> m ContextMenuItem
- contextMenuItemNewSeparator :: (HasCallStack, MonadIO m) => m ContextMenuItem
- contextMenuItemNewWithSubmenu :: (HasCallStack, MonadIO m, IsContextMenu a) => Text -> a -> m ContextMenuItem
- contextMenuItemSetSubmenu :: (HasCallStack, MonadIO m, IsContextMenuItem a, IsContextMenu b) => a -> Maybe b -> m ()
Exported types
newtype ContextMenuItem Source #
Memory-managed wrapper type.
Instances
GObject ContextMenuItem Source # | |
Defined in GI.WebKit2.Objects.ContextMenuItem gobjectType :: IO GType # | |
HasParentTypes ContextMenuItem Source # | |
Defined in GI.WebKit2.Objects.ContextMenuItem | |
type ParentTypes ContextMenuItem Source # | |
Defined in GI.WebKit2.Objects.ContextMenuItem |
class (GObject o, IsDescendantOf ContextMenuItem o) => IsContextMenuItem o Source #
Type class for types which can be safely cast to ContextMenuItem
, for instance with toContextMenuItem
.
Instances
(GObject o, IsDescendantOf ContextMenuItem o) => IsContextMenuItem o Source # | |
Defined in GI.WebKit2.Objects.ContextMenuItem |
toContextMenuItem :: (MonadIO m, IsContextMenuItem o) => o -> m ContextMenuItem Source #
Cast to ContextMenuItem
, for types for which this is known to be safe. For general casts, use castTo
.
noContextMenuItem :: Maybe ContextMenuItem Source #
A convenience alias for Nothing
:: Maybe
ContextMenuItem
.
Methods
getAction
contextMenuItemGetAction Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> a |
|
-> m (Maybe Action) | Returns: the |
Deprecated: (Since version 2.18)Use contextMenuItemGetGaction
instead.
Gets the action associated to item
as a Action
.
getGaction
contextMenuItemGetGaction Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> a |
|
-> m (Maybe Action) | Returns: the |
Gets the action associated to item
as a Action
.
Since: 2.18
getStockAction
contextMenuItemGetStockAction Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> a |
|
-> m ContextMenuAction | Returns: the |
Gets the ContextMenuAction
of item
. If the ContextMenuItem
was not
created for a stock action ContextMenuActionCustom
will be
returned. If the ContextMenuItem
is a separator ContextMenuActionNoAction
will be returned.
getSubmenu
contextMenuItemGetSubmenu Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> a |
|
-> m (Maybe ContextMenu) | Returns: the |
Gets the submenu of item
.
isSeparator
contextMenuItemIsSeparator Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> a |
|
-> m Bool |
Checks whether item
is a separator.
new
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> m ContextMenuItem | Returns: the newly created |
Deprecated: (Since version 2.18)Use contextMenuItemNewFromGaction
instead.
Creates a new ContextMenuItem
for the given action
.
newFromGaction
contextMenuItemNewFromGaction Source #
:: (HasCallStack, MonadIO m, IsAction a) | |
=> a |
|
-> Text |
|
-> Maybe GVariant |
|
-> m ContextMenuItem | Returns: the newly created |
Creates a new ContextMenuItem
for the given action
and label
. On activation
target
will be passed as parameter to the callback.
Since: 2.18
newFromStockAction
contextMenuItemNewFromStockAction Source #
:: (HasCallStack, MonadIO m) | |
=> ContextMenuAction |
|
-> m ContextMenuItem | Returns: the newly created |
Creates a new ContextMenuItem
for the given stock action.
Stock actions are handled automatically by WebKit so that, for example,
when a menu item created with a ContextMenuActionStop
is
activated the action associated will be handled by WebKit and the current
load operation will be stopped. You can get the Action
of a
ContextMenuItem
created with a ContextMenuAction
with
contextMenuItemGetAction
and connect to Action
::activate
signal
to be notified when the item is activated. But you can't prevent the associated
action from being performed.
newFromStockActionWithLabel
contextMenuItemNewFromStockActionWithLabel Source #
:: (HasCallStack, MonadIO m) | |
=> ContextMenuAction |
|
-> Text |
|
-> m ContextMenuItem | Returns: the newly created |
Creates a new ContextMenuItem
for the given stock action using the given label
.
Stock actions have a predefined label, this method can be used to create a
ContextMenuItem
for a ContextMenuAction
but using a custom label.
newSeparator
contextMenuItemNewSeparator Source #
:: (HasCallStack, MonadIO m) | |
=> m ContextMenuItem | Returns: the newly created |
Creates a new ContextMenuItem
representing a separator.
newWithSubmenu
contextMenuItemNewWithSubmenu Source #
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> Text |
|
-> a |
|
-> m ContextMenuItem | Returns: the newly created |
Creates a new ContextMenuItem
using the given label
with a submenu.
setSubmenu
contextMenuItemSetSubmenu Source #
:: (HasCallStack, MonadIO m, IsContextMenuItem a, IsContextMenu b) | |
=> a |
|
-> Maybe b |
|
-> m () |
Sets or replaces the item
submenu. If submenu
is Nothing
the current
submenu of item
is removed.