IME rotation sync related works.
[framework/osp/ime.git] / inc / FUiImeInputMethodManager.h
1 //\r
2 // Open Service Platform\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Apache License, Version 2.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 /**\r
19  * @file FUiImeInputMethodManager.h\r
20  * @brief This is the header file for the %InputMethodManager class.\r
21  *\r
22  * This header file contains the declarations of the %InputMethodManager class.\r
23  */\r
24 \r
25 #ifndef _FUI_IME_INPUT_METHOD_MANAGER_H_\r
26 #define _FUI_IME_INPUT_METHOD_MANAGER_H_\r
27 \r
28 #include <FAppTypes.h>\r
29 #include <FBaseColIList.h>\r
30 #include <FBaseDataType.h>\r
31 #include <FBaseObject.h>\r
32 #include <FOspConfig.h>\r
33 #include <FUiImeInputMethodInfo.h>\r
34 \r
35 namespace Tizen { namespace Ui { namespace Ime {\r
36 \r
37 class _InputMethodManagerImpl;\r
38 \r
39 /**\r
40  * @class       InputMethodManager\r
41  * @brief       This class provides a standard implementation of the %InputMethodManager class.\r
42  * @since 2.1\r
43  *\r
44  * @final This class is not intended for extension.\r
45  * @remarks A user can manage input methods installed in the system.\r
46  *\r
47  * The %InputMethodManager class provides a standard implementation of the %InputMethodManager class.\r
48  *\r
49  */\r
50 class _OSP_EXPORT_ InputMethodManager\r
51         : public Tizen::Base::Object\r
52 {\r
53 public:\r
54         /**\r
55          * Gets an instance of %InputMethodManager.\r
56          *\r
57          * @since 2.1\r
58          * @privlevel platform\r
59          * @privilege %http://tizen.org/privilege/imemanager\r
60          *\r
61          * @return An instance of %InputMethodManager \r
62          * @exception E_SUCCESS The method is successful.\r
63          * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
64          * @remarks \r
65          * - The specific error code can be accessed using the GetLastResult() method.\r
66          * - There is a high probability for an occurrence of an out-of-memory exception. @n If possible, check whether the exception is @c E_OUT_OF_MEMORY or not. For more information on how to handle the out-of-memory exception, refer <a href="../org.tizen.native.appprogramming/html/basics_tizen_programming/exception_check.htm">here</a>.\r
67          */\r
68         static InputMethodManager* GetInstance(void);\r
69 \r
70         /**\r
71          * Gets the %InputMethodInfo of the active input method.\r
72          *\r
73          * @since 2.1\r
74          * @privlevel platform\r
75          * @privilege %http://tizen.org/privilege/imemanager\r
76          *\r
77          * @return An instance of the InputMethodInfo @n\r
78          *                      This method returns @c null if it fails.\r
79          * @exception E_SUCCESS The method is successful.\r
80          * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
81          * @remarks     The specific error code can be accessed using the GetLastResult() method.\r
82          */\r
83         InputMethodInfo* GetActiveInputMethodInfoN(void) const;\r
84 \r
85         /**\r
86          * Gets the list of InputMethodInfo for all the input methods installed in a system.\r
87          *\r
88          * @since 2.1\r
89          * @privlevel platform\r
90          * @privilege %http://tizen.org/privilege/imemanager\r
91          *\r
92          * @return An instance of the list that consists of the InputMethodInfo instances\r
93          * @exception E_SUCCESS The method is successful.\r
94          * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
95          * @remarks The specific error code can be accessed using the GetLastResult() method.\r
96          */\r
97         Tizen::Base::Collection::IList* GetInputMethodInfoListN(void) const;\r
98 \r
99         /**\r
100          * Sets an input method.\r
101          *\r
102          * @since 2.1\r
103          * @privlevel platform\r
104          * @privilege %http://tizen.org/privilege/imemanager\r
105          *\r
106          * @return An error code\r
107          * @param[in]   id An application ID\r
108          * @exception   E_SUCCESS The method is successful.\r
109          * @exception E_APP_NOT_INSTALLED The specified ID does not match with any of the application IDs for the input methods installed in the system.\r
110          * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
111          */\r
112         result SetInputMethod(const Tizen::App::AppId& id);\r
113 \r
114         /**\r
115          * Checks whether an input method is active or not.\r
116          *\r
117          * @since 2.1\r
118          * @privlevel platform\r
119          * @privilege %http://tizen.org/privilege/imemanager\r
120          *\r
121          * @return @c true if the input method is active, @n\r
122          *             else @c false\r
123          * @param[in]   id An application ID\r
124          * @exception E_SUCCESS The method is successful.\r
125          * @exception E_PRIVILEGE_DENIED The application does not have the privilege to call this method.\r
126          * @remarks The specific error code can be accessed using the GetLastResult() method.\r
127          */\r
128         bool IsActiveInputMethod(const Tizen::App::AppId& id) const;\r
129 \r
130 private:\r
131         //\r
132         // This default constructor is intentionally declared as private to implement the Singleton semantic.\r
133         //\r
134         // @since 2.1\r
135         //\r
136         InputMethodManager(void);\r
137 \r
138         //\r
139         // This destructor is intentionally declared as private to implement the Singleton semantic.\r
140         //\r
141         // @since 2.1\r
142         //\r
143         virtual ~InputMethodManager(void);\r
144 \r
145         //\r
146         // The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.\r
147         //\r
148         // @since 2.1\r
149         //\r
150         InputMethodManager(const InputMethodManager& rhs);\r
151 \r
152         //\r
153         // The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.\r
154         //\r
155         // @since 2.1\r
156         //\r
157         InputMethodManager& operator=(const InputMethodManager& rhs);\r
158 \r
159 private:\r
160         friend class _InputMethodManagerImpl;\r
161 \r
162         _InputMethodManagerImpl* __pInputMethodManagerImpl;\r
163 };\r
164 \r
165 }}} // Tizen::Ui::Ime\r
166 \r
167 #endif // _FUI_IME_INPUT_METHOD_MANAGER_H_\r