pub type OH_TextEditorProxy_SetPreviewTextFunc = Option<unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy, text: *const u16, length: usize, start: i32, end: i32) -> i32>;Expand description
@brief Called when input method setting preview text.
You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link OH_TextEditorProxy_SetReceivePrivateCommandFunc}, and use {@link OH_InputMethodController_Attach} to complete the registration.\n
@param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in. @param text Represents text to be previewd. You can only access the memory when this callback is called. After this callback returns, the memory will be released and you should not access this memory again. @param length Length of preview text. @param start Start position of preview text. @param end End position of preview text. @return Returns the result of setting preview text. @since 12
Aliased Type§
pub enum OH_TextEditorProxy_SetPreviewTextFunc {
None,
Some(unsafe extern "C" fn(*mut InputMethod_TextEditorProxy, *const u16, usize, i32, i32) -> i32),
}