gcc6: narrowing conversion from char to unsigned char
[platform/core/uifw/ise-engine-unikey.git] / setup / scim_unikey_helper.cpp
1 /**
2    Scim-Unikey Input Method
3
4    Copyright (C) 2008-2009 Ubuntu-VN <http://www.ubuntu-vn.org>
5    Author: Le Quoc Tuan <mr.lequoctuan@gmail.com>
6    Home: http://scim-unikey.googlecode.com
7    License: GNU GENERAL PUBLIC LICENSE v2
8 */
9
10 #ifdef HAVE_CONFIG_H
11 #include "config.h"
12 #endif
13
14 #define Uses_SCIM_CONFIG_BASE
15 #define Uses_SCIM_CONFIG_PATH
16 #define Uses_SCIM_MODULE
17 #define Uses_SCIM_IMENGINE_MODULE
18 #define Uses_SCIM_HELPER
19 #define Uses_STL_MAP
20
21 #include <libintl.h>
22 #define _(String) dgettext(PACKAGE_NAME,String)
23
24 #include <scim.h>
25 #include "scim_unikey_const.h"
26
27 #define scim_module_init                        unikey_helper_LTX_scim_module_init
28 #define scim_module_exit                        unikey_helper_LTX_scim_module_exit
29 #define scim_helper_module_number_of_helpers    unikey_helper_LTX_scim_helper_module_number_of_helpers
30 #define scim_helper_module_get_helper_info      unikey_helper_LTX_scim_helper_module_get_helper_info
31 #define scim_helper_module_run_helper           unikey_helper_LTX_scim_helper_module_run_helper
32
33 using namespace scim;
34
35 static HelperInfo __helper_info (String("d64561de-c638-427e-9f9c-dd84e15043ab"),
36                                                                  String(_("Unikey Setup")),
37                                                                  String(SCIM_ICONDIR)+String(SCIM_UNIKEY_ICON_MAIN),
38                                                                  String(""),
39                                                                  SCIM_HELPER_STAND_ALONE);
40
41 extern "C"
42 {
43         void scim_module_init()
44         {
45         }
46
47         void scim_module_exit()
48         {
49         }
50
51         unsigned int scim_helper_module_number_of_helpers()
52         {
53                 return 1;
54         }
55
56         bool scim_helper_module_get_helper_info(unsigned int idx, HelperInfo &info)
57         {
58                 if (idx == 0)
59                 {
60                         info = __helper_info;
61                         return true;
62                 }
63                 return false;
64         }
65
66         void scim_helper_module_run_helper(const String &uuid, const ConfigPointer &config, const String &display)
67         {
68                 if (uuid == "d64561de-c638-427e-9f9c-dd84e15043ab")
69                 {
70                         system(LIBEXECDIR "/scim-setup-unikey &");
71                 }
72         }
73 }
74