inputmethod_text_editor_proxy_capi.h

Overview

Provides a set of methods for the custom text box developed by the application to obtain notifications and requests from the input method application.

File to include: <inputmethod/inputmethod_text_editor_proxy_capi.h>

Library: libohinputmethod.so

System capability: SystemCapability.MiscServices.InputMethodFramework

Since: 12

Related module: InputMethod

Summary

Structs

Name typedef Keyword Description
InputMethod_TextEditorProxy InputMethod_TextEditorProxy Represents the text box proxy. It provides methods for obtaining notifications and requests from the input method application.

Function

Name typedef Keyword Description
typedef void (*OH_TextEditorProxy_GetTextConfigFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_TextConfig *config) OH_TextEditorProxy_GetTextConfigFunc Function called when the input method obtains the text box configuration. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetTextConfigFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_InsertTextFunc)(InputMethod_TextEditorProxy *textEditorProxy, const char16_t *text, size_t length) OH_TextEditorProxy_InsertTextFunc Function called when the input method application inserts text. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetInsertTextFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_DeleteForwardFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t length) OH_TextEditorProxy_DeleteForwardFunc Function called when the input method deletes the text on the right of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetDeleteForwardFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_DeleteBackwardFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t length) OH_TextEditorProxy_DeleteBackwardFunc Function called when the input method deletes the text on the left of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetDeleteBackwardFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_SendKeyboardStatusFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_KeyboardStatus keyboardStatus) OH_TextEditorProxy_SendKeyboardStatusFunc Function called when the input method notifies the keyboard status. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSendKeyboardStatusFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_SendEnterKeyFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_EnterKeyType enterKeyType) OH_TextEditorProxy_SendEnterKeyFunc Function called when the Enter key is pressed in the input method. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSendEnterKeyFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_MoveCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_Direction direction) OH_TextEditorProxy_MoveCursorFunc Function called when the cursor is moved in the input method. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetMoveCursorFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_HandleSetSelectionFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t start, int32_t end) OH_TextEditorProxy_HandleSetSelectionFunc Function called when the input method requests to select text. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetHandleSetSelectionFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_HandleExtendActionFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_ExtendAction action) OH_TextEditorProxy_HandleExtendActionFunc Function called when the input method sends an extended editing operation. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetHandleExtendActionFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_GetLeftTextOfCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length) OH_TextEditorProxy_GetLeftTextOfCursorFunc Function called when the input method obtains the text on the left of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetLeftTextOfCursorFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_GetRightTextOfCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length) OH_TextEditorProxy_GetRightTextOfCursorFunc Function called when the input method obtains the text on the right of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetRightTextOfCursorFunc, and register it through OH_InputMethodController_Attach.
typedef int32_t (*OH_TextEditorProxy_GetTextIndexAtCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy) OH_TextEditorProxy_GetTextIndexAtCursorFunc Function called when the input method obtains the index of the text where the cursor is located in the text box. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetTextIndexAtCursorFunc, and register it through OH_InputMethodController_Attach.
typedef int32_t (*OH_TextEditorProxy_ReceivePrivateCommandFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_PrivateCommand *privateCommand[], size_t size) OH_TextEditorProxy_ReceivePrivateCommandFunc Function called when the input method application sends a private data command. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetReceivePrivateCommandFunc, and register it through OH_InputMethodController_Attach.
typedef int32_t (*OH_TextEditorProxy_SetPreviewTextFunc)(InputMethod_TextEditorProxy *textEditorProxy, const char16_t text[], size_t length, int32_t start, int32_t end) OH_TextEditorProxy_SetPreviewTextFunc Function called when the input method sets the text preview feature. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSetPreviewTextFunc, and register it through OH_InputMethodController_Attach.
typedef void (*OH_TextEditorProxy_FinishTextPreviewFunc)(InputMethod_TextEditorProxy *textEditorProxy) OH_TextEditorProxy_FinishTextPreviewFunc Function called when the input method ends the text preview feature. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetFinishTextPreviewFunc, and register it through OH_InputMethodController_Attach.
InputMethod_TextEditorProxy *OH_TextEditorProxy_Create(void) - Creates an InputMethod_TextEditorProxy instance.
void OH_TextEditorProxy_Destroy(InputMethod_TextEditorProxy *proxy) - Destroys an InputMethod_TextEditorProxy instance.
InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextConfigFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextConfigFunc getTextConfigFunc) - Sets the OH_TextEditorProxy_GetTextConfigFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetInsertTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_InsertTextFunc insertTextFunc) - Sets the OH_TextEditorProxy_InsertTextFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteForwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteForwardFunc deleteForwardFunc) - Sets the OH_TextEditorProxy_DeleteForwardFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteBackwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteBackwardFunc deleteBackwardFunc) - Sets the OH_TextEditorProxy_DeleteBackwardFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetSendKeyboardStatusFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendKeyboardStatusFunc sendKeyboardStatusFunc) - Sets the OH_TextEditorProxy_SendKeyboardStatusFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetSendEnterKeyFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendEnterKeyFunc sendEnterKeyFunc) - Sets the OH_TextEditorProxy_SetSendEnterKeyFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetMoveCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_MoveCursorFunc moveCursorFunc) - Sets the OH_TextEditorProxy_SetMoveCursorFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetHandleSetSelectionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleSetSelectionFunc handleSetSelectionFunc) - Sets the OH_TextEditorProxy_HandleSetSelectionFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetHandleExtendActionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleExtendActionFunc handleExtendActionFunc) - Sets the OH_TextEditorProxy_HandleExtendActionFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetGetLeftTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc getLeftTextOfCursorFunc) - Sets the OH_TextEditorProxy_GetLeftTextOfCursorFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetGetRightTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc getRightTextOfCursorFunc) - Sets the OH_TextEditorProxy_GetRightTextOfCursorFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextIndexAtCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc getTextIndexAtCursorFunc) - Sets the OH_TextEditorProxy_GetTextIndexAtCursorFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetReceivePrivateCommandFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc receivePrivateCommandFunc) - Sets the OH_TextEditorProxy_ReceivePrivateCommandFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetSetPreviewTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SetPreviewTextFunc setPreviewTextFunc) - Sets the OH_TextEditorProxy_SetPreviewTextFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_SetFinishTextPreviewFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_FinishTextPreviewFunc finishTextPreviewFunc) - Sets the OH_TextEditorProxy_FinishTextPreviewFunc function to InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextConfigFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextConfigFunc *getTextConfigFunc) - Obtains the OH_TextEditorProxy_GetTextConfigFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetInsertTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_InsertTextFunc *insertTextFunc) - Obtains the OH_TextEditorProxy_InsertTextFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteForwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteForwardFunc *deleteForwardFunc) - Obtains the OH_TextEditorProxy_DeleteForwardFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteBackwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteBackwardFunc *deleteBackwardFunc) - Obtains the OH_TextEditorProxy_DeleteBackwardFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetSendKeyboardStatusFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendKeyboardStatusFunc *sendKeyboardStatusFunc) - Obtains the OH_TextEditorProxy_SendKeyboardStatusFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetSendEnterKeyFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendEnterKeyFunc *sendEnterKeyFunc) - Obtains the OH_TextEditorProxy_SendEnterKeyFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetMoveCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_MoveCursorFunc *moveCursorFunc) - Obtains the OH_TextEditorProxy_MoveCursorFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetHandleSetSelectionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleSetSelectionFunc *handleSetSelectionFunc) - Obtains the OH_TextEditorProxy_HandleSetSelectionFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetHandleExtendActionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleExtendActionFunc *handleExtendActionFunc) - Obtains the OH_TextEditorProxy_HandleExtendActionFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetGetLeftTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc *getLeftTextOfCursorFunc) - Obtains the OH_TextEditorProxy_GetLeftTextOfCursorFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetGetRightTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc *getRightTextOfCursorFunc) - Obtains the OH_TextEditorProxy_GetRightTextOfCursorFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextIndexAtCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc *getTextIndexAtCursorFunc) - Obtains the OH_TextEditorProxy_GetTextIndexAtCursorFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetReceivePrivateCommandFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc *receivePrivateCommandFunc) - Obtains the OH_TextEditorProxy_ReceivePrivateCommandFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetSetPreviewTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SetPreviewTextFunc *setPreviewTextFunc) - Obtains the OH_TextEditorProxy_SetPreviewTextFunc function from InputMethod_TextEditorProxy.
InputMethod_ErrorCode OH_TextEditorProxy_GetFinishTextPreviewFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_FinishTextPreviewFunc *finishTextPreviewFunc) - Obtains the OH_TextEditorProxy_FinishTextPreviewFunc function from InputMethod_TextEditorProxy.

