#[repr(C)]pub struct _cef_command_handler_t {
pub base: cef_base_ref_counted_t,
pub on_chrome_command: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, browser: *mut _cef_browser_t, command_id: c_int, disposition: cef_window_open_disposition_t) -> c_int>,
pub is_chrome_app_menu_item_visible: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, browser: *mut _cef_browser_t, command_id: c_int) -> c_int>,
pub is_chrome_app_menu_item_enabled: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, browser: *mut _cef_browser_t, command_id: c_int) -> c_int>,
pub is_chrome_page_action_icon_visible: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, icon_type: cef_chrome_page_action_icon_type_t) -> c_int>,
pub is_chrome_toolbar_button_visible: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, button_type: cef_chrome_toolbar_button_type_t) -> c_int>,
}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.
Fields§
§base: cef_base_ref_counted_tBase structure.
on_chrome_command: Option<unsafe extern "C" fn(self_: *mut _cef_command_handler_t, browser: *mut _cef_browser_t, command_id: c_int, disposition: cef_window_open_disposition_t) -> c_int>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.
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.
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(self_: *mut _cef_command_handler_t, icon_type: cef_chrome_page_action_icon_type_t) -> c_int>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.
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.
Trait Implementations§
Source§impl Clone for _cef_command_handler_t
impl Clone for _cef_command_handler_t
Source§fn clone(&self) -> _cef_command_handler_t
fn clone(&self) -> _cef_command_handler_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more