122736c2fSopenharmony_ci/*
222736c2fSopenharmony_ci * Copyright (c) 2024 Huawei Device Co., Ltd.
322736c2fSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
422736c2fSopenharmony_ci * you may not use this file except in compliance with the License.
522736c2fSopenharmony_ci * You may obtain a copy of the License at
622736c2fSopenharmony_ci *
722736c2fSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
822736c2fSopenharmony_ci *
922736c2fSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1022736c2fSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1122736c2fSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1222736c2fSopenharmony_ci * See the License for the specific language governing permissions and
1322736c2fSopenharmony_ci * limitations under the License.
1422736c2fSopenharmony_ci */
1522736c2fSopenharmony_ci#ifndef OHOS_INPUTMETHOD_ATTACH_OPTIONS_CAPI_H
1622736c2fSopenharmony_ci#define OHOS_INPUTMETHOD_ATTACH_OPTIONS_CAPI_H
1722736c2fSopenharmony_ci/**
1822736c2fSopenharmony_ci * @addtogroup InputMethod
1922736c2fSopenharmony_ci * @{
2022736c2fSopenharmony_ci *
2122736c2fSopenharmony_ci * @brief InputMethod provides functions to use input methods and develop input methods.
2222736c2fSopenharmony_ci *
2322736c2fSopenharmony_ci * @since 12
2422736c2fSopenharmony_ci */
2522736c2fSopenharmony_ci
2622736c2fSopenharmony_ci/**
2722736c2fSopenharmony_ci * @file inputmethod_attach_options_capi.h
2822736c2fSopenharmony_ci *
2922736c2fSopenharmony_ci * @brief Provides the input method attach options.
3022736c2fSopenharmony_ci *
3122736c2fSopenharmony_ci * @library libohinputmethod.so
3222736c2fSopenharmony_ci * @kit IMEKit
3322736c2fSopenharmony_ci * @syscap SystemCapability.MiscServices.InputMethodFramework
3422736c2fSopenharmony_ci * @since 12
3522736c2fSopenharmony_ci * @version 1.0
3622736c2fSopenharmony_ci */
3722736c2fSopenharmony_ci#include "inputmethod_types_capi.h"
3822736c2fSopenharmony_ci#ifdef __cplusplus
3922736c2fSopenharmony_ciextern "C" {
4022736c2fSopenharmony_ci#endif /* __cplusplus */
4122736c2fSopenharmony_ci/**
4222736c2fSopenharmony_ci * @brief Define the InputMethod_AttachOptions structure type.
4322736c2fSopenharmony_ci *
4422736c2fSopenharmony_ci * The options when attaching input method.
4522736c2fSopenharmony_ci *
4622736c2fSopenharmony_ci * @since 12
4722736c2fSopenharmony_ci */
4822736c2fSopenharmony_citypedef struct InputMethod_AttachOptions InputMethod_AttachOptions;
4922736c2fSopenharmony_ci
5022736c2fSopenharmony_ci/**
5122736c2fSopenharmony_ci * @brief Create a new {@link InputMethod_AttachOptions} instance.
5222736c2fSopenharmony_ci *
5322736c2fSopenharmony_ci * @param showKeyboard Represents whether to show the keyboard.
5422736c2fSopenharmony_ci * @return If the creation succeeds, a pointer to the newly created {@link InputMethod_AttachOptions}
5522736c2fSopenharmony_ci * instance is returned. If the creation fails, NULL is returned, possible cause is insufficient memory.
5622736c2fSopenharmony_ci * @since 12
5722736c2fSopenharmony_ci */
5822736c2fSopenharmony_ciInputMethod_AttachOptions *OH_AttachOptions_Create(bool showKeyboard);
5922736c2fSopenharmony_ci/**
6022736c2fSopenharmony_ci * @brief Delete a {@link InputMethod_AttachOptions} instance.
6122736c2fSopenharmony_ci *
6222736c2fSopenharmony_ci * @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be destroyed.
6322736c2fSopenharmony_ci * @since 12
6422736c2fSopenharmony_ci */
6522736c2fSopenharmony_civoid OH_AttachOptions_Destroy(InputMethod_AttachOptions *options);
6622736c2fSopenharmony_ci/**
6722736c2fSopenharmony_ci * @brief Get showKeyboard value from {@link InputMethod_AttachOptions}.
6822736c2fSopenharmony_ci *
6922736c2fSopenharmony_ci * @param options Represents a pointer to an {@link InputMethod_AttachOptions} instance which will be get value from.
7022736c2fSopenharmony_ci * @param showKeyboard  Represents showKeyboard value.
7122736c2fSopenharmony_ci *     true - need to show keyboard.
7222736c2fSopenharmony_ci *     false - no need to show keyboard.
7322736c2fSopenharmony_ci * @return Returns a specific error code.
7422736c2fSopenharmony_ci *     {@link IME_ERR_OK} - success.
7522736c2fSopenharmony_ci *     {@link IME_ERR_NULL_POINTER} - unexpected null pointer.
7622736c2fSopenharmony_ci * Specific error codes can be referenced {@link InputMethod_ErrorCode}.
7722736c2fSopenharmony_ci * @since 12
7822736c2fSopenharmony_ci */
7922736c2fSopenharmony_ciInputMethod_ErrorCode OH_AttachOptions_IsShowKeyboard(InputMethod_AttachOptions *options, bool *showKeyboard);
8022736c2fSopenharmony_ci#ifdef __cplusplus
8122736c2fSopenharmony_ci}
8222736c2fSopenharmony_ci#endif /* __cplusplus */
8322736c2fSopenharmony_ci/** @} */
8422736c2fSopenharmony_ci#endif // OHOS_INPUTMETHOD_ATTACH_OPTIONS_CAPI_H