Function Description

OH_TextEditorProxy_GetTextConfigFunc()

typedef void (*OH_TextEditorProxy_GetTextConfigFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_TextConfig *config)

Description

Function called when the input method obtains the text box configuration. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetTextConfigFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_TextConfig *config Pointer to the InputMethod_TextConfig instance. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.

OH_TextEditorProxy_InsertTextFunc()

typedef void (*OH_TextEditorProxy_InsertTextFunc)(InputMethod_TextEditorProxy *textEditorProxy, const char16_t *text, size_t length)

Description

Function called when the input method application inserts text. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetInsertTextFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.in.
const char16_t *text Pointer to the characters to be inserted. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.
size_t length Length of the characters to be inserted.

OH_TextEditorProxy_DeleteForwardFunc()

typedef void (*OH_TextEditorProxy_DeleteForwardFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t length)

Description

Function called when the input method deletes the text on the right of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetDeleteForwardFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
int32_t length Length of the characters to be deleted.

OH_TextEditorProxy_DeleteBackwardFunc()

typedef void (*OH_TextEditorProxy_DeleteBackwardFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t length)

Description

Function called when the input method deletes the text on the left of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetDeleteBackwardFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
int32_t length Length of the characters to be deleted.

OH_TextEditorProxy_SendKeyboardStatusFunc()

