Merge "Add isf_input_hint_efl files" into tizen
[platform/core/uifw/isf.git] / ism / src / isf_control.h
1 /*
2  * ISF(Input Service Framework)
3  *
4  * ISF is based on SCIM 1.4.7 and extended for supporting more mobile fitable.
5  * Copyright (c) 2012-2014 Samsung Electronics Co., Ltd.
6  *
7  * Contact: Haifeng Deng <haifeng.deng@samsung.com>, Hengliang Luo <hl.luo@samsung.com>
8  *
9  * This library is free software; you can redistribute it and/or modify it under
10  * the terms of the GNU Lesser General Public License as published by the
11  * Free Software Foundation; either version 2.1 of the License, or (at your option)
12  * any later version.
13  *
14  * This library is distributed in the hope that it will be useful, but WITHOUT ANY
15  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
16  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
17  * License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this library; if not, write to the Free Software Foundation, Inc., 51
21  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  *
23  */
24
25 #ifndef __ISF_CONTROL_H
26 #define __ISF_CONTROL_H
27
28 #include <scim_visibility.h>
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif /* __cplusplus */
33
34 /////////////////////////////////////////////////////////////////////////////
35 // Declaration of global data types.
36 /////////////////////////////////////////////////////////////////////////////
37 typedef enum
38 {
39     HARDWARE_KEYBOARD_ISE = 0,  /* Hardware keyboard ISE */
40     SOFTWARE_KEYBOARD_ISE       /* Software keyboard ISE */
41 } ISE_TYPE_T;
42
43 /////////////////////////////////////////////////////////////////////////////
44 // Declaration of global functions.
45 /////////////////////////////////////////////////////////////////////////////
46 /**
47  * @brief Set active ISE by UUID.
48  *
49  * @param uuid The active ISE's UUID.
50  *
51  * @return 0 if successfully, otherwise return -1;
52  */
53 EAPI int isf_control_set_active_ise_by_uuid (const char *uuid);
54
55 /**
56  * @brief Get active ISE's UUID.
57  *
58  * @param uuid The parameter is used to store active ISE's UUID.
59  *             Application needs free *uuid if it is not used.
60  *
61  * @return the length of UUID if successfully, otherwise return -1;
62  */
63 EAPI int isf_control_get_active_ise (char **uuid);
64
65 /**
66  * @brief Get the list of all ISEs' UUID.
67  *
68  * @param uuid_list The list is used to store all ISEs' UUID.
69  *                  Application needs free **uuid_list if it is not used.
70  *
71  * @return the count of UUID list if successfully, otherwise return -1;
72  */
73 EAPI int isf_control_get_ise_list (char ***uuid_list);
74
75 /**
76  * @brief Get ISE's information according to ISE's UUID.
77  *
78  * @param uuid The ISE's UUID.
79  * @param name     The parameter is used to store ISE's name. Application needs free *name if it is not used.
80  * @param language The parameter is used to store ISE's language. Application needs free *language if it is not used.
81  * @param type     The parameter is used to store ISE's type.
82  * @param option   The parameter is used to store ISE's option.
83  *
84  * @return 0 if successfully, otherwise return -1;
85  */
86 EAPI int isf_control_get_ise_info (const char *uuid, char **name, char **language, ISE_TYPE_T *type, int *option);
87
88 /**
89  * @brief Get ISE's information according to ISE's UUID.
90  *
91  * @param uuid The ISE's UUID.
92  * @param name     The parameter is used to store ISE's name. Application needs free *name if it is not used.
93  * @param language The parameter is used to store ISE's language. Application needs free *language if it is not used.
94  * @param type     The parameter is used to store ISE's type.
95  * @param option   The parameter is used to store ISE's option.
96  * @param module_name The parameter is used to store ISE's module file name.
97  *
98  * @return 0 if successfully, otherwise return -1;
99  */
100 EAPI int isf_control_get_ise_info_and_module_name (const char *uuid, char **name, char **language, ISE_TYPE_T *type, int *option, char **module_name);
101
102 /**
103  * @brief Set active ISE to default ISE.
104  *
105  * @return 0 if successfully, otherwise return -1;
106  */
107 EAPI int isf_control_set_active_ise_to_default (void);
108
109 /**
110  * @brief Reset all ISEs' options.
111  *
112  * @return 0 if successfully, otherwise return -1;
113  */
114 EAPI int isf_control_reset_ise_option (void);
115
116 /**
117  * @brief Set initial ISE by UUID.
118  *
119  * @param uuid The initial ISE's UUID.
120  *
121  * @return 0 if successfully, otherwise return -1;
122  */
123 EAPI int isf_control_set_initial_ise_by_uuid (const char *uuid);
124
125 /**
126  * @brief Get initial ISE UUID.
127  *
128  * @param uuid The parameter is used to store initial ISE's UUID.
129  *             Application needs free *uuid if it is not used.
130  *
131  * @return the length of UUID if successfully, otherwise return -1;
132  */
133 EAPI int isf_control_get_initial_ise (char **uuid);
134
135 /**
136  * @brief Show ISE selector.
137  *
138  * @return 0 if successfully, otherwise return -1;
139  */
140 EAPI int isf_control_show_ise_selector ();
141
142 /**
143  * @brief Get the number of S/W or H/W keyboard ISEs
144  *
145  * @param type     ISE's type.
146  *
147  * @return the count of ISEs if successfully, otherwise return -1;
148  */
149 EAPI int isf_control_get_ise_count (ISE_TYPE_T type);
150
151 #ifdef __cplusplus
152 }
153 #endif /* __cplusplus */
154
155 #endif /* __ISF_CONTROL_H */
156
157 /*
158 vi:ts=4:nowrap:ai:expandtab
159 */