summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine-loader/Makefile.am20
-rw-r--r--isf.pc.in4
-rw-r--r--ism/demos/Makefile.am1
-rw-r--r--ism/extras/efl_panel/Makefile.am2
-rw-r--r--ism/extras/efl_panel/isf_panel_efl.cpp14
-rw-r--r--ism/src/Makefile.am103
-rw-r--r--ism/src/tizen_profile.cpp27
-rw-r--r--ism/src/tizen_profile.h2
-rw-r--r--packaging/isf.spec3
-rw-r--r--scim.pc.in2
10 files changed, 95 insertions, 83 deletions
diff --git a/engine-loader/Makefile.am b/engine-loader/Makefile.am
index 55f6faee..9b92f9fe 100644
--- a/engine-loader/Makefile.am
+++ b/engine-loader/Makefile.am
@@ -28,23 +28,7 @@ bin_PROGRAMS = $(ISE_ENGINE_LOADER)
ise_engine_loader_SOURCES = src/engine_loader.cpp \
src/engine_loader_main.cpp \
- src/engine_loader_dbus.cpp \
- ../ism/src/scim_imengine.cpp \
- ../ism/src/scim_imengine_module.cpp \
- ../ism/src/scim_signals.cpp \
- ../ism/src/scim_slot.cpp \
- ../ism/src/scim_connection.cpp \
- ../ism/src/scim_transaction.cpp \
- ../ism/src/scim_object.cpp \
- ../ism/src/scim_lookup_table.cpp \
- ../ism/src/scim_config_base.cpp \
- ../ism/src/scim_config_module.cpp \
- ../ism/src/scim_global_config.cpp \
- ../ism/src/scim_debug.cpp \
- ../ism/src/scim_module.cpp \
- ../ism/src/scim_utility.cpp \
- ../ism/src/scim_socket.cpp \
- ../ism/src/isf_query_utility.cpp
+ src/engine_loader_dbus.cpp
ise_engine_loader_CXXFLAGS = @GLIB_CFLAGS@ \
@GIO_CFLAGS@ \
@@ -59,4 +43,4 @@ ise_engine_loader_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \
@SQLITE3_LIBS@ \
-pie
-ise_engine_loader_LDADD = $(top_builddir)/ism/src/libltdlc.la
+ise_engine_loader_LDADD = $(top_builddir)/ism/src/libltdlc.la $(top_builddir)/ism/src/libscim_imengine.la
diff --git a/isf.pc.in b/isf.pc.in
index 9778aaba..b82926a8 100644
--- a/isf.pc.in
+++ b/isf.pc.in
@@ -10,6 +10,6 @@ sysconfdir=@sysconfdir@
Name: ISF
Description: Input Service Framework
Version: @ISF_VERSION@
-Requires:
-Libs: -L${libdir} -lscim@SCIM_EPOCH@
+Requires:
+Libs: -L${libdir} -lscim_imengine -lscim@SCIM_EPOCH@ -lisf-control
Cflags: -I${includedir}/scim@SCIM_EPOCH@
diff --git a/ism/demos/Makefile.am b/ism/demos/Makefile.am
index aa0bedc8..82f8d833 100644
--- a/ism/demos/Makefile.am
+++ b/ism/demos/Makefile.am
@@ -61,4 +61,5 @@ isf_demo_efl_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \
-pie
isf_demo_efl_LDADD = $(top_builddir)/ism/src/libscim@SCIM_EPOCH@.la \
+ $(top_builddir)/ism/src/libisf-control.la \
$(top_builddir)/ism/src/libprofile.la
diff --git a/ism/extras/efl_panel/Makefile.am b/ism/extras/efl_panel/Makefile.am
index 2287b3f2..e6dd20f4 100644
--- a/ism/extras/efl_panel/Makefile.am
+++ b/ism/extras/efl_panel/Makefile.am
@@ -57,6 +57,7 @@ isf_panel_efl_CXXFLAGS = @ECOREX_CFLAGS@ \
@PKGMGR_INFO_CFLAGS@ \
@PACKAGE_MANAGER_CFLAGS@ \
@AUL_CFLAGS@ \
+ @SYSTEM_INFO_CFLAGS@ \
-fPIE
isf_panel_efl_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \
@@ -79,6 +80,7 @@ isf_panel_efl_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \
@PKGMGR_INFO_LIBS@ \
@PACKAGE_MANAGER_LIBS@ \
@AUL_LIBS@ \
+ @SYSTEM_INFO_LIBS@ \
-pie
isf_panel_efl_LDADD = $(top_builddir)/ism/src/libscim@SCIM_EPOCH@.la \
diff --git a/ism/extras/efl_panel/isf_panel_efl.cpp b/ism/extras/efl_panel/isf_panel_efl.cpp
index 940ac1b7..f6fc9da8 100644
--- a/ism/extras/efl_panel/isf_panel_efl.cpp
+++ b/ism/extras/efl_panel/isf_panel_efl.cpp
@@ -43,6 +43,7 @@
#include <Ecore.h>
#include <Ecore_File.h>
#include <tzplatform_config.h>
+#include <system_info.h>
#include "scim_private.h"
#include "scim.h"
@@ -7657,6 +7658,17 @@ static Eina_Bool monitor_user_data_path_timer(void *data)
return ECORE_CALLBACK_RENEW;
}
+void set_tizen_profile()
+{
+ char *profile_name = NULL;
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profile_name);
+ if (profile_name) {
+ LOGD("profile name : %s", profile_name);
+ isf_set_tizen_profile(profile_name);
+ free(profile_name);
+ }
+}
+
int main (int argc, char *argv [])
{
struct tms tiks_buf;
@@ -7911,6 +7923,8 @@ int main (int argc, char *argv [])
_candidate_font_size = (int)(_candidate_font_size * (_width_rate < _height_rate ? _width_rate : _height_rate));
#endif /* CANDIDATE */
+ set_tizen_profile();
+
/* Load ISF configuration */
user_data_path = scim_get_user_data_dir ();
user_data_path_exists = ecore_file_exists (user_data_path.c_str ());
diff --git a/ism/src/Makefile.am b/ism/src/Makefile.am
index 6acf40d3..01137240 100644
--- a/ism/src/Makefile.am
+++ b/ism/src/Makefile.am
@@ -16,7 +16,7 @@
## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
MAINTAINERCLEANFILES = Makefile.in scim_types.h
-CLEANFILES = libltdlc.la libscim.la lib@ISF_CONTROL@.la *.bak
+CLEANFILES = libltdlc.la libscim.la lib@ISF_CONTROL@.la libscim_imengine.la *.bak
DISTCLEANFILES = scim_types.h
EXTRA_DIST = libscim.version-script
@@ -113,8 +113,8 @@ libprivilege_checker_la_CXXFLAGS = @DLOG_CFLAGS@ @CYNARA_CFLAGS@
libprivilege_checker_la_LIBADD = @DLOG_LIBS@ @CYNARA_LIBS@
libprofile_la_SOURCES = tizen_profile.cpp
-libprofile_la_CXXFLAGS = @SYSTEM_INFO_CFLAGS@
-libprofile_la_LIBADD = @SYSTEM_INFO_LIBS@
+libprofile_la_CXXFLAGS =
+libprofile_la_LIBADD =
libisf_pkg_la_SOURCES = isf_pkg.cpp
libisf_pkg_la_CXXFLAGS = @DLOG_CFLAGS@ @PKGMGR_INFO_CFLAGS@ @TZPLATFORM_CONFIG_CFLAGS@
@@ -124,44 +124,72 @@ if SCIM_LD_VERSION_SCRIPT
LD_VERSION_SCRIPT_OPTION="-Wl,--version-script=$(srcdir)/libscim.version-script"
endif
-lib_LTLIBRARIES = libscim@SCIM_EPOCH@.la lib@ISF_CONTROL@.la
+lib_LTLIBRARIES = libscim_imengine.la libscim@SCIM_EPOCH@.la lib@ISF_CONTROL@.la
+
+libscim_imengineincludedir = $(includedir)/scim_imengine
+
+libscim_imengineinclude_HEADERS = scim.h \
+ scim_config_base.h \
+ scim_config_module.h \
+ scim_config_path.h \
+ scim_imengine.h \
+ scim_imengine_module.h \
+ scim_module.h
+
+libscim_imengine_la_SOURCES = \
+ scim_imengine.cpp \
+ scim_imengine_module.cpp \
+ scim_signals.cpp \
+ scim_slot.cpp \
+ scim_connection.cpp \
+ scim_transaction.cpp \
+ scim_object.cpp \
+ scim_lookup_table.cpp \
+ scim_config_base.cpp \
+ scim_config_module.cpp \
+ scim_global_config.cpp \
+ scim_debug.cpp \
+ scim_module.cpp \
+ scim_utility.cpp \
+ scim_socket.cpp \
+ scim_event.cpp \
+ scim_setup_module_efl.cpp \
+ isf_query_utility.cpp
+
+libscim_imengine_la_CXXFLAGS = @EINA_CFLAGS@ \
+ @DLOG_CFLAGS@ \
+ @SQLITE3_CFLAGS@ \
+ @SYSTEMD_CFLAGS@ \
+ @EVAS_CFLAGS@
+
+libscim_imengine_la_LDFLAGS = -version-info $(SCIM_CURRENT):$(SCIM_REVISION):$(SCIM_AGE) \
+ -export-dynamic \
+ -rpath $(libdir) \
+ @EINA_LIBS@ \
+ @DLOG_LIBS@ \
+ @SQLITE3_LIBS@ \
+ @SYSTEMD_LIBS@ \
+ -lstdc++
+
+libscim_imengine_la_LIBADD = libltdlc.la libprofile.la
libscim@SCIM_EPOCH@_la_SOURCES = \
- scim_debug.cpp \
- scim_module.cpp \
scim_backend.cpp \
scim_chartraits.cpp \
scim_compose_key.cpp \
- scim_config_base.cpp \
- scim_config_module.cpp \
- scim_connection.cpp \
- scim_event.cpp \
scim_filter.cpp \
scim_filter_module.cpp \
scim_filter_manager.cpp \
scim_frontend.cpp \
scim_frontend_module.cpp \
- scim_global_config.cpp \
scim_helper.cpp \
scim_helper_manager.cpp \
scim_helper_module.cpp \
scim_hotkey.cpp \
scim_iconv.cpp \
- scim_imengine.cpp \
- scim_imengine_module.cpp \
- scim_lookup_table.cpp \
- scim_object.cpp \
scim_panel_client.cpp \
scim_private.cpp \
- scim_signals.cpp \
- scim_slot.cpp \
- scim_socket.cpp \
- scim_transaction.cpp \
- scim_utility.cpp \
- scim_setup_module_efl.cpp \
- isf_control.cpp \
isf_imcontrol_client.cpp \
- isf_query_utility.cpp \
isf_panel_agent_manager.cpp \
isf_info_manager.cpp \
isf_panel_agent_base.cpp \
@@ -170,15 +198,13 @@ libscim@SCIM_EPOCH@_la_SOURCES = \
isf_remote_client.cpp \
isf_pkg.cpp
-libscim@SCIM_EPOCH@_la_CXXFLAGS = @EVAS_CFLAGS@ \
- @EINA_CFLAGS@ \
+libscim@SCIM_EPOCH@_la_CXXFLAGS = @EINA_CFLAGS@ \
@ECORE_IMF_CFLAGS@ \
@ECORE_INPUT_CFLAGS@ \
@DLOG_CFLAGS@ \
@SQLITE3_CFLAGS@ \
@TZPLATFORM_CONFIG_CFLAGS@ \
@PKGMGR_INFO_CFLAGS@ \
- @VCONF_CFLAGS@ \
@GLIB_CFLAGS@ \
@SYSTEMD_CFLAGS@
@@ -195,41 +221,23 @@ libscim@SCIM_EPOCH@_la_LDFLAGS = -version-info $(SCIM_CURRENT):$(SCIM_REVISION)
@SQLITE3_LIBS@ \
@TZPLATFORM_CONFIG_LIBS@ \
@PKGMGR_INFO_LIBS@ \
- @VCONF_LIBS@ \
@GLIB_LIBS@ \
@SYSTEMD_LIBS@ \
-lstdc++
-libscim@SCIM_EPOCH@_la_LIBADD = libltdlc.la libprofile.la
+libscim@SCIM_EPOCH@_la_LIBADD = libltdlc.la libprofile.la libscim_imengine.la
libexecdir = $(libdir)/scim@SCIM_EPOCH@
libexec_PROGRAMS = scim-helper-launcher
scim_helper_launcher_SOURCES = scim_helper_launcher.cpp
scim_helper_launcher_CXXFLAGS = -fstack-protector-strong -Wl,-z,relro -D_FORTIFY_SOURCE=2 -fPIE
-scim_helper_launcher_LDADD = libscim@SCIM_EPOCH@.la
+scim_helper_launcher_LDADD = libscim_imengine.la libscim@SCIM_EPOCH@.la
scim_helper_launcher_LDFLAGS = @LTLIBINTL@ -pie
lib@ISF_CONTROL@includedir = $(includedir)/@ISF_CONTROL@
-lib@ISF_CONTROL@include_HEADERS = scim.h \
- scim_attribute.h \
- scim_bind.h \
- scim_connection.h \
- scim_debug.h \
- scim_exception.h \
- scim_global_config.h \
- scim_object.h \
- scim_pointer.h \
- scim_property.h \
- scim_signals.h \
- scim_slot.h \
- scim_socket.h \
- scim_trans_commands.h \
- scim_transaction.h \
- scim_types.h \
- scim_utility.h \
- scim_visibility.h \
+lib@ISF_CONTROL@include_HEADERS = \
isf_control.h \
isf_imcontrol_client.h \
tizen_profile.h
@@ -245,6 +253,7 @@ lib@ISF_CONTROL@_la_SOURCES = \
scim_socket.cpp \
scim_transaction.cpp \
scim_utility.cpp \
+ scim_lookup_table.cpp \
isf_control.cpp \
isf_imcontrol_client.cpp
diff --git a/ism/src/tizen_profile.cpp b/ism/src/tizen_profile.cpp
index 2ee3d301..6456bb5f 100644
--- a/ism/src/tizen_profile.cpp
+++ b/ism/src/tizen_profile.cpp
@@ -22,43 +22,40 @@
*
*/
-#include <system_info.h>
#include <stdlib.h>
#include "tizen_profile.h"
+static tizen_profile_t g_profile = TIZEN_PROFILE_WEARABLE;
+
/**
* The current profile information will be passed as a return value
*/
tizen_profile_t _get_tizen_profile()
{
- static tizen_profile_t profile = TIZEN_PROFILE_UNKNOWN;
- if (__builtin_expect(profile != TIZEN_PROFILE_UNKNOWN, 1))
- return profile;
+ return g_profile;
+}
- char *profileName;
- system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
- switch (*profileName)
+void isf_set_tizen_profile(const char *profile_name)
+{
+ switch (*profile_name)
{
case 'm':
case 'M':
- profile = TIZEN_PROFILE_MOBILE;
+ g_profile = TIZEN_PROFILE_MOBILE;
break;
case 'w':
case 'W':
- profile = TIZEN_PROFILE_WEARABLE;
+ g_profile = TIZEN_PROFILE_WEARABLE;
break;
case 't':
case 'T':
- profile = TIZEN_PROFILE_TV;
+ g_profile = TIZEN_PROFILE_TV;
break;
case 'i':
case 'I':
- profile = TIZEN_PROFILE_IVI;
+ g_profile = TIZEN_PROFILE_IVI;
break;
default: // common or unknown ==> ALL ARE COMMON.
- profile = TIZEN_PROFILE_COMMON;
+ g_profile = TIZEN_PROFILE_COMMON;
}
- free(profileName);
-
- return profile;
}
diff --git a/ism/src/tizen_profile.h b/ism/src/tizen_profile.h
index 836e2ce0..ea225caa 100644
--- a/ism/src/tizen_profile.h
+++ b/ism/src/tizen_profile.h
@@ -38,6 +38,8 @@ typedef enum {
extern "C" {
#endif /* __cplusplus */
+void isf_set_tizen_profile(const char *profile_name);
+
extern tizen_profile_t _get_tizen_profile();
#define _TV (_get_tizen_profile() == TIZEN_PROFILE_TV)
diff --git a/packaging/isf.spec b/packaging/isf.spec
index 2c453314..2b345c95 100644
--- a/packaging/isf.spec
+++ b/packaging/isf.spec
@@ -162,6 +162,7 @@ cat scim.lang > isf.lang
%{_libdir}/scim-1.0/scim-helper-launcher
%{_libdir}/libscim-*.so.*
%{_libdir}/libisf-control.so.*
+%{_libdir}/libscim_imengine.so.*
%{TZ_SYS_RO_ETC}/package-manager/parserlib/category/libimeparser.so
%license COPYING
%{TZ_SYS_ETC}/dump.d/module.d/*
@@ -172,7 +173,9 @@ cat scim.lang > isf.lang
%{_includedir}/scim-1.0/*
%{_libdir}/libscim-*.so
%{_includedir}/isf-control/*
+%{_includedir}/scim_imengine/*
%{_libdir}/libisf-control.so
+%{_libdir}/libscim_imengine.so
%{_libdir}/pkgconfig/isf.pc
%{_libdir}/pkgconfig/scim.pc
%{_libdir}/pkgconfig/isf-control.pc
diff --git a/scim.pc.in b/scim.pc.in
index a9d56321..0b259eea 100644
--- a/scim.pc.in
+++ b/scim.pc.in
@@ -16,5 +16,5 @@ Name: SCIM
Description: Smart Common Input Method platform
Version: @SCIM_VERSION@
Requires:
-Libs: -L${libdir} -lscim@SCIM_EPOCH@
+Libs: -L${libdir} -lscim@SCIM_EPOCH@ -lscim_imengine
Cflags: -I${includedir}/scim@SCIM_EPOCH@