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 ContextMenu = ContextMenu (ManagedPtr ContextMenu)
- class (GObject o, IsDescendantOf ContextMenu o) => IsContextMenu o
- toContextMenu :: (MonadIO m, IsContextMenu o) => o -> m ContextMenu
- noContextMenu :: Maybe ContextMenu
- contextMenuAppend :: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) => a -> b -> m ()
- contextMenuFirst :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m (Maybe ContextMenuItem)
- contextMenuGetItemAtPosition :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> Word32 -> m (Maybe ContextMenuItem)
- contextMenuGetItems :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m [ContextMenuItem]
- contextMenuGetNItems :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m Word32
- contextMenuGetUserData :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m (Maybe GVariant)
- contextMenuInsert :: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) => a -> b -> Int32 -> m ()
- contextMenuLast :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m (Maybe ContextMenuItem)
- contextMenuMoveItem :: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) => a -> b -> Int32 -> m ()
- contextMenuNew :: (HasCallStack, MonadIO m) => m ContextMenu
- contextMenuNewWithItems :: (HasCallStack, MonadIO m, IsContextMenuItem a) => [a] -> m ContextMenu
- contextMenuPrepend :: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) => a -> b -> m ()
- contextMenuRemove :: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) => a -> b -> m ()
- contextMenuRemoveAll :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> m ()
- contextMenuSetUserData :: (HasCallStack, MonadIO m, IsContextMenu a) => a -> GVariant -> m ()
Exported types
newtype ContextMenu Source #
Memory-managed wrapper type.
Instances
GObject ContextMenu Source # | |
Defined in GI.WebKit2.Objects.ContextMenu gobjectType :: IO GType # | |
HasParentTypes ContextMenu Source # | |
Defined in GI.WebKit2.Objects.ContextMenu | |
type ParentTypes ContextMenu Source # | |
Defined in GI.WebKit2.Objects.ContextMenu |
class (GObject o, IsDescendantOf ContextMenu o) => IsContextMenu o Source #
Type class for types which can be safely cast to ContextMenu
, for instance with toContextMenu
.
Instances
(GObject o, IsDescendantOf ContextMenu o) => IsContextMenu o Source # | |
Defined in GI.WebKit2.Objects.ContextMenu |
toContextMenu :: (MonadIO m, IsContextMenu o) => o -> m ContextMenu Source #
Cast to ContextMenu
, for types for which this is known to be safe. For general casts, use castTo
.
noContextMenu :: Maybe ContextMenu Source #
A convenience alias for Nothing
:: Maybe
ContextMenu
.
Methods
append
:: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) | |
=> a |
|
-> b |
|
-> m () |
Adds item
at the end of the menu
.
first
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m (Maybe ContextMenuItem) | Returns: the first |
Gets the first item in the menu
.
getItemAtPosition
contextMenuGetItemAtPosition Source #
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> Word32 |
|
-> m (Maybe ContextMenuItem) | Returns: the |
Gets the item at the given position in the menu
.
getItems
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m [ContextMenuItem] | Returns: a |
Returns the item list of menu
.
getNItems
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m Word32 | Returns: the number of |
Gets the length of the menu
.
getUserData
contextMenuGetUserData Source #
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m (Maybe GVariant) | Returns: the user data of |
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
:: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m (Maybe ContextMenuItem) | Returns: the last |
Gets the last item in the menu
.
moveItem
:: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> 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
:: (HasCallStack, MonadIO m) | |
=> m ContextMenu | Returns: The newly created |
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 #
:: (HasCallStack, MonadIO m, IsContextMenuItem a) | |
=> [a] |
|
-> m ContextMenu | Returns: The newly created |
Creates a new ContextMenu
object to be used as a submenu of an existing
ContextMenu
with the given initial items.
See also contextMenuNew
prepend
:: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) | |
=> a |
|
-> b |
|
-> m () |
Adds item
at the beginning of the menu
.
remove
:: (HasCallStack, MonadIO m, IsContextMenu a, IsContextMenuItem b) | |
=> a |
|
-> b |
|
-> m () |
Removes item
from the menu
.
See also contextMenuRemoveAll
to remove all items.
removeAll
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> a |
|
-> m () |
Removes all items of the menu
.
setUserData
contextMenuSetUserData Source #
:: (HasCallStack, MonadIO m, IsContextMenu a) | |
=> 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
.
If the userData
GVariant
is floating, it is consumed.
Since: 2.8