From 31865d0548f3e3bddc7e81bbcf6564b91c729607 Mon Sep 17 00:00:00 2001 From: Jihoon Kim Date: Mon, 25 Sep 2017 14:19:10 +0900 Subject: [PATCH] Remove appcore-efl dependency in isf-demo-efl Change-Id: I60f4b1b1e3d2f64b38679085a568cefdffe5b99e Signed-off-by: Jihoon Kim --- configure.ac | 3 --- ism/demos/Makefile.am | 2 -- ism/demos/include/isf_demo_efl.h | 8 +++++++- ism/demos/isf_demo_efl.cpp | 37 +++++++------------------------------ packaging/isf.spec | 1 - 5 files changed, 14 insertions(+), 37 deletions(-) diff --git a/configure.ac b/configure.ac index da06dc7..f83a722 100644 --- a/configure.ac +++ b/configure.ac @@ -286,9 +286,6 @@ PKG_CHECK_MODULES(GLIB, [glib-2.0]) # Check tzplatform-config library PKG_CHECK_MODULES(TZPLATFORM_CONFIG, [libtzplatform-config]) -# Check appcore-efl library -PKG_CHECK_MODULES(APPCORE_EFL, [appcore-efl]) - # Check dlog library PKG_CHECK_MODULES(DLOG, [dlog >= 0]) diff --git a/ism/demos/Makefile.am b/ism/demos/Makefile.am index 4b17145..c0ed826 100644 --- a/ism/demos/Makefile.am +++ b/ism/demos/Makefile.am @@ -46,7 +46,6 @@ isf_demo_efl_SOURCES = isf_demo_efl.cpp \ isf_demo_efl_CXXFLAGS = @ECOREX_CFLAGS@ \ @ELEMENTARY_CFLAGS@ \ - @APPCORE_EFL_CFLAGS@ \ @VCONF_CFLAGS@ \ @EFL_EXTENSION_CFLAGS@ \ @DLOG_CFLAGS@ \ @@ -56,7 +55,6 @@ isf_demo_efl_LDFLAGS = @LTLIBINTL@ -rpath $(libdir) \ @ECOREX_LIBS@ \ @ELEMENTARY_LIBS@ \ @VCONF_LIBS@ \ - @APPCORE_EFL_LIBS@ \ @EFL_EXTENSION_LIBS@ \ @DLOG_LIBS@ \ -pie diff --git a/ism/demos/include/isf_demo_efl.h b/ism/demos/include/isf_demo_efl.h index 167ae09..75c91b6 100644 --- a/ism/demos/include/isf_demo_efl.h +++ b/ism/demos/include/isf_demo_efl.h @@ -27,8 +27,8 @@ #include -#include #include +#include #include "isf_debug.h" #ifdef LOG_TAG @@ -36,6 +36,12 @@ #endif #define LOG_TAG "ISF_DEMO_EFL" +#ifndef _ +#define _(str) gettext(str) +#endif +#define gettext_noop(str) (str) +#define N_(str) gettext_noop(str) + struct appdata { int root_w; int root_h; diff --git a/ism/demos/isf_demo_efl.cpp b/ism/demos/isf_demo_efl.cpp index d0bd2be..d32f259 100644 --- a/ism/demos/isf_demo_efl.cpp +++ b/ism/demos/isf_demo_efl.cpp @@ -365,8 +365,6 @@ static int app_create (void *data) struct appdata *ad = (struct appdata *)data; if (ad == NULL) return -1; - appcore_measure_start (); - ad->win_main = create_win ("isf-demo-efl"); if (!ad->win_main) { LOGE ("Failed to create window\n"); @@ -398,15 +396,10 @@ static int app_create (void *data) vconf_notify_key_changed (VCONFKEY_ISF_INPUT_PANEL_STATE, input_panel_state_changed_cb, NULL); - /* add system event callback */ - appcore_set_event_callback (APPCORE_EVENT_LANG_CHANGE, - lang_changed, ad); ad->key_down_handler = ecore_event_handler_add (ECORE_EVENT_KEY_DOWN, _keydown_event, ad); ad->key_up_handler = ecore_event_handler_add (ECORE_EVENT_KEY_UP, _keyup_event, ad); - appcore_measure_time (); - autotest_add_demo(ad); if (_autotest_enabled) { isf_demo_autotest_run(); @@ -453,30 +446,14 @@ static int app_exit (void *data) return 0; } -static int app_pause (void *data) -{ - return 0; -} - -static int app_resume (void *data) -{ - return 0; -} - EXAPI int main (int argc, char *argv[]) { struct appdata ad; - struct appcore_ops ops; int ret = 0; - ops.create = app_create; - ops.terminate = app_exit; - ops.pause = app_pause; - ops.resume = app_resume; - ops.reset = NULL; + elm_init (argc, argv); - memset (&ad, 0x0, sizeof (struct appdata)); - ops.data = &ad; + app_create (&ad); for (int loop = 0;loop < argc;loop++) { if (strcmp(argv[loop], AUTOTEST_RUN_PARAMETER) == 0) { @@ -484,11 +461,11 @@ EXAPI int main (int argc, char *argv[]) } } - try { - ret = appcore_efl_main ("isf-demo-efl", &argc, &argv, &ops); - } catch (...) { - LOGW ("Exception is thrown from appcore_efl_main ()!!!\n"); - } + elm_run (); + + app_exit ((void *)&ad); + + elm_shutdown (); return ret; } diff --git a/packaging/isf.spec b/packaging/isf.spec index f12d536..edeb09a 100644 --- a/packaging/isf.spec +++ b/packaging/isf.spec @@ -11,7 +11,6 @@ Source0: %{name}-%{version}.tar.gz Source100: %{name}.conf BuildRequires: edje-bin BuildRequires: gettext-tools -BuildRequires: pkgconfig(appcore-efl) BuildRequires: pkgconfig(elementary) BuildRequires: pkgconfig(vconf) %if %{with wayland} -- 2.7.4