| Top |  |  |  |  | 
| WebKitContextMenuItemWebKitContextMenuItem — One item of the WebKitContextMenu | 
The WebKitContextMenu is composed of WebKitContextMenuItems. These items can be created from a GtkAction, from a WebKitContextMenuAction or from a WebKitContextMenuAction and a label. These WebKitContextMenuActions denote stock actions for the items. You can also create separators and submenus.
WebKitContextMenuItem *
webkit_context_menu_item_new (GtkAction *action);
webkit_context_menu_item_new has been deprecated since version 2.18 and should not be used in newly-written code.
Use webkit_context_menu_item_new_from_gaction() instead.
Creates a new WebKitContextMenuItem for the given action
.
WebKitContextMenuItem * webkit_context_menu_item_new_from_gaction (GAction *action,const gchar *label,GVariant *target);
Creates a new WebKitContextMenuItem for the given action
 and label
. On activation
target
 will be passed as parameter to the callback.
Since: 2.18
WebKitContextMenuItem *
webkit_context_menu_item_new_from_stock_action
                               (WebKitContextMenuAction action);
Creates a new WebKitContextMenuItem for the given stock action.
Stock actions are handled automatically by WebKit so that, for example,
when a menu item created with a WEBKIT_CONTEXT_MENU_ACTION_STOP is
activated the action associated will be handled by WebKit and the current
load operation will be stopped. You can get the GtkAction of a
WebKitContextMenuItem created with a WebKitContextMenuAction with
webkit_context_menu_item_get_action() and connect to “activate” signal
to be notified when the item is activated. But you can't prevent the associated
action from being performed.
WebKitContextMenuItem * webkit_context_menu_item_new_from_stock_action_with_label (WebKitContextMenuAction action,const gchar *label);
Creates a new WebKitContextMenuItem for the given stock action using the given label
.
Stock actions have a predefined label, this method can be used to create a
WebKitContextMenuItem for a WebKitContextMenuAction but using a custom label.
| action | a WebKitContextMenuAction stock action | |
| label | a custom label text to use instead of the predefined one | 
WebKitContextMenuItem * webkit_context_menu_item_new_with_submenu (const gchar *label,WebKitContextMenu *submenu);
Creates a new WebKitContextMenuItem using the given label
 with a submenu.
WebKitContextMenuItem *
webkit_context_menu_item_new_separator
                               (void);
Creates a new WebKitContextMenuItem representing a separator.
GtkAction *
webkit_context_menu_item_get_action (WebKitContextMenuItem *item);
webkit_context_menu_item_get_action has been deprecated since version 2.18 and should not be used in newly-written code.
Use webkit_context_menu_item_get_gaction() instead.
Gets the action associated to item
 as a GtkAction.
the GtkAction associated to the WebKitContextMenuItem,
or NULL if item
is a separator. 
[transfer none]
GAction *
webkit_context_menu_item_get_gaction (WebKitContextMenuItem *item);
Gets the action associated to item
 as a GAction.
the GAction associated to the WebKitContextMenuItem,
or NULL if item
is a separator. 
[transfer none]
Since: 2.18
WebKitContextMenuAction
webkit_context_menu_item_get_stock_action
                               (WebKitContextMenuItem *item);
Gets the WebKitContextMenuAction of item
. If the WebKitContextMenuItem was not
created for a stock action WEBKIT_CONTEXT_MENU_ACTION_CUSTOM will be
returned. If the WebKitContextMenuItem is a separator WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION
will be returned.
gboolean
webkit_context_menu_item_is_separator (WebKitContextMenuItem *item);
Checks whether item
 is a separator.
void webkit_context_menu_item_set_submenu (WebKitContextMenuItem *item,WebKitContextMenu *submenu);
Sets or replaces the item
 submenu. If submenu
 is NULL the current
submenu of item
 is removed.
WebKitContextMenu *
webkit_context_menu_item_get_submenu (WebKitContextMenuItem *item);
Gets the submenu of item
.
the WebKitContextMenu representing the submenu of
item
or NULL if item
doesn't have a submenu. 
[transfer none]
Enum values used to denote the stock actions for WebKitContextMenuItems
| No action, used by separator menu items. | ||
| Open current link. | ||
| Open current link in a new window. | ||
| Download link destination. | ||
| Copy link location to the clipboard. | ||
| Open current image in a new window. | ||
| Download current image. | ||
| Copy current image to the clipboard. | ||
| Copy current image location to the clipboard. | ||
| Open current frame in a new window. | ||
| Load the previous history item. | ||
| Load the next history item. | ||
| Stop any ongoing loading operation. | ||
| Reload the contents of current view. | ||
| Copy current selection the clipboard. | ||
| Cut current selection to the clipboard. | ||
| Paste clipboard contents. | ||
| Delete current selection. | ||
| Select all text. | ||
| Input methods menu. | ||
| Unicode menu. | ||
| A proposed replacement for a misspelled word. | ||
| An indicator that spellchecking found no proposed replacements. | ||
| Causes the spellchecker to ignore the word for this session. | ||
| Causes the spellchecker to add the word to the dictionary. | ||
| Ignore grammar. | ||
| Font options menu. | ||
| Bold. | ||
| Italic. | ||
| Underline. | ||
| Outline. | ||
| Open current element in the inspector. | ||
| Open current video element in a new window. | ||
| Open current audio element in a new window. | ||
| Copy video link location in to the clipboard. | ||
| Copy audio link location in to the clipboard. | ||
| Enable or disable media controls. | ||
| Enable or disable media loop. | ||
| Show current video element in fullscreen mode. | ||
| Play current media element. | ||
| Pause current media element. | ||
| Mute current media element. | ||
| Download video to disk. Since 2.2 | ||
| Download audio to disk. Since 2.2 | ||
| Custom action defined by applications. |