Skip to main content

PlatformInputHandlerExt

Trait PlatformInputHandlerExt 

Source
pub trait PlatformInputHandlerExt {
    // Required methods
    fn dispatch_input(
        &mut self,
        input: &str,
        window: &mut Window<'_>,
        cx: &mut App,
    );
    fn selected_bounds(
        &mut self,
        window: &mut Window<'_>,
        cx: &mut App,
    ) -> Option<Bounds<Pixels>>;
    fn accepts_text_input(
        &mut self,
        window: &mut Window<'_>,
        cx: &mut App,
    ) -> bool;
    fn text_input_configuration(
        &mut self,
        window: &mut Window<'_>,
        cx: &mut App,
    ) -> TextInputConfiguration;
}
Expand description

The PlatformInputHandler operations that need the owning window.

Required Methods§

Source

fn dispatch_input(&mut self, input: &str, window: &mut Window<'_>, cx: &mut App)

Applies text input directly to the focused input, bypassing the IME.

Source

fn selected_bounds( &mut self, window: &mut Window<'_>, cx: &mut App, ) -> Option<Bounds<Pixels>>

Bounds of the current IME candidate region.

Source

fn accepts_text_input(&mut self, window: &mut Window<'_>, cx: &mut App) -> bool

Whether the focused input currently accepts text.

Source

fn text_input_configuration( &mut self, window: &mut Window<'_>, cx: &mut App, ) -> TextInputConfiguration

The text input configuration of the focused input.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§