typedef void (*OH_TextEditorProxy_SendKeyboardStatusFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_KeyboardStatus keyboardStatus)

Description

Function called when the input method notifies the keyboard status. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSendKeyboardStatusFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_KeyboardStatus keyboardStatus Keyboard status. For details, see InputMethod_KeyboardStatus.

OH_TextEditorProxy_SendEnterKeyFunc()

typedef void (*OH_TextEditorProxy_SendEnterKeyFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_EnterKeyType enterKeyType)

Description

Function called when the Enter key is pressed in the input method. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSendEnterKeyFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_EnterKeyType enterKeyType Enter key type. For details, see InputMethod_EnterKeyType.

OH_TextEditorProxy_MoveCursorFunc()

typedef void (*OH_TextEditorProxy_MoveCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_Direction direction)

Description

Function called when the cursor is moved in the input method. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetMoveCursorFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_Direction direction Direction in which the cursor moves. For details, see InputMethod_Direction.

OH_TextEditorProxy_HandleSetSelectionFunc()

typedef void (*OH_TextEditorProxy_HandleSetSelectionFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t start, int32_t end)

Description

Function called when the input method requests to select text. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetHandleSetSelectionFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
int32_t start Start position of the selected text.
int32_t end End position of the selected text.

OH_TextEditorProxy_HandleExtendActionFunc()

typedef void (*OH_TextEditorProxy_HandleExtendActionFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_ExtendAction action)

Description

Function called when the input method sends an extended editing operation. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetHandleExtendActionFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_ExtendAction action Extended editing operation. For details, see InputMethod_ExtendAction.

OH_TextEditorProxy_GetLeftTextOfCursorFunc()

typedef void (*OH_TextEditorProxy_GetLeftTextOfCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length)

Description

Function called when the input method obtains the text on the left of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetLeftTextOfCursorFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
int32_t number Length of the text to be obtained.
char16_t text[] Text content of a specified length on the left of the cursor. You need to assign a value to the text content in the function implementation. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.
size_t *length Pointer to the length of the text on the left of the cursor. You need to transfer this parameter.

OH_TextEditorProxy_GetRightTextOfCursorFunc()

typedef void (*OH_TextEditorProxy_GetRightTextOfCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy, int32_t number, char16_t text[], size_t *length)

Description

Function called when the input method obtains the text on the right of the cursor. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetRightTextOfCursorFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
int32_t number Length of the text to be obtained.
char16_t text[] Text content of a specified length on the right of the cursor. You need to assign a value to the text content in the function implementation. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.
size_t *length Pointer to the length of the text on the right of the cursor. You need to transfer this parameter.

OH_TextEditorProxy_GetTextIndexAtCursorFunc()

typedef int32_t (*OH_TextEditorProxy_GetTextIndexAtCursorFunc)(InputMethod_TextEditorProxy *textEditorProxy)

Description

Function called when the input method obtains the index of the text where the cursor is located in the text box. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetGetTextIndexAtCursorFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.

Returns

Type Description
int32_t Index of the text where the cursor is located.

OH_TextEditorProxy_ReceivePrivateCommandFunc()

typedef int32_t (*OH_TextEditorProxy_ReceivePrivateCommandFunc)(InputMethod_TextEditorProxy *textEditorProxy, InputMethod_PrivateCommand *privateCommand[], size_t size)

