gi-webkit2-4.0.11: WebKit2 bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.WebKit2.Objects.ContextMenu

Contents

Description

 

Synopsis

Exported types

Methods

append

contextMenuAppend Source #

Arguments

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

menu: a ContextMenu

-> b

item: the ContextMenuItem to add

-> m () 

Adds item at the end of the menu.

first

contextMenuFirst Source #

Arguments

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

menu: a ContextMenu

-> m ContextMenuItem

Returns: the first ContextMenuItem of menu, or Nothing if the ContextMenu is empty.

Gets the first item in the menu.

getItemAtPosition

contextMenuGetItemAtPosition Source #

Arguments

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

menu: a ContextMenu

-> Word32

position: the position of the item, counting from 0

-> m ContextMenuItem

Returns: the ContextMenuItem at position position in menu, or Nothing if the position is off the end of the menu.

Gets the item at the given position in the menu.

getItems

contextMenuGetItems Source #

Arguments

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

menu: a ContextMenu

-> m [ContextMenuItem]

Returns: a List of ContextMenuItem<!-- -->s

Returns the item list of menu.

getNItems

contextMenuGetNItems Source #

Arguments

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

menu: a ContextMenu

-> m Word32

Returns: the number of ContextMenuItem<!-- -->s in menu

Gets the length of the menu.

getUserData

contextMenuGetUserData Source #

Arguments

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

menu: a ContextMenu

-> m GVariant

Returns: the user data of menu, or Nothing if menu doesn't have user data

Gets the user data of menu. This function can be used from the UI Process to get user data previously set from the Web Process with contextMenuSetUserData.

Since: 2.8

insert

contextMenuInsert Source #

Arguments

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

menu: a ContextMenu

-> b

item: the ContextMenuItem to add

-> Int32

position: the position to insert the item

-> m () 

Inserts item into the menu at the given position. If position is negative, or is larger than the number of items in the ContextMenu, the item is added on to the end of the menu. The first position is 0.

last

contextMenuLast Source #

Arguments

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

menu: a ContextMenu

-> m ContextMenuItem

Returns: the last ContextMenuItem of menu, or Nothing if the ContextMenu is empty.

Gets the last item in the menu.

moveItem

contextMenuMoveItem Source #

Arguments

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

menu: a ContextMenu

-> b

item: the ContextMenuItem to add

-> Int32

position: the new position to move the item

-> m () 

Moves item to the given position in the menu. If position is negative, or is larger than the number of items in the ContextMenu, the item is added on to the end of the menu. The first position is 0.

new

contextMenuNew Source #

Arguments

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

Returns: The newly created ContextMenu object

Creates a new ContextMenu object to be used as a submenu of an existing ContextMenu. The context menu of a WebView is created by the view and passed as an argument of WebView::context-menu signal. To add items to the menu use contextMenuPrepend, contextMenuAppend or contextMenuInsert. See also contextMenuNewWithItems to create a ContextMenu with a list of initial items.

newWithItems

contextMenuNewWithItems Source #

Arguments

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

items: a List of ContextMenuItem

-> m ContextMenu

Returns: The newly created ContextMenu object

Creates a new ContextMenu object to be used as a submenu of an existing ContextMenu with the given initial items. See also contextMenuNew

prepend

contextMenuPrepend Source #

Arguments

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

menu: a ContextMenu

-> b

item: the ContextMenuItem to add

-> m () 

Adds item at the beginning of the menu.

remove

contextMenuRemove Source #

Arguments

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

menu: a ContextMenu

-> b

item: the ContextMenuItem to remove

-> m () 

Removes item from the menu. See also contextMenuRemoveAll to remove all items.

removeAll

contextMenuRemoveAll Source #

Arguments

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

menu: a ContextMenu

-> m () 

Removes all items of the menu.

setUserData

contextMenuSetUserData Source #

Arguments

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

menu: a ContextMenu

-> GVariant

userData: a GVariant

-> m () 

Sets user data to menu. This function can be used from a Web Process extension to set user data that can be retrieved from the UI Process using contextMenuGetUserData.

Since: 2.8