Add demo application in wayland environment 60/36260/1
authorJihoon Kim <jihoon48.kim@samsung.com>
Wed, 4 Mar 2015 09:03:18 +0000 (18:03 +0900)
committerJihoon Kim <jihoon48.kim@samsung.com>
Wed, 4 Mar 2015 09:03:18 +0000 (18:03 +0900)
Change-Id: I1298ddbddad002d3aadccbd95798352344c3b800

ism/demos/Makefile.am
ism/demos/isf_demo_efl.cpp
ism/demos/isf_layout_efl.cpp
packaging/isf.spec

index c4572b6..e7a07fb 100644 (file)
@@ -21,9 +21,7 @@ INCLUDES = -I$(top_builddir) \
 
 noinst_HEADERS =
 
-if ISF_BUILD_SETTING_EFL
 ISF_DEMO_EFL = isf-demo-efl
-endif
 
 optexecdir            = /opt/usr/devel/usr/bin/
 optexec_PROGRAMS      = $(ISF_DEMO_EFL)
index 0e5ef98..2be339f 100644 (file)
@@ -25,7 +25,9 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <Elementary.h>
+#ifndef WAYLAND
 #include <Ecore_X.h>
+#endif
 #include <privilege-control.h>
 #include <vconf.h>
 #include <efl_extension.h>
@@ -180,6 +182,7 @@ static int create_demo_view (struct appdata *ad)
     return 0;
 }
 
+#ifndef WAYLAND
 static int lang_changed (void *event_info, void *data)
 {
 #if HAVE_UIGADGET
@@ -187,6 +190,7 @@ static int lang_changed (void *event_info, void *data)
 #endif
     return 0;
 }
+#endif
 
 static void win_del (void *data, Evas_Object *obj, void *event)
 {
@@ -196,15 +200,13 @@ static void win_del (void *data, Evas_Object *obj, void *event)
 static Evas_Object* create_win (const char *name)
 {
     Evas_Object *eo = NULL;
-    int w, h;
     const int rots[4] = { 0, 90, 180, 270 };
 
     eo = elm_win_util_standard_add (name, name);
     if (eo != NULL) {
         evas_object_smart_callback_add (eo, "delete,request",
                                         win_del, NULL);
-        ecore_x_window_size_get (ecore_x_window_root_first_get (), &w, &h);
-        evas_object_resize (eo, w, h);
+        elm_win_fullscreen_set (eo, EINA_TRUE);
     }
 
     if (elm_win_wm_rotation_supported_get (eo)) {
@@ -342,15 +344,19 @@ static int app_create (void *data)
     //init the content in conformant.
     create_demo_view (ad);
 
+#ifndef WAYLAND
     lang_changed (NULL, ad);
+#endif
 
     evas_object_show (ad->win_main);
 
     vconf_notify_key_changed (VCONFKEY_ISF_INPUT_PANEL_STATE, input_panel_state_changed_cb, NULL);
 
+#ifndef WAYLAND
     /* add system event callback */
     appcore_set_event_callback (APPCORE_EVENT_LANG_CHANGE,
                                 lang_changed, ad);
+#endif
 
     ecore_event_handler_add (ECORE_EVENT_KEY_DOWN, _keydown_event, ad);
     ecore_event_handler_add (ECORE_EVENT_KEY_UP, _keyup_event, ad);
index 52ac7f1..6aa2547 100644 (file)
 
 #include "isf_demo_efl.h"
 #include "isf_layout_efl.h"
+#ifndef WAYLAND
 #include <Ecore_X.h>
 #include <utilX.h>
+#endif
 
+#ifndef WAYLAND
 static void _back_key_cb (void *data, Evas_Object *obj, void *event_info)
 {
     ecore_x_test_fake_key_press (KEY_END);
 }
+#endif
 
 static void _rotate_cb (void *data, Evas_Object *obj, void *event_info)
 {
@@ -123,6 +127,7 @@ _key_up_cb (void *data, Evas *e, Evas_Object *obj, void *event_info)
     LOGD ("[evas key up] keyname : '%s', key : '%s', string : '%s', compose : '%s'\n", ev->keyname, ev->key, ev->string, ev->compose);
 }
 
+#ifndef WAYLAND
 static void
 _print_keyboard_geometry (Ecore_X_Window xwin)
 {
@@ -153,6 +158,7 @@ _prop_change_cb (void *data, int type, void *event)
 
     return ECORE_CALLBACK_PASS_ON;
 }
+#endif
 
 static void entry_changed_cb (void *data, Evas_Object *obj, void *event_info)
 {
@@ -275,6 +281,7 @@ static Evas_Object * create_inner_layout (void *data)
     ef = _create_ef_layout (parent, _("TERMINAL LAYOUT"), _("click to enter TERMINAL"), ELM_INPUT_PANEL_LAYOUT_TERMINAL);
     elm_box_pack_end (bx, ef);
 
+#ifndef WAYLAND
     /* create back key event generation button */
     Evas_Object *back_key_btn = elm_button_add (parent);
     elm_object_text_set (back_key_btn, "Generate BACK key");
@@ -284,6 +291,7 @@ static Evas_Object * create_inner_layout (void *data)
     evas_object_show (back_key_btn);
     elm_box_pack_end (bx, back_key_btn);
     elm_object_focus_allow_set (back_key_btn, EINA_FALSE);
+#endif
 
     /* Click to rotate button */
     Evas_Object *rotate_btn = elm_button_add (parent);
@@ -294,7 +302,9 @@ static Evas_Object * create_inner_layout (void *data)
     evas_object_show (rotate_btn);
     elm_box_pack_end (bx, rotate_btn);
 
+#ifndef WAYLAND
     ecore_event_handler_add (ECORE_X_EVENT_WINDOW_PROPERTY, _prop_change_cb, NULL);
+#endif
 
     return bx;
 }
index 501fd7a..73a9369 100644 (file)
@@ -154,11 +154,11 @@ cat scim.lang > isf.lang
 %{_sysconfdir}/scim/config
 %{_datadir}/scim/isf_candidate_theme1.edj
 %{_datadir}/scim/icons/*
+%{_optexecdir}/isf-demo-efl
 %if %{with wayland}
 %{_bindir}/isf-wsm-efl
 %{_bindir}/isf-wsc-efl
 %else
-%{_optexecdir}/isf-demo-efl
 %{_bindir}/isf-panel-efl
 %{_libdir}/ecore_imf/modules/*/*/*.so
 %endif