pub trait EmbedderClient {
Show 16 methods
// Required methods
fn frame(&mut self, frame: Frame);
fn view_added(&mut self, id: ViewId);
fn view_metrics_changed(&mut self, id: ViewId);
fn view_removed(&mut self, id: ViewId);
fn pointer_data_packet(&mut self, packet: PointerDataPacket);
fn key_data(&mut self, data: KeyData) -> bool;
fn platform_brightness_changed(&mut self);
fn locales_changed(&mut self);
fn wake(&mut self, elapsed: Duration);
// Provided methods
fn view_focus_changed(&mut self, event: ViewFocusEvent) { ... }
fn system_fonts_changed(&mut self) { ... }
fn text_input_editing_value(
&mut self,
view: ViewId,
value: TextEditingValue,
) { ... }
fn text_input_action(&mut self, view: ViewId, action: TextInputAction) { ... }
fn text_input_closed(&mut self, view: ViewId) { ... }
fn system_context_menu_hidden(&mut self) { ... }
fn custom_context_menu_action(&mut self, callback_id: &str) { ... }
}Expand description
Complete frames and typed view lifecycle notifications.
The platform updates its view registry before sending a lifecycle method, so the client can immediately query the affected view.
Required Methods§
fn frame(&mut self, frame: Frame)
fn view_added(&mut self, id: ViewId)
fn view_metrics_changed(&mut self, id: ViewId)
fn view_removed(&mut self, id: ViewId)
Sourcefn pointer_data_packet(&mut self, packet: PointerDataPacket)
fn pointer_data_packet(&mut self, packet: PointerDataPacket)
Flutter PlatformDispatcher.onPointerDataPacket.
Sourcefn key_data(&mut self, data: KeyData) -> bool
fn key_data(&mut self, data: KeyData) -> bool
Flutter PlatformDispatcher.onKeyData.
Returns whether the framework handled the event; a host that shares the keyboard with other native components should not propagate a handled one.
Sourcefn platform_brightness_changed(&mut self)
fn platform_brightness_changed(&mut self)
Flutter PlatformDispatcher.onPlatformBrightnessChanged: the host’s light or dark
preference changed, and Platform::platform_brightness already answers the new one.
Sourcefn locales_changed(&mut self)
fn locales_changed(&mut self)
Flutter PlatformDispatcher.onLocaleChanged: the host’s locale list changed, and
Platform::locales already answers the new one.
Provided Methods§
Sourcefn view_focus_changed(&mut self, event: ViewFocusEvent)
fn view_focus_changed(&mut self, event: ViewFocusEvent)
Flutter PlatformDispatcher.onViewFocusChange.
Sourcefn system_fonts_changed(&mut self)
fn system_fonts_changed(&mut self)
Flutter PlatformDispatcher.onSystemFontsChanged: the host registered faces the
framework did not have when text last laid out.
Sourcefn text_input_editing_value(&mut self, view: ViewId, value: TextEditingValue)
fn text_input_editing_value(&mut self, view: ViewId, value: TextEditingValue)
Flutter TextInputClient.updateEditingValue. The default drops it.
Sourcefn text_input_action(&mut self, view: ViewId, action: TextInputAction)
fn text_input_action(&mut self, view: ViewId, action: TextInputAction)
Flutter TextInputClient.performAction. The default drops it.
Sourcefn text_input_closed(&mut self, view: ViewId)
fn text_input_closed(&mut self, view: ViewId)
Flutter TextInputClient.connectionClosed. The default drops it.
Flutter SystemContextMenuClient.handleSystemHide. The default drops it.
Flutter SystemContextMenuClient.handleCustomContextMenuAction. The default drops it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".