cef_command_handler_t

Type Alias cef_command_handler_t 

Source
pub type cef_command_handler_t = _cef_command_handler_t;
Expand description

Implement this structure to handle events related to commands. The functions of this structure will be called on the UI thread.

NOTE: This struct is allocated client-side.

Aliased Type§

#[repr(C)]
pub struct cef_command_handler_t { pub base: _cef_base_ref_counted_t, pub on_chrome_command: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32, cef_window_open_disposition_t) -> i32>, pub is_chrome_app_menu_item_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32) -> i32>, pub is_chrome_app_menu_item_enabled: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32) -> i32>, pub is_chrome_page_action_icon_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, cef_chrome_page_action_icon_type_t) -> i32>, pub is_chrome_toolbar_button_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, cef_chrome_toolbar_button_type_t) -> i32>, }

Fields§

§base: _cef_base_ref_counted_t

Base structure.

§on_chrome_command: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32, cef_window_open_disposition_t) -> i32>

Called to execute a Chrome command triggered via menu selection or keyboard shortcut. Use the cef_id_for_command_id_name() function for version-safe mapping of command IDC names from cef_command_ids.h to version-specific numerical |command_id| values. |disposition| provides information about the intended command target. Return true (1) if the command was handled or false (0) for the default implementation. For context menu commands this will be called after cef_context_menu_handler_t::OnContextMenuCommand. Only used with Chrome style.

§is_chrome_app_menu_item_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32) -> i32>

Called to check if a Chrome app menu item should be visible. Use the cef_id_for_command_id_name() function for version-safe mapping of command IDC names from cef_command_ids.h to version-specific numerical |command_id| values. Only called for menu items that would be visible by default. Only used with Chrome style.

§is_chrome_app_menu_item_enabled: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, *mut _cef_browser_t, i32) -> i32>

Called to check if a Chrome app menu item should be enabled. Use the cef_id_for_command_id_name() function for version-safe mapping of command IDC names from cef_command_ids.h to version-specific numerical |command_id| values. Only called for menu items that would be enabled by default. Only used with Chrome style.

§is_chrome_page_action_icon_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, cef_chrome_page_action_icon_type_t) -> i32>

Called during browser creation to check if a Chrome page action icon should be visible. Only called for icons that would be visible by default. Only used with Chrome style.

§is_chrome_toolbar_button_visible: Option<unsafe extern "C" fn(*mut _cef_command_handler_t, cef_chrome_toolbar_button_type_t) -> i32>

Called during browser creation to check if a Chrome toolbar button should be visible. Only called for buttons that would be visible by default. Only used with Chrome style.