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 { ... }
}
BETextInputDelegate
only.Expand description
Provided Methods§
Sourceunsafe fn shouldDeferEventHandlingToSystemForTextInput_context(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
key_event_context: &BEKeyEntryContext,
) -> bool
Available on crate features BEKeyEntryContext
and BETextInput
only.
unsafe fn shouldDeferEventHandlingToSystemForTextInput_context( &self, text_input: &ProtocolObject<dyn BETextInput>, key_event_context: &BEKeyEntryContext, ) -> bool
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.
Sourceunsafe fn textInput_setCandidateSuggestions(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
suggestions: Option<&NSArray<BETextSuggestion>>,
)
Available on crate features BETextInput
and BETextSuggestion
only.
unsafe fn textInput_setCandidateSuggestions( &self, text_input: &ProtocolObject<dyn BETextInput>, suggestions: Option<&NSArray<BETextSuggestion>>, )
BETextInput
and BETextSuggestion
only.Provides text suggestions to the system.
For example, suggestions could include data list elements or AutoFill candidates.
Sourceunsafe fn selectionWillChangeForTextInput(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
)
Available on crate feature BETextInput
only.
unsafe fn selectionWillChangeForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
BETextInput
only.Tells the system when the selection is about to change in the document.
Sourceunsafe fn selectionDidChangeForTextInput(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
)
Available on crate feature BETextInput
only.
unsafe fn selectionDidChangeForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
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:]
Sourceunsafe fn textInput_deferReplaceTextActionToSystem(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
sender: &AnyObject,
)
Available on crate feature BETextInput
only.
unsafe fn textInput_deferReplaceTextActionToSystem( &self, text_input: &ProtocolObject<dyn BETextInput>, sender: &AnyObject, )
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.
Sourceunsafe fn invalidateTextEntryContextForTextInput(
&self,
text_input: &ProtocolObject<dyn BETextInput>,
)
Available on crate feature BETextInput
only.
unsafe fn invalidateTextEntryContextForTextInput( &self, text_input: &ProtocolObject<dyn BETextInput>, )
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.