gi-webkit2-4.0.21: WebKit2 bindings

CopyrightWill Thompson Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (inaki@blueleaf.cc)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Objects.ContextMenuItem

Contents

Description

No description available in the introspection data.

Synopsis

Exported types

class (GObject o, IsDescendantOf ContextMenuItem o) => IsContextMenuItem o Source #

Type class for types which can be safely cast to ContextMenuItem, for instance with toContextMenuItem.

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.

Methods

getAction

contextMenuItemGetAction Source #

Arguments

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

item: a ContextMenuItem

-> m (Maybe Action)

Returns: the Action associated to the ContextMenuItem, or Nothing if item is a separator.

Deprecated: (Since version 2.18)Use contextMenuItemGetGaction instead.

Gets the action associated to item as a Action.

getGaction

contextMenuItemGetGaction Source #

Arguments

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

item: a ContextMenuItem

-> m (Maybe Action)

Returns: the Action associated to the ContextMenuItem, or Nothing if item is a separator.

Gets the action associated to item as a Action.

Since: 2.18

getStockAction

contextMenuItemGetStockAction Source #

Arguments

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

item: a ContextMenuItem

-> m ContextMenuAction

Returns: the ContextMenuAction of item

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 #

Arguments

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

item: a ContextMenuItem

-> m (Maybe ContextMenu)

Returns: the ContextMenu representing the submenu of item or Nothing if item doesn't have a submenu.

Gets the submenu of item.

isSeparator

contextMenuItemIsSeparator Source #

Arguments

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

item: a ContextMenuItem

-> m Bool

Returns: True is item is a separator or False otherwise

Checks whether item is a separator.

new

contextMenuItemNew Source #

Arguments

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

action: a Action

-> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

Deprecated: (Since version 2.18)Use contextMenuItemNewFromGaction instead.

Creates a new ContextMenuItem for the given action.

newFromGaction

contextMenuItemNewFromGaction Source #

Arguments

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

action: a Action

-> Text

label: the menu item label text

-> Maybe GVariant

target: a GVariant to use as the action target

-> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> ContextMenuAction

action: a ContextMenuAction stock action

-> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> ContextMenuAction

action: a ContextMenuAction stock action

-> Text

label: a custom label text to use instead of the predefined one

-> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

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 #

Arguments

:: (HasCallStack, MonadIO m) 
=> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

Creates a new ContextMenuItem representing a separator.

newWithSubmenu

contextMenuItemNewWithSubmenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsContextMenu a) 
=> Text

label: the menu item label text

-> a

submenu: a ContextMenu to set

-> m ContextMenuItem

Returns: the newly created ContextMenuItem object.

Creates a new ContextMenuItem using the given label with a submenu.

setSubmenu

contextMenuItemSetSubmenu Source #

Arguments

:: (HasCallStack, MonadIO m, IsContextMenuItem a, IsContextMenu b) 
=> a

item: a ContextMenuItem

-> Maybe b

submenu: a ContextMenu

-> m () 

Sets or replaces the item submenu. If submenu is Nothing the current submenu of item is removed.