2 * Copyright (c) 2014-2015 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_UIX_INPUTMETHOD_MANAGER_H__
18 #define __TIZEN_UIX_INPUTMETHOD_MANAGER_H__
21 * @file inputmethod_manager.h
22 * @brief This file contains input method manager APIs for input method editor (IME) list and selector settings.
32 * @addtogroup CAPI_UIX_INPUTMETHOD_MANAGER_MODULE
37 * @brief Enumeration for input method manager function error
43 IME_MANAGER_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
44 IME_MANAGER_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
45 IME_MANAGER_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
46 IME_MANAGER_ERROR_OPERATION_FAILED = TIZEN_ERROR_IME | 0x0010, /**< Operation failed */
47 } ime_manager_error_e;
50 * @brief Requests to open the installed IME list menu.
52 * @details This function provides the installed IME list menu for the IME developers who might want to open it to enable their IME.
58 * @privilege %http://tizen.org/privilege/imemanager
60 * @return 0 on success, otherwise a negative error value
61 * @retval #IME_MANAGER_ERROR_NONE No error
62 * @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
63 * @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed
65 * @see ime_manager_show_ime_selector
67 EXPORT_API int ime_manager_show_ime_list(void);
70 * @brief Requests to open the IME selector menu.
72 * @details This function provides the IME selector menu for the IME or other application developers who might want to change the default IME.
78 * @privilege %http://tizen.org/privilege/imemanager
80 * @return 0 on success, otherwise a negative error value
81 * @retval #IME_MANAGER_ERROR_NONE No error
82 * @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
83 * @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed
85 * @see ime_manager_show_ime_list
87 EXPORT_API int ime_manager_show_ime_selector(void);
90 * @brief Checks if the specific IME is enabled or disabled in the system keyboard setting.
92 * @details The IME developers can use this function to check their IME is enabled or not.
98 * @privilege %http://tizen.org/privilege/imemanager
100 * @param[in] app_id The application ID of the IME
101 * @param[out] enabled The On (enabled) and Off (disabled) state of the IME
103 * @return 0 on success, otherwise a negative error value
104 * @retval #IME_MANAGER_ERROR_NONE No error
105 * @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
106 * @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
107 * @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed
109 * @see ime_manager_show_ime_list
111 EXPORT_API int ime_manager_is_ime_enabled(const char *app_id, bool *enabled);
114 * @brief Checks which IME is the current activated (selected) IME.
116 * @remarks @a app_id must be released using free().
122 * @privilege %http://tizen.org/privilege/imemanager
124 * @param[out] app_id The application ID of the active IME
126 * @return 0 on success, otherwise a negative error value
127 * @retval #IME_MANAGER_ERROR_NONE No error
128 * @retval #IME_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
129 * @retval #IME_MANAGER_ERROR_PERMISSION_DENIED The application does not have the privilege to call this function
130 * @retval #IME_MANAGER_ERROR_OPERATION_FAILED Operation failed
132 * @see ime_manager_show_ime_selector
134 EXPORT_API int ime_manager_get_active_ime(char **app_id);
144 #endif // __TIZEN_UIX_INPUTMETHOD_MANAGER_H__