FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextInputMethodConnection

    struct · ferroui-base · v0.5.0

    struct TextInputMethodConnection
    

    A manager-owned connection to one semantic input owner. Platform adapters capture it when the client is installed. It never redirects to a newer focused element, and retaining it does not retain its owner or client.

    The input method manager creates a connection only for a client that opts in by implementing TextInputMethodEditing (TextInputMethodClient::input_method_editing returns Some); for every other client TextInputMethodClient::input_method_connection is None and the platform backends keep their upstream behaviour (docs/porting/winui-rich-text.md, decision D5).

    View source

    Members

    owner

    fn owner(self: &Self) -> Option<Ref<InputElement>>
    

    The original input owner, only while this connection remains valid.

    Source

    is_current

    fn is_current(self: &Self) -> bool
    

    Source

    input_scope_names

    fn input_scope_names(self: &Self) -> Option<Rc<[crate::input::InputScopeNameValue]>>
    

    The input scopes of the owner (TextInputOptions.InputScopeNames), while this connection remains valid. Backends read them here within 0.4, where they are not a field of TextInputOptions (decision D8).

    Source

    effective_input_scope

    fn effective_input_scope(self: &Self) -> Option<crate::input::InputScopeNameValue>
    

    The first input scope of the owner, for a platform with a single hint.

    Source

    effective_content_type

    fn effective_content_type(self: &Self, options: &super::TextInputOptions) -> super::TextInputContentType
    

    The content type that best matches the first input scope of the owner, or options.content_type without one.

    Source

    supports_composition

    fn supports_composition(self: &Self) -> bool
    

    Source

    supports_exact_edits

    fn supports_exact_edits(self: &Self) -> bool
    

    Source

    edit_state

    fn edit_state(self: &Self) -> Result<TextInputMethodState, TextInputMethodError>
    

    Source

    apply_edit

    fn apply_edit(self: &Rc<Self>, edit: &TextInputMethodEdit, timestamp: u64) -> Result<bool, TextInputMethodError>
    

    Applies a committed exact edit through the same raw/routed interception path as ordinary text. The owner's acknowledgement is authoritative.

    Source

    select_exact

    fn select_exact(self: &Self, selection: super::TextSelection) -> Result<(), TextInputMethodError>
    

    Source

    begin_composition

    fn begin_composition(self: &Rc<Self>) -> Result<TextInputMethodComposition, TextInputMethodError>
    

    Starts a new immutable platform session without deleting the current selection. Any previous session on this connection is superseded.

    Source

    commit_text

    fn commit_text(self: &Rc<Self>, text: &str, timestamp: u64) -> Result<bool, TextInputMethodError>
    

    Sends ordinary committed input to a client with the atomic editing capability. A platform composing text should use its captured composition's commit instead.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.