Description

Function called when the input method application sends a private data command. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetReceivePrivateCommandFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
InputMethod_PrivateCommand *privateCommand[] Private data command. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.
size_t size Size of the private data.

Returns

Type Description
int32_t Processing result of the private data command.

OH_TextEditorProxy_SetPreviewTextFunc()

typedef int32_t (*OH_TextEditorProxy_SetPreviewTextFunc)(InputMethod_TextEditorProxy *textEditorProxy, const char16_t text[], size_t length, int32_t start, int32_t end)

Description

Function called when the input method sets the text preview feature. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetSetPreviewTextFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.
const char16_t text[] Text requested to be previewed. The memory to which this pointer points can be accessed only when this API is called. Once the callback returns, the memory will be released and must not be accessed thereafter.
size_t length Length of the text to be previewed.
int32_t start Starting cursor position of the text to be previewed.
int32_t end Ending cursor position of the text to be previewed.

Returns

Type Description
int32_t Result of setting text preview.

OH_TextEditorProxy_FinishTextPreviewFunc()

typedef void (*OH_TextEditorProxy_FinishTextPreviewFunc)(InputMethod_TextEditorProxy *textEditorProxy)

Description

Function called when the input method ends the text preview feature. You need to implement this function, set it to InputMethod_TextEditorProxy via OH_TextEditorProxy_SetFinishTextPreviewFunc, and register it through OH_InputMethodController_Attach.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *textEditorProxy Pointer to the InputMethod_TextEditorProxy instance to be set.

OH_TextEditorProxy_Create()

InputMethod_TextEditorProxy *OH_TextEditorProxy_Create(void)

Description

Creates an InputMethod_TextEditorProxy instance.

Since: 12

Returns

Type Description
InputMethod_TextEditorProxy * If the operation is successful, a pointer to the created InputMethod_TextEditorProxy instance is returned.
If the operation failed, NULL is returned, which may be caused by insufficient application address space.

OH_TextEditorProxy_Destroy()

void OH_TextEditorProxy_Destroy(InputMethod_TextEditorProxy *proxy)

Description

Destroys an InputMethod_TextEditorProxy instance.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be destroyed.

OH_TextEditorProxy_SetGetTextConfigFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextConfigFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextConfigFunc getTextConfigFunc)

Description

Sets the OH_TextEditorProxy_GetTextConfigFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_GetTextConfigFunc getTextConfigFunc OH_TextEditorProxy_GetTextConfigFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetInsertTextFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetInsertTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_InsertTextFunc insertTextFunc)

Description

Sets the OH_TextEditorProxy_InsertTextFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_InsertTextFunc insertTextFunc OH_TextEditorProxy_InsertTextFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetDeleteForwardFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteForwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteForwardFunc deleteForwardFunc)

Description

Sets the OH_TextEditorProxy_DeleteForwardFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_DeleteForwardFunc deleteForwardFunc OH_TextEditorProxy_DeleteForwardFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetDeleteBackwardFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetDeleteBackwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteBackwardFunc deleteBackwardFunc)

Description

Sets the OH_TextEditorProxy_DeleteBackwardFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_DeleteBackwardFunc deleteBackwardFunc OH_TextEditorProxy_DeleteBackwardFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetSendKeyboardStatusFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetSendKeyboardStatusFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendKeyboardStatusFunc sendKeyboardStatusFunc)

Description

Sets the OH_TextEditorProxy_SendKeyboardStatusFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_SendKeyboardStatusFunc sendKeyboardStatusFunc OH_TextEditorProxy_SendKeyboardStatusFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetSendEnterKeyFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetSendEnterKeyFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendEnterKeyFunc sendEnterKeyFunc)

Description

Sets the OH_TextEditorProxy_SetSendEnterKeyFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_SendEnterKeyFunc sendEnterKeyFunc OH_TextEditorProxy_SendEnterKeyFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetMoveCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetMoveCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_MoveCursorFunc moveCursorFunc)

Description

Sets the OH_TextEditorProxy_SetMoveCursorFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_MoveCursorFunc moveCursorFunc OH_TextEditorProxy_MoveCursorFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetHandleSetSelectionFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetHandleSetSelectionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleSetSelectionFunc handleSetSelectionFunc)

Description

