#[repr(C)]pub struct _cef_render_handler_t {Show 18 fields
pub base: cef_base_ref_counted_t,
pub get_accessibility_handler: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t) -> *mut _cef_accessibility_handler_t>,
pub get_root_screen_rect: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *mut cef_rect_t) -> c_int>,
pub get_view_rect: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *mut cef_rect_t)>,
pub get_screen_point: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, viewX: c_int, viewY: c_int, screenX: *mut c_int, screenY: *mut c_int) -> c_int>,
pub get_screen_info: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, screen_info: *mut cef_screen_info_t) -> c_int>,
pub on_popup_show: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, show: c_int)>,
pub on_popup_size: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *const cef_rect_t)>,
pub on_paint: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, type_: cef_paint_element_type_t, dirtyRectsCount: usize, dirtyRects: *const cef_rect_t, buffer: *const c_void, width: c_int, height: c_int)>,
pub on_accelerated_paint: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, type_: cef_paint_element_type_t, dirtyRectsCount: usize, dirtyRects: *const cef_rect_t, info: *const cef_accelerated_paint_info_t)>,
pub get_touch_handle_size: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, orientation: cef_horizontal_alignment_t, size: *mut cef_size_t)>,
pub on_touch_handle_state_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, state: *const cef_touch_handle_state_t)>,
pub start_dragging: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, drag_data: *mut _cef_drag_data_t, allowed_ops: cef_drag_operations_mask_t, x: c_int, y: c_int) -> c_int>,
pub update_drag_cursor: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, operation: cef_drag_operations_mask_t)>,
pub on_scroll_offset_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, x: f64, y: f64)>,
pub on_ime_composition_range_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, selected_range: *const cef_range_t, character_boundsCount: usize, character_bounds: *const cef_rect_t)>,
pub on_text_selection_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, selected_text: *const cef_string_t, selected_range: *const cef_range_t)>,
pub on_virtual_keyboard_requested: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, input_mode: cef_text_input_mode_t)>,
}Expand description
Implement this structure to handle events when window rendering is disabled. 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.
get_accessibility_handler: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t) -> *mut _cef_accessibility_handler_t>Return the handler for accessibility notifications. If no handler is provided the default implementation will be used.
get_root_screen_rect: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *mut cef_rect_t) -> c_int>Called to retrieve the root window rectangle in screen DIP coordinates. Return true (1) if the rectangle was provided. If this function returns false (0) the rectangle from GetViewRect will be used.
get_view_rect: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *mut cef_rect_t)>Called to retrieve the view rectangle in screen DIP coordinates. This function must always provide a non-NULL rectangle.
get_screen_point: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, viewX: c_int, viewY: c_int, screenX: *mut c_int, screenY: *mut c_int) -> c_int>Called to retrieve the translation from view DIP coordinates to screen coordinates. Windows/Linux should provide screen device (pixel) coordinates and MacOS should provide screen DIP coordinates. Return true (1) if the requested coordinates were provided.
get_screen_info: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, screen_info: *mut cef_screen_info_t) -> c_int>Called to allow the client to fill in the CefScreenInfo object with appropriate values. Return true (1) if the |screen_info| structure has been modified.
If the screen info rectangle is left NULL the rectangle from GetViewRect will be used. If the rectangle is still NULL or invalid popups may not be drawn correctly.
on_popup_show: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, show: c_int)>Called when the browser wants to show or hide the popup widget. The popup should be shown if |show| is true (1) and hidden if |show| is false (0).
on_popup_size: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, rect: *const cef_rect_t)>Called when the browser wants to move or resize the popup widget. |rect| contains the new location and size in view coordinates.
on_paint: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, type_: cef_paint_element_type_t, dirtyRectsCount: usize, dirtyRects: *const cef_rect_t, buffer: *const c_void, width: c_int, height: c_int)>Called when an element should be painted. Pixel values passed to this function are scaled relative to view coordinates based on the value of CefScreenInfo.device_scale_factor returned from GetScreenInfo. |type| indicates whether the element is the view or the popup widget. |buffer| contains the pixel data for the whole image. |dirtyRects| contains the set of rectangles in pixel coordinates that need to be repainted. |buffer| will be |width|*|height|*4 bytes in size and represents a BGRA image with an upper-left origin. This function is only called when cef_window_tInfo::shared_texture_enabled is set to false (0).
on_accelerated_paint: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, type_: cef_paint_element_type_t, dirtyRectsCount: usize, dirtyRects: *const cef_rect_t, info: *const cef_accelerated_paint_info_t)>Called when an element has been rendered to the shared texture handle. |type| indicates whether the element is the view or the popup widget. |dirtyRects| contains the set of rectangles in pixel coordinates that need to be repainted. |info| contains the shared handle; on Windows it is a HANDLE to a texture that can be opened with D3D11 OpenSharedResource, on macOS it is an IOSurface pointer that can be opened with Metal or OpenGL, and on Linux it contains several planes, each with an fd to the underlying system native buffer.
The underlying implementation uses a pool to deliver frames. As a result, the handle may differ every frame depending on how many frames are in- progress. The handle’s resource cannot be cached and cannot be accessed outside of this callback. It should be reopened each time this callback is executed and the contents should be copied to a texture owned by the client application. The contents of |info| will be released back to the pool after this callback returns.
get_touch_handle_size: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, orientation: cef_horizontal_alignment_t, size: *mut cef_size_t)>Called to retrieve the size of the touch handle for the specified |orientation|.
on_touch_handle_state_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, state: *const cef_touch_handle_state_t)>Called when touch handle state is updated. The client is responsible for rendering the touch handles.
start_dragging: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, drag_data: *mut _cef_drag_data_t, allowed_ops: cef_drag_operations_mask_t, x: c_int, y: c_int) -> c_int>Called when the user starts dragging content in the web view. Contextual information about the dragged content is supplied by |drag_data|. (|x|, |y|) is the drag start location in screen coordinates. OS APIs that run a system message loop may be used within the StartDragging call.
Return false (0) to abort the drag operation. Don’t call any of cef_browser_host_t::DragSourceEnded functions after returning false (0).
Return true (1) to handle the drag operation. Call cef_browser_host_t::DragSourceEndedAt and DragSourceSystemDragEnded either synchronously or asynchronously to inform the web view that the drag operation has ended.
update_drag_cursor: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, operation: cef_drag_operations_mask_t)>Called when the web view wants to update the mouse cursor during a drag & drop operation. |operation| describes the allowed operation (none, move, copy, link).
on_scroll_offset_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, x: f64, y: f64)>Called when the scroll offset has changed.
on_ime_composition_range_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, selected_range: *const cef_range_t, character_boundsCount: usize, character_bounds: *const cef_rect_t)>Called when the IME composition range has changed. |selected_range| is the range of characters that have been selected. |character_bounds| is the bounds of each character in view coordinates.
on_text_selection_changed: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, selected_text: *const cef_string_t, selected_range: *const cef_range_t)>Called when text selection has changed for the specified |browser|. |selected_text| is the currently selected text and |selected_range| is the character range.
on_virtual_keyboard_requested: Option<unsafe extern "C" fn(self_: *mut _cef_render_handler_t, browser: *mut _cef_browser_t, input_mode: cef_text_input_mode_t)>Called when an on-screen keyboard should be shown or hidden for the specified |browser|. |input_mode| specifies what kind of keyboard should be opened. If |input_mode| is CEF_TEXT_INPUT_MODE_NONE, any existing keyboard for this browser should be hidden.
Trait Implementations§
Source§impl Clone for _cef_render_handler_t
impl Clone for _cef_render_handler_t
Source§fn clone(&self) -> _cef_render_handler_t
fn clone(&self) -> _cef_render_handler_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more