Top |
guint | webkit_option_menu_get_n_items () |
WebKitOptionMenuItem * | webkit_option_menu_get_item () |
void | webkit_option_menu_select_item () |
void | webkit_option_menu_activate_item () |
void | webkit_option_menu_close () |
WebKitOptionMenu represents the dropdown menu of a select element in a WebKitWebView.
When a select element in a WebKitWebView needs to display a dropdown menu, the signal “show-option-menu” is emitted, providing a WebKitOptionMenu with the WebKitOptionMenuItems that should be displayed.
guint
webkit_option_menu_get_n_items (WebKitOptionMenu *menu
);
Gets the length of the menu
.
Since: 2.18
WebKitOptionMenuItem * webkit_option_menu_get_item (WebKitOptionMenu *menu
,guint index
);
Returns the WebKitOptionMenuItem at index
in menu
.
Since: 2.18
void webkit_option_menu_select_item (WebKitOptionMenu *menu
,guint index
);
Selects the WebKitOptionMenuItem at index
in menu
. Selecting an item changes the
text shown by the combo button, but it doesn't change the value of the element. You need to
explicitly activate the item with webkit_option_menu_select_item()
or close the menu with
webkit_option_menu_close()
in which case the currently selected item will be activated.
Since: 2.18
void webkit_option_menu_activate_item (WebKitOptionMenu *menu
,guint index
);
Activates the WebKitOptionMenuItem at index
in menu
. Activating an item changes the value
of the element making the item the active one. You are expected to close the menu with
webkit_option_menu_close()
after activating an item, calling this function again will have no
effect.
Since: 2.18
void
webkit_option_menu_close (WebKitOptionMenu *menu
);
Request to close a WebKitOptionMenu. This emits WebKitOptionMenu::close signal.
This function should always be called to notify WebKit that the associated
menu has been closed. If the menu is closed and neither webkit_option_menu_select_item()
nor webkit_option_menu_activate_item()
have been called, the element value remains
unchanged.
Since: 2.18
“close”
signalvoid user_function (WebKitOptionMenu *menu, gpointer user_data)
Emitted when closing a WebKitOptionMenu is requested. This can happen
when the user explicitly calls webkit_option_menu_close()
or when the
element is detached from the current page.
menu |
the WebKitOptionMenu on which the signal is emitted |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run Last
Since: 2.18