harmony 鸿蒙inputmethod_text_config_capi.h

  • 2025-06-16
  • 浏览 (1)

inputmethod_text_config_capi.h

概述

提供输入框配置信息对象的创建、销毁与读写方法。

库: libohinputmethod.so

系统能力: SystemCapability.MiscServices.InputMethodFramework

起始版本: 12

相关模块:InputMethod

汇总

类型定义

名称 描述
InputMethod_TextConfig 输入框配置。

函数

名称 描述
InputMethod_TextConfig * OH_TextConfig_Create () 创建一个新的InputMethod_TextConfig实例。
void OH_TextConfig_Destroy (InputMethod_TextConfig *config) 销毁一个InputMethod_TextConfig实例。
InputMethod_ErrorCode OH_TextConfig_SetInputType (InputMethod_TextConfig *config, InputMethod_TextInputType inputType) 设置InputMethod_TextConfig实例的输入框类型。
InputMethod_ErrorCode OH_TextConfig_SetEnterKeyType (InputMethod_TextConfig *config, InputMethod_EnterKeyType enterKeyType) 设置InputMethod_TextConfig实例的回车键功能类型。
InputMethod_ErrorCode OH_TextConfig_SetPreviewTextSupport (InputMethod_TextConfig *config, bool supported) 将预上屏支持情况设置到InputMethod_TextConfig实例。
InputMethod_ErrorCode OH_TextConfig_SetSelection (InputMethod_TextConfig *config, int32_t start, int32_t end) 设置InputMethod_TextConfig实例的选中文本范围。
InputMethod_ErrorCode OH_TextConfig_SetWindowId (InputMethod_TextConfig *config, int32_t windowId) 设置InputMethod_TextConfig实例的所属窗口的窗口id。
InputMethod_ErrorCode OH_TextConfig_GetInputType (InputMethod_TextConfig *config, InputMethod_TextInputType *inputType) 获取InputMethod_TextConfig实例的输入框类型。
InputMethod_ErrorCode OH_TextConfig_GetEnterKeyType (InputMethod_TextConfig *config, InputMethod_EnterKeyType *enterKeyType) 获取InputMethod_TextConfig实例的回车键功能类型。
InputMethod_ErrorCode OH_TextConfig_IsPreviewTextSupported (InputMethod_TextConfig *config, bool *supported) 获取InputMethod_TextConfig实例的是否支持预上屏。
InputMethod_ErrorCode OH_TextConfig_GetCursorInfo (InputMethod_TextConfig *config, InputMethod_CursorInfo **cursorInfo) 获取InputMethod_TextConfig实例的光标信息。
InputMethod_ErrorCode OH_TextConfig_GetTextAvoidInfo (InputMethod_TextConfig *config, InputMethod_TextAvoidInfo **avoidInfo) 获取InputMethod_TextConfig实例的避让信息。
InputMethod_ErrorCode OH_TextConfig_GetSelection (InputMethod_TextConfig *config, int32_t *start, int32_t *end) 获取InputMethod_TextConfig实例的选区范围信息。
InputMethod_ErrorCode OH_TextConfig_GetWindowId (InputMethod_TextConfig *config, int32_t *windowId) 获取InputMethod_TextConfig实例所属窗口的窗口id。
InputMethod_ErrorCode OH_TextConfig_SetPlaceholder (InputMethod_TextConfig *config, const char16_t *placeholder, size_t length) 设置InputMethod_TextConfig实例的占位符文本信息。
InputMethod_ErrorCode OH_TextConfig_SetAbilityName (InputMethod_TextConfig *config, const char16_t *abilityName, size_t length) 设置InputMethod_TextConfig实例的abilityName信息。
InputMethod_ErrorCode OH_TextConfig_GetPlaceholder (InputMethod_TextConfig *config, char16_t *placeholder,size_t *length) 获取InputMethod_TextConfig实例占位文本信息。
InputMethod_ErrorCode OH_TextConfig_GetAbilityName (InputMethod_TextConfig *config, char16_t *abilityName,size_t *length) 获取InputMethod_TextConfig实例abilityName信息。

你可能感兴趣的鸿蒙文章

harmony 鸿蒙IME Kit(输入法开发服务)

harmony 鸿蒙InputMethod

harmony 鸿蒙输入法框架错误码

harmony 鸿蒙inputmethod_attach_options_capi.h

harmony 鸿蒙inputmethod_controller_capi.h

harmony 鸿蒙inputmethod_cursor_info_capi.h

harmony 鸿蒙inputmethod_inputmethod_proxy_capi.h

harmony 鸿蒙inputmethod_private_command_capi.h

harmony 鸿蒙inputmethod_text_avoid_info_capi.h

harmony 鸿蒙inputmethod_text_editor_proxy_capi.h

0  赞