Sets the OH_TextEditorProxy_HandleSetSelectionFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_HandleSetSelectionFunc handleSetSelectionFunc OH_TextEditorProxy_HandleSetSelectionFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetHandleExtendActionFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetHandleExtendActionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleExtendActionFunc handleExtendActionFunc)

Description

Sets the OH_TextEditorProxy_HandleExtendActionFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_HandleExtendActionFunc handleExtendActionFunc OH_TextEditorProxy_HandleExtendActionFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetGetLeftTextOfCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetGetLeftTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc getLeftTextOfCursorFunc)

Description

Sets the OH_TextEditorProxy_GetLeftTextOfCursorFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_GetLeftTextOfCursorFunc getLeftTextOfCursorFunc OH_TextEditorProxy_GetLeftTextOfCursorFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetGetRightTextOfCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetGetRightTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc getRightTextOfCursorFunc)

Description

Sets the OH_TextEditorProxy_GetRightTextOfCursorFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_GetRightTextOfCursorFunc getRightTextOfCursorFunc OH_TextEditorProxy_GetRightTextOfCursorFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetGetTextIndexAtCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetGetTextIndexAtCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc getTextIndexAtCursorFunc)

Description

Sets the OH_TextEditorProxy_GetTextIndexAtCursorFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_GetTextIndexAtCursorFunc getTextIndexAtCursorFunc OH_TextEditorProxy_GetTextIndexAtCursorFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetReceivePrivateCommandFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetReceivePrivateCommandFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc receivePrivateCommandFunc)

Description

Sets the OH_TextEditorProxy_ReceivePrivateCommandFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_ReceivePrivateCommandFunc receivePrivateCommandFunc OH_TextEditorProxy_ReceivePrivateCommandFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetSetPreviewTextFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetSetPreviewTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SetPreviewTextFunc setPreviewTextFunc)

Description

Sets the OH_TextEditorProxy_SetPreviewTextFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_SetPreviewTextFunc setPreviewTextFunc OH_TextEditorProxy_SetPreviewTextFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetFinishTextPreviewFunc()

InputMethod_ErrorCode OH_TextEditorProxy_SetFinishTextPreviewFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_FinishTextPreviewFunc finishTextPreviewFunc)

Description

Sets the OH_TextEditorProxy_FinishTextPreviewFunc function to InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be set.
OH_TextEditorProxy_FinishTextPreviewFunc finishTextPreviewFunc OH_TextEditorProxy_FinishTextPreviewFunc to be set to the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetGetTextConfigFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextConfigFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextConfigFunc *getTextConfigFunc)

Description

Obtains the OH_TextEditorProxy_GetTextConfigFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_GetTextConfigFunc *getTextConfigFunc Function OH_TextEditorProxy_GetTextConfigFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetInsertTextFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetInsertTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_InsertTextFunc *insertTextFunc)

Description

Obtains the OH_TextEditorProxy_InsertTextFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_InsertTextFunc *insertTextFunc Function OH_TextEditorProxy_InsertTextFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetDeleteForwardFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteForwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteForwardFunc *deleteForwardFunc)

Description

Obtains the OH_TextEditorProxy_DeleteForwardFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_DeleteForwardFunc *deleteForwardFunc Function OH_TextEditorProxy_DeleteForwardFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetDeleteBackwardFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetDeleteBackwardFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_DeleteBackwardFunc *deleteBackwardFunc)

Description

Obtains the OH_TextEditorProxy_DeleteBackwardFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_DeleteBackwardFunc *deleteBackwardFunc Function OH_TextEditorProxy_DeleteBackwardFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetSendKeyboardStatusFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetSendKeyboardStatusFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendKeyboardStatusFunc *sendKeyboardStatusFunc)

Description

Obtains the OH_TextEditorProxy_SendKeyboardStatusFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_SendKeyboardStatusFunc *sendKeyboardStatusFunc Function OH_TextEditorProxy_SendKeyboardStatusFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetSendEnterKeyFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetSendEnterKeyFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SendEnterKeyFunc *sendEnterKeyFunc)

Description

Obtains the OH_TextEditorProxy_SendEnterKeyFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_SendEnterKeyFunc *sendEnterKeyFunc Function OH_TextEditorProxy_SendEnterKeyFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetMoveCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetMoveCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_MoveCursorFunc *moveCursorFunc)

Description

Obtains the OH_TextEditorProxy_MoveCursorFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_MoveCursorFunc *moveCursorFunc Function OH_TextEditorProxy_MoveCursorFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetHandleSetSelectionFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetHandleSetSelectionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleSetSelectionFunc *handleSetSelectionFunc)

