src/ise-emoticon-list.cpp
src/ise-emoticon-mode.cpp
- src/cbhm.cpp
src/modeindicator.cpp
src/eflutil.cpp
)
)
INCLUDE(FindPkgConfig)
-pkg_check_modules(ISE_PKGS REQUIRED
+SET(PKGS_CHECK_MODULES
elementary
efl-extension
dlog
capi-media-audio-io
)
+IF (with_cbhm)
+ ADD_DEFINITIONS("-DHAVE_CBHM")
+ SET(PKGS_CHECK_MODULES ${PKGS_CHECK_MODULES} cbhm)
+ENDIF(with_cbhm)
+
+pkg_check_modules(ISE_PKGS REQUIRED ${PKGS_CHECK_MODULES})
+
FOREACH(flag ${ISE_PKGS_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)
+%if "%{profile}" == "mobile"
+%define WITH_CBHM TRUE
+%else
+%define WITH_CBHM FALSE
+%endif
+
Name: ise-default
Summary: Tizen keyboard
Version: 1.3.3
BuildRequires: pkgconfig(stt)
BuildRequires: pkgconfig(capi-appfw-application)
BuildRequires: pkgconfig(capi-media-audio-io)
+%if "%{WITH_CBHM}" == "TRUE"
+BuildRequires: pkgconfig(cbhm)
+%endif
BuildRequires: model-build-features
cmake . -DCMAKE_INSTALL_PREFIX=%{_prefix} \
-DTARGET=%{?profile} \
-DTZ_SYS_RO_APP=%TZ_SYS_RO_APP \
- -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES
+ -DTZ_SYS_RO_PACKAGES=%TZ_SYS_RO_PACKAGES \
+ -Dwith_cbhm=%{WITH_CBHM}
make %{?jobs:-j%jobs}
+++ /dev/null
-/*
- * Copyright (c) 2012 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#include <Eldbus.h>
-
-#define CBHM_DBUS_OBJPATH "/org/tizen/cbhm/dbus"
-#ifndef CBHM_DBUS_INTERFACE
-#define CBHM_DBUS_INTERFACE "org.tizen.cbhm.dbus"
-#endif /* CBHM_DBUS_INTERFACE */
-
-static Eldbus_Proxy *eldbus_proxy = NULL;
-static Eldbus_Connection *cbhm_conn = NULL;
-
-Eldbus_Proxy* cbhm_proxy_get()
-{
- return eldbus_proxy;
-}
-
-static void _cbhm_on_name_owner_changed(void *data EINA_UNUSED,
- const char *bus EINA_UNUSED, const char *old_id EINA_UNUSED,
- const char *new_id EINA_UNUSED)
-{
- /* If client should know the time clipboard service is started or stoped,
- * use this function. */
-}
-
-void cbhm_eldbus_init()
-{
- Eldbus_Object *eldbus_obj;
-
- cbhm_conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SESSION);
- eldbus_obj = eldbus_object_get(cbhm_conn, CBHM_DBUS_INTERFACE, CBHM_DBUS_OBJPATH);
- eldbus_proxy = eldbus_proxy_get(eldbus_obj, CBHM_DBUS_INTERFACE);
- eldbus_name_owner_changed_callback_add(cbhm_conn, CBHM_DBUS_INTERFACE,
- _cbhm_on_name_owner_changed, cbhm_conn, EINA_TRUE);
-}
-
-void cbhm_eldbus_deinit()
-{
- if (cbhm_conn)
- eldbus_connection_unref(cbhm_conn);
-}
-
+++ /dev/null
-/*
- * Copyright (c) 2012 - 2016 Samsung Electronics Co., Ltd All Rights Reserved
- *
- * Licensed under the Apache License, Version 2.0 (the License);
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-#ifndef __CBHM_H__
-#define __CBHM_H__
-
-Eldbus_Proxy* cbhm_proxy_get();
-
-void cbhm_eldbus_init();
-void cbhm_eldbus_deinit();
-
-#endif //__CBHM_H__
\ No newline at end of file
#include <Ecore_IMF.h>
#include <Elementary.h>
#include <scim.h>
+#ifdef HAVE_CBHM
+#include <cbhm.h>
+#endif
#include "sclui.h"
#include "sclcore.h"
#include "languages.h"
#include "candidate-factory.h"
#include "ise-emoticon-mode.h"
-#include "cbhm.h"
#include "ise-stt-mode.h"
#include "ise-stt-option.h"
#include "modeindicator.h"
#include "ise.h"
+#ifdef HAVE_CBHM
+static cbhm_h cbhm_handle;
+#endif
+
static CCoreEventCallback g_core_event_callback;
CSCLCore g_core(&g_core_event_callback);
int g_imdata_state = 0;
{
LOGD("CCoreEventCallback::init()\n");
ise_create();
- cbhm_eldbus_init();
+
+#ifdef HAVE_CBHM
+ cbhm_open_service(&cbhm_handle);
+#endif
}
void CCoreEventCallback::on_run(int argc, char **argv)
{
::ise_hide();
ise_destroy();
- cbhm_eldbus_deinit();
+
+#ifdef HAVE_CBHM
+ cbhm_close_service(cbhm_handle);
+ cbhm_handle = NULL;
+#endif
}
void CCoreEventCallback::on_attach_input_context(sclint ic, const sclchar *ic_uuid)
g_core.create_option_window();
ret = SCL_EVENT_DONE;
} else if (strcmp(event_desc.key_value, USER_KEYSTRING_CLIPBOARD) == 0) {
- eldbus_proxy_call(cbhm_proxy_get(), "CbhmShow", NULL, NULL, -1, "s", "0");
+#ifdef HAVE_CBHM
+ int cbhm_ret = cbhm_show(cbhm_handle);
+ if (cbhm_ret != CBHM_ERROR_NONE)
+ LOGW("cbhm show error : %d\n", cbhm_ret);
+#endif
+
ret = SCL_EVENT_DONE;
} else if (on_input_mode_changed(event_desc.key_value, event_desc.key_event, event_desc.key_type)) {
ret = SCL_EVENT_DONE;
g_core.create_option_window();
ret = SCL_EVENT_DONE;
} else if (strcmp(event_desc.key_value, USER_KEYSTRING_CLIPBOARD) == 0) {
- eldbus_proxy_call(cbhm_proxy_get(), "CbhmShow", NULL, NULL, -1, "s", "0");
+#ifdef HAVE_CBHM
+ int cbhm_ret = cbhm_hide(cbhm_handle);
+ if (cbhm_ret != CBHM_ERROR_NONE)
+ LOGW("cbhm hide error : %d\n", cbhm_ret);
+#endif
+
ret = SCL_EVENT_DONE;
} else if (strcmp(event_desc.key_value, "Cancel") == 0) {
ret = SCL_EVENT_DONE;