#[repr(C)]pub struct _cef_keyboard_handler_t {
pub base: cef_base_ref_counted_t,
pub on_pre_key_event: Option<unsafe extern "C" fn(self_: *mut _cef_keyboard_handler_t, browser: *mut _cef_browser_t, event: *const cef_key_event_t, os_event: cef_event_handle_t, is_keyboard_shortcut: *mut c_int) -> c_int>,
pub on_key_event: Option<unsafe extern "C" fn(self_: *mut _cef_keyboard_handler_t, browser: *mut _cef_browser_t, event: *const cef_key_event_t, os_event: cef_event_handle_t) -> c_int>,
}Expand description
Implement this structure to handle events related to keyboard input. 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_pre_key_event: Option<unsafe extern "C" fn(self_: *mut _cef_keyboard_handler_t, browser: *mut _cef_browser_t, event: *const cef_key_event_t, os_event: cef_event_handle_t, is_keyboard_shortcut: *mut c_int) -> c_int>Called before a keyboard event is sent to the renderer. |event| contains information about the keyboard event. |os_event| is the operating system event message, if any. Return true (1) if the event was handled or false (0) otherwise. If the event will be handled in on_key_event() as a keyboard shortcut set |is_keyboard_shortcut| to true (1) and return false (0).
on_key_event: Option<unsafe extern "C" fn(self_: *mut _cef_keyboard_handler_t, browser: *mut _cef_browser_t, event: *const cef_key_event_t, os_event: cef_event_handle_t) -> c_int>Called after the renderer and JavaScript in the page has had a chance to handle the event. |event| contains information about the keyboard event. |os_event| is the operating system event message, if any. Return true (1) if the keyboard event was handled or false (0) otherwise.
Trait Implementations§
Source§impl Clone for _cef_keyboard_handler_t
impl Clone for _cef_keyboard_handler_t
Source§fn clone(&self) -> _cef_keyboard_handler_t
fn clone(&self) -> _cef_keyboard_handler_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more