Trait BETextInputDelegate

Source
pub unsafe trait BETextInputDelegate {
    // Provided methods
    unsafe fn shouldDeferEventHandlingToSystemForTextInput_context(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
        key_event_context: &BEKeyEntryContext,
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn textInput_setCandidateSuggestions(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
        suggestions: Option<&NSArray<BETextSuggestion>>,
    )
       where Self: Sized + Message { ... }
    unsafe fn selectionWillChangeForTextInput(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
    )
       where Self: Sized + Message { ... }
    unsafe fn selectionDidChangeForTextInput(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
    )
       where Self: Sized + Message { ... }
    unsafe fn textInput_deferReplaceTextActionToSystem(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
        sender: &AnyObject,
    )
       where Self: Sized + Message { ... }
    unsafe fn invalidateTextEntryContextForTextInput(
        &self,
        text_input: &ProtocolObject<dyn BETextInput>,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature BETextInputDelegate only.
Expand description

Provided Methods§

Source

unsafe fn shouldDeferEventHandlingToSystemForTextInput_context( &self, text_input: &ProtocolObject<dyn BETextInput>, key_event_context: &BEKeyEntryContext, ) -> bool
where Self: Sized + Message,

Available on crate features BEKeyEntryContext and BETextInput only.

Defers the key event to the system and returns whether the key event was handled.

For example, the system will handle key events for character insertions, deletions, key commands, and more.

Source

unsafe fn textInput_setCandidateSuggestions( &self, text_input: &ProtocolObject<dyn BETextInput>, suggestions: Option<&NSArray<BETextSuggestion>>, )
where Self: Sized + Message,

Available on crate features BETextInput and BETextSuggestion only.

Provides text suggestions to the system.

For example, suggestions could include data list elements or AutoFill candidates.

Source

unsafe fn selectionWillChangeForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
where Self: Sized + Message,

Available on crate feature BETextInput only.

Tells the system when the selection is about to change in the document.

Source

unsafe fn selectionDidChangeForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
where Self: Sized + Message,

Available on crate feature BETextInput only.

Tells the system when the selection has changed in the document.

This method results in an document state refresh with an invocation to: -[BETextInput requestTextContextForAutocorrectionWithCompletionHandler:]

Source

unsafe fn textInput_deferReplaceTextActionToSystem( &self, text_input: &ProtocolObject<dyn BETextInput>, sender: &AnyObject, )
where Self: Sized + Message,

Available on crate feature BETextInput only.

Defers a replace text action to the ssytem.

When handling the replace: action, use this method to defer the replacement to the system.

For example, a replacement could be deferred after it is selected from the autocorrect replacements list.

Source

unsafe fn invalidateTextEntryContextForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
where Self: Sized + Message,

Available on crate feature BETextInput only.

Tells the system the text entry context has changed and that text entry UI’s need to be refreshed.

This is a costly operation and should only used with intention. For example, when switching focus between different elements.

Trait Implementations§

Source§

impl ProtocolType for dyn BETextInputDelegate

Source§

const NAME: &'static str = "BETextInputDelegate"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn BETextInputDelegate

Implementations on Foreign Types§

Source§

impl<T> BETextInputDelegate for ProtocolObject<T>

Implementors§