Description

Obtains the OH_TextEditorProxy_HandleSetSelectionFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_HandleSetSelectionFunc *handleSetSelectionFunc Function OH_TextEditorProxy_HandleSetSelectionFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetHandleExtendActionFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetHandleExtendActionFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_HandleExtendActionFunc *handleExtendActionFunc)

Description

Obtains the OH_TextEditorProxy_HandleExtendActionFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_HandleExtendActionFunc *handleExtendActionFunc Function OH_TextEditorProxy_HandleExtendActionFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetGetLeftTextOfCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetGetLeftTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetLeftTextOfCursorFunc *getLeftTextOfCursorFunc)

Description

Obtains the OH_TextEditorProxy_GetLeftTextOfCursorFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_GetLeftTextOfCursorFunc *getLeftTextOfCursorFunc Function OH_TextEditorProxy_GetLeftTextOfCursorFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetGetRightTextOfCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetGetRightTextOfCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetRightTextOfCursorFunc *getRightTextOfCursorFunc)

Description

Obtains the OH_TextEditorProxy_GetRightTextOfCursorFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_GetRightTextOfCursorFunc *getRightTextOfCursorFunc Function OH_TextEditorProxy_GetRightTextOfCursorFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetGetTextIndexAtCursorFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetGetTextIndexAtCursorFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_GetTextIndexAtCursorFunc *getTextIndexAtCursorFunc)

Description

Obtains the OH_TextEditorProxy_GetTextIndexAtCursorFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_GetTextIndexAtCursorFunc *getTextIndexAtCursorFunc Function OH_TextEditorProxy_GetTextIndexAtCursorFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetReceivePrivateCommandFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetReceivePrivateCommandFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_ReceivePrivateCommandFunc *receivePrivateCommandFunc)

Description

Obtains the OH_TextEditorProxy_ReceivePrivateCommandFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_ReceivePrivateCommandFunc *receivePrivateCommandFunc Function OH_TextEditorProxy_ReceivePrivateCommandFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetSetPreviewTextFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetSetPreviewTextFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_SetPreviewTextFunc *setPreviewTextFunc)

Description

Obtains the OH_TextEditorProxy_SetPreviewTextFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_SetPreviewTextFunc *setPreviewTextFunc Function OH_TextEditorProxy_SetPreviewTextFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_GetFinishTextPreviewFunc()

InputMethod_ErrorCode OH_TextEditorProxy_GetFinishTextPreviewFunc(InputMethod_TextEditorProxy *proxy, OH_TextEditorProxy_FinishTextPreviewFunc *finishTextPreviewFunc)

Description

Obtains the OH_TextEditorProxy_FinishTextPreviewFunc function from InputMethod_TextEditorProxy.

Since: 12

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the InputMethod_TextEditorProxy instance to be read.
OH_TextEditorProxy_FinishTextPreviewFunc *finishTextPreviewFunc Function OH_TextEditorProxy_FinishTextPreviewFunc obtained from the proxy.

Returns

Type Description
InputMethod_ErrorCode An error code.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - An unexpected null pointer.
For details about the error codes, see InputMethod_ErrorCode.

OH_TextEditorProxy_SetCallbackInMainThread()

InputMethod_ErrorCode OH_TextEditorProxy_SetCallbackInMainThread(InputMethod_TextEditorProxy *proxy, bool isCallbackInMainThread)

Description

Configures the execution thread (main thread/IPC thread) for the callback function of InputMethod_TextEditorProxy. This API controls all callbacks of InputMethod_TextEditorProxy except OH_TextEditorProxy_GetTextConfigFunc. The execution thread of OH_TextEditorProxy_GetTextConfigFunc is determined by the thread that calls OH_InputMethodController_Attach, and is not affected by this API. If this callback needs to be executed on the main thread, ensure that OH_InputMethodController_Attach is called on the main thread.

Since: 22

Parameters

Name Description
InputMethod_TextEditorProxy *proxy Pointer to the target InputMethod_TextEditorProxy instance.
bool isCallbackInMainThread Thread execution policy. - true: The callback executes on the main thread to avoid multithreaded concurrency. Do not perform time-consuming operations in the callback, as this may block the main thread. - false: The callback executes on an IPC thread (which may result in multithreaded concurrency).

Returns

Type Description
InputMethod_ErrorCode Execution result.
IME_ERR_OK - Success.
IME_ERR_NULL_POINTER - It is returned when proxy is null.