| WebKit2GTK+ Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | ||||
WebKitContextMenuItem; enum WebKitContextMenuAction; WebKitContextMenuItem * webkit_context_menu_item_new (GtkAction *action); WebKitContextMenuItem * webkit_context_menu_item_new_from_stock_action (WebKitContextMenuAction action); WebKitContextMenuItem * webkit_context_menu_item_new_from_stock_action_with_label (WebKitContextMenuAction action,const gchar *label); WebKitContextMenuItem * webkit_context_menu_item_new_with_submenu (const gchar *label,WebKitContextMenu *submenu); WebKitContextMenuItem * webkit_context_menu_item_new_separator (void); GtkAction * webkit_context_menu_item_get_action (WebKitContextMenuItem *item); WebKitContextMenuAction webkit_context_menu_item_get_stock_action (WebKitContextMenuItem *item); gboolean webkit_context_menu_item_is_separator (WebKitContextMenuItem *item); void webkit_context_menu_item_set_submenu (WebKitContextMenuItem *item,WebKitContextMenu *submenu); WebKitContextMenu * webkit_context_menu_item_get_submenu (WebKitContextMenuItem *item);
typedef enum {
WEBKIT_CONTEXT_MENU_ACTION_NO_ACTION = 0,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_LINK_IN_NEW_WINDOW,
WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_LINK_TO_DISK,
WEBKIT_CONTEXT_MENU_ACTION_COPY_LINK_TO_CLIPBOARD,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_IMAGE_IN_NEW_WINDOW,
WEBKIT_CONTEXT_MENU_ACTION_DOWNLOAD_IMAGE_TO_DISK,
WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_TO_CLIPBOARD,
WEBKIT_CONTEXT_MENU_ACTION_COPY_IMAGE_URL_TO_CLIPBOARD,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_FRAME_IN_NEW_WINDOW,
WEBKIT_CONTEXT_MENU_ACTION_GO_BACK,
WEBKIT_CONTEXT_MENU_ACTION_GO_FORWARD,
WEBKIT_CONTEXT_MENU_ACTION_STOP,
WEBKIT_CONTEXT_MENU_ACTION_RELOAD,
WEBKIT_CONTEXT_MENU_ACTION_COPY,
WEBKIT_CONTEXT_MENU_ACTION_CUT,
WEBKIT_CONTEXT_MENU_ACTION_PASTE,
WEBKIT_CONTEXT_MENU_ACTION_DELETE,
WEBKIT_CONTEXT_MENU_ACTION_SELECT_ALL,
WEBKIT_CONTEXT_MENU_ACTION_INPUT_METHODS,
WEBKIT_CONTEXT_MENU_ACTION_UNICODE,
WEBKIT_CONTEXT_MENU_ACTION_SPELLING_GUESS,
WEBKIT_CONTEXT_MENU_ACTION_NO_GUESSES_FOUND,
WEBKIT_CONTEXT_MENU_ACTION_IGNORE_SPELLING,
WEBKIT_CONTEXT_MENU_ACTION_LEARN_SPELLING,
WEBKIT_CONTEXT_MENU_ACTION_IGNORE_GRAMMAR,
WEBKIT_CONTEXT_MENU_ACTION_FONT_MENU,
WEBKIT_CONTEXT_MENU_ACTION_BOLD,
WEBKIT_CONTEXT_MENU_ACTION_ITALIC,
WEBKIT_CONTEXT_MENU_ACTION_UNDERLINE,
WEBKIT_CONTEXT_MENU_ACTION_OUTLINE,
WEBKIT_CONTEXT_MENU_ACTION_INSPECT_ELEMENT,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_VIDEO_IN_NEW_WINDOW,
WEBKIT_CONTEXT_MENU_ACTION_OPEN_AUDIO_IN_NEW_WINDOW,
WEBKIT_CONTEXT_MENU_ACTION_COPY_VIDEO_LINK_TO_CLIPBOARD,
WEBKIT_CONTEXT_MENU_ACTION_COPY_AUDIO_LINK_TO_CLIPBOARD,
WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_CONTROLS,
WEBKIT_CONTEXT_MENU_ACTION_TOGGLE_MEDIA_LOOP,
WEBKIT_CONTEXT_MENU_ACTION_ENTER_VIDEO_FULLSCREEN,
WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PLAY,
WEBKIT_CONTEXT_MENU_ACTION_MEDIA_PAUSE,
WEBKIT_CONTEXT_MENU_ACTION_MEDIA_MUTE,
WEBKIT_CONTEXT_MENU_ACTION_CUSTOM = 10000
} WebKitContextMenuAction;
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 curent 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 conents 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. | |
| Custom action defined by applications. |
WebKitContextMenuItem * webkit_context_menu_item_new (GtkAction *action);
Creates a new WebKitContextMenuItem for the given action.
|
a GtkAction |
Returns : |
the newly created WebKitContextMenuItem object. |
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 asociated
action from being performed.
|
a WebKitContextMenuAction stock action |
Returns : |
the newly created WebKitContextMenuItem object. |
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.
|
a WebKitContextMenuAction stock action |
|
a custom label text to use instead of the predefined one |
Returns : |
the newly created WebKitContextMenuItem object. |
WebKitContextMenuItem * webkit_context_menu_item_new_with_submenu (const gchar *label,WebKitContextMenu *submenu);
Creates a new WebKitContextMenuItem using the given label with a submenu.
|
the menu item label text |
|
a WebKitContextMenu to set |
Returns : |
the newly created WebKitContextMenuItem object. |
WebKitContextMenuItem * webkit_context_menu_item_new_separator
(void);
Creates a new WebKitContextMenuItem representing a separator.
Returns : |
the newly created WebKitContextMenuItem object. |
GtkAction * webkit_context_menu_item_get_action (WebKitContextMenuItem *item);
Gets the action associated to item.
|
a WebKitContextMenuItem |
Returns : |
the GtkAction associated to the WebKitContextMenuItem,
or NULL if item is a separator. [transfer none]
|
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.
|
a WebKitContextMenuItem |
Returns : |
the WebKitContextMenuAction of item
|
gboolean webkit_context_menu_item_is_separator
(WebKitContextMenuItem *item);
Checks whether item is a separator.
|
a WebKitContextMenuItem |
Returns : |
TRUE is item is a separator or FALSE otherwise |
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.
|
a WebKitContextMenuItem |
|
a WebKitContextMenu. [allow-none] |
WebKitContextMenu * webkit_context_menu_item_get_submenu
(WebKitContextMenuItem *item);
Gets the submenu of item.
|
a WebKitContextMenuItem |
Returns : |
the WebKitContextMenu representing the submenu of
item or NULL if item doesn't have a submenu. [transfer none]
|