Git init
[framework/uifw/isf.git] / ism / extras / efl_panel / isf_panel_utility.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) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
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_PANEL_UTILITY_H
26 #define __ISF_PANEL_UTILITY_H
27
28 using namespace scim;
29
30
31 /////////////////////////////////////////////////////////////////////////////
32 // Declaration of macro.
33 /////////////////////////////////////////////////////////////////////////////
34 #define ENGLISH_KEYBOARD_MODULE                         "English/Keyboard"
35
36
37 #define EFL_CANDIDATE_BG                                (SCIM_DATADIR "/pixmaps/08_textinput_panel_bg.png")
38
39 #ifndef VCONFKEY_ISF_INPUT_LANG_STR
40 #define VCONFKEY_ISF_PREFIX                             "db/isf"
41 #define VCONFKEY_ISF_INPUT_LANG_STR                     (VCONFKEY_ISF_PREFIX "/input_lang")
42 #endif
43 #ifndef VCONFKEY_LANGSET
44 #define VCONFKEY_LANGSET                                "db/menu_widget/language"
45 #endif
46 #ifndef VCONFKEY_THEME
47 #define VCONFKEY_THEME                                  "db/setting/selected_theme"
48 #endif
49
50
51 #if SCIM_USE_STL_EXT_HASH_MAP
52 typedef __gnu_cxx::hash_map <String, std::vector <size_t>, scim_hash_string>        MapStringVectorSizeT;
53 typedef std::map <String, std::vector <String> >                                    MapStringVectorString;
54 typedef std::map <String ,String>                                                   MapStringString;
55 #elif SCIM_USE_STL_HASH_MAP
56 typedef std::hash_map <String, std::vector <size_t>, scim_hash_string>              MapStringVectorSizeT;
57 typedef std::map <String, std::vector <String> >                                    MapStringVectorString;
58 typedef std::map <String ,String>                                                   MapStringString;
59 #else
60 typedef std::map <String, std::vector <size_t> >                                    MapStringVectorSizeT;
61 typedef std::map <String, std::vector <String> >                                    MapStringVectorString;
62 typedef std::map <String ,String>                                                   MapStringString;
63 #endif
64
65 typedef enum {
66     ALL_ISE = 0,
67     HELPER_ONLY,
68     TYPE_END
69 } LOAD_ISE_TYPE;
70
71 void isf_get_all_languages (std::vector<String> &all_langs);
72 void isf_get_enabled_languages (std::vector<String> &enabled_langs);
73
74 void isf_get_enabled_ise_names_in_languages (std::vector<String> lang_list, std::vector<String> &ise_names);
75
76 void isf_get_keyboard_ise (String &ise_uuid, String &ise_name, const ConfigPointer &config);
77 void isf_get_keyboard_names_in_languages (std::vector<String> lang_list, std::vector<String> &keyboard_names);
78 void isf_get_keyboard_uuids_in_languages (std::vector<String> lang_list, std::vector<String> &keyboard_uuids);
79
80 void isf_get_helper_names_in_languages (std::vector<String> lang_list, std::vector<String> &helper_names);
81
82 void isf_save_ise_information (void);
83 void isf_load_ise_information (LOAD_ISE_TYPE type, const ConfigPointer &config);
84 bool isf_update_ise_list (LOAD_ISE_TYPE type, const ConfigPointer &config);
85
86 void isf_set_language (String language);
87
88 #endif /* __ISF_PANEL_UTILITY_H */
89
90 /*
91 vi:ts=4:ai:nowrap:expandtab
92 */