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;
_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 = g_file_test (user_data_path.c_str(), G_FILE_TEST_EXISTS);
int val;
if (vconf_get_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, &val) == 0) {
if (val) {
- LOGD ("Changed keyboard mode from H/W to S/W ");
+ LOGI ("Changed keyboard mode from H/W to S/W");
hw_keyboard_mode = EINA_FALSE;
vconf_set_bool (VCONFKEY_ISF_HW_KEYBOARD_INPUT_DETECTED, 0);
if (ecore_imf_context_input_panel_enabled_get (ctx)) {
}
}
}
+
if (strcmp (ecore_key_ev.key, "space") == 0 ||
strcmp (ecore_key_ev.key, "KP_Space") == 0) {
autoperiod_insert (ctx);
_focused_ic = 0;
if (_TV)
- g_info_manager->remoteinput_callback_focus_out ();
+ g_info_manager->remoteinput_callback_focus_out ();
context_scim->impl->surrounding_text.clear ();
context_scim->impl->preedit_string.clear ();
libprivilege_checker_la_LIBADD = @DLOG_LIBS@ @CYNARA_LIBS@
libprofile_la_SOURCES = tizen_profile.cpp
-libprofile_la_CXXFLAGS =
-libprofile_la_LIBADD =
+libprofile_la_CXXFLAGS = @SYSTEM_INFO_CFLAGS@
+libprofile_la_LIBADD = @SYSTEM_INFO_LIBS@
libisf_pkg_la_SOURCES = isf_pkg.cpp
libisf_pkg_la_CXXFLAGS = @DLOG_CFLAGS@ @PKGMGR_INFO_CFLAGS@ @TZPLATFORM_CONFIG_CFLAGS@
*/
#include <stdlib.h>
+#include <system_info.h>
#include "tizen_profile.h"
-static tizen_profile_t g_profile = TIZEN_PROFILE_WEARABLE;
+static tizen_profile_t g_profile = TIZEN_PROFILE_UNKNOWN;
/**
* 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;
+
+ char *profileName;
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ switch (*profileName)
+ {
+ case 'm':
+ case 'M':
+ g_profile = TIZEN_PROFILE_MOBILE;
+ break;
+ case 'w':
+ case 'W':
+ g_profile = TIZEN_PROFILE_WEARABLE;
+ break;
+ case 't':
+ case 'T':
+ g_profile = TIZEN_PROFILE_TV;
+ break;
+ case 'i':
+ case 'I':
+ g_profile = TIZEN_PROFILE_IVI;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ g_profile = TIZEN_PROFILE_COMMON;
+ }
+
return g_profile;
}
-void isf_set_tizen_profile(const char *profile_name)
+void isf_set_tizen_profile(const char *profileName)
{
- switch (*profile_name)
+ switch (*profileName)
{
case 'm':
case 'M':
default: // common or unknown ==> ALL ARE COMMON.
g_profile = TIZEN_PROFILE_COMMON;
}
-}
+}
\ No newline at end of file