Skip to main content

ohos_input_method_sys/
lib.rs

1/* automatically generated by rust-bindgen 0.65.1 */
2
3#![allow(non_snake_case)]
4#![allow(non_upper_case_globals)]
5#![allow(non_camel_case_types)]
6#![allow(clippy::missing_safety_doc)]
7
8#[link(name = "ohinputmethod")]
9unsafe extern "C" {}
10
11#[doc = " The keyboard status is none."]
12pub const InputMethod_KeyboardStatus_IME_KEYBOARD_STATUS_NONE: InputMethod_KeyboardStatus = 0;
13#[doc = " The keyboard status is hide."]
14pub const InputMethod_KeyboardStatus_IME_KEYBOARD_STATUS_HIDE: InputMethod_KeyboardStatus = 1;
15#[doc = " The keyboard status is show."]
16pub const InputMethod_KeyboardStatus_IME_KEYBOARD_STATUS_SHOW: InputMethod_KeyboardStatus = 2;
17#[doc = " @brief Keyboard status.\n\n @since 12"]
18pub type InputMethod_KeyboardStatus = u32;
19#[doc = " The enter key type is UNSPECIFIED."]
20pub const InputMethod_EnterKeyType_IME_ENTER_KEY_UNSPECIFIED: InputMethod_EnterKeyType = 0;
21#[doc = " The enter key type is NONE."]
22pub const InputMethod_EnterKeyType_IME_ENTER_KEY_NONE: InputMethod_EnterKeyType = 1;
23#[doc = " The enter key type is GO."]
24pub const InputMethod_EnterKeyType_IME_ENTER_KEY_GO: InputMethod_EnterKeyType = 2;
25#[doc = " The enter key type is SEARCH."]
26pub const InputMethod_EnterKeyType_IME_ENTER_KEY_SEARCH: InputMethod_EnterKeyType = 3;
27#[doc = " The enter key type is SEND."]
28pub const InputMethod_EnterKeyType_IME_ENTER_KEY_SEND: InputMethod_EnterKeyType = 4;
29#[doc = " The enter key type is NEXT."]
30pub const InputMethod_EnterKeyType_IME_ENTER_KEY_NEXT: InputMethod_EnterKeyType = 5;
31#[doc = " The enter key type is DONE."]
32pub const InputMethod_EnterKeyType_IME_ENTER_KEY_DONE: InputMethod_EnterKeyType = 6;
33#[doc = " The enter key type is PREVIOUS."]
34pub const InputMethod_EnterKeyType_IME_ENTER_KEY_PREVIOUS: InputMethod_EnterKeyType = 7;
35#[doc = " The enter key type is NEWLINE."]
36pub const InputMethod_EnterKeyType_IME_ENTER_KEY_NEWLINE: InputMethod_EnterKeyType = 8;
37#[doc = " @brief Enter key type.\n\n @since 12"]
38pub type InputMethod_EnterKeyType = u32;
39#[doc = " The direction is NONE."]
40pub const InputMethod_Direction_IME_DIRECTION_NONE: InputMethod_Direction = 0;
41#[doc = " The direction is UP."]
42pub const InputMethod_Direction_IME_DIRECTION_UP: InputMethod_Direction = 1;
43#[doc = " The direction is DOWN."]
44pub const InputMethod_Direction_IME_DIRECTION_DOWN: InputMethod_Direction = 2;
45#[doc = " The direction is LEFT."]
46pub const InputMethod_Direction_IME_DIRECTION_LEFT: InputMethod_Direction = 3;
47#[doc = " The direction is RIGHT."]
48pub const InputMethod_Direction_IME_DIRECTION_RIGHT: InputMethod_Direction = 4;
49#[doc = " @brief Direction.\n\n @since 12"]
50pub type InputMethod_Direction = u32;
51#[doc = " Select all text."]
52pub const InputMethod_ExtendAction_IME_EXTEND_ACTION_SELECT_ALL: InputMethod_ExtendAction = 0;
53#[doc = " Cut selected text."]
54pub const InputMethod_ExtendAction_IME_EXTEND_ACTION_CUT: InputMethod_ExtendAction = 3;
55#[doc = " Copy selected text."]
56pub const InputMethod_ExtendAction_IME_EXTEND_ACTION_COPY: InputMethod_ExtendAction = 4;
57#[doc = " Paste from paste board."]
58pub const InputMethod_ExtendAction_IME_EXTEND_ACTION_PASTE: InputMethod_ExtendAction = 5;
59#[doc = " @brief The extend action.\n\n @since 12"]
60pub type InputMethod_ExtendAction = u32;
61#[doc = " The text input type is NONE."]
62pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_NONE: InputMethod_TextInputType = -1;
63#[doc = " The text input type is TEXT."]
64pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_TEXT: InputMethod_TextInputType = 0;
65#[doc = " The text input type is MULTILINE."]
66pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_MULTILINE: InputMethod_TextInputType = 1;
67#[doc = " The text input type is NUMBER."]
68pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_NUMBER: InputMethod_TextInputType = 2;
69#[doc = " The text input type is PHONE."]
70pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_PHONE: InputMethod_TextInputType = 3;
71#[doc = " The text input type is DATETIME."]
72pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_DATETIME: InputMethod_TextInputType = 4;
73#[doc = " The text input type is EMAIL ADDRESS."]
74pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_EMAIL_ADDRESS: InputMethod_TextInputType =
75    5;
76#[doc = " The text input type is URL."]
77pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_URL: InputMethod_TextInputType = 6;
78#[doc = " The text input type is VISIBLE PASSWORD."]
79pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_VISIBLE_PASSWORD:
80    InputMethod_TextInputType = 7;
81#[doc = " The text input type is NUMBER PASSWORD."]
82pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_NUMBER_PASSWORD: InputMethod_TextInputType =
83    8;
84#[doc = " The text input type is SCREEN LOCK PASSWORD."]
85pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_SCREEN_LOCK_PASSWORD:
86    InputMethod_TextInputType = 9;
87#[doc = " The text input type is USER NAME."]
88pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_USER_NAME: InputMethod_TextInputType = 10;
89#[doc = " The text input type is NEW PASSWORD."]
90pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_NEW_PASSWORD: InputMethod_TextInputType =
91    11;
92#[doc = " The text input type is NUMBER DECIMAL."]
93pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_NUMBER_DECIMAL: InputMethod_TextInputType =
94    12;
95#[doc = " The text input type is ONE TIME CODE.\n\n @since 20"]
96#[cfg(feature = "api-20")]
97pub const InputMethod_TextInputType_IME_TEXT_INPUT_TYPE_ONE_TIME_CODE: InputMethod_TextInputType =
98    13;
99#[doc = " @brief The text input type.\n\n @since 12"]
100pub type InputMethod_TextInputType = i32;
101#[doc = " Value type is NONE."]
102pub const InputMethod_CommandValueType_IME_COMMAND_VALUE_TYPE_NONE: InputMethod_CommandValueType =
103    0;
104#[doc = " Value type is STRING."]
105pub const InputMethod_CommandValueType_IME_COMMAND_VALUE_TYPE_STRING: InputMethod_CommandValueType =
106    1;
107#[doc = " Value type is BOOL."]
108pub const InputMethod_CommandValueType_IME_COMMAND_VALUE_TYPE_BOOL: InputMethod_CommandValueType =
109    2;
110#[doc = " Value type is INT32."]
111pub const InputMethod_CommandValueType_IME_COMMAND_VALUE_TYPE_INT32: InputMethod_CommandValueType =
112    3;
113#[doc = " @brief The value type of command data.\n\n @since 12"]
114pub type InputMethod_CommandValueType = u32;
115#[doc = " @error The error code in the correct case."]
116pub const InputMethod_ErrorCode_IME_ERR_OK: InputMethod_ErrorCode = 0;
117#[doc = " @error The error code when error is undefined."]
118pub const InputMethod_ErrorCode_IME_ERR_UNDEFINED: InputMethod_ErrorCode = 1;
119#[doc = " @error The error code when parameter check failed."]
120pub const InputMethod_ErrorCode_IME_ERR_PARAMCHECK: InputMethod_ErrorCode = 401;
121#[doc = " @error The error code when the bundle manager error."]
122pub const InputMethod_ErrorCode_IME_ERR_PACKAGEMANAGER: InputMethod_ErrorCode = 12800001;
123#[doc = " @error The error code when input method engine error."]
124pub const InputMethod_ErrorCode_IME_ERR_IMENGINE: InputMethod_ErrorCode = 12800002;
125#[doc = " @error The error code when input method client error."]
126pub const InputMethod_ErrorCode_IME_ERR_IMCLIENT: InputMethod_ErrorCode = 12800003;
127#[doc = " @error The error code when configuration persistence error."]
128pub const InputMethod_ErrorCode_IME_ERR_CONFIG_PERSIST: InputMethod_ErrorCode = 12800005;
129#[doc = " @error The error code when input method controller error."]
130pub const InputMethod_ErrorCode_IME_ERR_CONTROLLER: InputMethod_ErrorCode = 12800006;
131#[doc = " @error The error code when input method setting error."]
132pub const InputMethod_ErrorCode_IME_ERR_SETTINGS: InputMethod_ErrorCode = 12800007;
133#[doc = " @error The error code when input method manager service error."]
134pub const InputMethod_ErrorCode_IME_ERR_IMMS: InputMethod_ErrorCode = 12800008;
135#[doc = " @error The error code when input method client detached."]
136pub const InputMethod_ErrorCode_IME_ERR_DETACHED: InputMethod_ErrorCode = 12800009;
137#[doc = " @error The error code when unexpected null pointer."]
138pub const InputMethod_ErrorCode_IME_ERR_NULL_POINTER: InputMethod_ErrorCode = 12802000;
139#[doc = " @error The error code when query failed."]
140pub const InputMethod_ErrorCode_IME_ERR_QUERY_FAILED: InputMethod_ErrorCode = 12802001;
141#[doc = " @brief The value type of command data.\n\n @since 12"]
142pub type InputMethod_ErrorCode = u32;
143#[doc = " The request keyboard reason is NONE."]
144#[cfg(feature = "api-15")]
145pub const InputMethod_RequestKeyboardReason_IME_REQUEST_REASON_NONE:
146    InputMethod_RequestKeyboardReason = 0;
147#[doc = " The request keyboard reason is MOUSE."]
148#[cfg(feature = "api-15")]
149pub const InputMethod_RequestKeyboardReason_IME_REQUEST_REASON_MOUSE:
150    InputMethod_RequestKeyboardReason = 1;
151#[doc = " The request keyboard reason is TOUCH."]
152#[cfg(feature = "api-15")]
153pub const InputMethod_RequestKeyboardReason_IME_REQUEST_REASON_TOUCH:
154    InputMethod_RequestKeyboardReason = 2;
155#[doc = " The request keyboard reason is OTHER."]
156#[cfg(feature = "api-15")]
157pub const InputMethod_RequestKeyboardReason_IME_REQUEST_REASON_OTHER:
158    InputMethod_RequestKeyboardReason = 20;
159#[doc = " @brief The value type of request keyboard.\n\n @since 15"]
160#[cfg(feature = "api-15")]
161pub type InputMethod_RequestKeyboardReason = u32;
162#[repr(C)]
163#[derive(Debug, Copy, Clone)]
164pub struct InputMethod_PrivateCommand {
165    _unused: [u8; 0],
166}
167extern "C" {
168    #[doc = " @brief Create a new {@link InputMethod_PrivateCommand} instance.\n\n @param key The key of the private command.\n @param keyLength The length of the key.\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_PrivateCommand}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
169    pub fn OH_PrivateCommand_Create(
170        key: *mut ::std::os::raw::c_char,
171        keyLength: usize,
172    ) -> *mut InputMethod_PrivateCommand;
173}
174extern "C" {
175    #[doc = " @brief Destroy a {@link InputMethod_PrivateCommand} instance.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be destroyed.\n @since 12"]
176    pub fn OH_PrivateCommand_Destroy(command: *mut InputMethod_PrivateCommand);
177}
178extern "C" {
179    #[doc = " @brief Set key value into {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be set value.\n @param key Represents key value.\n @param keyLength Represents key length.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
180    pub fn OH_PrivateCommand_SetKey(
181        command: *mut InputMethod_PrivateCommand,
182        key: *mut ::std::os::raw::c_char,
183        keyLength: usize,
184    ) -> InputMethod_ErrorCode;
185}
186extern "C" {
187    #[doc = " @brief Set bool data value into {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be set value.\n @param value Represents bool data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
188    pub fn OH_PrivateCommand_SetBoolValue(
189        command: *mut InputMethod_PrivateCommand,
190        value: bool,
191    ) -> InputMethod_ErrorCode;
192}
193extern "C" {
194    #[doc = " @brief Set integer data value into {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be set value.\n @param value Represents integer data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
195    pub fn OH_PrivateCommand_SetIntValue(
196        command: *mut InputMethod_PrivateCommand,
197        value: i32,
198    ) -> InputMethod_ErrorCode;
199}
200extern "C" {
201    #[doc = " @brief Set string data value into {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be set value.\n @param value Represents string data value.\n @param valueLength Represents the length of string data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
202    pub fn OH_PrivateCommand_SetStrValue(
203        command: *mut InputMethod_PrivateCommand,
204        value: *mut ::std::os::raw::c_char,
205        valueLength: usize,
206    ) -> InputMethod_ErrorCode;
207}
208extern "C" {
209    #[doc = " @brief Get key value from {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be get value from.\n @param key Represents key value.\n @param keyLength Represents key length.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
210    pub fn OH_PrivateCommand_GetKey(
211        command: *mut InputMethod_PrivateCommand,
212        key: *mut *const ::std::os::raw::c_char,
213        keyLength: *mut usize,
214    ) -> InputMethod_ErrorCode;
215}
216extern "C" {
217    #[doc = " @brief Get value type from {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be get value from.\n @param type Represents a pointer to a {@link InputMethod_CommandValueType} instance. Indicates the data type of the\n value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
218    pub fn OH_PrivateCommand_GetValueType(
219        command: *mut InputMethod_PrivateCommand,
220        type_: *mut InputMethod_CommandValueType,
221    ) -> InputMethod_ErrorCode;
222}
223extern "C" {
224    #[doc = " @brief Get bool data value from {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be get value from.\n @param value Represents bool data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n     {@link IME_ERR_QUERY_FAILED} - query failed, no bool value in command.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
225    pub fn OH_PrivateCommand_GetBoolValue(
226        command: *mut InputMethod_PrivateCommand,
227        value: *mut bool,
228    ) -> InputMethod_ErrorCode;
229}
230extern "C" {
231    #[doc = " @brief Get integer data value from {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be get value from.\n @param value Represents integer data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n     {@link IME_ERR_QUERY_FAILED} - query failed, no integer value in command.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
232    pub fn OH_PrivateCommand_GetIntValue(
233        command: *mut InputMethod_PrivateCommand,
234        value: *mut i32,
235    ) -> InputMethod_ErrorCode;
236}
237extern "C" {
238    #[doc = " @brief Get string data value from {@link InputMethod_PrivateCommand}.\n\n @param command Represents a pointer to an {@link InputMethod_PrivateCommand} instance which will be get value from.\n @param value Represents string data value.\n @param valueLength Represents the length of string data value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n     {@link IME_ERR_QUERY_FAILED} - query failed, no string value in command.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
239    pub fn OH_PrivateCommand_GetStrValue(
240        command: *mut InputMethod_PrivateCommand,
241        value: *mut *const ::std::os::raw::c_char,
242        valueLength: *mut usize,
243    ) -> InputMethod_ErrorCode;
244}
245#[repr(C)]
246#[derive(Debug, Copy, Clone)]
247pub struct InputMethod_CursorInfo {
248    _unused: [u8; 0],
249}
250extern "C" {
251    #[doc = " @brief Create a new {@link InputMethod_CursorInfo} instance.\n\n @param left The left point of the cursor and must be absolute coordinate of the physical screen.\n @param top The top point of the cursor and must be absolute coordinate of the physical screen.\n @param width The width of the cursor.\n @param height The height of the cursor.\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_CursorInfo}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
252    pub fn OH_CursorInfo_Create(
253        left: f64,
254        top: f64,
255        width: f64,
256        height: f64,
257    ) -> *mut InputMethod_CursorInfo;
258}
259extern "C" {
260    #[doc = " @brief Destroy a {@link InputMethod_CursorInfo} instance.\n\n @param cursorInfo Represents a pointer to an {@link InputMethod_CursorInfo} instance which will be destroyed.\n @since 12"]
261    pub fn OH_CursorInfo_Destroy(cursorInfo: *mut InputMethod_CursorInfo);
262}
263extern "C" {
264    #[doc = " @brief Set cursor info.\n\n @param cursorInfo Represents a pointer to an {@link InputMethod_CursorInfo} instance.\n @param left The left point of the cursor and must be absolute coordinate of the physical screen.\n @param top The top point of the cursor and must be absolute coordinate of the physical screen.\n @param width The width of the cursor.\n @param height The height of the cursor.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
265    pub fn OH_CursorInfo_SetRect(
266        cursorInfo: *mut InputMethod_CursorInfo,
267        left: f64,
268        top: f64,
269        width: f64,
270        height: f64,
271    ) -> InputMethod_ErrorCode;
272}
273extern "C" {
274    #[doc = " @brief Get cursor info.\n\n @param cursorInfo Represents a pointer to an {@link InputMethod_CursorInfo} instance.\n @param left The left point of the cursor and must be absolute coordinate of the physical screen.\n @param top The top point of the cursor and must be absolute coordinate of the physical screen.\n @param width The width of the cursor.\n @param height The height of the cursor.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
275    pub fn OH_CursorInfo_GetRect(
276        cursorInfo: *mut InputMethod_CursorInfo,
277        left: *mut f64,
278        top: *mut f64,
279        width: *mut f64,
280        height: *mut f64,
281    ) -> InputMethod_ErrorCode;
282}
283#[repr(C)]
284#[derive(Debug, Copy, Clone)]
285pub struct InputMethod_TextAvoidInfo {
286    _unused: [u8; 0],
287}
288extern "C" {
289    #[doc = " @brief Create a new {@link InputMethod_TextAvoidInfo} instance.\n\n @param positionY The y-coordinate of the avoid area.\n @param height The height of the avoid area.\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_TextAvoidInfo}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
290    pub fn OH_TextAvoidInfo_Create(positionY: f64, height: f64) -> *mut InputMethod_TextAvoidInfo;
291}
292extern "C" {
293    #[doc = " @brief Destroy a {@link InputMethod_TextAvoidInfo} instance.\n\n @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be destroyed.\n @since 12"]
294    pub fn OH_TextAvoidInfo_Destroy(info: *mut InputMethod_TextAvoidInfo);
295}
296extern "C" {
297    #[doc = " @brief Set positionY value into {@link InputMethod_TextAvoidInfo}.\n\n @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be set value.\n @param positionY Represents positionY value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
298    pub fn OH_TextAvoidInfo_SetPositionY(
299        info: *mut InputMethod_TextAvoidInfo,
300        positionY: f64,
301    ) -> InputMethod_ErrorCode;
302}
303extern "C" {
304    #[doc = " @brief Set height value into {@link InputMethod_TextAvoidInfo}.\n\n @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be set value.\n @param height Represents height value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
305    pub fn OH_TextAvoidInfo_SetHeight(
306        info: *mut InputMethod_TextAvoidInfo,
307        height: f64,
308    ) -> InputMethod_ErrorCode;
309}
310extern "C" {
311    #[doc = " @brief Get positionY value from {@link InputMethod_TextAvoidInfo}.\n\n @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be get value from.\n @param positionY Represents positionY value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
312    pub fn OH_TextAvoidInfo_GetPositionY(
313        info: *mut InputMethod_TextAvoidInfo,
314        positionY: *mut f64,
315    ) -> InputMethod_ErrorCode;
316}
317extern "C" {
318    #[doc = " @brief Get height value into {@link InputMethod_TextAvoidInfo}.\n\n @param info Represents a pointer to an {@link InputMethod_TextAvoidInfo} instance which will be get value from.\n @param height Represents height value.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
319    pub fn OH_TextAvoidInfo_GetHeight(
320        info: *mut InputMethod_TextAvoidInfo,
321        height: *mut f64,
322    ) -> InputMethod_ErrorCode;
323}
324#[repr(C)]
325#[derive(Debug, Copy, Clone)]
326pub struct InputMethod_TextConfig {
327    _unused: [u8; 0],
328}
329extern "C" {
330    #[doc = " @brief Create a new {@link InputMethod_TextConfig} instance.\n\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_TextConfig}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
331    pub fn OH_TextConfig_Create() -> *mut InputMethod_TextConfig;
332}
333extern "C" {
334    #[doc = " @brief Destroy a {@link InputMethod_TextConfig} instance.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be destroyed.\n @since 12"]
335    pub fn OH_TextConfig_Destroy(config: *mut InputMethod_TextConfig);
336}
337extern "C" {
338    #[doc = " @brief Set input type into TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be set.\n @param inputType The text input type of text Editor, which is defined in {@link InputMethod_TextInputType}.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
339    pub fn OH_TextConfig_SetInputType(
340        config: *mut InputMethod_TextConfig,
341        inputType: InputMethod_TextInputType,
342    ) -> InputMethod_ErrorCode;
343}
344extern "C" {
345    #[doc = " @brief Set enter key type into TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be set.\n @param enterKeyType The enter key type of text Editor, which is defined in {@link InputMethod_EnterKeyType}.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
346    pub fn OH_TextConfig_SetEnterKeyType(
347        config: *mut InputMethod_TextConfig,
348        enterKeyType: InputMethod_EnterKeyType,
349    ) -> InputMethod_ErrorCode;
350}
351extern "C" {
352    #[doc = " @brief Set preview text support into TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be set.\n @param supported Indicates whether the preview text is supported.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
353    pub fn OH_TextConfig_SetPreviewTextSupport(
354        config: *mut InputMethod_TextConfig,
355        supported: bool,
356    ) -> InputMethod_ErrorCode;
357}
358extern "C" {
359    #[doc = " @brief Set selection into TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be set.\n @param start The start position of selection.\n @param end The end position of selection.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
360    pub fn OH_TextConfig_SetSelection(
361        config: *mut InputMethod_TextConfig,
362        start: i32,
363        end: i32,
364    ) -> InputMethod_ErrorCode;
365}
366extern "C" {
367    #[doc = " @brief Set window id into TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be set.\n @param windowId The window ID of the application currently bound to the input method.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
368    pub fn OH_TextConfig_SetWindowId(
369        config: *mut InputMethod_TextConfig,
370        windowId: i32,
371    ) -> InputMethod_ErrorCode;
372}
373extern "C" {
374    #[doc = " @brief Sets the placeholder text of an InputMethod_TextConfig instance.\n\n @param config Pointer to the InputMethod_TextConfig instance.\n @param placeholder Pointer to a UTF-16 encoded double-byte string. If a null pointer is passed, the placeholder text\n     is an empty string.\n @param length Number of elements in the memory to which <b>placeholder</b> points, including the null character of\n     the double-byte string.\n      1) If <b>length</b> is <b>0</b>, the placeholder text is an empty string.\n      2) The maximum number of UTF-16 encoded characters is 256, and the last element must be a null character.\n      3) If the <b>length</b> exceeds 256, the placeholder text will be truncated.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 20"]
375    #[cfg(feature = "api-20")]
376    pub fn OH_TextConfig_SetPlaceholder(
377        config: *mut InputMethod_TextConfig,
378        placeholder: *const u16,
379        length: usize,
380    ) -> InputMethod_ErrorCode;
381}
382extern "C" {
383    #[doc = " @brief Sets the ability name of an InputMethod_TextConfig instance.\n\n @param config Pointer to the InputMethod_TextConfig instance.\n @param abilityName Pointer to a UTF-16 encoded double-byte string. If a null pointer is passed, the ability name is\n     an empty string.\n @param length Number of elements in the memory to which <b>abilityName</b> points, including the null character of\n      the double-byte string.\n     1) If <b>length</b> is <b>0</b>, the ability name is an empty string.\n     2) The maximum number of UTF-16 encoded characters is 128, and the last element must be a null character.\n     3) If the <b>length</b> exceeds 128, the placeholder text will be truncated.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 20"]
384    #[cfg(feature = "api-20")]
385    pub fn OH_TextConfig_SetAbilityName(
386        config: *mut InputMethod_TextConfig,
387        abilityName: *const u16,
388        length: usize,
389    ) -> InputMethod_ErrorCode;
390}
391extern "C" {
392    #[doc = " @brief Get input type from TextConfig\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param inputType Represents a pointer to an {@link InputMethod_TextInputType} instance.\n     The text input type of text Editor\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
393    pub fn OH_TextConfig_GetInputType(
394        config: *mut InputMethod_TextConfig,
395        inputType: *mut InputMethod_TextInputType,
396    ) -> InputMethod_ErrorCode;
397}
398extern "C" {
399    #[doc = " @brief Get enter key type from TextConfig\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param enterKeyType Represents a pointer to an {@link InputMethod_EnterKeyType} instance.\n     Indicates the enter key type of text Editor\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
400    pub fn OH_TextConfig_GetEnterKeyType(
401        config: *mut InputMethod_TextConfig,
402        enterKeyType: *mut InputMethod_EnterKeyType,
403    ) -> InputMethod_ErrorCode;
404}
405extern "C" {
406    #[doc = " @brief Get is preview text supported from TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param supported Indicates whether the preview text is supported.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
407    pub fn OH_TextConfig_IsPreviewTextSupported(
408        config: *mut InputMethod_TextConfig,
409        supported: *mut bool,
410    ) -> InputMethod_ErrorCode;
411}
412extern "C" {
413    #[doc = " @brief Get cursor info from TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param cursorInfo Represents a pointer to an {@link InputMethod_CursorInfo} instance.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
414    pub fn OH_TextConfig_GetCursorInfo(
415        config: *mut InputMethod_TextConfig,
416        cursorInfo: *mut *mut InputMethod_CursorInfo,
417    ) -> InputMethod_ErrorCode;
418}
419extern "C" {
420    #[doc = " @brief Get text avoid information from text configuration.\n\n @param config Indicates the text configuration.\n @param avoidInfo Indicates the text avoid information.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n@since 12"]
421    pub fn OH_TextConfig_GetTextAvoidInfo(
422        config: *mut InputMethod_TextConfig,
423        avoidInfo: *mut *mut InputMethod_TextAvoidInfo,
424    ) -> InputMethod_ErrorCode;
425}
426extern "C" {
427    #[doc = " @brief Get selection from TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param start Represents selection start position.\n @param end Represents selection end position.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
428    pub fn OH_TextConfig_GetSelection(
429        config: *mut InputMethod_TextConfig,
430        start: *mut i32,
431        end: *mut i32,
432    ) -> InputMethod_ErrorCode;
433}
434extern "C" {
435    #[doc = " @brief Get window id from TextConfig.\n\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance which will be get from.\n @param windowId The window ID of the application currently bound to the input method.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
436    pub fn OH_TextConfig_GetWindowId(
437        config: *mut InputMethod_TextConfig,
438        windowId: *mut i32,
439    ) -> InputMethod_ErrorCode;
440}
441extern "C" {
442    #[doc = " @brief Obtains the placeholder text of an InputMethod_TextConfig instance.\n\n @param config Pointer to the InputMethod_TextConfig instance.\n @param placeholder Pointer to the placeholder text. The memory of this pointer is maintained by the caller.\n @param length Pointer to the length of the placeholder text, in double bytes. The length includes the null character\n     of the string.\n     1) As an input parameter, <b>length</b> indicates the available length of the memory to which <b>placeholder</b>\n        points. As an output parameter, it indicates the actual length of the placeholder text.\n     2) If <b>placeholder</b> is a null pointer and <b>length</b> points to valid memory, <b>length</b> will be set to\n        the actual length of the placeholder text, and an error will be return.\n     3) If both <b>placeholder</b> and <b>length</b> point to valid memory, but the value of <b>length</b> is less\n        than the actual length of the placeholder text, <b>length</b> will be set to the actual length of the\n        placeholder text, and an error will be return.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 20"]
443    #[cfg(feature = "api-20")]
444    pub fn OH_TextConfig_GetPlaceholder(
445        config: *mut InputMethod_TextConfig,
446        placeholder: *mut u16,
447        length: *mut usize,
448    ) -> InputMethod_ErrorCode;
449}
450extern "C" {
451    #[doc = " @brief Obtains the ability name of an InputMethod_TextConfig instance.\n\n @param config Pointer to the InputMethod_TextConfig instance.\n @param abilityName Pointer to the ability name. The memory of this pointer is maintained by the caller.\n @param length Pointer to the length of the ability name, in double bytes. The length includes the null character of\n     the string.\n     1) As an input parameter, <b>length</b> indicates the available length of the memory to which <b>abilityName</b>\n        points. As an output parameter, it indicates the actual length of the ability name.\n     2) If <b>abilityName</b> is a null pointer and <b>length</b> points to valid memory, <b>length</b> will be set to\n        the actual length of the ability name, and an error will be return.\n     3) If both <b>abilityName</b> and <b>length</b> point to valid memory, but the value of <b>length</b> is less\n        than the actual length of the ability name, <b>length</b> will be set to the actual length of the ability\n        name, and an error will be return.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 20"]
452    #[cfg(feature = "api-20")]
453    pub fn OH_TextConfig_GetAbilityName(
454        config: *mut InputMethod_TextConfig,
455        abilityName: *mut u16,
456        length: *mut usize,
457    ) -> InputMethod_ErrorCode;
458}
459#[repr(C)]
460#[derive(Debug, Copy, Clone)]
461pub struct InputMethod_TextEditorProxy {
462    _unused: [u8; 0],
463}
464#[doc = " @brief Defines the function called when input method getting text config.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetGetTextConfigFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance.\n @param config Represents a pointer to an {@link InputMethod_TextConfig} instance. You can only access the memory when\n this callback is called. After this callback returns, the memory will be released and you should not access this\n memory again.\n @since 12"]
465pub type OH_TextEditorProxy_GetTextConfigFunc = ::std::option::Option<
466    unsafe extern "C" fn(
467        textEditorProxy: *mut InputMethod_TextEditorProxy,
468        config: *mut InputMethod_TextConfig,
469    ),
470>;
471#[doc = " @brief Defines the function called when input method inserting text.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetInsertTextFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to the {@link InputMethod_TextEditorProxy} instance which will be set\n in.\n @param text Represents a pointer to the text to be inserted. You can only access the memory when this callback\n is called. After this callback returns, the memory will be released and you should not access this memory again.\n @param length Represents the length of the text to be inserted.\n @since 12"]
472pub type OH_TextEditorProxy_InsertTextFunc = ::std::option::Option<
473    unsafe extern "C" fn(
474        textEditorProxy: *mut InputMethod_TextEditorProxy,
475        text: *const u16,
476        length: usize,
477    ),
478>;
479#[doc = " @brief Defines the function called when input method deleting text forward.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetDeleteForwardFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to the {@link InputMethod_TextEditorProxy} instance which will be set\n in.\n @param length Represents the length of the text to be deleted.\n @since 12"]
480pub type OH_TextEditorProxy_DeleteForwardFunc = ::std::option::Option<
481    unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy, length: i32),
482>;
483#[doc = " @brief Defines the function called when input method deleting text backward.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetDeleteForwardFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to the {@link InputMethod_TextEditorProxy} instance which will be set\n in.\n @param length Represents the length of the text to be deleted.\n @since 12"]
484pub type OH_TextEditorProxy_DeleteBackwardFunc = ::std::option::Option<
485    unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy, length: i32),
486>;
487#[doc = " @brief Called when input method notifying keyboard status.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetSendKeyboardStatusFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param keyboardStatus Keyboard status, which is defined in {@link InputMethod_KeyboardStatus}.\n @since 12"]
488pub type OH_TextEditorProxy_SendKeyboardStatusFunc = ::std::option::Option<
489    unsafe extern "C" fn(
490        textEditorProxy: *mut InputMethod_TextEditorProxy,
491        keyboardStatus: InputMethod_KeyboardStatus,
492    ),
493>;
494#[doc = " @brief Called when input method sending enter key.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetSendEnterKeyFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param enterKeyType Enter key type, which is defined in {@link InputMethod_EnterKeyType}.\n @since 12"]
495pub type OH_TextEditorProxy_SendEnterKeyFunc = ::std::option::Option<
496    unsafe extern "C" fn(
497        textEditorProxy: *mut InputMethod_TextEditorProxy,
498        enterKeyType: InputMethod_EnterKeyType,
499    ),
500>;
501#[doc = " @brief Called when input method requesting to move cursor.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetMoveCursorFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param direction Represents the direction of the cursor movement, which is defined in {@link InputMethod_Direction}.\n @since 12"]
502pub type OH_TextEditorProxy_MoveCursorFunc = ::std::option::Option<
503    unsafe extern "C" fn(
504        textEditorProxy: *mut InputMethod_TextEditorProxy,
505        direction: InputMethod_Direction,
506    ),
507>;
508#[doc = " @brief Called when input method requesting to set selection.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetHandleSetSelectionFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param start Represents the start position of the selection.\n @param end Represents the end position of the selection.\n @since 12"]
509pub type OH_TextEditorProxy_HandleSetSelectionFunc = ::std::option::Option<
510    unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy, start: i32, end: i32),
511>;
512#[doc = " @brief Called when input method sending extend action.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetHandleExtendActionFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param action Represents the extend action, which is defined in {@link InputMethod_ExtendAction}.\n @since 12"]
513pub type OH_TextEditorProxy_HandleExtendActionFunc = ::std::option::Option<
514    unsafe extern "C" fn(
515        textEditorProxy: *mut InputMethod_TextEditorProxy,
516        action: InputMethod_ExtendAction,
517    ),
518>;
519#[doc = " @brief Called when input method requesting to get left text of cursor.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetGetLeftTextOfCursorFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param number Represents the number of characters to be get.\n @param text Represents the left text of cursor, you need to assing this parameter. You can only access the memory\n when this callback is called. After this callback returns, the memory will be released and you should not access this\n memory again.\n @param length Represents the length of the left text of cursor, you need to assing this parameter.\n @since 12"]
520pub type OH_TextEditorProxy_GetLeftTextOfCursorFunc = ::std::option::Option<
521    unsafe extern "C" fn(
522        textEditorProxy: *mut InputMethod_TextEditorProxy,
523        number: i32,
524        text: *mut u16,
525        length: *mut usize,
526    ),
527>;
528#[doc = " @brief Called when input method requesting to get right text of cursor.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetGetRightTextOfCursorFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param number Represents the number of characters to be get.\n @param text Represents the right text of cursor, you need to assing this parameter. You can only access the memory\n when this callback is called. After this callback returns, the memory will be released and you should not access this\n memory again.\n @param length Represents the length of the right text of cursor.\n @since 12"]
529pub type OH_TextEditorProxy_GetRightTextOfCursorFunc = ::std::option::Option<
530    unsafe extern "C" fn(
531        textEditorProxy: *mut InputMethod_TextEditorProxy,
532        number: i32,
533        text: *mut u16,
534        length: *mut usize,
535    ),
536>;
537#[doc = " @brief Called when input method requesting to get text index at cursor.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetGetTextIndexAtCursorFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @return Returns the index of text at cursor.\n @since 12"]
538pub type OH_TextEditorProxy_GetTextIndexAtCursorFunc = ::std::option::Option<
539    unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy) -> i32,
540>;
541#[doc = " @brief Called when input method sending private command.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetReceivePrivateCommandFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param privateCommand Private command from input method. You can only access the memory when this callback is called.\n After this callback returns, the memory will be released and you should not access this memory again.\n @param size Size of private command.\n @return Returns the result of handling private command.\n @since 12"]
542pub type OH_TextEditorProxy_ReceivePrivateCommandFunc = ::std::option::Option<
543    unsafe extern "C" fn(
544        textEditorProxy: *mut InputMethod_TextEditorProxy,
545        privateCommand: *mut *mut InputMethod_PrivateCommand,
546        size: usize,
547    ) -> i32,
548>;
549#[doc = " @brief Called when input method setting preview text.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetReceivePrivateCommandFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @param text Represents text to be previewd. You can only access the memory when this callback is called.\n After this callback returns, the memory will be released and you should not access this memory again.\n @param length Length of preview text.\n @param start Start position of preview text.\n @param end End position of preview text.\n @return Returns the result of setting preview text.\n @since 12"]
550pub type OH_TextEditorProxy_SetPreviewTextFunc = ::std::option::Option<
551    unsafe extern "C" fn(
552        textEditorProxy: *mut InputMethod_TextEditorProxy,
553        text: *const u16,
554        length: usize,
555        start: i32,
556        end: i32,
557    ) -> i32,
558>;
559#[doc = " @brief Called when input method finishing preview text.\n\n You need to implement this function, set it to {@link InputMethod_TextEditorProxy} through {@link\n OH_TextEditorProxy_SetReceivePrivateCommandFunc}, and use {@link OH_InputMethodController_Attach} to complete the\n registration.\\n\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set in.\n @since 12"]
560pub type OH_TextEditorProxy_FinishTextPreviewFunc =
561    ::std::option::Option<unsafe extern "C" fn(textEditorProxy: *mut InputMethod_TextEditorProxy)>;
562extern "C" {
563    #[doc = " @brief Create a new {@link InputMethod_TextEditorProxy} instance.\n\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_TextEditorProxy}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
564    pub fn OH_TextEditorProxy_Create() -> *mut InputMethod_TextEditorProxy;
565}
566extern "C" {
567    #[doc = " @brief Destroy a {@link InputMethod_TextEditorProxy} instance.\n\n @param proxy The {@link InputMethod_TextEditorProxy} instance to be destroyed.\n @since 12"]
568    pub fn OH_TextEditorProxy_Destroy(proxy: *mut InputMethod_TextEditorProxy);
569}
570extern "C" {
571    #[doc = " @brief Set function {@link OH_TextEditorProxy_GetTextConfigFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param getTextConfigFunc Represents function {@link OH_TextEditorProxy_GetTextConfigFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
572    pub fn OH_TextEditorProxy_SetGetTextConfigFunc(
573        proxy: *mut InputMethod_TextEditorProxy,
574        getTextConfigFunc: OH_TextEditorProxy_GetTextConfigFunc,
575    ) -> InputMethod_ErrorCode;
576}
577extern "C" {
578    #[doc = " @brief Set function {@link OH_TextEditorProxy_InsertTextFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param insertTextFunc Represents function {@link OH_TextEditorProxy_InsertTextFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
579    pub fn OH_TextEditorProxy_SetInsertTextFunc(
580        proxy: *mut InputMethod_TextEditorProxy,
581        insertTextFunc: OH_TextEditorProxy_InsertTextFunc,
582    ) -> InputMethod_ErrorCode;
583}
584extern "C" {
585    #[doc = " @brief Set function {@link OH_TextEditorProxy_SetDeleteForwardFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param deleteForwardFunc Represents function {@link OH_TextEditorProxy_DeleteForwardFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
586    pub fn OH_TextEditorProxy_SetDeleteForwardFunc(
587        proxy: *mut InputMethod_TextEditorProxy,
588        deleteForwardFunc: OH_TextEditorProxy_DeleteForwardFunc,
589    ) -> InputMethod_ErrorCode;
590}
591extern "C" {
592    #[doc = " @brief Set function {@link OH_TextEditorProxy_DeleteBackwardFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param deleteBackwardFunc Represents function {@link OH_TextEditorProxy_DeleteBackwardFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
593    pub fn OH_TextEditorProxy_SetDeleteBackwardFunc(
594        proxy: *mut InputMethod_TextEditorProxy,
595        deleteBackwardFunc: OH_TextEditorProxy_DeleteBackwardFunc,
596    ) -> InputMethod_ErrorCode;
597}
598extern "C" {
599    #[doc = " @brief Set function {@link OH_TextEditorProxy_SendKeyboardStatusFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param sendKeyboardStatusFunc Represents function {@link OH_TextEditorProxy_SendKeyboardStatusFunc} which will be\n set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
600    pub fn OH_TextEditorProxy_SetSendKeyboardStatusFunc(
601        proxy: *mut InputMethod_TextEditorProxy,
602        sendKeyboardStatusFunc: OH_TextEditorProxy_SendKeyboardStatusFunc,
603    ) -> InputMethod_ErrorCode;
604}
605extern "C" {
606    #[doc = " @brief Set function {@link OH_TextEditorProxy_SendEnterKeyFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param sendEnterKeyFunc Represents function {@link OH_TextEditorProxy_SendEnterKeyFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
607    pub fn OH_TextEditorProxy_SetSendEnterKeyFunc(
608        proxy: *mut InputMethod_TextEditorProxy,
609        sendEnterKeyFunc: OH_TextEditorProxy_SendEnterKeyFunc,
610    ) -> InputMethod_ErrorCode;
611}
612extern "C" {
613    #[doc = " @brief Set function {@link OH_TextEditorProxy_MoveCursorFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param moveCursorFunc Represents function {@link OH_TextEditorProxy_MoveCursorFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
614    pub fn OH_TextEditorProxy_SetMoveCursorFunc(
615        proxy: *mut InputMethod_TextEditorProxy,
616        moveCursorFunc: OH_TextEditorProxy_MoveCursorFunc,
617    ) -> InputMethod_ErrorCode;
618}
619extern "C" {
620    #[doc = " @brief Set function {@link OH_TextEditorProxy_HandleSetSelectionFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param handleSetSelectionFunc Represents function {@link OH_TextEditorProxy_HandleSetSelectionFunc} which will be\n set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
621    pub fn OH_TextEditorProxy_SetHandleSetSelectionFunc(
622        proxy: *mut InputMethod_TextEditorProxy,
623        handleSetSelectionFunc: OH_TextEditorProxy_HandleSetSelectionFunc,
624    ) -> InputMethod_ErrorCode;
625}
626extern "C" {
627    #[doc = " @brief Set function {@link OH_TextEditorProxy_HandleExtendActionFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param handleExtendActionFunc Represents function {@link OH_TextEditorProxy_HandleExtendActionFunc} which will be\n set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
628    pub fn OH_TextEditorProxy_SetHandleExtendActionFunc(
629        proxy: *mut InputMethod_TextEditorProxy,
630        handleExtendActionFunc: OH_TextEditorProxy_HandleExtendActionFunc,
631    ) -> InputMethod_ErrorCode;
632}
633extern "C" {
634    #[doc = " @brief Set function {@link OH_TextEditorProxy_GetLeftTextOfCursorFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param getLeftTextOfCursorFunc Represents function {@link OH_TextEditorProxy_GetLeftTextOfCursorFunc} which will\n be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
635    pub fn OH_TextEditorProxy_SetGetLeftTextOfCursorFunc(
636        proxy: *mut InputMethod_TextEditorProxy,
637        getLeftTextOfCursorFunc: OH_TextEditorProxy_GetLeftTextOfCursorFunc,
638    ) -> InputMethod_ErrorCode;
639}
640extern "C" {
641    #[doc = " @brief Set function {@link OH_TextEditorProxy_GetRightTextOfCursorFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param getRightTextOfCursorFunc Represents function {@link OH_TextEditorProxy_GetRightTextOfCursorFunc} which\n will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
642    pub fn OH_TextEditorProxy_SetGetRightTextOfCursorFunc(
643        proxy: *mut InputMethod_TextEditorProxy,
644        getRightTextOfCursorFunc: OH_TextEditorProxy_GetRightTextOfCursorFunc,
645    ) -> InputMethod_ErrorCode;
646}
647extern "C" {
648    #[doc = " @brief Set function {@link OH_TextEditorProxy_GetTextIndexAtCursorFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param getTextIndexAtCursorFunc Represents function {@link OH_TextEditorProxy_GetTextIndexAtCursorFunc} which\n will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
649    pub fn OH_TextEditorProxy_SetGetTextIndexAtCursorFunc(
650        proxy: *mut InputMethod_TextEditorProxy,
651        getTextIndexAtCursorFunc: OH_TextEditorProxy_GetTextIndexAtCursorFunc,
652    ) -> InputMethod_ErrorCode;
653}
654extern "C" {
655    #[doc = " @brief Set function {@link OH_TextEditorProxy_ReceivePrivateCommandFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param receivePrivateCommandFunc Represents function {@link OH_TextEditorProxy_ReceivePrivateCommandFunc} which\n will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
656    pub fn OH_TextEditorProxy_SetReceivePrivateCommandFunc(
657        proxy: *mut InputMethod_TextEditorProxy,
658        receivePrivateCommandFunc: OH_TextEditorProxy_ReceivePrivateCommandFunc,
659    ) -> InputMethod_ErrorCode;
660}
661extern "C" {
662    #[doc = " @brief Set function {@link OH_TextEditorProxy_SetPreviewTextFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param setPreviewTextFunc Represents function {@link OH_TextEditorProxy_SetPreviewTextFunc} which will be set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
663    pub fn OH_TextEditorProxy_SetSetPreviewTextFunc(
664        proxy: *mut InputMethod_TextEditorProxy,
665        setPreviewTextFunc: OH_TextEditorProxy_SetPreviewTextFunc,
666    ) -> InputMethod_ErrorCode;
667}
668extern "C" {
669    #[doc = " @brief Set function {@link OH_TextEditorProxy_FinishTextPreviewFunc} into {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be set function in.\n @param finishTextPreviewFunc Represents function {@link OH_TextEditorProxy_FinishTextPreviewFunc} which will be\n set.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
670    pub fn OH_TextEditorProxy_SetFinishTextPreviewFunc(
671        proxy: *mut InputMethod_TextEditorProxy,
672        finishTextPreviewFunc: OH_TextEditorProxy_FinishTextPreviewFunc,
673    ) -> InputMethod_ErrorCode;
674}
675extern "C" {
676    #[doc = " @brief Get function {@link OH_TextEditorProxy_GetTextConfigFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param getTextConfigFunc Represents function {@link OH_TextEditorProxy_GetTextConfigFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
677    pub fn OH_TextEditorProxy_GetGetTextConfigFunc(
678        proxy: *mut InputMethod_TextEditorProxy,
679        getTextConfigFunc: *mut OH_TextEditorProxy_GetTextConfigFunc,
680    ) -> InputMethod_ErrorCode;
681}
682extern "C" {
683    #[doc = " @brief Get function {@link OH_TextEditorProxy_InsertTextFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param insertTextFunc Represents function {@link OH_TextEditorProxy_InsertTextFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
684    pub fn OH_TextEditorProxy_GetInsertTextFunc(
685        proxy: *mut InputMethod_TextEditorProxy,
686        insertTextFunc: *mut OH_TextEditorProxy_InsertTextFunc,
687    ) -> InputMethod_ErrorCode;
688}
689extern "C" {
690    #[doc = " @brief Get function {@link OH_TextEditorProxy_DeleteForwardFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param deleteForwardFunc Represents function {@link OH_TextEditorProxy_DeleteForwardFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
691    pub fn OH_TextEditorProxy_GetDeleteForwardFunc(
692        proxy: *mut InputMethod_TextEditorProxy,
693        deleteForwardFunc: *mut OH_TextEditorProxy_DeleteForwardFunc,
694    ) -> InputMethod_ErrorCode;
695}
696extern "C" {
697    #[doc = " @brief Get function {@link OH_TextEditorProxy_DeleteBackwardFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param deleteBackwardFunc Represents function {@link OH_TextEditorProxy_DeleteBackwardFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
698    pub fn OH_TextEditorProxy_GetDeleteBackwardFunc(
699        proxy: *mut InputMethod_TextEditorProxy,
700        deleteBackwardFunc: *mut OH_TextEditorProxy_DeleteBackwardFunc,
701    ) -> InputMethod_ErrorCode;
702}
703extern "C" {
704    #[doc = " @brief Get function {@link OH_TextEditorProxy_SendKeyboardStatusFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param sendKeyboardStatusFunc Represents function {@link OH_TextEditorProxy_SendKeyboardStatusFunc} which will be\n get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
705    pub fn OH_TextEditorProxy_GetSendKeyboardStatusFunc(
706        proxy: *mut InputMethod_TextEditorProxy,
707        sendKeyboardStatusFunc: *mut OH_TextEditorProxy_SendKeyboardStatusFunc,
708    ) -> InputMethod_ErrorCode;
709}
710extern "C" {
711    #[doc = " @brief Get function {@link OH_TextEditorProxy_SendEnterKeyFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param sendEnterKeyFunc Represents function {@link OH_TextEditorProxy_SendEnterKeyFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
712    pub fn OH_TextEditorProxy_GetSendEnterKeyFunc(
713        proxy: *mut InputMethod_TextEditorProxy,
714        sendEnterKeyFunc: *mut OH_TextEditorProxy_SendEnterKeyFunc,
715    ) -> InputMethod_ErrorCode;
716}
717extern "C" {
718    #[doc = " @brief Get function {@link OH_TextEditorProxy_MoveCursorFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param moveCursorFunc Represents function {@link OH_TextEditorProxy_MoveCursorFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
719    pub fn OH_TextEditorProxy_GetMoveCursorFunc(
720        proxy: *mut InputMethod_TextEditorProxy,
721        moveCursorFunc: *mut OH_TextEditorProxy_MoveCursorFunc,
722    ) -> InputMethod_ErrorCode;
723}
724extern "C" {
725    #[doc = " @brief Get function {@link OH_TextEditorProxy_HandleSetSelectionFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param handleSetSelectionFunc Represents function {@link OH_TextEditorProxy_HandleSetSelectionFunc} which will be\n get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
726    pub fn OH_TextEditorProxy_GetHandleSetSelectionFunc(
727        proxy: *mut InputMethod_TextEditorProxy,
728        handleSetSelectionFunc: *mut OH_TextEditorProxy_HandleSetSelectionFunc,
729    ) -> InputMethod_ErrorCode;
730}
731extern "C" {
732    #[doc = " @brief Get function {@link OH_TextEditorProxy_HandleExtendActionFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param handleExtendActionFunc Represents function {@link OH_TextEditorProxy_HandleExtendActionFunc} which will be\n get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
733    pub fn OH_TextEditorProxy_GetHandleExtendActionFunc(
734        proxy: *mut InputMethod_TextEditorProxy,
735        handleExtendActionFunc: *mut OH_TextEditorProxy_HandleExtendActionFunc,
736    ) -> InputMethod_ErrorCode;
737}
738extern "C" {
739    #[doc = " @brief Get function {@link OH_TextEditorProxy_GetLeftTextOfCursorFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param getLeftTextOfCursorFunc Represents function {@link OH_TextEditorProxy_GetLeftTextOfCursorFunc} which will\n be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
740    pub fn OH_TextEditorProxy_GetGetLeftTextOfCursorFunc(
741        proxy: *mut InputMethod_TextEditorProxy,
742        getLeftTextOfCursorFunc: *mut OH_TextEditorProxy_GetLeftTextOfCursorFunc,
743    ) -> InputMethod_ErrorCode;
744}
745extern "C" {
746    #[doc = " @brief Get function {@link OH_TextEditorProxy_GetRightTextOfCursorFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param getRightTextOfCursorFunc Represents function {@link OH_TextEditorProxy_GetRightTextOfCursorFunc} which\n will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
747    pub fn OH_TextEditorProxy_GetGetRightTextOfCursorFunc(
748        proxy: *mut InputMethod_TextEditorProxy,
749        getRightTextOfCursorFunc: *mut OH_TextEditorProxy_GetRightTextOfCursorFunc,
750    ) -> InputMethod_ErrorCode;
751}
752extern "C" {
753    #[doc = " @brief Get function {@link OH_TextEditorProxy_GetTextIndexAtCursorFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param getTextIndexAtCursorFunc Represents function {@link OH_TextEditorProxy_GetTextIndexAtCursorFunc} which\n will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
754    pub fn OH_TextEditorProxy_GetGetTextIndexAtCursorFunc(
755        proxy: *mut InputMethod_TextEditorProxy,
756        getTextIndexAtCursorFunc: *mut OH_TextEditorProxy_GetTextIndexAtCursorFunc,
757    ) -> InputMethod_ErrorCode;
758}
759extern "C" {
760    #[doc = " @brief Get function {@link OH_TextEditorProxy_ReceivePrivateCommandFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param receivePrivateCommandFunc Represents function {@link OH_TextEditorProxy_ReceivePrivateCommandFunc} which\n will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
761    pub fn OH_TextEditorProxy_GetReceivePrivateCommandFunc(
762        proxy: *mut InputMethod_TextEditorProxy,
763        receivePrivateCommandFunc: *mut OH_TextEditorProxy_ReceivePrivateCommandFunc,
764    ) -> InputMethod_ErrorCode;
765}
766extern "C" {
767    #[doc = " @brief Get function {@link OH_TextEditorProxy_SetPreviewTextFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param setPreviewTextFunc Represents function {@link OH_TextEditorProxy_SetPreviewTextFunc} which will be get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
768    pub fn OH_TextEditorProxy_GetSetPreviewTextFunc(
769        proxy: *mut InputMethod_TextEditorProxy,
770        setPreviewTextFunc: *mut OH_TextEditorProxy_SetPreviewTextFunc,
771    ) -> InputMethod_ErrorCode;
772}
773extern "C" {
774    #[doc = " @brief Get function {@link OH_TextEditorProxy_FinishTextPreviewFunc} from {@link InputMethod_TextEditorProxy}.\n\n @param proxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance which will be get function\n from.\n @param finishTextPreviewFunc Represents function {@link OH_TextEditorProxy_FinishTextPreviewFunc} which will be\n get.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
775    pub fn OH_TextEditorProxy_GetFinishTextPreviewFunc(
776        proxy: *mut InputMethod_TextEditorProxy,
777        finishTextPreviewFunc: *mut OH_TextEditorProxy_FinishTextPreviewFunc,
778    ) -> InputMethod_ErrorCode;
779}
780extern "C" {
781    #[doc = " @brief Configure the execution thread (main thread/IPC thread) for the callback functions of\n {@link InputMethod_TextEditorProxy}.\n This interface only controls all callbacks in {@link InputMethod_TextEditorProxy} except\n {@link OH_TextEditorProxy_GetTextConfigFunc}.\n The execution thread of {@link OH_TextEditorProxy_GetTextConfigFunc} is determined by the thread that calls\n {@link OH_InputMethodController_Attach} and is not affected by this interface.\n\n @param proxy Pointer to the target {@link InputMethod_TextEditorProxy} instance.\n @param isCallbackInMainThread Thread execution strategy\n                              - true: The callback function is switched to the main thread for execution (to avoid\n multi-thread concurrency)\n                              - false: The callback function is executed in the IPC thread (there may be multi-thread\n concurrency)\n @return Execution result.\n     {@link IME_ERR_OK} - Configuration succeeded.\n     {@link IME_ERR_NULL_POINTER} - Returned when proxy is NULL.\n @since 22"]
782    #[cfg(feature = "api-22")]
783    pub fn OH_TextEditorProxy_SetCallbackInMainThread(
784        proxy: *mut InputMethod_TextEditorProxy,
785        isCallbackInMainThread: bool,
786    ) -> InputMethod_ErrorCode;
787}
788#[repr(C)]
789#[derive(Debug, Copy, Clone)]
790pub struct InputMethod_AttachOptions {
791    _unused: [u8; 0],
792}
793extern "C" {
794    #[doc = " @brief Create a new {@link InputMethod_AttachOptions} instance.\n\n @param showKeyboard Represents whether to show the keyboard.\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_AttachOptions}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 12"]
795    pub fn OH_AttachOptions_Create(showKeyboard: bool) -> *mut InputMethod_AttachOptions;
796}
797extern "C" {
798    #[doc = " @brief Create a new {@link InputMethod_AttachOptions} instance.\n\n @param showKeyboard Represents whether to show the keyboard.\n @param requestKeyboardReason  the reason for showKeyboard.\n @return If the creation succeeds, a pointer to the newly created {@link InputMethod_AttachOptions}\n instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.\n @since 15"]
799    #[cfg(feature = "api-15")]
800    pub fn OH_AttachOptions_CreateWithRequestKeyboardReason(
801        showKeyboard: bool,
802        requestKeyboardReason: InputMethod_RequestKeyboardReason,
803    ) -> *mut InputMethod_AttachOptions;
804}
805extern "C" {
806    #[doc = " @brief Delete a {@link InputMethod_AttachOptions} instance.\n\n @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be destroyed.\n @since 12"]
807    pub fn OH_AttachOptions_Destroy(options: *mut InputMethod_AttachOptions);
808}
809extern "C" {
810    #[doc = " @brief Get showKeyboard value from {@link InputMethod_AttachOptions}.\n\n @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from.\n @param showKeyboard  Represents showKeyboard value.\n     true - need to show keyboard.\n     false - no need to show keyboard.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
811    pub fn OH_AttachOptions_IsShowKeyboard(
812        options: *mut InputMethod_AttachOptions,
813        showKeyboard: *mut bool,
814    ) -> InputMethod_ErrorCode;
815}
816extern "C" {
817    #[doc = " @brief Get showKeyboard value from {@link InputMethod_AttachOptions}.\n\n @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from.\n @param requestKeyboardReason  Represents a pointer to an {@link InputMethodRequestKeyboardReason} instance which will\n be get value from.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer. If options is NULL, or requestKeyboardReason is NULL.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 15"]
818    #[cfg(feature = "api-15")]
819    pub fn OH_AttachOptions_GetRequestKeyboardReason(
820        options: *mut InputMethod_AttachOptions,
821        requestKeyboardReason: *mut ::std::os::raw::c_int,
822    ) -> InputMethod_ErrorCode;
823}
824#[repr(C)]
825#[derive(Debug, Copy, Clone)]
826pub struct InputMethod_InputMethodProxy {
827    _unused: [u8; 0],
828}
829extern "C" {
830    #[doc = " @brief Show keyboard.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
831    pub fn OH_InputMethodProxy_ShowKeyboard(
832        inputMethodProxy: *mut InputMethod_InputMethodProxy,
833    ) -> InputMethod_ErrorCode;
834}
835extern "C" {
836    #[doc = " @brief ShowTextInput.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from.\n     {@link ShowKeyboard} - property is always true,can not be changed,so no need to focus on\n     {@link InputMethod_RequestKeyboardReason} - property is the requestKeyboardReason for show keyboard\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer. If inputMethodProxy is NULL, or options is NULL.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 15"]
837    #[cfg(feature = "api-15")]
838    pub fn OH_InputMethodProxy_ShowTextInput(
839        inputMethodProxy: *mut InputMethod_InputMethodProxy,
840        options: *mut InputMethod_AttachOptions,
841    ) -> InputMethod_ErrorCode;
842}
843extern "C" {
844    #[doc = " @brief Hide keyboard.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
845    pub fn OH_InputMethodProxy_HideKeyboard(
846        inputMethodProxy: *mut InputMethod_InputMethodProxy,
847    ) -> InputMethod_ErrorCode;
848}
849extern "C" {
850    #[doc = " @brief Notify selection change.\n\n Notify selection change when text or cursor position or selected text changed.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @param text The whole input text.\n @param length The length of text. Max length is 8K.\n @param start The start position of selected text.\n @param end The end position of selected text.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
851    pub fn OH_InputMethodProxy_NotifySelectionChange(
852        inputMethodProxy: *mut InputMethod_InputMethodProxy,
853        text: *mut u16,
854        length: usize,
855        start: ::std::os::raw::c_int,
856        end: ::std::os::raw::c_int,
857    ) -> InputMethod_ErrorCode;
858}
859extern "C" {
860    #[doc = " @brief Notify text editor configuration change.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @param enterKey The enter key type.\n @param textType The text input type.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
861    pub fn OH_InputMethodProxy_NotifyConfigurationChange(
862        inputMethodProxy: *mut InputMethod_InputMethodProxy,
863        enterKey: InputMethod_EnterKeyType,
864        textType: InputMethod_TextInputType,
865    ) -> InputMethod_ErrorCode;
866}
867extern "C" {
868    #[doc = " @brief Notify cursor update.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @param cursorInfo Represents a pointer to an {@link InputMethod_CursorInfo} instance.\n     The cursor information.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
869    pub fn OH_InputMethodProxy_NotifyCursorUpdate(
870        inputMethodProxy: *mut InputMethod_InputMethodProxy,
871        cursorInfo: *mut InputMethod_CursorInfo,
872    ) -> InputMethod_ErrorCode;
873}
874extern "C" {
875    #[doc = " @brief Send private command.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @param privateCommand The private commands, which is defined in {@link InputMethod_PrivateCommand}. Max size 32KB.\n @param size The size of privateCommand. Max is 5.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_DETACHED} - input method client detached.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
876    pub fn OH_InputMethodProxy_SendPrivateCommand(
877        inputMethodProxy: *mut InputMethod_InputMethodProxy,
878        privateCommand: *mut *mut InputMethod_PrivateCommand,
879        size: usize,
880    ) -> InputMethod_ErrorCode;
881}
882extern "C" {
883    #[doc = " @brief Attach application to the input method service.\n\n @param textEditorProxy Represents a pointer to an {@link InputMethod_TextEditorProxy} instance.\n     The caller needs to manage the lifecycle of textEditorProxy.\n     If the call succeeds, caller cannot release textEditorProxy until the next attach or detach call.\n @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance.\n     The options when attaching input method.\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     Lifecycle is mantianed until the next attach or detach call.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_PARAMCHECK} - parameter check failed.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
884    pub fn OH_InputMethodController_Attach(
885        textEditorProxy: *mut InputMethod_TextEditorProxy,
886        options: *mut InputMethod_AttachOptions,
887        inputMethodProxy: *mut *mut InputMethod_InputMethodProxy,
888    ) -> InputMethod_ErrorCode;
889}
890extern "C" {
891    #[doc = " @brief Detach application from the input method service.\n\n @param inputMethodProxy Represents a pointer to an {@link InputMethod_InputMethodProxy} instance.\n     The inputMethodProxy is obtained from {@link OH_InputMethodController_Attach}.\n @return Returns a specific error code.\n     {@link IME_ERR_OK} - success.\n     {@link IME_ERR_IMCLIENT} - input method client error.\n     {@link IME_ERR_IMMS} - input method manager service error.\n     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.\n Specific error codes can be referenced {@link InputMethod_ErrorCode}.\n @since 12"]
892    pub fn OH_InputMethodController_Detach(
893        inputMethodProxy: *mut InputMethod_InputMethodProxy,
894    ) -> InputMethod_ErrorCode;
895}