0.9.21 release -- It changes so that the layer controlling function of GENIVI may... 40/16740/1
authorMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Mon, 24 Feb 2014 11:58:49 +0000 (20:58 +0900)
committerMasayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
Mon, 24 Feb 2014 11:58:49 +0000 (20:58 +0900)
Change-Id: Ic11640be957593f75b9410ec9f9780432349d933
Signed-off-by: Masayuki Sasaki <masayuki.sasaki@mail.toyota-td.jp>
55 files changed:
configure.ac
data/share/packages/org.tizen.ico.homescreen.xml
data/share/packages/org.tizen.ico.onscreen.xml
data/share/packages/org.tizen.ico.statusbar.xml
data/share/packages/org.tizen.ico.system-controller.xml
include/ico_syc_inputctl.h
include/ico_syc_msg_cmd_def.h
include/ico_syc_sysdef.h [new file with mode: 0644]
include/ico_syc_type.h
include/ico_syc_winctl.h
lib/apps-framework/Makefile.am
lib/apps-framework/ico_syc_inputctl.c
lib/apps-framework/ico_syc_winctl.c
lib/common/CicoSystemConfig.cpp
lib/common/CicoSystemConfig.h
lib/system-controller/CicoSCInputController.cpp
lib/system-controller/CicoSCInputController.h
lib/system-controller/CicoSCLayer.cpp
lib/system-controller/CicoSCLayer.h
lib/system-controller/CicoSCLifeCycleController.cpp
lib/system-controller/CicoSCMessageRes.cpp [new file with mode: 0644]
lib/system-controller/CicoSCMessageRes.h [new file with mode: 0644]
lib/system-controller/CicoSCServer.cpp
lib/system-controller/CicoSCUserManager.cpp
lib/system-controller/CicoSCVInfoManager.cpp
lib/system-controller/CicoSCWayland.cpp
lib/system-controller/CicoSCWaylandIF.cpp
lib/system-controller/CicoSCWaylandIF.h
lib/system-controller/CicoSCWindow.cpp
lib/system-controller/CicoSCWindow.h
lib/system-controller/CicoSCWindowController.cpp
lib/system-controller/CicoSCWindowController.h
lib/system-controller/CicoSCWlInputMgrIF.cpp
lib/system-controller/CicoSCWlInputMgrIF.h
lib/system-controller/CicoSCWlWinMgrIF.cpp
lib/system-controller/CicoSCWlWinMgrIF.h
lib/system-controller/Makefile.am
packaging/ico-uxf-homescreen.spec
src/homescreen/CicoHSAppControl.cpp
src/homescreen/CicoHSAppHistoryExt.cpp
src/homescreen/CicoHSCommand.h
src/homescreen/CicoHSMenuTile.cpp
src/homescreen/CicoHSMenuTile.h
src/homescreen/CicoHSSwipeTouch.cpp
src/homescreen/CicoHSSwipeTouch.h
src/homescreen/CicoHomeScreen.cpp
src/homescreen/CicoHomeScreenCommon.h
src/homescreen/home_screen_res.h
src/onscreen/CicoOSPopWindow.cpp [new file with mode: 0644]
src/onscreen/CicoOSPopWindow.h [new file with mode: 0644]
src/syscond/Makefile.am
tests/system-controller/apps-framework/tst_inputctl.c
tests/system-controller/apps-framework/tst_server.c
tests/system-controller/apps-framework/tst_winctl.c
tool/Makefile.am

index 182063e..cb38794 100644 (file)
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ([2.68])
-AC_INIT([org.tizen.ico.homescreen], [0.9.14], [])
+AC_INIT([org.tizen.ico.homescreen], [0.9.21], [])
 AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
 AC_CONFIG_SRCDIR([configure.ac])
 AC_CONFIG_HEADERS([config.h])
@@ -79,6 +79,11 @@ UWS_LIBS="-lico-util"
 AC_SUBST(UWS_CFLAGS)
 AC_SUBST(UWS_LIBS)
 
+GENIVI_CFLAGS="-I/usr/include/ilm -I/usr/include/layermanager"
+GENIVI_LIBS="-lilmCommon -lilmControl -lilmClient"
+AC_SUBST(GENIVI_CFLAGS)
+AC_SUBST(GENIVI_LIBS)
+
 SLPPKGMGR_CFLAGS="$SLPPKGMGR_CFLAGS"
 SLPPKGMGR_LIBS="$SLPPKGMGR_LIBS"
 AC_SUBST(SLPPKGMGR_CFLAGS)
index 9561317..bdfdb75 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.9.14" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.homescreen" version="0.9.21" install-location="internal-only">
        <label>HomeScreen</label>
        <description>IVI HomeScreen Application</description>
        <ui-application appid="org.tizen.ico.homescreen" exec="/usr/apps/org.tizen.ico.homescreen/bin/HomeScreen" nodisplay="true" multiple="false" type="capp" taskmanage="true">
index 567fdac..ee22d9c 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.onscreen" version="0.9.14" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.onscreen" version="0.9.21" install-location="internal-only">
        <label>OnScreen</label>
        <description>IVI OnScreen Application</description>
        <ui-application appid="org.tizen.ico.onscreen" exec="/usr/apps/org.tizen.ico.onscreen/bin/OnScreen" nodisplay="true" multiple="false" type="capp" taskmanage="true">
index f1a88d6..cbb8360 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.9.14" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.statusbar" version="0.9.21" install-location="internal-only">
        <label>StatusBar</label>
        <description>IVI StatusBar Application</description>
        <ui-application appid="org.tizen.ico.statusbar" exec="/usr/apps/org.tizen.ico.statusbar/bin/StatusBar" nodisplay="true" multiple="false" type="capp" taskmanage="true">
index 60e7923..e0be7a8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.9.14" install-location="internal-only">
+<manifest xmlns="http://tizen.org/ns/packages" package="org.tizen.ico.system-controller" version="0.9.21" install-location="internal-only">
        <label>system-controller</label>
        <author email="" href=""> </author>
        <description>ico system-controller</description>
index 3fc97b8..ddb073d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -10,7 +10,7 @@
  * @brief   header file of Input Control API
  *          for privilege applications
  *
- * @date    July-31-2013
+ * @date    Feb-21-2014
  */
 
 #ifndef _ICO_SYC_INPUTCTL_H_
@@ -87,28 +87,6 @@ int ico_syc_add_input(const char *appid, const char *device,
 /*--------------------------------------------------------------------------*/
 int ico_syc_delete_input(const char *appid, const char *device, int input);
 
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   ico_syc_send_input
- *          Send the input event to the application.
- *
- * @param[in]   appid                   application id
- * @param[in]   surface                 window's surface id
- * @param[in]   type                    device type of input event
- * @param[in]   deviceno                input device number
- * @param[in]   time                    input event time(ms), if 0 auto generate
- * @param[in]   code                    input event code
- * @param[in]   value                   input event value
- * @return      result
- * @retval      0                       success
- * @retval      not 0                   error
- * @see         ico_syc_input_type_e
- */
-/*--------------------------------------------------------------------------*/
-int ico_syc_send_input(const char *appid, int surface, int type,
-                       int deviceno, int time, int code, int value);
-
-
 #ifdef __cplusplus
 }
 #endif
index 3bc5437..7f2f87d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -132,14 +132,13 @@ extern "C" {
 #define MSG_CMD_NAME                0x00010009
 #define MSG_CMD_MAP_THUMB           0x00010011
 #define MSG_CMD_UNMAP_THUMB         0x00010012
-#define MSG_CMD_MAP_BUFFER          0x00010013
+#define MSG_CMD_MAP_GET             0x00010013
 #define MSG_CMD_SHOW_LAYER          0x00010020
 #define MSG_CMD_HIDE_LAYER          0x00010021
 #define MSG_CMD_CHANGE_LAYER_ATTR   0x00010022
 /* input controller */
 #define MSG_CMD_ADD_INPUT           0x00020001
 #define MSG_CMD_DEL_INPUT           0x00020002
-#define MSG_CMD_SEND_INPUT          0x00020003
 /* user controller */
 #define MSG_CMD_CHANGE_USER         0x00030001
 #define MSG_CMD_GET_USERLIST        0x00030002
diff --git a/include/ico_syc_sysdef.h b/include/ico_syc_sysdef.h
new file mode 100644 (file)
index 0000000..5f2f650
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief   header file of System Fixed Parameters
+ *          for privilege and general applications
+ *
+ * @date    Feb-21-2014
+ */
+
+#ifndef _ICO_SYC_SYSDEF_H_
+#define _ICO_SYC_SYSDEF_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * Display number
+ */
+#define ICO_SYC_DISPLAY_CENTER      0       /* center display Id        */
+#define ICO_SYC_DISPLAY_MATER       1       /* meter display Id         */
+
+/*
+ * Layer id
+ */
+#define ICO_SYC_LAYER_BACKGROUND    0       /* layer of BackGround      */
+#define ICO_SYC_LAYER_APPLICATION   1       /* layer of Application     */
+#define ICO_SYC_LAYER_HOMESCREEN    2       /* layer of HomeScreen menu */
+#define ICO_SYC_LAYER_CONTROLBAR    3       /* layer of Control/Status bar */
+#define ICO_SYC_LAYER_FULLSCREEN    4       /* layer of FullScreen Application */
+#define ICO_SYC_LAYER_ONSCREEN      5       /* layer of OnScreen        */
+#define ICO_SYC_LAYER_TOUCHPANEL    6       /* layer of TouchPanel input */
+#define ICO_SYC_LAYER_CURSOR        7       /* layer of Cursor          */
+
+#define ICO_SYC_LAYER_MATERAPP      3       /* layer of Meter application */
+
+#ifdef __cplusplus
+}
+#endif
+#endif /*_ICO_SYC_SYSDEF_H_*/
+/* vim:set expandtab ts=4 sw=4: */
index 184e0ee..a9fd14a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -10,7 +10,7 @@
  * @brief   header file of System Controller
  *          for privilege and general applications
  *
- * @date    Aug-6-2013
+ * @date    Feb-21-2014
  */
 
 #ifndef _ICO_SYC_TYPE_H_
@@ -65,7 +65,7 @@ typedef enum _event_id {
  * @ICO_SYC_WIN_NOCHANGE: no change value
  */
 typedef enum _win_value {
-    ICO_SYC_WIN_NOCHANGE    = ICO_WINDOW_MGR_V_NOCHANGE
+    ICO_SYC_WIN_NOCHANGE    = 99999999
 } ico_syc_win_value_e;
 
 /*
@@ -85,9 +85,9 @@ typedef enum _thumb_format {
  * @ICO_SYC_WIN_RAISE_NOCHANGE: order of showing surface is not change
  */
 typedef enum _window_raise {
-    ICO_SYC_WIN_RAISE_RAISE     = ICO_WINDOW_MGR_RAISE_RAISE,
-    ICO_SYC_WIN_RAISE_LOWER     = ICO_WINDOW_MGR_RAISE_LOWER,
-    ICO_SYC_WIN_RAISE_NOCHANGE  = ICO_WINDOW_MGR_V_NOCHANGE
+    ICO_SYC_WIN_RAISE_RAISE     = 1,
+    ICO_SYC_WIN_RAISE_LOWER     = 0,
+    ICO_SYC_WIN_RAISE_NOCHANGE  = 9
 } ico_syc_win_raise_e;
 
 /*
@@ -97,25 +97,32 @@ typedef enum _window_raise {
  * @ICO_SYC_WIN_VISIBLE_NOCHANGE: show/hide status is not change
  */
 typedef enum _window_visible {
-    ICO_SYC_WIN_VISIBLE_SHOW        = ICO_WINDOW_MGR_VISIBLE_SHOW,
-    ICO_SYC_WIN_VISIBLE_HIDE        = ICO_WINDOW_MGR_VISIBLE_HIDE,
-    ICO_SYC_WIN_VISIBLE_NOCHANGE    = ICO_WINDOW_MGR_V_NOCHANGE
+    ICO_SYC_WIN_VISIBLE_SHOW     = 1,
+    ICO_SYC_WIN_VISIBLE_HIDE     = 0,
+    ICO_SYC_WIN_VISIBLE_NOCHANGE = 9
 } ico_syc_win_visible_e;
 
 /*
- * type of window active
- * @ICO_SYC_WIN_ACTIVE_NONE: surface is not active
- * @ICO_SYC_WIN_ACTIVE_POINTER: pointing device is active
- * @ICO_SYC_WIN_ACTIVE_KEYBOARD: keyboard is active
- * @ICO_SYC_WIN_ACTIVE_SELECTED: pointing device that is operated
- *                               by touch panel or mouse is still active
+ * window change hint
+ * @ICO_SYC_WIN_HINT_HINT: hint information(no change)
+ * @ICO_SYC_WIN_HINT_CHANGE: real changed
  */
-typedef enum _window_active {
-    ICO_SYC_WIN_ACTIVE_NONE     = ICO_WINDOW_MGR_ACTIVE_NONE,
-    ICO_SYC_WIN_ACTIVE_POINTER  = ICO_WINDOW_MGR_ACTIVE_POINTER,
-    ICO_SYC_WIN_ACTIVE_KEYBOARD = ICO_WINDOW_MGR_ACTIVE_KEYBOARD,
-    ICO_SYC_WIN_ACTIVE_SELECTED = ICO_WINDOW_MGR_ACTIVE_SELECTED
-} ico_syc_win_act_e;
+typedef enum _window_change_hint {
+    ICO_SYC_WIN_HINT_HINT     = 1,
+    ICO_SYC_WIN_HINT_CHANGE   = 0
+} ico_syc_win_change_hint_e;
+
+/*
+ * type of window active select
+ * @ICO_SYC_WIN_ACTIVE_NONE: no device(surface not active)
+ * @ICO_SYC_WIN_ACTIVE_POINTER: active by pointing device(mouse)
+ * @ICO_SYC_WIN_ACTIVE_TOUCH: active by touchpanel device
+ */
+typedef enum _window_active_select {
+    ICO_SYC_WIN_ACTIVE_NONE     = 0,
+    ICO_SYC_WIN_ACTIVE_POINTER  = 1,
+    ICO_SYC_WIN_ACTIVE_TOUCH = 2
+} ico_syc_win_act_select_e;
 
 /*
  * layer show/hide status
@@ -123,10 +130,37 @@ typedef enum _window_active {
  * @ICO_SYC_LAYER_VISIBLE_HIDE: hide the layer
  */
 typedef enum _layer_visible {
-    ICO_SYC_LAYER_VISIBLE_SHOW  = 0,
-    ICO_SYC_LAYER_VISIBLE_HIDE  = 1
+    ICO_SYC_LAYER_VISIBLE_SHOW  = 1,
+    ICO_SYC_LAYER_VISIBLE_HIDE  = 0,
+    ICO_SYC_LAYER_VISIBLE_NOCHANGE  = 9
 } ico_syc_layer_visible_e;
 
+/*
+ * surface animation on/off
+ * @ICO_SYC_ANIMATION_ON: surface animation
+ * @ICO_SYC_ANIMATION_OFF: no surface animation
+ */
+typedef enum _surface_animation {
+    ICO_SYC_ANIMATION_ON  = 1,
+    ICO_SYC_ANIMATION_OFF  = 0
+} ico_syc_surface_animation;
+
+/*
+ * type of window aspect
+ * @ICO_SYC_WIN_ASPECT_FIXED: fixed aspect
+ * @ICO_SYC_WIN_ASPECT_ALIGN_LEFT: left align
+ * @ICO_SYC_WIN_ASPECT_ALIGN_RIGHT: right align
+ * @ICO_SYC_WIN_ASPECT_ALIGN_TOP: top align
+ * @ICO_SYC_WIN_ASPECT_ALIGN_BOTTOM: bottom align
+ */
+typedef enum _window_aspect {
+    ICO_SYC_WIN_ASPECT_FIXED     = 16,
+    ICO_SYC_WIN_ASPECT_ALIGN_LEFT  = 1,
+    ICO_SYC_WIN_ASPECT_ALIGN_RIGHT  = 2,
+    ICO_SYC_WIN_ASPECT_ALIGN_TOP  = 4,
+    ICO_SYC_WIN_ASPECT_ALIGN_BOTTOM  = 8,
+} ico_syc_win_aspect_e;
+
 /**
  *  system state
  */
@@ -194,7 +228,6 @@ typedef struct _thumb_info {
     char *appid;    /* application id */
     int  surface;   /* window's surface id */
     int  type;      /* buffer type(ICO_WINDOW_MGR_MAP_TYPE_EGL/SHM/PIXEL)*/
-    int  name;      /* EGL buffer name/shared memory buffer index(+1) */
     int  width;     /* window width */
     int  height;    /* window height */
     int  stride;    /* byte par line of frame buffer */
@@ -288,7 +321,6 @@ typedef struct _state_info {
 typedef void (*ico_syc_callback_t) (const ico_syc_ev_e event,
                                     const void *detail,
                                     void *user_data);
-
 #ifdef __cplusplus
 }
 #endif
index 4e7e05a..4edd057 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -10,7 +10,7 @@
  * @brief   header file of Window Control API
  *          for privilege applications
  *
- * @date    July-31-2013
+ * @date    Feb-21-2014
  */
 
 #ifndef _ICO_SYC_WINCTL_H_
@@ -137,32 +137,32 @@ int ico_syc_change_layer(const char *appid, int surface, int layer);
 
 /*--------------------------------------------------------------------------*/
 /**
- * @brief   ico_syc_map_buffer
- *          Set map buffer for surface image mapping to the memory.
+ * @brief   ico_syc_map_get
+ *          Get surface image pixel to the file.
  *
- * @param[in]   shmname                 shared memory name
- * @param[in]   bufsize                 buffer size [byte]
- * @param[in]   bufnum                  number of buffer
+ * @param[in]   surface                 window's surface id
+ * @param[in]   filepath                pixel image file path
  * @return      result
  * @retval      0                       success
  * @retval      not 0                   error
  */
 /*--------------------------------------------------------------------------*/
-int ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum);
+int ico_syc_map_get(int surface, const char *filepath);
 
 /*--------------------------------------------------------------------------*/
 /**
  * @brief   ico_syc_map_thumb
- *          Map the thumbnail data for mapping to the memory.
+ *          Map the thumbnail data
  *
  * @param[in]   surface                 window's surface id
  * @param[in]   framerate               notify cycle [frames par sec]
+ * @param[in]   filepath                pixel image file path
  * @return      result
  * @retval      0                       success
  * @retval      not 0                   error
  */
 /*--------------------------------------------------------------------------*/
-int ico_syc_map_thumb(int surface, int framerate);
+int ico_syc_map_thumb(int surface, int framerate, const char *filepath);
 
 /*--------------------------------------------------------------------------*/
 /**
index 3eec727..a694060 100644 (file)
@@ -1,9 +1,11 @@
 lib_LTLIBRARIES = libico-appfw.la
 
-COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin
+COMMON_LIBS = -lm -lwebsockets -lico-uxf-weston-plugin -lilmCommon -lilmControl -lilmClient
 
 libico_appfw_la_CFLAGS = -I../../include $(OPT_CFLAGS) $(UWS_CFLAGS) \
                           $(AUL_CFLAGS) @ECORE_CFLAGS@ \
+                          -I/usr/include/ilm \
+                          -I/usr/include/layermanager \
                           -I/usr/include/ico-uxf-weston-plugin \
                           -I/usr/include/ico-util
 
index 15f0100..8a4cc92 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -10,7 +10,7 @@
  * @brief   Input Control API
  *          for privilege applications
  *
- * @date    July-31-2013
+ * @date    Feb-21-2014
  */
 
 #include "ico_syc_msg_cmd_def.h"
@@ -25,8 +25,6 @@ static msg_t _create_add_input_msg(const char *appid, const char *device,
                                   int input, int fix, int keycode);
 static msg_t _create_del_input_msg(const char *appid,
                                   const char *device, int input);
-static msg_t _create_send_input_msg(const char *appid, int surface, int type,
-                                   int deviceno, int time, int code, int value);
 
 /*============================================================================*/
 /* static function                                                            */
@@ -135,64 +133,6 @@ _create_del_input_msg(const char *appid, const char *device, int input)
     return gen;
 }
 
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   _create_send_input_msg
- *          Create the message to send input event.
- *
- * @param[in]   appid                   application id
- * @param[in]   surface                 window's surface id
- * @param[in]   type                    device type of input event
- * @param[in]   deviceno                input device number
- * @param[in]   time                    input event time(ms)
- * @param[in]   code                    input event code
- * @param[in]   value                   input event value
- * @return      json generator
- * @retval      json generator          success
- * @retval      NULL                    error
- */
-/*--------------------------------------------------------------------------*/
-static msg_t
-_create_send_input_msg(const char *appid, int surface, int type,
-                       int deviceno, int time, int code, int value)
-{
-    JsonObject *obj     = NULL;
-    JsonObject *argobj  = NULL;
-    JsonGenerator *gen  = NULL;
-    JsonNode *root      = NULL;
-
-    /* create json object */
-    obj = json_object_new();
-    argobj = json_object_new();
-    if (obj == NULL || argobj == NULL) {
-        _ERR("json_object_new failed");
-        return NULL;
-    }
-
-    /* set message */
-    json_object_set_int_member(obj, MSG_PRMKEY_CMD, MSG_CMD_SEND_INPUT);
-    json_object_set_string_member(obj, MSG_PRMKEY_APPID, appid);
-    json_object_set_int_member(obj, MSG_PRMKEY_PID, getpid());
-
-    json_object_set_int_member(argobj, MSG_PRMKEY_SURFACE, surface);
-    json_object_set_int_member(argobj, MSG_PRMKEY_EV_TYPE, type);
-    json_object_set_int_member(argobj, MSG_PRMKEY_DEVICE, deviceno);
-    json_object_set_int_member(argobj, MSG_PRMKEY_EV_TIME, time);
-    json_object_set_int_member(argobj, MSG_PRMKEY_EV_CODE, code);
-    json_object_set_int_member(argobj, MSG_PRMKEY_EV_VAL, value);
-    json_object_set_object_member(obj, MSG_PRMKEY_ARG, argobj);
-
-    /* create root object */
-    root = json_node_new(JSON_NODE_OBJECT);
-    json_node_take_object(root, obj);
-
-    /* create generator object */
-    gen = json_generator_new();
-    json_generator_set_root(gen, root);
-
-    return gen;
-}
-
 /*============================================================================*/
 /* public interface function                                                  */
 /*============================================================================*/
@@ -270,45 +210,4 @@ ico_syc_delete_input(const char *appid, const char *device, int input)
 
     return ret;
 }
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   ico_syc_send_input
- *          Send the input event to the application.
- *
- * @param[in]   appid                   application id
- * @param[in]   surface                 window's surface id
- * @param[in]   type                    device type of input event
- * @param[in]   deviceno                input device number
- * @param[in]   time                    input event time
- * @param[in]   code                    input event code
- * @param[in]   value                   input event value
- * @return      result
- * @retval      0                       success
- * @retval      not 0                   error
- * @see         ico_syc_input_type_e
- */
-/*--------------------------------------------------------------------------*/
-ICO_API int
-ico_syc_send_input(const char *appid, int surface, int type,
-                   int deviceno, int time, int code, int value)
-{
-    int ret = ICO_SYC_ERR_NONE;
-    msg_t msg;
-
-    /* check argument */
-    if (appid == NULL) {
-        _ERR("invalid parameter (appid is NULL)");
-        return ICO_SYC_ERR_INVALID_PARAM;
-    }
-
-    /* make message */
-    msg = _create_send_input_msg(appid, surface, type, deviceno, time, code, value);
-    /* send message */
-    ret = ico_syc_send_msg(msg);
-    /* free send message */
-    ico_syc_free_msg(msg);
-
-    return ret;
-}
 /* vim: set expandtab ts=4 sw=4: */
index 0311711..668b7fb 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -10,7 +10,7 @@
  * @brief   Window Control API
  *          for privilege applications
  *
- * @date    Aug-22-2013
+ * @date    Feb-21-2014
  */
 
 #include <string.h>
@@ -39,14 +39,12 @@ static msg_t _create_win_move_msg(const char *appid, int surface,
                                   const ico_syc_win_move_t *move,
                                   const ico_syc_animation_t *animation);
 static msg_t _create_active_win_msg(const char *appid, int surface);
-static msg_t _create_change_layer_msg(const char *appid, int surface,
-                                      int layer);
-static msg_t _create_map_buffer_msg(const char *appid, const char *shmname,
-                                    int bufsize, int bufnum);
-static msg_t _create_map_thumb_msg(const char *appid, int surface, int framerate);
+static msg_t _create_change_layer_msg(const char *appid, int surface, int layer);
+static msg_t _create_map_get_msg(const char *appid, int surface, const char *filepath);
+static msg_t _create_map_thumb_msg(const char *appid, int surface, int framerate,
+                                   const char *filepath);
 static msg_t _create_unmap_thumb_msg(const char *appid, int surface);
-static msg_t _create_layer_msg(const char *appid, int layer, int attr,
-                               int type);
+static msg_t _create_layer_msg(const char *appid, int layer, int type);
 
 /*============================================================================*/
 /* static function                                                            */
@@ -285,20 +283,19 @@ _create_change_layer_msg(const char *appid, int surface, int layer)
 
 /*--------------------------------------------------------------------------*/
 /**
- * @brief   _create_map_buffer_msg
- *          Create the message to map buffer.
+ * @brief   _create_map_get_msg
+ *          Create the message to map get.
  *
  * @param[in]   appid                   application id
- * @param[in]   shmname                 shared memory name
- * @param[in]   bufsize                 buffer size
- * @param[in]   bufnum                  number of buffer
+ * @param[in]   surface                 window's surface id
+ * @param[in]   filepath                pixel image file path
  * @return      json generator
  * @retval      json generator          success
  * @retval      NULL                    error
  */
 /*--------------------------------------------------------------------------*/
 static msg_t
-_create_map_buffer_msg(const char *appid, const char *shmname, int bufsize, int bufnum)
+_create_map_get_msg(const char *appid, int surface, const char *filepath)
 {
     JsonObject *obj     = NULL;
     JsonObject *argobj  = NULL;
@@ -314,13 +311,12 @@ _create_map_buffer_msg(const char *appid, const char *shmname, int bufsize, int
     }
 
     /* set message */
-    json_object_set_int_member(obj, MSG_PRMKEY_CMD, MSG_CMD_MAP_BUFFER);
+    json_object_set_int_member(obj, MSG_PRMKEY_CMD, MSG_CMD_MAP_GET);
     json_object_set_string_member(obj, MSG_PRMKEY_APPID, appid);
     json_object_set_int_member(obj, MSG_PRMKEY_PID, getpid());
 
-    json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, shmname);
-    json_object_set_int_member(argobj, MSG_PRMKEY_WIDTH, bufsize);
-    json_object_set_int_member(argobj, MSG_PRMKEY_HEIGHT, bufnum);
+    json_object_set_int_member(argobj, MSG_PRMKEY_SURFACE, surface);
+    json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, filepath);
     json_object_set_object_member(obj, MSG_PRMKEY_ARG, argobj);
 
     /* create root object */
@@ -342,13 +338,14 @@ _create_map_buffer_msg(const char *appid, const char *shmname, int bufsize, int
  * @param[in]   appid                   application id
  * @param[in]   surface                 window's surface id
  * @param[in]   framerate               notify cycle [frames par sec]
+ * @param[in]   filepath                pixel image file path
  * @return      json generator
  * @retval      json generator          success
  * @retval      NULL                    error
  */
 /*--------------------------------------------------------------------------*/
 static msg_t
-_create_map_thumb_msg(const char *appid, int surface, int framerate)
+_create_map_thumb_msg(const char *appid, int surface, int framerate, const char *filepath)
 {
     JsonObject *obj     = NULL;
     JsonObject *argobj  = NULL;
@@ -370,6 +367,12 @@ _create_map_thumb_msg(const char *appid, int surface, int framerate)
 
     json_object_set_int_member(argobj, MSG_PRMKEY_SURFACE, surface);
     json_object_set_int_member(argobj, MSG_PRMKEY_RATE, framerate);
+    if ((filepath != NULL) && (*filepath != 0) && (*filepath != ' '))   {
+        json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, filepath);
+    }
+    else    {
+        json_object_set_string_member(argobj, MSG_PRMKEY_ANIM_NAME, " ");
+    }
     json_object_set_object_member(obj, MSG_PRMKEY_ARG, argobj);
 
     /* create root object */
@@ -437,7 +440,6 @@ _create_unmap_thumb_msg(const char *appid, int surface)
  *
  * @param[in]   appid                   application id
  * @param[in]   layer                   window's layer id
- * @param[in]   attr                    attribute
  * @param[in]   type                    type of command
  * @return      json generator
  * @retval      json generator          success
@@ -445,7 +447,7 @@ _create_unmap_thumb_msg(const char *appid, int surface)
  */
 /*--------------------------------------------------------------------------*/
 static msg_t
-_create_layer_msg(const char *appid, int layer, int attr, int type)
+_create_layer_msg(const char *appid, int layer, int type)
 {
     JsonObject *obj     = NULL;
     JsonObject *argobj  = NULL;
@@ -740,7 +742,6 @@ ico_syc_cb_thumb(ico_syc_callback_t callback, void *user_data,
 
     thumb_info->surface = ico_syc_get_int_member(argobj,
                                                  MSG_PRMKEY_SURFACE);
-    thumb_info->name = ico_syc_get_int_member(argobj, MSG_PRMKEY_NAME);
     thumb_info->type = ico_syc_get_int_member(argobj, MSG_PRMKEY_ATTR);
     thumb_info->width = ico_syc_get_int_member(argobj, MSG_PRMKEY_WIDTH);
     thumb_info->height = ico_syc_get_int_member(argobj, MSG_PRMKEY_HEIGHT);
@@ -1024,19 +1025,18 @@ ico_syc_change_layer(const char *appid, int surface, int layer)
 
 /*--------------------------------------------------------------------------*/
 /**
- * @brief   ico_syc_map_buffer
- *          Prepare the thumbnail set map buffer for mapping to the memory.
+ * @brief   ico_syc_map_get
+ *          Get the surface thumbnail pixel image to the file.
  *
- * @param[in]   shmname                 shared memory name
- * @param[in]   bufsize                 buffer size [byte]
- * @param[in]   bufnum                  number of buffer
+ * @param[in]   surface                 window's surface id
+ * @param[in]   filepath                surface image pixel file path
  * @return      result
  * @retval      0                       success
  * @retval      not 0                   error
  */
 /*--------------------------------------------------------------------------*/
 ICO_API int
-ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum)
+ico_syc_map_get(int surface, const char *filepath)
 {
     int ret = ICO_SYC_ERR_NONE;
     msg_t msg;
@@ -1046,7 +1046,7 @@ ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum)
     appid = ico_syc_get_appid();
 
     /* make message */
-    msg = _create_map_buffer_msg(appid, shmname, bufsize, bufnum);
+    msg = _create_map_get_msg(appid, surface, filepath);
     /* send message */
     ret = ico_syc_send_msg(msg);
     /* free send message */
@@ -1058,17 +1058,18 @@ ico_syc_map_buffer(const char *shmname, int bufsize, int bufnum)
 /*--------------------------------------------------------------------------*/
 /**
  * @brief   ico_syc_map_thumb
- *          Prepare the thumbnail data for mapping to the memory.
+ *          Prepare the thumbnail data
  *
  * @param[in]   surface                 window's surface id
  * @param[in]   framerate               notify cycle [ms]
+ * @param[in]   filepath                pixel image file path
  * @return      result
  * @retval      0                       success
  * @retval      not 0                   error
  */
 /*--------------------------------------------------------------------------*/
 ICO_API int
-ico_syc_map_thumb(int surface, int framerate)
+ico_syc_map_thumb(int surface, int framerate, const char *filepath)
 {
     int ret = ICO_SYC_ERR_NONE;
     msg_t msg;
@@ -1078,7 +1079,7 @@ ico_syc_map_thumb(int surface, int framerate)
     appid = ico_syc_get_appid();
 
     /* make message */
-    msg = _create_map_thumb_msg(appid, surface, framerate);
+    msg = _create_map_thumb_msg(appid, surface, framerate, filepath);
     /* send message */
     ret = ico_syc_send_msg(msg);
     /* free send message */
@@ -1142,7 +1143,7 @@ ico_syc_show_layer(int layer)
     appid = ico_syc_get_appid();
 
     /* make message */
-    msg = _create_layer_msg(appid, layer, 0, _CMD_SHOW_LAYER);
+    msg = _create_layer_msg(appid, layer, _CMD_SHOW_LAYER);
     /* send message */
     ret = ico_syc_send_msg(msg);
     /* free send message */
@@ -1173,7 +1174,7 @@ ico_syc_hide_layer(int layer)
     appid = ico_syc_get_appid();
 
     /* make message */
-    msg = _create_layer_msg(appid, layer, 0, _CMD_HIDE_LAYER);
+    msg = _create_layer_msg(appid, layer, _CMD_HIDE_LAYER);
     /* send message */
     ret = ico_syc_send_msg(msg);
     /* free send message */
index dc5220b..c57350b 100644 (file)
@@ -1327,6 +1327,28 @@ CicoSystemConfig::findDisplayConfbyName(const string & name)
  *  @param  [in]
  */
 //--------------------------------------------------------------------------
+const CicoSCDisplayConf*
+CicoSystemConfig::findDisplayConfbyId(int id)
+{
+    vector<CicoSCDisplayConf*>::iterator itr;
+    itr = m_displayConfList.begin();
+    for (; itr != m_displayConfList.end(); ++itr) {
+        const CicoSCDisplayConf* conf = NULL;
+        conf = const_cast<CicoSCDisplayConf*>(*itr);
+        if (id == conf->id) {
+            return conf;
+        }
+    }
+    return NULL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  
+ *
+ *  @param  [in]
+ */
+//--------------------------------------------------------------------------
 const CicoSCLayerConf*
 CicoSystemConfig::findLayerConfbyName(const string & displayName,
                                         const string & layerName)
@@ -1357,6 +1379,35 @@ CicoSystemConfig::findLayerConfbyName(const string & displayName,
  *  @param  [in]
  */
 //--------------------------------------------------------------------------
+const CicoSCLayerConf*
+CicoSystemConfig::findLayerConfbyIdx(int displayid, int idx)
+{
+    const CicoSCDisplayConf* displayConf = NULL;
+    displayConf = findDisplayConfbyId(displayid);
+    if (NULL == displayConf) {
+        return NULL;
+    }
+
+    vector<CicoSCLayerConf*>::const_iterator itr;
+    itr = displayConf->layerConfList.begin();
+    for (; itr != displayConf->layerConfList.end(); ++itr) {
+        const CicoSCLayerConf* conf = NULL;
+        conf = const_cast<CicoSCLayerConf*>(*itr);
+               if (idx <= 0)   {
+            return conf;
+        }
+               idx --;
+    }
+    return NULL;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  
+ *
+ *  @param  [in]
+ */
+//--------------------------------------------------------------------------
 const CicoSCDisplayZoneConf*
 CicoSystemConfig::findDisplayZoneConfbyName(const string & displayName,
                                               const string & zoneName)
@@ -1701,6 +1752,54 @@ CicoSystemConfig::getDisplayIdbyName(const string & name)
  */
 //--------------------------------------------------------------------------
 int
+CicoSystemConfig::getDisplayIdbyNo(int no)
+{
+    vector<CicoSCDisplayConf*>::iterator itr;
+    itr = m_displayConfList.begin();
+    for (; itr != m_displayConfList.end(); ++itr) {
+        const CicoSCDisplayConf* conf = NULL;
+        conf = const_cast<CicoSCDisplayConf*>(*itr);
+        if (no == conf->no) {
+            return conf->id;
+        }
+    }
+    return -1;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  
+ *
+ *  @param  [in]
+ */
+//--------------------------------------------------------------------------
+void
+CicoSystemConfig::setDisplaySize(int id, int width, int height)
+{
+    vector<CicoSCDisplayConf*>::iterator itr;
+    itr = m_displayConfList.begin();
+    for (; itr != m_displayConfList.end(); ++itr) {
+        CicoSCDisplayConf* conf = NULL;
+        conf = const_cast<CicoSCDisplayConf*>(*itr);
+        if (id == conf->id) {
+               ICO_TRA("CicoSystemConfig::setDisplaySize(%d,%d,%d) change size from %d,%d",
+                                       id, width, height, conf->width, conf->height);
+                       conf->width = width;
+                       conf->height = height;
+            return;
+        }
+    }
+    ICO_ERR("CicoSystemConfig::setDisplaySize(%d,%d,%d) Error", id, width, height);
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  
+ *
+ *  @param  [in]
+ */
+//--------------------------------------------------------------------------
+int
 CicoSystemConfig::getLayerIdfbyName(const string & displayName,
                                       const string & layerName)
 {
index 74bd248..e5a3847 100644 (file)
@@ -70,8 +70,10 @@ public:
 
     const CicoSCNodeConf* findNodeConfbyName(const string & name);
     const CicoSCDisplayConf* findDisplayConfbyName(const string & name);
+    const CicoSCDisplayConf* findDisplayConfbyId(int id);
     const CicoSCLayerConf* findLayerConfbyName(const string & displayName,
                                                const string & layerName);
+       const CicoSCLayerConf*  findLayerConfbyIdx(int displayid, int idx);
     const CicoSCDisplayZoneConf* findDisplayZoneConfbyName(const string & displayName,
                                                        const string & zoneName);
     const CicoSCSoundConf* findSoundConfbyName(const string & name);
@@ -110,6 +112,9 @@ public:
                           const string & switchName);
     int getAppKindIdbyName(const string & name);
     int getCategoryIdbyName(const string & name);
+    int getDisplayIdbyNo(int no);
+       void setDisplaySize(int id, int width, int height);
+
     const CicoSCResourceConf* getResourceConf() const
     {
         return m_resourceConf;
index 15d6fec..a897bc1 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -115,11 +115,6 @@ CicoSCInputController::handleCommand(const CicoSCCommand *cmd)
         opt = static_cast<CicoSCCmdInputDevCtrlOpt*>(cmd->opt);
         delInputApp(cmd->appid, opt->device, opt->input);
         break;
-    case MSG_CMD_SEND_INPUT:
-        opt = static_cast<CicoSCCmdInputDevCtrlOpt*>(cmd->opt);
-        sendInputEvent(cmd->appid, opt->surfaceid, opt->evtype,
-                       opt->deviceno, opt->evtime, opt->evcode, opt->evvalue);
-        break;
     case MSG_CMD_SET_REGION:
         set_opt = static_cast<CicoSCCmdInputDevSettingOpt*>(cmd->opt);
         setInputRegion(cmd->appid, set_opt->winname, set_opt->x, set_opt->y,
@@ -196,39 +191,6 @@ CicoSCInputController::delInputApp(const string &appid,
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  send input device event
- *
- *  @param [in] appid     application id
- *  @param [in] surfaceid surface id
- *  @param [in] type      device type
- *  @param [in] deviceno  input device number
- *  @param [in] time      event time
- *  @param [in] code      event code
- *  @param [in] value     event value
- */
-//--------------------------------------------------------------------------
-int
-CicoSCInputController::sendInputEvent(const string &appid,
-                                      int          surfaceid,
-                                      int          type,
-                                      int          deviceno,
-                                      int          time,
-                                      int          code,
-                                      int          value)
-{
-    ICO_TRA("CicoSCInputController::sendInputEvent Enter"
-            "(appid=%s surfaceid=0x%08X type=%d dev_no=%d time=%d code=%d value=%d)",
-            appid.c_str(), surfaceid, type, deviceno, time, code, value);
-
-    CicoSCWlInputMgrIF::sendInputEvent(appid.c_str(), surfaceid,
-                                       type, deviceno, time, code, value);
-
-    ICO_TRA("CicoSCInputController::sendInputEvent Leave(EOK)");
-    return ICO_SYC_EOK;
-}
-
-//--------------------------------------------------------------------------
-/**
  *  @brief  set input region information
  *
  *  @param [in] appid     application id
index ec24262..3d3a307 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -61,15 +61,6 @@ public:
                     const std::string &device,
                     int               input);
 
-    // send input device event
-    int sendInputEvent(const std::string &appid,
-                       int               surfaceid,
-                       int               type,
-                       int               deviceno,
-                       int               time,
-                       int               code,
-                       int               value);
-
     // set input region information
     int setInputRegion(const std::string &appid,
                        const std::string &winname,
index 7abcbc3..bf2d38b 100644 (file)
@@ -9,12 +9,14 @@
 
 /*========================================================================*/
 /**
- *  @file   CicoSCLayer.h
+ *  @file   CicoSCLayer.cpp
  *
  *  @brief  This file is implementation of CicoSCLayer class
  */
 /*========================================================================*/
 
+#include <stdlib.h>
+#include <string.h>
 #include "CicoSCLayer.h"
 #include "CicoLog.h"
 
 //--------------------------------------------------------------------------
 CicoSCLayer::CicoSCLayer()
     : layerid(-1), type(-1), width(-1), height(-1),
-      displayid(-1), menuoverlap(false)
+      displayid(-1), numsurfaces(0), menuoverlap(false)
 
 {
+    surfaceids = (int *)malloc(40 * sizeof(int));
+    if (surfaceids) {
+        maxsurfaces = 50;
+    }
 }
 
 //--------------------------------------------------------------------------
@@ -37,6 +43,95 @@ CicoSCLayer::CicoSCLayer()
 //--------------------------------------------------------------------------
 CicoSCLayer::~CicoSCLayer()
 {
+    if (surfaceids) {
+        maxsurfaces = 0;
+        numsurfaces = 0;
+        free(surfaceids);
+        surfaceids = NULL;
+    }
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  addSurface
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCLayer::addSurface(int surfaceid, bool top)
+{
+    int     idx, idx2;
+    int     *wksurfaceids;
+    ICO_DBG("CicoSCLayer::addSurface(%d,%d)", surfaceid, top);
+
+    idx2 = 0;
+    for (idx = 0; idx < numsurfaces; idx++, idx2++) {
+        if (surfaceids[idx] == surfaceid)   {
+            idx2 --;
+        }
+        else    {
+            surfaceids[idx2] = surfaceids[idx];
+        }
+    }
+    numsurfaces = idx2;
+
+    if (numsurfaces >= maxsurfaces) {
+        maxsurfaces += 20;
+        wksurfaceids = (int *)malloc(maxsurfaces * sizeof(int));
+        if (! wksurfaceids) {
+            ICO_ERR("CicoSCLayer::addSurface: Out of Memory");
+            return;
+        }
+        if (surfaceids) {
+            memcpy(wksurfaceids, surfaceids, numsurfaces * sizeof(int));
+            free(surfaceids);
+        }
+        surfaceids = wksurfaceids;
+    }
+    if (top)    {
+        surfaceids[numsurfaces] = surfaceid;
+    }
+    else    {
+        for (idx = numsurfaces; idx > 0; idx--) {
+            surfaceids[idx] = surfaceids[idx-1];
+        }
+        surfaceids[0] = surfaceid;
+    }
+    numsurfaces ++;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  removeSurface
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCLayer::removeSurface(int surfaceid)
+{
+    int     idx, idx2;
+    ICO_DBG("CicoSCLayer::removeSurface(%d)", surfaceid);
+
+    idx2 = 0;
+    for (idx = 0; idx < numsurfaces; idx++, idx2++) {
+        if (surfaceids[idx] == surfaceid)   {
+            idx2 --;
+        }
+        else    {
+            surfaceids[idx2] = surfaceids[idx];
+        }
+    }
+    numsurfaces = idx2;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  getSurfaces
+ */
+//--------------------------------------------------------------------------
+const int *
+CicoSCLayer::getSurfaces(int *retsurfaces)
+{
+    *retsurfaces = numsurfaces;
+    return surfaceids;
 }
 
 //--------------------------------------------------------------------------
index bc9e5c6..47e97f0 100644 (file)
@@ -33,6 +33,11 @@ public:
     // destructor
     virtual ~CicoSCLayer();
 
+    // surface
+    void addSurface(int surfaceid, bool top);
+    void removeSurface(int surfaceid);
+    const int *getSurfaces(int *retsurfaces);
+
     // dump log this class member variables
     void dump(void);
 
@@ -49,6 +54,10 @@ public:
     int     width;        //!< The number of the lateral pixels
     int     height;       //!< The number of vertical pixels
     int     displayid;    //!< display ID
+
+    int     *surfaceids;  //!< surface ID list
+    int     numsurfaces;  //!< current number of surfaces
+    int     maxsurfaces;  //!< max number of surfaces
     bool    menuoverlap;  //!< overlap menu window flag
 };
 #endif  // __CICO_SC_LAYER_H__
index a1fcc17..fa6c8ad 100644 (file)
@@ -149,6 +149,8 @@ CicoSCLifeCycleController::CicoSCLifeCycleController()
     ailRenewFlagOff();
     initAIL();
     initAUL();
+
+    CicoSCLifeCycleController::ms_myInstance = this;
 }
 
 /**
@@ -157,6 +159,7 @@ CicoSCLifeCycleController::CicoSCLifeCycleController()
 CicoSCLifeCycleController::~CicoSCLifeCycleController()
 {
     delete m_RC;
+    CicoSCLifeCycleController::ms_myInstance = NULL;
 }
 
 CicoSCLifeCycleController*
diff --git a/lib/system-controller/CicoSCMessageRes.cpp b/lib/system-controller/CicoSCMessageRes.cpp
new file mode 100644 (file)
index 0000000..dcde1bc
--- /dev/null
@@ -0,0 +1,165 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoSCMessageRes.cpp
+ *
+ *  @brief  This file implementation of CicoSCMessage class
+ */
+//==========================================================================
+
+#include <string>
+#include <limits.h>
+
+#include "CicoSCMessage.h"
+#include "CicoSCMessageRes.h"
+#include "CicoLog.h"
+
+//==========================================================================    
+//  private static variable
+//==========================================================================    
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  default constructor
+ */
+//--------------------------------------------------------------------------
+CicoSCMessageRes::CicoSCMessageRes()
+{
+    m_winObj = json_object_new();
+    m_sndObj = json_object_new();
+    m_inpObj = json_object_new();
+    m_winCnt = 0;
+    m_sndCnt = 0;
+    m_inpCnt = 0;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  destructor
+ */
+//--------------------------------------------------------------------------
+CicoSCMessageRes::~CicoSCMessageRes()
+{
+    //ICO_TRA("Enter");
+    json_object_unref(m_winObj);
+    json_object_unref(m_sndObj);
+    json_object_unref(m_inpObj);
+    //ICO_TRA("Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  add argument object for char pointer type
+ *
+ *  @param [in] key     key name of object
+ *  @param [in] value   value of object for char pointer type
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCMessageRes::addWinObject(const char * key, const char * value)
+{
+    json_object_set_string_member(m_winObj, key, value);
+    m_winCnt++;
+}
+
+void
+CicoSCMessageRes::addSndObject(const char * key, const char * value)
+{
+    json_object_set_string_member(m_sndObj, key, value);
+    m_sndCnt++;
+}
+
+void
+CicoSCMessageRes::addInpObject(const char * key, const char * value)
+{
+    json_object_set_string_member(m_inpObj, key, value);
+    m_inpCnt++;
+}
+
+void
+CicoSCMessageRes::addWinObject(const char * key, const std::string & value)
+{
+    json_object_set_string_member(m_winObj, key, value.c_str());
+    m_winCnt++;
+}
+
+void
+CicoSCMessageRes::addSndObject(const char * key, const std::string & value)
+{
+    json_object_set_string_member(m_sndObj, key, value.c_str());
+    m_sndCnt++;
+}
+
+void
+CicoSCMessageRes::addInpObject(const char * key, const std::string & value)
+{
+    json_object_set_string_member(m_inpObj, key, value.c_str());
+    m_inpCnt++;
+}
+
+void
+CicoSCMessageRes::addWinObject(const char * key, int value)
+{
+    json_object_set_int_member(m_winObj, key, value);
+    m_winCnt++;
+}
+
+void
+CicoSCMessageRes::addSndObject(const char * key, int value)
+{
+    json_object_set_int_member(m_sndObj, key, value);
+    m_sndCnt++;
+}
+
+void
+CicoSCMessageRes::addInpObject(const char * key, int value)
+{
+    json_object_set_int_member(m_inpObj, key, value);
+    m_inpCnt++;
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get message data
+ *
+ *  @return pointer of message data
+ */
+//--------------------------------------------------------------------------
+const char*
+CicoSCMessageRes::getData(void)
+{
+    // count up reference
+    json_object_ref(m_rootObj);
+    json_object_ref(m_argObj);
+    json_object_ref(m_winObj);
+    json_object_ref(m_sndObj);
+    json_object_ref(m_inpObj);
+
+    if (0 != m_winCnt) {
+        json_object_set_object_member(m_argObj, "window", m_winObj);
+    }
+    if (0 != m_sndCnt) {
+        json_object_set_object_member(m_argObj, "sound",  m_sndObj);
+    }
+    if (0 != m_inpCnt) {
+        json_object_set_object_member(m_argObj, "input",  m_inpObj);
+    }
+
+    json_object_set_object_member(m_rootObj, "res",   m_argObj);
+    json_node_take_object(m_root, m_rootObj);
+    json_generator_set_root(m_generator, m_root);
+    gsize len = 0;
+    gchar* data = json_generator_to_data(m_generator, &len);
+    m_data = data;
+    g_free(data);
+    return m_data.c_str();
+}
+
diff --git a/lib/system-controller/CicoSCMessageRes.h b/lib/system-controller/CicoSCMessageRes.h
new file mode 100644 (file)
index 0000000..ac9e6e4
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+
+//==========================================================================
+/**
+ *  @file   CicoSCMessageRes.h
+ *
+ *  @brief  This file is definition of CicoSCMessage class
+ */
+//==========================================================================
+#ifndef __CICO_SC_MESSAGE_RES_H__
+#define __CICO_SC_MESSAGE_RES_H__
+
+#include <string>
+
+#include <json-glib/json-glib.h>
+#include "CicoSCMessage.h"
+
+//==========================================================================
+//  forward declaration
+//==========================================================================
+
+//==========================================================================
+/**
+ *  @brief  This class hold communication message
+ */
+//==========================================================================
+class CicoSCMessageRes :public CicoSCMessage
+{
+public:
+    // default constructor
+    CicoSCMessageRes();
+
+    // destructor
+    ~CicoSCMessageRes();
+
+    // add argument object for char pointer type
+    void addWinObject(const char * key, const char * value);
+
+    // add argument object for string type
+    void addWinObject(const char * key, const std::string & value);
+
+    // add argument object for integer type
+    void addWinObject(const char * key, int value);
+
+    // add argument object for char pointer type
+    void addSndObject(const char * key, const char * value);
+
+    // add argument object for string type
+    void addSndObject(const char * key, const std::string & value);
+
+    // add argument object for integer type
+    void addSndObject(const char * key, int value);
+
+    // add argument object for char pointer type
+    void addInpObject(const char * key, const char * value);
+
+    // add argument object for string type
+    void addInpObject(const char * key, const std::string & value);
+
+    // add argument object for integer type
+    void addInpObject(const char * key, int value);
+
+    // get message data
+    virtual const char* getData(void);
+
+private:
+
+private:
+    JsonObject          *m_winObj;      //!< json window objects
+    JsonObject          *m_sndObj;      //!< json sound objects
+    JsonObject          *m_inpObj;      //!< json input objects
+    int                 m_winCnt;
+    int                 m_sndCnt;
+    int                 m_inpCnt;
+};
+#endif  // __CICO_SC_MESSAGE_RES_H__
+// vim:set expandtab ts=4 sw=4:
index a51a890..2be8fa5 100644 (file)
@@ -66,6 +66,7 @@ CicoSCServer::CicoSCServer()
       m_inputCtrl(NULL) , m_userMgr(NULL), m_resourceMgr(NULL),
       m_policyMgr(NULL), m_dispatchProcessing(false)
 {
+    CicoSCServer::ms_myInstance = this;
 }
 
 //--------------------------------------------------------------------------
@@ -78,6 +79,7 @@ CicoSCServer::~CicoSCServer()
     if (NULL != m_uwsContext) {
         ico_uws_close(m_uwsContext);
     }
+    CicoSCServer::ms_myInstance = NULL;
 }
 
 //--------------------------------------------------------------------------
index 6547605..fee7373 100644 (file)
@@ -120,6 +120,8 @@ CicoSCUserManager::CicoSCUserManager()
     chkAndAddSlash(m_flagPath);
     m_flagPath += ICO_SYC_CHGUSR_FLAG_FIL;
     ICO_TRA("end");
+
+    CicoSCUserManager::ms_myInstance = this;
 }
 
 //--------------------------------------------------------------------------
@@ -152,6 +154,8 @@ CicoSCUserManager::~CicoSCUserManager()
     m_userList.clear();
     m_vppa.clear();
 
+    CicoSCUserManager::ms_myInstance = NULL;
+
     ICO_TRA("CicoSCUserManager::~CicoSCUserManager Leave");
 }
 
index 507f297..f1eab9f 100644 (file)
@@ -56,6 +56,8 @@ CicoSCVInfoManager::CicoSCVInfoManager()
     ms_dbusTypes[ICO_TYPE_STRING]  = DBUS_TYPE_STRING;
 
     ms_ecoreEvType = ecore_event_type_new();
+
+    CicoSCVInfoManager::ms_myInstance = this;
 }
 
 //--------------------------------------------------------------------------
@@ -65,6 +67,7 @@ CicoSCVInfoManager::CicoSCVInfoManager()
 //--------------------------------------------------------------------------
 CicoSCVInfoManager::~CicoSCVInfoManager()
 {
+    CicoSCVInfoManager::ms_myInstance = NULL;
 }
 
 //--------------------------------------------------------------------------
index 4a38a58..d79dd7a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -29,9 +29,11 @@ using namespace std;
 
 #include <wayland-client.h>
 #include <ico_window_mgr-client-protocol.h>
+#include <ilm_control.h>
 
 #include "CicoSCWayland.h"
 #include "CicoSCWlWinMgrIF.h"
+#include "CicoSCWindowController.h"
 #include "CicoLog.h"
 #include "ico_syc_error.h"
 
@@ -54,6 +56,8 @@ CicoSCWayland::CicoSCWayland()
     // wayland callbacks
     m_wlListener.global        = wlGlobalCB;
     m_wlListener.global_remove = NULL;
+
+    CicoSCWayland::ms_myInstance = this;
 }
 
 //--------------------------------------------------------------------------
@@ -63,6 +67,7 @@ CicoSCWayland::CicoSCWayland()
 //--------------------------------------------------------------------------
 CicoSCWayland::~CicoSCWayland()
 {
+    CicoSCWayland::ms_myInstance = NULL;
 }
 
 //--------------------------------------------------------------------------
@@ -93,6 +98,7 @@ int
 CicoSCWayland::initialize(void)
 {
     ICO_TRA("CicoSCWayland::initialize Enter");
+
     for (int i = 0; i < (5000/50); ++i)  {
         m_wlDisplay = wl_display_connect(NULL);
         if (NULL != m_wlDisplay) {
@@ -152,12 +158,22 @@ CicoSCWayland::initialize(void)
     ICO_DBG("called: wl_display_flush(wlDisplay=0x%08x)", (int)m_wlDisplay);
     wl_display_flush(m_wlDisplay);
 
+    // initialize genivi ivi-shell
+    if (ilm_init() != ILM_SUCCESS)  {
+        ICO_ERR("ilm_init failed.");
+        ICO_TRA("CicoSCWayland::initialize Leave(EIO)");
+        return ICO_SYC_EIO;
+    }
+
     ICO_DBG("called: wl_display_get_fd(wlDisplay=0x%08x)", (int)m_wlDisplay);
     m_wlFd = wl_display_get_fd(m_wlDisplay);
     ICO_DBG("CicoSCWayland::initialize: Wayland/Weston fd=%d", m_wlFd);
 
     ICO_DBG("CicoSCWayland::initialize: Wayland/Weston connect OK");
 
+    // initialize genivi callbacks
+    CicoSCWindowController::initializeGeniviNotifications();
+
     ICO_TRA("CicoSCWayland::initialize: Leave(EOK)");
     return ICO_SYC_EOK;
 }
@@ -199,6 +215,10 @@ CicoSCWayland::dispatchDisplay(void)
     if (-1 == wlret) {
         int error =  wl_display_get_error(m_wlDisplay);
         ICO_ERR("wl_display_dispatch failed. error(%d)", error);
+
+        if (error == EINVAL)    {
+            exit(9);
+        }
     }
 }
 
index dd1d90e..c5774af 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -23,6 +23,8 @@ const char * CicoSCWaylandIF::ICO_WL_WIN_MGR_IF        = "ico_window_mgr";
 const char * CicoSCWaylandIF::ICO_WL_INPUT_MGR_CTRL_IF = "ico_input_mgr_control";
 const char * CicoSCWaylandIF::ICO_WL_EXINPUT_IF        = "ico_exinput";
 const char * CicoSCWaylandIF::ICO_WL_INPUT_MGR_DEV_IF  = "ico_input_mgr_device";
+const char * CicoSCWaylandIF::ICO_WL_IVI_APPLICATION_IF= "ivi_application";
+const char * CicoSCWaylandIF::ICO_WL_IVI_CONTROLLER_IF = "ivi_controller";
 const char * CicoSCWaylandIF::ICO_WL_OUTPUT_IF         = "wl_output";
 
 
index 649bcf6..f647d83 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -54,10 +54,14 @@ protected:
     static const char * ICO_WL_WIN_MGR_IF;
     /// interface name of wayland input manager control
     static const char * ICO_WL_INPUT_MGR_CTRL_IF;
-    /// interface name of wayland exinput 
+    /// interface name of wayland exinput
     static const char * ICO_WL_EXINPUT_IF;
     /// interface name of wayland input manager device
     static const char * ICO_WL_INPUT_MGR_DEV_IF;
+    /// interface name of genivi ivi_application
+    static const char * ICO_WL_IVI_APPLICATION_IF;
+    /// interface name of genivi ivi_controller
+    static const char * ICO_WL_IVI_CONTROLLER_IF;
     /// interface name of wayland output
     static const char * ICO_WL_OUTPUT_IF;
 
index 3661f4b..37361fe 100644 (file)
@@ -19,6 +19,7 @@
 using namespace std;
 
 #include "CicoSCWindow.h"
+#include "CicoSCWlWinMgrIF.h"
 #include "CicoLog.h"
 
 //--------------------------------------------------------------------------
@@ -27,7 +28,7 @@ using namespace std;
  */
 //--------------------------------------------------------------------------
 CicoSCWindow::CicoSCWindow()
-    : surfaceid(-1), name(""), appid(""), pid(-1), layertype(-1),
+    : surfaceid(-1), name(""), appid(""), pid(-1),
       nodeid(-1), displayid(-1), layerid(-1), zone(""), zoneid(-1),
       subwindow(0), eventmask(0), x(-1), y(-1), width(-1), height(-1),
       visible(false), raise(false), active(false)
@@ -43,8 +44,9 @@ CicoSCWindow::CicoSCWindow()
 //--------------------------------------------------------------------------
 CicoSCWindow::~CicoSCWindow()
 {
-//    ICO_TRA("CicoSCWindow::~CicoSCWindow Enter");
-//    ICO_TRA("CicoSCWindow::~CicoSCWindow Leave");
+    ICO_TRA("CicoSCWindow::~CicoSCWindow Enter");
+    CicoSCWlWinMgrIF::wlIviCtrlRemoveSurface(surfaceid);
+    ICO_TRA("CicoSCWindow::~CicoSCWindow Leave");
 }
 
 //--------------------------------------------------------------------------
@@ -58,11 +60,11 @@ CicoSCWindow::dump(void)
     ICO_DBG("CicoSCWindow: surfaceid=0x%08X name=%s appid=%s pid=%d "
             "nodeid=%d displayid=%d layerid=%d zone=%s zoneid=%d "
             "subwindow=%d eventmask=%d x=%d y=%d width=%d height=%d "
-            "visible=%s raise=%s active=%s layertype=%x",
+            "visible=%s raise=%s active=%s",
             surfaceid, name.c_str(), appid.c_str(), pid, nodeid, displayid,
             layerid, zone.c_str(), zoneid, subwindow, eventmask,
             x, y, width, height,
             visible ? "true" : "false", raise ? "true" : "false",
-            active ? "true" : "false", layertype);
+            active ? "true" : "false");
 }
 // vim:set expandtab ts=4 sw=4:
index 287ea59..0122685 100644 (file)
@@ -56,7 +56,6 @@ public:
     std::string       name;         ///< window name
     std::string       appid;        ///< application id
     int               pid;          ///< process id
-    int               layertype;    ///< layer type
 
     int               nodeid;       ///< node id
     int               displayid;    ///< display id
index 09198c3..0c456d9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -47,6 +47,27 @@ using namespace std;
 #include "CicoSCLifeCycleController.h"
 #include "CicoSCResourceManager.h"
 
+//==========================================================================
+//  private static variable
+//==========================================================================
+CicoSCWindowController* CicoSCWindowController::ms_myInstance = NULL;
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  get instance of CicoSCWindowController
+ *
+ *  @return instance of CicoSCWayland
+ */
+//--------------------------------------------------------------------------
+CicoSCWindowController*
+CicoSCWindowController::getInstance(void)
+{
+    if (NULL == ms_myInstance) {
+        ms_myInstance = new CicoSCWindowController();
+    }
+    return ms_myInstance;
+}
+
 //--------------------------------------------------------------------------
 /**
  *  @brief  default constructor
@@ -57,8 +78,12 @@ CicoSCWindowController::CicoSCWindowController()
 {
     CicoSCWayland* wayland = CicoSCWayland::getInstance();
     wayland->getInstance()->addWaylandIF(ICO_WL_WIN_MGR_IF, this);
+    wayland->getInstance()->addWaylandIF(ICO_WL_IVI_APPLICATION_IF, this);
+    wayland->getInstance()->addWaylandIF(ICO_WL_IVI_CONTROLLER_IF, this);
     wayland->getInstance()->addWaylandIF(ICO_WL_OUTPUT_IF, this);
     initDB();
+
+    CicoSCWindowController::ms_myInstance = this;
 }
 
 //--------------------------------------------------------------------------
@@ -68,6 +93,7 @@ CicoSCWindowController::CicoSCWindowController()
 //--------------------------------------------------------------------------
 CicoSCWindowController::~CicoSCWindowController()
 {
+    CicoSCWindowController::ms_myInstance = NULL;
 }
 
 //--------------------------------------------------------------------------
@@ -192,19 +218,19 @@ CicoSCWindowController::show(int        surfaceid,
     }
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
-    int raiseFlag = ICO_WINDOW_MGR_V_NOCHANGE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
+    int raiseFlag = ICO_SYC_WIN_RAISE_NOCHANGE;
     if (animationTime & ICO_SYC_WIN_SURF_RAISE) {
-        raiseFlag = ICO_WINDOW_MGR_RAISE_RAISE;
+        raiseFlag = ICO_SYC_WIN_RAISE_RAISE;
         window->raise = true;
     }
     else if (animationTime & ICO_SYC_WIN_SURF_LOWER)    {
-        raiseFlag = ICO_WINDOW_MGR_RAISE_LOWER;
+        raiseFlag = ICO_SYC_WIN_RAISE_LOWER;
         window->raise = false;
     }
     else if (((animationTime & ICO_SYC_WIN_SURF_NOCHANGE) == 0) &&
              (false == window->raise))   {
-        raiseFlag = ICO_WINDOW_MGR_RAISE_RAISE;
+        raiseFlag = ICO_SYC_WIN_RAISE_RAISE;
         window->raise = true;
     }
     if ((NULL != animation) && (animation[0] != '\0')) {
@@ -212,12 +238,12 @@ CicoSCWindowController::show(int        surfaceid,
         CicoSCWlWinMgrIF::setAnimation(window->surfaceid,
                                     ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW,
                                     animation, animationTime & ~ICO_SYC_WIN_SURF_FLAGS);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
     // set visible request to Multi Window Manager
     CicoSCWlWinMgrIF::setVisible(window->surfaceid,
-                                 ICO_WINDOW_MGR_VISIBLE_SHOW,
+                                 ICO_SYC_WIN_VISIBLE_SHOW,
                                  raiseFlag, animaFlag);
 
     // flush display
@@ -281,18 +307,18 @@ CicoSCWindowController::hide(int        surfaceid,
     }
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
     if ((NULL != animation) && (animation[0] != '\0')) {
         CicoSCWlWinMgrIF::setAnimation(window->surfaceid,
                                        ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE,
                                        animation, animationTime & ~ICO_SYC_WIN_SURF_FLAGS);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
     // set visible request to Multi Window Manager
     CicoSCWlWinMgrIF::setVisible(window->surfaceid,
-                                    ICO_WINDOW_MGR_VISIBLE_HIDE,
-                                    ICO_WINDOW_MGR_V_NOCHANGE, animaFlag);
+                                    ICO_SYC_LAYER_VISIBLE_HIDE,
+                                    ICO_SYC_WIN_RAISE_NOCHANGE, animaFlag);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -337,18 +363,19 @@ CicoSCWindowController::resize(int        surfaceid,
     }
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
     if ((NULL != animation) && (animation[0] != '\0')) {
         CicoSCWlWinMgrIF::setAnimation(window->surfaceid,
                                        ICO_WINDOW_MGR_ANIMATION_TYPE_RESIZE,
                                        animation, animationTime);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
     // set visible request to Multi Window Manager
+    window->width = w;
+    window->height = h;
     CicoSCWlWinMgrIF::setPositionsize(window->surfaceid, window->nodeid,
-                                      ICO_WINDOW_MGR_V_NOCHANGE,
-                                      ICO_WINDOW_MGR_V_NOCHANGE,
+                                      window->x, window->y,
                                       w, h, animaFlag);
 
     // flush display
@@ -360,7 +387,7 @@ CicoSCWindowController::resize(int        surfaceid,
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  move window(surface) size
+ *  @brief  move window(surface) position
  *
  *  @param [in] surfaceid       wayland surface id
  *  @param [in] nodeid          node id
@@ -397,24 +424,25 @@ CicoSCWindowController::move(int        surfaceid,
     }
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
     if ((NULL != animation) && (animation[0] != '\0')) {
         CicoSCWlWinMgrIF::setAnimation(window->surfaceid,
                                        ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE,
                                        animation, animationTime);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
-    int moveNodeId = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveNodeId = ICO_SYC_WIN_NOCHANGE;
     if (nodeid >= 0) {
         moveNodeId = nodeid;
     }
 
     // set visible request to Multi Window Manager
+    window->x = x;
+    window->y = y;
     CicoSCWlWinMgrIF::setPositionsize(window->surfaceid,
                                       moveNodeId, x, y,
-                                      ICO_WINDOW_MGR_V_NOCHANGE,
-                                      ICO_WINDOW_MGR_V_NOCHANGE,
+                                      window->width, window->height,
                                       animaFlag);
 
     // flush display
@@ -459,18 +487,18 @@ CicoSCWindowController::raise(int        surfaceid,
     window->raise = true;
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
     if ((NULL != animation) && (animation[0] != '\0')) {
         CicoSCWindowController::setAnimation(window->surfaceid,
                                              ICO_WINDOW_MGR_ANIMATION_TYPE_SHOW,
                                              animation, animationTime);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
     // set visible request to Multi Window Manager
     CicoSCWlWinMgrIF::setVisible(window->surfaceid,
-                                 ICO_WINDOW_MGR_V_NOCHANGE,
-                                 ICO_WINDOW_MGR_RAISE_RAISE, animaFlag);
+                                 ICO_SYC_WIN_VISIBLE_NOCHANGE,
+                                 ICO_SYC_WIN_RAISE_RAISE, animaFlag);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -546,7 +574,7 @@ CicoSCWindowController::setGeometry(int        surfaceid,
                                    ICO_WINDOW_MGR_ANIMATION_TYPE_MOVE,
                                    animation, moveAnimationTime);
 
-    int moveNodeId = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveNodeId = ICO_SYC_WIN_NOCHANGE;
     if (nodeid >= 0) {
         moveNodeId = nodeid;
     }
@@ -561,24 +589,28 @@ CicoSCWindowController::setGeometry(int        surfaceid,
         return ICO_SYC_EINVAL;
     }
 
-    int moveX = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveX = window->x;
     if (0 <= x) {
         moveX = x;
+        window->x = x;
     }
 
-    int moveY = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveY = window->y;
     if (0 <= y) {
         moveY = y;
+        window->y = y;
     }
 
-    int moveW = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveW = window->width;
     if (0 <= w) {
         moveW = w;
+        window->width = w;
     }
 
-    int moveH = ICO_WINDOW_MGR_V_NOCHANGE;
+    int moveH = window->height;
     if (0 <= h) {
         moveH = h;
+        window->height = h;
     }
 
     // set window layer to Multi Window Manager
@@ -592,7 +624,7 @@ CicoSCWindowController::setGeometry(int        surfaceid,
     // set visible request to Multi Window Manager
     CicoSCWlWinMgrIF::setPositionsize(window->surfaceid, moveNodeId,
                                       moveX, moveY, moveW, moveH,
-                                      ICO_WINDOW_MGR_FLAGS_ANIMATION);
+                                      ICO_SYC_ANIMATION_ON);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -752,17 +784,17 @@ CicoSCWindowController::lower(int        surfaceid,
     window->raise = false;
 
     // set animation request to Multi Window Manager
-    int animaFlag = ICO_WINDOW_MGR_FLAGS_NO_CONFIGURE;
+    int animaFlag = ICO_SYC_ANIMATION_OFF;
     if ((NULL != animation) && (animation[0] != '\0')) {
         CicoSCWlWinMgrIF::setAnimation(window->surfaceid,
                                        ICO_WINDOW_MGR_ANIMATION_TYPE_HIDE,
                                        animation, animationTime);
-        animaFlag = ICO_WINDOW_MGR_FLAGS_ANIMATION;
+        animaFlag = ICO_SYC_ANIMATION_ON;
     }
 
     // set visible request to Multi Window Manager
-    CicoSCWlWinMgrIF::setVisible(window->surfaceid, ICO_WINDOW_MGR_V_NOCHANGE,
-                                 ICO_WINDOW_MGR_RAISE_LOWER, animaFlag);
+    CicoSCWlWinMgrIF::setVisible(window->surfaceid, ICO_SYC_WIN_VISIBLE_NOCHANGE,
+                                 ICO_SYC_WIN_RAISE_LOWER, animaFlag);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -787,11 +819,13 @@ CicoSCWindowController::lower(int        surfaceid,
 int
 CicoSCWindowController::setWindowLayer(int surfaceid, int layerid)
 {
+    uint32_t    oldlayerid;
+
     ICO_TRA("CicoSCWindowController::setWindowLayer Enter"
             "(surfaceid=0x%08X layerid=%x)", surfaceid, layerid);
 
     // find window information in window list
-    CicoSCWindow *window = findWindow(surfaceid);
+    CicoSCWindowwindow = findWindow(surfaceid);
     if (NULL == window) {
         ICO_WRN("not found window information");
         ICO_TRA("CicoSCWindowController::setWindowLayer Leave(ENOENT)");
@@ -801,21 +835,18 @@ CicoSCWindowController::setWindowLayer(int surfaceid, int layerid)
     // find layer information in layer list
     CicoSCLayer* layer = findLayer(window->displayid, layerid);
     if (NULL == layer) {
-        // check special layer
-        if ((layerid != ICO_WINDOW_MGR_LAYERTYPE_TOUCH) &&
-            (layerid != ICO_WINDOW_MGR_LAYERTYPE_CURSOR)) {
-            ICO_TRA("CicoSCWindowController::setWindowLayer Leave(ENOENT[disp=%d,layer=%d])",
-                    window->displayid, layerid);
-            return ICO_SYC_ENOENT;
-        }
+        ICO_TRA("CicoSCWindowController::setWindowLayer Leave(ENOENT[disp=%d,layer=%d])",
+                window->displayid, layerid);
+        return ICO_SYC_ENOENT;
     }
 
     // update window attr
+    oldlayerid = window->layerid;
     window->layerid = layerid;
 
     // set window layer request to Multi Window Manager
-    CicoSCWlWinMgrIF::setWindowLayer(window->surfaceid, window->layerid);
-
+    CicoSCWlWinMgrIF::setWindowLayer(window->surfaceid,
+                                     (uint32_t)window->layerid, oldlayerid);
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
 
@@ -850,7 +881,7 @@ CicoSCWindowController::showLayer(int displayid, int layerid)
         return ICO_SYC_ENOENT;
     }
 
-    CicoSCWlWinMgrIF::setLayerVisible(layerid, ICO_WINDOW_MGR_VISIBLE_SHOW);
+    CicoSCWlWinMgrIF::setLayerVisible(layerid, ICO_SYC_LAYER_VISIBLE_SHOW);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -887,7 +918,7 @@ CicoSCWindowController::hideLayer(int displayid, int layerid)
         return ICO_SYC_ENOENT;
     }
 
-    CicoSCWlWinMgrIF::setLayerVisible(layerid, ICO_WINDOW_MGR_VISIBLE_HIDE);
+    CicoSCWlWinMgrIF::setLayerVisible(layerid, ICO_SYC_LAYER_VISIBLE_HIDE);
 
     // flush display
     CicoSCWayland::getInstance()->flushDisplay();
@@ -928,8 +959,7 @@ CicoSCWindowController::active(int surfaceid, int target)
     }
 
     if (target < 0) {
-        target = ICO_WINDOW_MGR_ACTIVE_POINTER  |
-                 ICO_WINDOW_MGR_ACTIVE_KEYBOARD;
+        target = 0xffff;
     }
 
     // set active request to Multi Window Manager
@@ -967,25 +997,24 @@ CicoSCWindowController::active(int surfaceid, int target)
 
 //--------------------------------------------------------------------------
 /**
- *  @brief   set surface map buffer
+ *  @brief   set surface map get
  *
- *  @param [in] shmname     shared memory name (POSIX I/F)
- *  @param [in] bufsize     shared memory buffer size
- *  @param [in] bufnum      number of shared memory buffer
+ *  @param [in] surfaceid   wayland surface id
+ *  @param [in] filepath    surface image pixel file path
  *
  *  @return ICO_SYC_EOK on success, other on error(currently EOK only)
  *  @retval ICO_SYC_EOK     success
  */
 //--------------------------------------------------------------------------
 int
-CicoSCWindowController::setmapBuffer(const char *shmname, int bufsize, int bufnum)
+CicoSCWindowController::setmapGet(int surfaceid, const char *filepath)
 {
-    ICO_TRA("CicoSCWindowController::setmapBuffer Enter");
+    ICO_TRA("CicoSCWindowController::setmapGet Enter");
 
-    CicoSCWlWinMgrIF::setmapBuffer(shmname, bufsize, bufnum);
+    CicoSCWlWinMgrIF::setmapGet(surfaceid, filepath);
     CicoSCWayland::getInstance()->flushDisplay();
 
-    ICO_TRA("CicoSCWindowController::setmapBuffer Leave(EOK)");
+    ICO_TRA("CicoSCWindowController::setmapGet Leave(EOK)");
     return ICO_SYC_EOK;
 }
 
@@ -995,6 +1024,7 @@ CicoSCWindowController::setmapBuffer(const char *shmname, int bufsize, int bufnu
  *
  *  @param [in] surfaceid   wayland surface id
  *  @param [in] framerate   surface change frame rate(frames par sec)
+ *  @param [in] filepath    surface image pixel file path
  *
  *  @return ICO_SYC_EOK on success, other on error
  *  @retval ICO_SYC_EOK     success
@@ -1003,9 +1033,10 @@ CicoSCWindowController::setmapBuffer(const char *shmname, int bufsize, int bufnu
  */
 //--------------------------------------------------------------------------
 int
-CicoSCWindowController::mapSurface(int surfaceid, int framerate)
+CicoSCWindowController::mapSurface(int surfaceid, int framerate, const char *filepath)
 {
-    ICO_TRA("CicoSCWindowController::mapSurface Enter");
+    ICO_TRA("CicoSCWindowController::mapSurface Enter(0x%08x,%d,%s)",
+            surfaceid, framerate, filepath ? filepath : "(null)");
 
     // find window information in window list
     CicoSCWindow *window = findWindow(surfaceid);
@@ -1019,7 +1050,7 @@ CicoSCWindowController::mapSurface(int surfaceid, int framerate)
         framerate = 0;
     }
 
-    CicoSCWlWinMgrIF::mapSurface(surfaceid, framerate);
+    CicoSCWlWinMgrIF::mapSurface(surfaceid, framerate, filepath);
     CicoSCWayland::getInstance()->flushDisplay();
 
     ICO_TRA("CicoSCWindowController::mapSurface Leave(EOK)");
@@ -1041,7 +1072,7 @@ CicoSCWindowController::mapSurface(int surfaceid, int framerate)
 int
 CicoSCWindowController::unmapSurface(int surfaceid)
 {
-    ICO_TRA("CicoSCWindowController::unmapSurface Enter");
+    ICO_TRA("CicoSCWindowController::unmapSurface Enter(0x%08x)", surfaceid);
 
     // find window information in window list
     CicoSCWindow *window = findWindow(surfaceid);
@@ -1117,476 +1148,43 @@ CicoSCWindowController::setAttributes(int surfaceid)
 
     uint32_t attributes = 0;
     if (true == zone->aspectFixed) {
-        attributes |= ICO_WINDOW_MGR_ATTR_FIXED_ASPECT;
+        attributes |= ICO_SYC_WIN_ASPECT_FIXED;
         if (true == zone->aspectAlignLeft) {
-            attributes |= ICO_WINDOW_MGR_ATTR_ALIGN_LEFT;
+            attributes |= ICO_SYC_WIN_ASPECT_ALIGN_LEFT;
         }
         if (true == zone->aspectAlignRight) {
-            attributes |= ICO_WINDOW_MGR_ATTR_ALIGN_RIGHT;
+            attributes |= ICO_SYC_WIN_ASPECT_ALIGN_RIGHT;
         }
         if (true == zone->aspectAlignTop) {
-            attributes |= ICO_WINDOW_MGR_ATTR_ALIGN_TOP;
+            attributes |= ICO_SYC_WIN_ASPECT_ALIGN_TOP;
         }
         if (true == zone->aspectAlignBottom) {
-            attributes |= ICO_WINDOW_MGR_ATTR_ALIGN_BOTTOM;
+            attributes |= ICO_SYC_WIN_ASPECT_ALIGN_BOTTOM;
         }
     }
-
-    CicoSCWlWinMgrIF::setAttributes(surfaceid, attributes);
-    CicoSCWayland::getInstance()->flushDisplay();
-
     ICO_TRA("CicoSCWindowController::setAttributes Leave(EOK)");
     return ICO_SYC_EOK;
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief   wayland surface create callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] winname         surface window name(title)
- *  @param [in] pid             wayland client process Id
- *  @param [in] appid           wayland client application Id
- *  @param [in] layertype       surface layer type
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::createdCB(void                  *data,
-                                  struct ico_window_mgr *ico_window_mgr,
-                                  uint32_t              surfaceid,
-                                  const char            *winname,
-                                  int32_t               pid,
-                                  const char            *appid,
-                                  int32_t               layertype)
-{
-    ICO_TRA("CicoSCWindowController::createdCB Enter"
-            "(surfaceid=0x%08X winname=%s pid=%d appid=%s layer=%x)",
-            surfaceid, winname, pid, appid, layertype);
-
-    if (layertype == ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL)   {
-        // So far, SystemController ignores this event
-        // because it does not support InputPanel(Software Keyboard).
-        ICO_WRN("Input Panel layer create window information skip.");
-        ICO_TRA("CicoSCWindowController::createdCB Leave(Input Panel)");
-        return;
-    }
-
-    CicoSCWindow* window = new CicoSCWindow();
-
-    window->surfaceid = surfaceid;
-    window->name      = winname;
-    window->appid     = appid;
-    window->layertype = layertype;
-    window->pid       = pid;
-    window->displayid = ICO_SURFACEID_2_NODEID(surfaceid);
-
-    CicoSCLifeCycleController* appctrl;
-    appctrl = CicoSCLifeCycleController::getInstance();
-    const CicoAilItems *ailItem = appctrl->findAIL(appid);
-    if (NULL == ailItem) {
-        const CicoAulItems* aulitem = appctrl->findAUL(pid);
-        if (NULL != aulitem) {
-            window->appid = aulitem->m_appid;
-            ICO_DBG("appid=%s", window->appid.c_str());
-            ailItem = appctrl->findAIL(window->appid.c_str());
-        }
-        else {
-            ICO_DBG("application information not found.");
-        }
-    }
-
-    if (NULL != ailItem) {
-        window->layerid = ailItem->m_layer;
-        window->zoneid  = ailItem->m_displayZone;
-        window->nodeid  = ailItem->m_nodeID;
-        if ((window->displayid >= 0) && (window->zoneid >= 0)) {
-
-            const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
-            if (NULL != zone) {
-                window->zone   = zone->fullname;
-                window->x      = zone->x;
-                window->y      = zone->y;
-                window->width  = zone->width;
-                window->height = zone->height;
-            }
-        }
-    }
-    else{
-        delete window;
-        ICO_WRN("ail item not found.");
-        ICO_TRA("CicoSCWindowController::createdCB Leave(ENOENT)");
-        return;
-    }
-
-    appctrl->enterAUL(appid, pid, window);
-
-    // dump log window information
-    window->dump();
-
-    m_windowList[surfaceid] = window;
-
-    // set surface attributes
-    setAttributes(surfaceid);
-
-    // send message
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_CREATE);
-    message->addRootObject("appid", window->appid);
-    message->addRootObject("pid", window->pid);
-    message->addArgObject("surface", window->surfaceid);
-    message->addArgObject("winname", window->name);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    if (NULL != m_resMgr) {
-        CicoSCCommand cmd;
-        CicoSCCmdResCtrlOpt *opt = new CicoSCCmdResCtrlOpt();
-
-        cmd.cmdid = MSG_CMD_CREATE_RES;
-        cmd.appid = window->appid;
-        cmd.pid   = window->pid;
-        cmd.opt = opt;
-
-        opt->dispres   = true;
-        opt->winname   = window->name;
-        opt->surfaceid = window->surfaceid;
-
-        string fullname;
-        const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
-        if (NULL != zone) {
-            opt->dispzone = zone->fullname;
-        }
-
-#if 1   //TODO
-        opt->soundres  = true;
-        opt->soundname = window->appid;
-        opt->soundid   = 0;
-        CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
-        const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
-        if (NULL != defconf) {
-            const CicoSCSoundZoneConf *zoneconf =
-                sysconf->findSoundZoneConfbyId(defconf->soundzone);
-            if (NULL != zoneconf) {
-                opt->soundzone = zoneconf->fullname;
-            }
-        }
-#endif
-
-        m_resMgr->handleCommand((const CicoSCCommand&)cmd, true);
-    }
-    else {
-        show(window->surfaceid, NULL, 0);
-    }
-
-    ICO_TRA("CicoSCWindowController::createdCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland change surface name callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] winname         surface window name(title)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::nameCB(void                  *data,
-                               struct ico_window_mgr *ico_window_mgr,
-                               uint32_t              surfaceid,
-                               const char            *winname)
-{
-    ICO_TRA("CicoSCWindowController::nameCB Enter"
-            "(surfaceid=0x%08X winname=%s)", surfaceid, winname);
-
-    CicoSCWindow *window = findWindow(surfaceid);
-    if (NULL == window) {
-        ICO_WRN("not found window information");
-        ICO_TRA("CicoSCWindowController::nameCB Leave");
-        return;
-    }
-
-    ICO_DBG("nameCB: Update window name %s=>%s",
-            window->name.c_str(), winname);
-    window->name = winname;
-
-    // send message
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_NAME);
-    message->addRootObject("appid", window->appid);
-    message->addRootObject("pid", window->pid);
-    message->addArgObject("surface", window->surfaceid);
-    message->addArgObject("winname", window->name);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    ICO_TRA("CicoSCWindowController::nameCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland surface destroy callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::destroyedCB(void                  *data,
-                                    struct ico_window_mgr *ico_window_mgr,
-                                    uint32_t              surfaceid)
-{
-    ICO_TRA("CicoSCWindowController::destroyedCB Enter"
-            "(surfaceid=0x%08X)", surfaceid);
-
-    CicoSCWindow *window = findWindow(surfaceid);
-    if (NULL == window) {
-        ICO_WRN("not found window information");
-        ICO_TRA("CicoSCWindowController::destroyedCB Leave");
-        return;
-    }
-
-    // send message
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_DESTROY);
-    message->addRootObject("appid", window->appid);
-    message->addRootObject("pid", window->pid);
-    message->addArgObject("surface", window->surfaceid);
-    message->addArgObject("winname", window->name);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    // TODO delete window in application
-
-    if (NULL != m_resMgr) {
-        CicoSCCommand cmd;
-        CicoSCCmdResCtrlOpt *opt = new CicoSCCmdResCtrlOpt();
-
-        cmd.cmdid = MSG_CMD_DESTORY_RES;
-        cmd.appid = window->appid;
-        cmd.pid   = window->pid;
-        cmd.opt = opt;
-
-        opt->dispres   = true;
-        opt->winname   = window->name;
-        opt->surfaceid = window->surfaceid;
-
-        string fullname;
-        const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
-        if (NULL != zone) {
-            opt->dispzone = zone->fullname;
-        }
-
-        opt->soundres  = true;
-        opt->soundname = window->appid;
-        opt->soundid   = 0;
-        CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
-        const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
-        if (NULL != defconf) {
-            const CicoSCSoundZoneConf *zoneconf =
-                sysconf->findSoundZoneConfbyId(defconf->soundzone);
-            if (NULL != zoneconf) {
-                opt->soundzone = zoneconf->fullname;
-            }
-        }
-
-        m_resMgr->handleCommand((const CicoSCCommand&)cmd, true);
-    }
-
-    // delete window in list
-    m_windowList.erase(window->surfaceid);
-    delete(window);
-
-    ICO_TRA("CicoSCWindowController::destroyedCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland surface visible callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] visible         surface visible
- *                              (1=visible/0=invisible/other=no-change)
- *  @param [in] raise           surface raise
- *                              (1=raise/0=lower/other=no change)
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::visibleCB(void                  *data,
-                                  struct ico_window_mgr *ico_window_mgr,
-                                  uint32_t              surfaceid,
-                                  int32_t               visible,
-                                  int32_t               raise,
-                                  int32_t               hint)
-{
-    ICO_TRA("CicoSCWindowController::visibleCB Enter"
-            "(surfaceid=0x%08X visible=%d raise=%d hint=%d)",
-            surfaceid, visible, raise, hint);
-
-    CicoSCWindow *window = findWindow(surfaceid);
-    if (NULL == window) {
-        ICO_WRN("not found window information");
-        ICO_TRA("CicoSCWindowController::visibleCB Leave");
-        return;
-    }
-
-    int newVisible = visible;
-    int newRaise   = raise;
-
-    if (visible == ICO_WINDOW_MGR_V_NOCHANGE) {
-        newVisible = window->visible;
-    }
-
-    if (raise == ICO_WINDOW_MGR_V_NOCHANGE) {
-        newVisible = window->raise;
-    }
-
-    if ((window->visible == newVisible) && (window->raise == newRaise) ){
-        ICO_TRA("CicoSCWindowController::visibleCB Leave");
-        return;
-    }
-
-    // update attr
-    window->visible = newVisible;
-    window->raise = newRaise;
-
-    // notify homescreen
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_CHANGE_ATTR);
-    message->addRootObject("appid", window->appid);
-    const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
-    if (NULL != zone) {
-        message->addArgObject("zone", zone->fullname);
-    }
-    else {
-        message->addArgObject("zone", "");
-    }
-    message->addArgObject("surface", window->surfaceid);
-    message->addArgObject("winname", window->name);
-    message->addArgObject("node", window->nodeid);
-    message->addArgObject("layer", window->layerid);
-    message->addArgObject("pos_x", window->x);
-    message->addArgObject("pos_y", window->y);
-    message->addArgObject("width", window->width);
-    message->addArgObject("height", window->height);
-    message->addArgObject("raise", window->raise ? 1 : 0);
-    message->addArgObject("visible", window->visible ? 1 : 0);
-    message->addArgObject("active", window->active ? 1 : 0);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    ICO_TRA("CicoSCWindowController::visibleCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland surface configure callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] node            surface node Id
- *  @param [in] layertype       surface layer type
- *  @param [in] layer           surface layer Id
- *  @param [in] x               surface upper-left X coordinate
- *  @param [in] y               surface upper-left Y coordinate
- *  @param [in] width           surface width
- *  @param [in] height          surface height
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::configureCB(void                  *data,
-                                    struct ico_window_mgr *ico_window_mgr,
-                                    uint32_t              surfaceid,
-                                    uint32_t              node,
-                                    int32_t               layertype,
-                                    uint32_t              layer,
-                                    int32_t               x,
-                                    int32_t               y,
-                                    int32_t               width,
-                                    int32_t               height,
-                                    int32_t               hint)
-{
-    ICO_TRA("CicoSCWindowController::configureCB Enter"
-            "(surfaceid=0x%08X node=%d layer=%x.%x x=%d y=%d "
-            "width=%d height=%d hint=%d)",
-            surfaceid, node, layertype, layer, x, y, width, height, hint);
-
-    if (layertype == ICO_WINDOW_MGR_LAYERTYPE_INPUTPANEL)   {
-        // So far, SystemController ignores this event
-        // because it does not support InputPanel(Software Keyboard).
-        ICO_TRA("CicoSCWindowController::configureCB Leave(Input Panel)");
-        return;
-    }
-    CicoSCWindow *window = findWindow(surfaceid);
-    if (NULL == window) {
-        ICO_WRN("not found window information");
-        ICO_TRA("CicoSCWindowController::visibleCB Leave"
-                "(update window visible failed)");
-        return;
-    }
-
-    if (ICO_WINDOW_MGR_HINT_CHANGE == hint) {
-        window->x      = x;
-        window->y      = y;
-        window->width  = width;
-        window->height = height;
-        window->layertype = layertype;
-    }
-
-    // send message
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_CHANGE_ATTR);
-    message->addRootObject("appid", window->appid);
-    const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
-    if (NULL != zone) {
-        message->addArgObject("zone", zone->fullname);
-    }
-    else {
-        message->addArgObject("zone", "");
-    }
-    message->addArgObject("surface", window->surfaceid);
-    message->addArgObject("winname", window->name);
-    message->addArgObject("node", window->nodeid);
-    message->addArgObject("layertype", window->layertype);
-    message->addArgObject("layer", window->layerid);
-    message->addArgObject("pos_x", window->x);
-    message->addArgObject("pos_y", window->y);
-    message->addArgObject("width", window->width);
-    message->addArgObject("height", window->height);
-    message->addArgObject("raise", window->raise ? 1 : 0);
-    message->addArgObject("visible", window->visible ? 1 : 0);
-    message->addArgObject("active", window->active ? 1 : 0);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    ICO_TRA("CicoSCWindowController::configureCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
  *  @brief  wayland surface active callback
  *
  *  @param [in] data            user data(unused)
  *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
  *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] active          surface active
- *                              (1=active/0=not active)
+ *  @param [in] select          select device(unused)
+ *                              (0=not active/1=pointer/2=touch)
  */
 //--------------------------------------------------------------------------
 void
 CicoSCWindowController::activeCB(void                  *data,
                                  struct ico_window_mgr *ico_window_mgr,
                                  uint32_t              surfaceid,
-                                 int32_t               active)
+                                 int32_t               select)
 {
     ICO_TRA("CicoSCWindowController::activeCB Enter"
-            "(surfaceid=0x%08X active=%d)", surfaceid, active);
+            "(surfaceid=0x%08X select=%d)", surfaceid, select);
 
     CicoSCWindow *window = findWindow(surfaceid);
     if (NULL == window) {
@@ -1595,7 +1193,7 @@ CicoSCWindowController::activeCB(void                  *data,
         return;
     }
 
-    if (0 == active) {
+    if (0 == select) {
         ICO_TRA("CicoSCWindowController::activeCB Leave(not active)");
         return;
     }
@@ -1619,70 +1217,6 @@ CicoSCWindowController::activeCB(void                  *data,
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland layer visible callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] layer           layer Id
- *  @param [in] visible         layer visible
- *                              (1=visible/0=invisible/other=no change)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::layerVisibleCB(void                  *data,
-                                       struct ico_window_mgr *ico_window_mgr,
-                                       uint32_t              layer,
-                                       int32_t               visible)
-{
-    ICO_TRA("CicoSCWindowController::layerVisibleCB Enter"
-            "layer=%d visible=%d)", layer, visible);
-
-    // send message
-    CicoSCMessage *message = new CicoSCMessage();
-    message->addRootObject("command", MSG_CMD_CHANGE_LAYER_ATTR);
-    message->addRootObject("appid", "");
-    message->addArgObject("layer", layer);
-    message->addArgObject("visible", visible);
-    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
-
-    ICO_TRA("CicoSCWindowController::layerVisibleCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  query application surface callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] appid           application Id
- *  @param [in] surface         surface Id array
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWindowController::appSurfacesCB(void                  *data,
-                                      struct ico_window_mgr *ico_window_mgr,
-                                      const char            *appid,
-                                      struct wl_array       *surfaces)
-{
-    ICO_TRA("CicoSCWindowController::appSurfacesCB Enter(appid=%s)", appid);
-
-    //struct wl_array {
-    //  size_t size;
-    //  size_t alloc;
-    //  void *data;
-    //};
-    uint32_t **p;
-    for (p = (uint32_t**)(surfaces)->data;
-         (const char*) p < ((const char*) (surfaces)->data + (surfaces)->size);
-         (p)++) {
-        ICO_DBG("appSurfacesCB: surface=%d", (int)*p);
-    }
-
-    ICO_TRA("CicoSCWindowController::appSurfacesCB Leave");
-}
-
-//--------------------------------------------------------------------------
-/**
  *  @brief   surface map event callback
  *
  *  @param [in] data            user data(unused)
@@ -1690,7 +1224,6 @@ CicoSCWindowController::appSurfacesCB(void                  *data,
  *  @param [in] event           event
  *  @param [in] surfaceid       surface Id
  *  @param [in] type            surface type (EGL buffer/Shared memory)
- *  @param [in] target          surface buffer target(EGL buffer name)
  *  @param [in] width           surface width
  *  @param [in] height          surface height
  *  @param [in] stride          surface buffer(frame buffer) stride
@@ -1703,7 +1236,6 @@ CicoSCWindowController::mapSurfaceCB(void                  *data,
                                      int32_t               event,
                                      uint32_t              surfaceid,
                                      uint32_t              type,
-                                     uint32_t              target,
                                      int32_t               width,
                                      int32_t               height,
                                      int32_t               stride,
@@ -1712,8 +1244,8 @@ CicoSCWindowController::mapSurfaceCB(void                  *data,
     int command;
 
     ICO_TRA("CicoSCWindowController::mapSurfaceCB Enter(ev=%d surf=%x "
-            "type=%d target=%d w/h=%d/%d stride=%d form=%x)",
-            event, surfaceid, type, target, width, height, stride, format);
+            "type=%d w/h=%d/%d stride=%d form=%x)",
+            event, surfaceid, type, width, height, stride, format);
 
     CicoSCWindow *window = findWindow(surfaceid);
     if (NULL == window) {
@@ -1742,7 +1274,6 @@ CicoSCWindowController::mapSurfaceCB(void                  *data,
     message->addRootObject("appid", window->appid);
     message->addArgObject("surface", window->surfaceid);
     message->addArgObject("attr", type);
-    message->addArgObject("name", target);
     message->addArgObject("width", width);
     message->addArgObject("height", height);
     message->addArgObject("stride", stride);
@@ -1869,6 +1400,407 @@ CicoSCWindowController::outputModeCB(void             *data,
     ICO_TRA("CicoSCWindowController::outputModeCB Leave");
 }
 
+//--------------------------------------------------------------------------
+/**
+ *  @brief  wayland genivi ivi-shell surface create callback
+ *
+ *  @param [in] data        user data
+ *  @param [in] ivi_controller  wayland ivi-controller plugin interface
+ *  @param [in] id_surface      surface id
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWindowController::createSurfaceCB(void *data,
+                                        struct ivi_controller *ivi_controller,
+                                        uint32_t id_surface)
+{
+    int     pid;
+    int     ret;
+    struct ilmSurfaceProperties SurfaceProperties;
+
+    ICO_TRA("CicoSCWindowController::createSurfaceCB Enter"
+            "(surfaceid=0x%08x)", id_surface);
+
+    if ((ilm_getPropertiesOfSurface(id_surface, &SurfaceProperties) != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWindowController::createSurfaceCB: ilm_getPropertiesOfSurface(%x) Error",
+                id_surface);
+        return;
+    }
+    ICO_TRA("createSurfaceCB: surface=%08x pid=%d w/h=%d/%d->%d/%d",
+            id_surface, SurfaceProperties.creatorPid,
+            SurfaceProperties.sourceWidth, SurfaceProperties.sourceHeight,
+            SurfaceProperties.destWidth, SurfaceProperties.destHeight);
+
+    CicoSCWindow* window = new CicoSCWindow();
+    window->surfaceid = id_surface;
+    window->name = CicoSCWlWinMgrIF::wlIviCtrlGetSurfaceWaiting(id_surface, &pid);
+    window->pid       = pid;
+    window->displayid = 0;              // currently fixed 0
+    window->raise = 1;                  // created surface is top of layer
+
+    CicoSCLifeCycleController* appctrl;
+    appctrl = CicoSCLifeCycleController::getInstance();
+    const CicoAilItems* ailItem = NULL;
+    const CicoAulItems* aulitem = appctrl->findAUL(window->pid);
+    if (NULL != aulitem) {
+        window->appid = aulitem->m_appid;
+        ICO_DBG("appid=%s", window->appid.c_str());
+        ailItem = appctrl->findAIL(window->appid.c_str());
+    }
+    else {
+        ICO_DBG("application information not found.");
+    }
+
+    if (NULL != ailItem) {
+        window->layerid = ailItem->m_layer;
+        window->zoneid  = ailItem->m_displayZone;
+        window->nodeid  = ailItem->m_nodeID;
+        if ((window->displayid >= 0) && (window->zoneid >= 0)) {
+
+            const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
+            if (NULL != zone) {
+                window->zone   = zone->fullname;
+                window->x      = zone->x;
+                window->y      = zone->y;
+                window->width  = zone->width;
+                window->height = zone->height;
+            }
+        }
+    }
+    else{
+        delete window;
+        ICO_WRN("ail item not found.");
+        ICO_TRA("CicoSCWindowController::createSurfaceCB Leave(ENOENT)");
+        return;
+    }
+
+    CicoSCLayer *blayer = findLayer(window->displayid, window->layerid);
+    if (blayer) {
+        blayer->addSurface(window->surfaceid, true);
+        int nsurf;
+        const int *surfs = blayer->getSurfaces(&nsurf);
+        if (ilm_layerSetRenderOrder(window->layerid, (t_ilm_layer *)surfs, nsurf)
+            != ILM_SUCCESS)   {
+            ICO_ERR("CicoSCWindowController::createSurfaceCB: "
+                    "ilm_layerSetRenderOrder(%d,,%d) Error", window->layerid, nsurf);
+        }
+        else if (ilm_commitChanges() != ILM_SUCCESS)    {
+            ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_commitChanges() Error");
+        }
+    }
+
+    appctrl->enterAUL(window->appid.c_str(), window->pid, window);
+
+    // dump log window information
+    window->dump();
+
+    m_windowList[window->surfaceid] = window;
+
+    // set surface attributes
+    setAttributes(window->surfaceid);
+
+    // send message
+    CicoSCMessage *message = new CicoSCMessage();
+    message->addRootObject("command", MSG_CMD_CREATE);
+    message->addRootObject("appid", window->appid);
+    message->addRootObject("pid", window->pid);
+    message->addArgObject("surface", window->surfaceid);
+    message->addArgObject("winname", window->name);
+    CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
+
+    if (NULL != m_resMgr) {
+        CicoSCCommand cmd;
+        CicoSCCmdResCtrlOpt *opt = new CicoSCCmdResCtrlOpt();
+
+        cmd.cmdid = MSG_CMD_CREATE_RES;
+        cmd.appid = window->appid;
+        cmd.pid   = window->pid;
+        cmd.opt = opt;
+
+        opt->dispres   = true;
+        opt->winname   = window->name;
+        opt->surfaceid = window->surfaceid;
+
+        string fullname;
+        const CicoSCDisplayZone* zone = findDisplayZone(window->zoneid);
+        if (NULL != zone) {
+            opt->dispzone = zone->fullname;
+        }
+
+#if 1   //TODO
+        opt->soundres  = true;
+        opt->soundname = window->appid;
+        opt->soundid   = 0;
+        CicoSystemConfig *sysconf = CicoSystemConfig::getInstance();
+        const CicoSCDefaultConf *defconf = sysconf->getDefaultConf();
+        if (NULL != defconf) {
+            const CicoSCSoundZoneConf *zoneconf =
+                sysconf->findSoundZoneConfbyId(defconf->soundzone);
+            if (NULL != zoneconf) {
+                opt->soundzone = zoneconf->fullname;
+            }
+        }
+#endif
+        m_resMgr->handleCommand((const CicoSCCommand&)cmd, true);
+    }
+    else {
+        show(window->surfaceid, NULL, 0);
+    }
+
+    // add notification
+    if ((ret = ilm_surfaceAddNotification(window->surfaceid, wlGeniviSurfaceNotification))
+        != ILM_SUCCESS) {
+        ICO_ERR("CicoSCWindowController::createSurfaceCB ilm_surfaceAddNotification(%08x) "
+                "Error.%d", window->surfaceid, ret);
+    }
+    ICO_TRA("CicoSCWindowController::createSurfaceCB Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief   genivi ivi-shell layer propaty callback
+ *
+ *  @param [in] layer           layer id
+ *  @param [in] LayerProperties layer properties
+ *  @param [in] mask            change properties
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWindowController::wlGeniviLayerNotification(t_ilm_layer layer,
+                                            struct ilmLayerProperties *LayerProperties,
+                                            t_ilm_notification_mask mask)
+{
+    ICO_TRA("CicoSCWindowController::wlGeniviLayerNotification Enter(%x,,%x)", layer, mask);
+
+    if (mask & ILM_NOTIFICATION_VISIBILITY) {
+        // change layer visibility, send message to HomeScreen
+        CicoSCMessage *message = new CicoSCMessage();
+        message->addRootObject("command", MSG_CMD_CHANGE_LAYER_ATTR);
+        message->addRootObject("appid", "");
+        message->addArgObject("layer", layer);
+        message->addArgObject("visible", LayerProperties->visibility ? 1 : 0);
+        CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
+    }
+    ICO_TRA("CicoSCWindowController::wlGeniviLayerNotification Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief   genivi ivi-shell surface propaty callback
+ *
+ *  @param [in] surface           surface id
+ *  @param [in] SurfaceProperties surface properties
+ *  @param [in] mask              change properties
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWindowController::wlGeniviSurfaceNotification(t_ilm_surface surface,
+                                              struct ilmSurfaceProperties *SurfaceProperties,
+                                              t_ilm_notification_mask mask)
+{
+    int newVisible;
+
+    ICO_TRA("CicoSCWindowController::wlGeniviSurfaceNotification Enter(%x,,%x)", surface, mask);
+    newVisible = SurfaceProperties->visibility ? ICO_SYC_WIN_VISIBLE_SHOW
+                                               : ICO_SYC_WIN_VISIBLE_HIDE;
+    CicoSCWindow *window = CicoSCWindowController::getInstance()->findWindow(surface);
+    if (NULL == window) {
+        ICO_WRN("CicoSCWindowController::wlGeniviSurfaceNotification Leave(surface=%08x not exist)", surface);
+        return;
+    }
+    if ((window->visible != newVisible) ||
+        (window->x != (int)SurfaceProperties->destX) ||
+        (window->y != (int)SurfaceProperties->destY) ||
+        (window->width != (int)SurfaceProperties->destWidth) ||
+        (window->height != (int)SurfaceProperties->destHeight))  {
+        // change visibility
+        window->visible = newVisible;
+        window->x = (int)SurfaceProperties->destX;
+        window->y = (int)SurfaceProperties->destY;
+        window->width = (int)SurfaceProperties->destWidth;
+        window->height = (int)SurfaceProperties->destHeight;
+
+        // update attr
+        window->visible = newVisible;
+
+        // notify to homescreen
+        CicoSCMessage *message = new CicoSCMessage();
+        message->addRootObject("command", MSG_CMD_CHANGE_ATTR);
+        message->addRootObject("appid", window->appid);
+        const CicoSCDisplayZone* zone
+                = CicoSCWindowController::getInstance()->findDisplayZone(window->zoneid);
+        if (NULL != zone) {
+            message->addArgObject("zone", zone->fullname);
+        }
+        else {
+            message->addArgObject("zone", "");
+        }
+        message->addArgObject("surface", window->surfaceid);
+        message->addArgObject("winname", window->name);
+        message->addArgObject("node", window->nodeid);
+        message->addArgObject("layer", window->layerid);
+        message->addArgObject("pos_x", window->x);
+        message->addArgObject("pos_y", window->y);
+        message->addArgObject("width", window->width);
+        message->addArgObject("height", window->height);
+        message->addArgObject("raise", window->raise ? 1 : 0);
+        message->addArgObject("visible", window->visible ? 1 : 0);
+        message->addArgObject("active", window->active ? 1 : 0);
+        CicoSCServer::getInstance()->sendMessageToHomeScreen(message);
+    }
+    else    {
+        ICO_TRA("CicoSCWindowController::wlGeniviSurfaceNotification Leave(no change)");
+    }
+}
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief  setup Genivi ivi-shell notification(callback) finctions
+ *
+ *  @param      none
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWindowController::initializeGeniviNotifications(void)
+{
+    t_ilm_uint  NumberOfScreens = 16;
+    t_ilm_uint  ScreenIds[16];
+    t_ilm_layer *pLayerId, *ppLayerId;
+    t_ilm_int   LayerNumber;
+    t_ilm_uint  *pScreenIds = ScreenIds;
+    struct ilmScreenProperties  ScreenProperties;
+    int                     idx, DisplayId;
+    const CicoSCDisplayConf *DisplayConf;
+    const CicoSCLayerConf   *LayerConf;
+    int                     LayerId;
+
+    // get all screen id
+    memset(ScreenIds, 0, sizeof(ScreenIds));
+    if ((ilm_getScreenIDs(&NumberOfScreens, &pScreenIds) != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                "ilm_getScreenIDs() Error");
+        return;
+    }
+    ICO_TRA("initializeGeniviNotifications: Screens=%d.%x %x %x %x",
+            NumberOfScreens, ScreenIds[0], ScreenIds[1], ScreenIds[2], ScreenIds[3]);
+    for (idx = 0; idx < (int)NumberOfScreens; idx++) {
+        ICO_TRA("CicoSCWindowController::initializeGeniviNotifications: call ilm_getPropertiesOfScreen(%x)", ScreenIds[idx]);
+        if ((ilm_getPropertiesOfScreen(ScreenIds[idx], &ScreenProperties) != ILM_SUCCESS) ||
+            (ilm_commitChanges() != ILM_SUCCESS))   {
+            ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                    "ilm_getPropertiesOfScreen(%d.%x) Error", idx, ScreenIds[idx]);
+            continue;
+        }
+        ICO_TRA("CicoSCWindowController::initializeGeniviNotifications: "
+                "Screen[%d.%x] w/h=%d/%d layers=%d",
+                idx, ScreenIds[idx], ScreenProperties.screenWidth,
+                ScreenProperties.screenHeight, ScreenProperties.layerCount);
+
+        DisplayId = CicoSystemConfig::getInstance()->getDisplayIdbyNo((int)ScreenIds[idx]);
+        if ((DisplayId < 0) ||
+            ((DisplayConf = CicoSystemConfig::getInstance()->findDisplayConfbyId(DisplayId))
+                == NULL))   {
+            ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                    "ScreenId.%x not found", ScreenIds[idx]);
+        }
+        else    {
+#if 0       // TODO
+            CicoSystemConfig::getInstance()->setDisplaySize(DisplayId,
+                                                            ScreenProperties.screenWidth,
+                                                            ScreenProperties.screenHeight);
+#endif
+            // set genivi layers
+            for (idx = 0; ; idx++)  {
+                LayerConf = CicoSystemConfig::getInstance()->
+                                                findLayerConfbyIdx(DisplayId, idx);
+                if (! LayerConf)    break;
+            }
+            pLayerId = (t_ilm_layer *)malloc(sizeof(t_ilm_layer) * idx);
+            ppLayerId = pLayerId;
+            LayerNumber = 0;
+
+            for (idx = 0; ; idx++)  {
+                LayerConf = CicoSystemConfig::getInstance()->
+                                                findLayerConfbyIdx(DisplayId, idx);
+                if (! LayerConf)    break;
+
+                LayerId = (DisplayId << 16) | LayerConf->id;
+                if (ilm_layerCreateWithDimension((t_ilm_layer *)&LayerId,
+                            DisplayConf->width, DisplayConf->height) != ILM_SUCCESS)    {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerCreateWithDimension(%x,%d,%d) Error",
+                            LayerId, DisplayConf->width, DisplayConf->height);
+                }
+                else if (ilm_commitChanges() != ILM_SUCCESS) {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_commitChanges() Error");
+                }
+                else if (ilm_layerSetOpacity(LayerId, (t_ilm_float)1.0f) != ILM_SUCCESS) {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerSetOpacity(%x) Error", LayerId);
+                }
+                else if (ilm_layerSetSourceRectangle(LayerId, 0, 0,
+                             DisplayConf->width, DisplayConf->height) != ILM_SUCCESS)   {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerSetSourceRectangle(%x) Error", LayerId);
+                }
+                else if (ilm_layerSetDestinationRectangle(LayerId, 0, 0,
+                             DisplayConf->width, DisplayConf->height) != ILM_SUCCESS)   {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerSetDestinationRectangle(%x) Error", LayerId);
+                }
+                else if (ilm_layerSetOrientation(LayerId, ILM_ZERO) != ILM_SUCCESS) {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerSetOrientation(%x) Error", LayerId);
+                }
+                else if (ilm_layerSetOrientation(LayerId, ILM_ZERO) != ILM_SUCCESS) {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerSetOrientation(%x) Error", LayerId);
+                }
+                else if (ilm_layerAddNotification(LayerId, wlGeniviLayerNotification)
+                    != ILM_SUCCESS)   {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_layerAddNotification(%x) Error", LayerId);
+                }
+                else    {
+                    if (ilm_commitChanges() != ILM_SUCCESS) {
+                        ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                                "ilm_commitChanges() Error");
+                    }
+                    ICO_TRA("initializeGeniviNotifications: layer=%x created(%d,%d)",
+                            LayerId, DisplayConf->width, DisplayConf->height);
+                    *ppLayerId = LayerId;
+                    ppLayerId ++;
+                    LayerNumber ++;
+                }
+            }
+            if (LayerNumber > 0)    {
+                if (ilm_displaySetRenderOrder(ScreenIds[idx], pLayerId, LayerNumber)
+                    != ILM_SUCCESS)   {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_displaySetRenderOrder(%d) Error", LayerNumber);
+                }
+                else if (ilm_commitChanges() != ILM_SUCCESS) {
+                    ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                            "ilm_commitChanges() Error");
+                }
+                ppLayerId = pLayerId;
+                for (idx = 0; idx < LayerNumber; idx++) {
+                    if (ilm_layerAddNotification(*ppLayerId, wlGeniviLayerNotification)
+                        != ILM_SUCCESS)   {
+                        ICO_ERR("CicoSCWindowController::initializeGeniviNotifications "
+                                "ilm_layerAddNotification(%x) Error", *ppLayerId);
+                    }
+                    ppLayerId ++;
+                }
+            }
+            free(pLayerId);
+        }
+    }
+}
+
 //==========================================================================
 // private method
 //==========================================================================
@@ -1886,7 +1818,7 @@ CicoSCWindowController::findWindow(int surfaceid)
     map<unsigned int, CicoSCWindow*>::iterator itr;
     itr = m_windowList.find(surfaceid);
     if (m_windowList.end() == itr) {
-        ICO_WRN("not found window object. surfaceid=0x%08X", surfaceid);
+        ICO_TRA("not found window object. surfaceid=0x%08X", surfaceid);
         return NULL;
     }
 
@@ -2011,13 +1943,13 @@ CicoSCWindowController::handleCommand(const CicoSCCommand * cmd)
         ICO_DBG("command: MSG_CMD_CHANGE_LAYER");
         (void)setWindowLayer(opt->surfaceid, opt->layerid);
         break;
-    case MSG_CMD_MAP_BUFFER:
-        ICO_DBG("command: MSG_CMD_MAP_BUFFER");
-        (void)setmapBuffer(opt->animation.c_str(), opt->width, opt->height);
+    case MSG_CMD_MAP_GET:
+        ICO_DBG("command: MSG_CMD_MAP_GET");
+        (void)setmapGet(opt->surfaceid, opt->animation.c_str());
         break;
     case MSG_CMD_MAP_THUMB:
         ICO_DBG("command: MSG_CMD_MAP_THUMB");
-        (void)mapSurface(opt->surfaceid, opt->framerate);
+        (void)mapSurface(opt->surfaceid, opt->framerate, opt->animation.c_str());
         break;
     case MSG_CMD_UNMAP_THUMB:
         ICO_DBG("command: MSG_CMD_UNMAP_THUMB");
index cf0f81f..de61303 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
@@ -42,6 +42,9 @@ class CicoSCResourceManager;
 class CicoSCWindowController : public CicoSCWlWinMgrIF
 {
 public:
+    // get instance of CicoSCWindowController
+    static CicoSCWindowController* getInstance();
+
     // default constructor
     CicoSCWindowController();
 
@@ -110,9 +113,9 @@ public:
 
     int active(int surfaceid, int target);
 
-    int setmapBuffer(const char *shmname, int bufsize, int bufnum);
+    int setmapGet(int surfaceid, const char *filepath);
 
-    int mapSurface(int surfaceid, int framerate);
+    int mapSurface(int surfaceid, int framerate, const char *filepath);
 
     int unmapSurface(int surfaceid);
 
@@ -120,64 +123,26 @@ public:
 
     int setAttributes(int surfaceid);
 
-    //
-    virtual void createdCB(void *data,
-                           struct ico_window_mgr *ico_window_mgr,
-                           uint32_t surfaceid,
-                           const char *winname,
-                           int32_t pid,
-                           const char *appid,
-                           int32_t layertype);
-
-    virtual void nameCB(void *data,
-                        struct ico_window_mgr *ico_window_mgr,
-                        uint32_t surfaceid,
-                        const char *winname);
-
-    virtual void destroyedCB(void *data,
-                             struct ico_window_mgr *ico_window_mgr,
-                             uint32_t surfaceid);
-
-    virtual void visibleCB(void *data,
-                           struct ico_window_mgr *ico_window_mgr,
-                           uint32_t surfaceid,
-                           int32_t visible,
-                           int32_t raise,
-                           int32_t hint);
-
-    virtual void configureCB(void *data,
-                             struct ico_window_mgr *ico_window_mgr,
-                             uint32_t surfaceid,
-                             uint32_t node,
-                             int32_t layertype,
-                             uint32_t layer,
-                             int32_t x,
-                             int32_t y,
-                             int32_t width,
-                             int32_t height,
-                             int32_t hint);
+    static void initializeGeniviNotifications(void);
+
+    static void wlGeniviLayerNotification(t_ilm_layer layer,
+                                          struct ilmLayerProperties *LayerProperties,
+                                          t_ilm_notification_mask mask);
 
+    static void wlGeniviSurfaceNotification(t_ilm_surface surface,
+                                            struct ilmSurfaceProperties *SurfaceProperties,
+                                            t_ilm_notification_mask mask);
+    //
     virtual void activeCB(void *data,
                           struct ico_window_mgr *ico_window_mgr,
                           uint32_t surfaceid,
-                          int32_t active);
-
-    virtual void layerVisibleCB(void *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                uint32_t layer,
-                                int32_t visible);
-
-    virtual void appSurfacesCB(void *data,
-                               struct ico_window_mgr *ico_window_mgr,
-                               const char *appid,
-                               struct wl_array *surfaces);
+                          int32_t select);
 
     virtual void mapSurfaceCB(void *data,
                               struct ico_window_mgr *ico_window_mgr,
                               int32_t event,
                               uint32_t surfaceid,
                               uint32_t type,
-                              uint32_t target,
                               int32_t width,
                               int32_t height,
                               int32_t stride,
@@ -201,6 +166,10 @@ public:
                               int32_t height,
                               int32_t refresh);
 
+    virtual void createSurfaceCB(void           *data,
+                                 struct ivi_controller *ivi_controller,
+                                 uint32_t id_surface);
+
 private:
     // assignment operator
     CicoSCWindowController& operator=(const CicoSCWindowController &object);
@@ -224,6 +193,9 @@ private:
                               int        animationTime);
 
 private:
+    /// my instance
+    static CicoSCWindowController *ms_myInstance;
+
     // resource manager instance
     CicoSCResourceManager *m_resMgr;
 
@@ -233,9 +205,8 @@ private:
     // display object list
     vector<CicoSCDisplay*> m_displayList;
 
-    // total of physical display 
+    // total of physical display
     unsigned int m_physicalDisplayTotal;
-
 };
 #endif  // __CICO_SC_WINDOW_CONTROLLER_H__
 // vim:set expandtab ts=4 sw=4:
index 72ed678..6032665 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full tWlExt of the Apache License is at
@@ -185,37 +185,6 @@ CicoSCWlInputMgrIF::delInputApp(const string &appid,
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wrapper function ico_input_mgr_control_send_input_event
- *
- *  @param [in] appid     application id
- *  @param [in] surfaceid surface id
- *  @param [in] type      device type
- *  @param [in] deviceno  input device number
- *  @param [in] time      event time
- *  @param [in] code      event code
- *  @param [in] value     event value
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlInputMgrIF::sendInputEvent(const string &appid,
-                                   int          surfaceid,
-                                   int          type,
-                                   int          deviceno,
-                                   int          time,
-                                   int          code,
-                                   int          value)
-{
-    ICO_DBG("called: ico_input_mgr_control_send_input_event"
-            "(appid=<%s> surfaceid=0x%08X type=%d deviceno=%d time=%d code=%d value=%d)",
-            appid.c_str(), surfaceid, type, deviceno, time, code, value);
-    ico_input_mgr_control_send_input_event(m_inputmgr, appid.c_str(), surfaceid,
-                                           type, deviceno, time, code, value);
-    // flush display
-    CicoSCWayland::getInstance()->flushDisplay();
-}
-
-//--------------------------------------------------------------------------
-/**
  *  @brief  wrapper function ico_exinput_set_input_region
  *
  *  @param [in] target    target window name(winname@appid)
index 271561e..42924e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full tWlExt of the Apache License is at
@@ -93,15 +93,6 @@ protected:
                      const std::string &device,
                      int               input);
 
-    // wrapper function ico_input_mgr_control_send_input_event
-    void sendInputEvent(const std::string &appid,
-                        int               surfaceid,
-                        int               type,
-                        int               deviceno,
-                        int               time,
-                        int               code,
-                        int               value);
-
     // wrapper function ico_exinput_set_input_region
     void setInputRegion(const std::string &target,
                         int x,
index 15695d6..cdd1c38 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
 #include <fcntl.h>
 #include <cstring>
 
+#include "ico_syc_type.h"
 #include "CicoSCWlWinMgrIF.h"
 #include "CicoLog.h"
+#include "CicoSystemConfig.h"
+#include "CicoConf.h"
+#include "CicoSCWindowController.h"
 
 //==========================================================================
 //  static variables
 //==========================================================================
+struct ico_window_mgr *CicoSCWlWinMgrIF::m_winmgr = NULL;
+struct ivi_application *CicoSCWlWinMgrIF::m_ivi_app = NULL;
+struct ivi_controller *CicoSCWlWinMgrIF::m_ivi_ctrl = NULL;
+struct wl_output *CicoSCWlWinMgrIF::m_wloutput = NULL;
+
+int CicoSCWlWinMgrIF::m_id_surface = 0;
+
+struct creation_surface_wait    *CicoSCWlWinMgrIF::m_wait_surface_creation = NULL;
+struct creation_surface_wait    *CicoSCWlWinMgrIF::m_free_surface_creation = NULL;
 
 //--------------------------------------------------------------------------
 /**
  */
 //--------------------------------------------------------------------------
 CicoSCWlWinMgrIF::CicoSCWlWinMgrIF()
-    : m_winmgr(NULL), m_wloutput(NULL)
 {
     // ico_window_mgr listener
-    m_listener.window_created   = wlCreatedCB;
-    m_listener.window_name      = wlNameCB;
-    m_listener.window_destroyed = wlDestroyedCB;
-    m_listener.window_visible   = wlVisibleCB;
-    m_listener.window_configure = wlConfigureCB;
     m_listener.window_active    = wlActiveCB;
-    m_listener.layer_visible    = wlLayerVisibleCB;
-    m_listener.app_surfaces     = wlAppSurfacesCB;
     m_listener.map_surface      = wlMapSurfaceCB;
 
+    // genivi ivi_application listener
+    m_ivi_app_listener.error = wlIviAppErrorCB;
+    m_ivi_app_listener.wl_shell_info = wlIviAppNativeShellInfoCB;
+
+    // genivi ivi_controller listener
+    m_ivi_ctrl_listener.screen = wlIviCtrlScreenCB;
+    m_ivi_ctrl_listener.layer = wlIviCtrlLayerCB;
+    m_ivi_ctrl_listener.surface = wlIviCtrlSurfaceCB;
+    m_ivi_ctrl_listener.error = wlIviCtrlErrorCB;
+    m_ivi_ctrl_listener.native_handle = wlIviCtrlNativeHandleCB;
+
     // wayland output listener
     m_wlOutputListener.geometry = wlOutputGeometryCB;
     m_wlOutputListener.mode     = wlOutputModeCB;
@@ -98,17 +114,45 @@ CicoSCWlWinMgrIF::initInterface(void               *data,
 
 
         m_winmgr = (struct ico_window_mgr *)wlProxy;
-        ico_window_mgr_add_listener(m_winmgr, 
+        ico_window_mgr_add_listener(m_winmgr,
                                     &m_listener,
                                     this);
-#if 0
-        ico_window_mgr_set_user_data(m_winmgr, NULL/*TODO*/);
-#endif
-
-        ICO_DBG("called: ico_window_mgr_declare_manager");
-        ico_window_mgr_declare_manager(m_winmgr,
-                                       ICO_WINDOW_MGR_DECLARE_MANAGER_MANAGER);
-
+    }
+    else if (0 == strcmp(interface, ICO_WL_IVI_APPLICATION_IF)) {
+        // get interface instance
+        ICO_DBG("called: wl_registry_bind for ivi_application");
+        void *wlProxy = wl_registry_bind(registry,
+                                         name,
+                                         &ivi_application_interface,
+                                         1);
+        if (NULL == wlProxy) {
+            ICO_WRN("interface(%s) wl_registry_bind failed.",
+                    interface);
+            ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave(binding failed)");
+            return;
+        }
+        m_ivi_app = (struct ivi_application *)wlProxy;
+        ivi_application_add_listener(m_ivi_app,
+                                     &m_ivi_app_listener,
+                                     this);
+    }
+    else if (0 == strcmp(interface, ICO_WL_IVI_CONTROLLER_IF)) {
+        // get interface instance
+        ICO_DBG("called: wl_registry_bind for ivi_controller");
+        void *wlProxy = wl_registry_bind(registry,
+                                         name,
+                                         &ivi_controller_interface,
+                                         1);
+        if (NULL == wlProxy) {
+            ICO_WRN("interface(%s) wl_registry_bind failed.",
+                    interface);
+            ICO_TRA("CicoSCWlWinMgrIF::initInterface Leave(binding failed)");
+            return;
+        }
+        m_ivi_ctrl = (struct ivi_controller *)wlProxy;
+        ivi_controller_add_listener(m_ivi_ctrl,
+                                    &m_ivi_ctrl_listener,
+                                    this);
     }
     else if (0 == strcmp(interface, ICO_WL_OUTPUT_IF)) {
         // get interface instance
@@ -125,12 +169,9 @@ CicoSCWlWinMgrIF::initInterface(void               *data,
         }
 
         m_wloutput = (struct wl_output*)wlProxy;
-        wl_output_add_listener(m_wloutput, 
+        wl_output_add_listener(m_wloutput,
                                &m_wlOutputListener,
                                this);
-#if 0
-        wl_output_set_user_data(m_wloutput, NULL/*TODO*/);
-#endif
     }
     else {
         ICO_WRN("unmatch interface");
@@ -146,48 +187,53 @@ CicoSCWlWinMgrIF::initInterface(void               *data,
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_declare_manager
- *  
- *  @param [in] manager type of manager
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::declareManager(int32_t manager)
-{
-    // declare manager request to Multi Window Manager
-    ICO_DBG("called: ico_window_mgr_declare_manager(manager=%d)", manager);
-    ico_window_mgr_declare_manager(m_winmgr, manager);
-}
-
-//--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_window_layer
- *  
+/**
+ *  @brief   wrapper function of ilm_layerAddSurface
+ *
  *  @param [in] surfaceid       wayland surface id
- *  @param [in] layer           number of layer
+ *  @param [in] layer           layer id
+ *  @param [in] oldlayer        old layer id(if 0xffffffff, no old layer)
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::setWindowLayer(uint32_t surfaceid, uint32_t layer)
+CicoSCWlWinMgrIF::setWindowLayer(uint32_t surfaceid, uint32_t layer, uint32_t oldlayer)
 {
     // set window layer request to Multi Window Manager
-    ICO_DBG("called: ico_window_mgr_set_window_layer"
-            "(surfaceid=0x%08X layer=%d)", surfaceid, layer);
-    ico_window_mgr_set_window_layer(m_winmgr, surfaceid, layer);
+    ICO_DBG("CicoSCWlWinMgrIF::setWindowLayer: "
+            "surfaceid=0x%08X layer=%d->%d", surfaceid, oldlayer, layer);
+
+    // remove original layer
+    if (oldlayer <= 0x7fffffff) {
+        ICO_TRA("CicoSCWlWinMgrIF::setWindowLayer: remove surface %08x "
+                "from layer(%d)", surfaceid, oldlayer);
+        (void) ilm_layerRemoveSurface(oldlayer, surfaceid);
+    }
+    else    {
+        ICO_TRA("CicoSCWlWinMgrIF::setWindowLayer: surface %08x has no old layer(%d)",
+                surfaceid, oldlayer);
+    }
+
+    // add new layer
+    if (ilm_layerAddSurface(layer, surfaceid) != ILM_SUCCESS)   {
+        ICO_ERR("CicoSCWlWinMgrIF::setWindowLayer ilm_layerAddSurface(%d,%08x) Error",
+                layer, surfaceid);
+    }
+    if (ilm_commitChanges() != ILM_SUCCESS) {
+        ICO_ERR("CicoSCWlWinMgrIF::setWindowLayer ilm_commitChanges Error");
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_positionsize
- *  
+/**
+ *  @brief   wrapper function of ilm_surfaceSetDestinationRectangle
+ *
  *  @param [in] surfaceid       wayland surface id
  *  @param [in] layer           number of layer
  *  @param [in] x
  *  @param [in] y
  *  @param [in] width
  *  @param [in] height
- *  @param [in] flags
+ *  @param [in] flags           (unused)
  */
 //--------------------------------------------------------------------------
 void
@@ -196,21 +242,26 @@ CicoSCWlWinMgrIF::setPositionsize(uint32_t surfaceid, uint32_t node,
                                   int32_t height, int32_t flags)
 {
     // set position size request to Multi Window Manager
-    ICO_DBG("called: ico_window_mgr_set_positionsize"
+    ICO_DBG("called: ilm_surfaceSetDestinationRectangle"
             "(surfaceid=0x%08X node=%d x=%d y=%d w=%d h=%d flags=%d)",
             surfaceid, node, x, y, width, height, flags);
-    ico_window_mgr_set_positionsize(m_winmgr, surfaceid, node,
-                                    x, y, width, height, flags);
+    if ((ilm_surfaceSetDestinationRectangle(surfaceid, x, y, width, height)
+            != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWlWinMgrIF::setPositionsize ilm_surfaceSetDestinationRectangle"
+                "(%08x,%d,%d,%d,%d) Error",
+                surfaceid, x, y, width, height);
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_visible
- *  
+/**
+ *  @brief   wrapper function of ilm_surfaceSetVisibility
+ *
  *  @param [in] surfaceid       wayland surface id
  *  @param [in] visible         visible state
  *  @param [in] raise           raise state
- *  @param [in] flags           option on change visible
+ *  @param [in] flags           (unused)
  */
 //--------------------------------------------------------------------------
 void
@@ -218,39 +269,24 @@ CicoSCWlWinMgrIF::setVisible(uint32_t surfaceid, int32_t visible,
                              int32_t raise, int32_t flags)
 {
     // set visible request to Multi Window Manager
-    ICO_DBG("called: ico_window_mgr_set_visible"
+    ICO_DBG("called: ilm_surfaceSetVisibility"
             "(surfaceid=0x%08X visible=%d raise=%d anima=%d)",
             surfaceid, visible, raise, flags);
-    ico_window_mgr_set_visible(m_winmgr, surfaceid, visible, raise, flags);
-}
-
-//--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_visible_animation
- *  
- *  @param [in] surfaceid       wayland surface id
- *  @param [in] visible         visible state
- *  @param [in] raise           raise state
- *  @param [in] flags           option on change visible
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::visibleAnimation(uint32_t surfaceid, int32_t visible,
-                                   int32_t x, int32_t y,
-                                   int32_t width, int32_t height)
-{
-    // visible animation request to Multi Window Manager
-    ICO_DBG("called: ico_window_mgr_visible_animation"
-            "(surfaceid=0x%08X visible=%d x=%d y=%d w=%d h=%d)",
-            surfaceid, visible, x, y, width, height);
-    ico_window_mgr_visible_animation(m_winmgr, surfaceid, visible,
-                                     x, y, width, height);
+    if ((visible == ICO_SYC_WIN_VISIBLE_SHOW) || (visible == ICO_SYC_WIN_VISIBLE_HIDE)) {
+        ilm_surfaceSetVisibility(surfaceid, visible);
+    }
+    if ((raise == ICO_SYC_WIN_RAISE_RAISE) || (raise == ICO_SYC_WIN_RAISE_LOWER))   {
+        // TODO: need raise/lower control
+    }
+    if (ilm_commitChanges() != ILM_SUCCESS) {
+        ICO_ERR("CicoSCWlWinMgrIF::setVisible: ilm_commitChanges() Error");
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
+/**
  *  @brief   wrapper function of ico_window_mgr_set_animation
- *  
+ *
  *  @param [in] surfaceid       wayland surface id
  *  @param [in] type            transition type
  *  @param [in] animation       name of animation
@@ -268,41 +304,28 @@ CicoSCWlWinMgrIF::setAnimation(uint32_t surfaceid, int32_t type,
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_attributes
- *  
- *  @param [in] surfaceid       wayland surface id
- *  @param [in] attributes      attributes of surface
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::setAttributes(uint32_t surfaceid, uint32_t attributes)
-{
-    ICO_DBG("called: ico_window_mgr_set_attributes"
-            "(surfaceid=0x%08X attributes=%d)", surfaceid, attributes);
-    ico_window_mgr_set_attributes(m_winmgr, surfaceid, attributes);
-}
-
-//--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_active
- *  
+/**
+ *  @brief   wrapper function of ilm_SetKeyboardFocusOn
+ *
  *  @param [in] surfaceid       wayland surface id
- *  @param [in] active          flags od active device
+ *  @param [in] active          flags or active device(unused)
  */
 //--------------------------------------------------------------------------
 void
 CicoSCWlWinMgrIF::setActive(uint32_t surfaceid, int32_t active)
 {
-    ICO_DBG("called: ico_window_mgr_set_active"
+    ICO_DBG("called: ilm_SetKeyboardFocusOn"
             "(surfaceid=0x%08X active=%d)", surfaceid, active);
-    ico_window_mgr_set_active(m_winmgr, surfaceid, active);
+    if ((ilm_SetKeyboardFocusOn(surfaceid) != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWlWinMgrIF::setActive ilm_SetKeyboardFocusOn(%08x) Error", surfaceid);
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_layer_visible
- *  
+/**
+ *  @brief   wrapper function of ilm_layerSetVisibility
+ *
  *  @param [in] surfaceid       wayland surface id
  *  @param [in] layer           id of layer
  *  @param [in] visible         visible state
@@ -311,64 +334,62 @@ CicoSCWlWinMgrIF::setActive(uint32_t surfaceid, int32_t active)
 void
 CicoSCWlWinMgrIF::setLayerVisible(uint32_t layer, int32_t visible)
 {
-    ICO_DBG("called: ico_window_mgr_set_layer_visible"
+    ICO_DBG("called: ilm_layerSetVisibility"
             "(layer=%d visible=%d)", layer, visible);
-    ico_window_mgr_set_layer_visible(m_winmgr, layer, visible);
-}
-
-//--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_get_surfaces
- *  
- *  @param [in] appid           id of application
- *  @param [in] pid             id of process
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::getSurfaces(const char *appid, int pid)
-{
-    ICO_DBG("called: ico_window_mgr_get_surfaces(appid=%d,pid=%d)",
-            appid ? appid : " ", pid);
-    ico_window_mgr_get_surfaces(m_winmgr, appid ? appid : " ", pid);
+    if ((ilm_layerSetVisibility(layer, visible) != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWlWinMgrIF::setLayerVisible ilm_layerSetVisibility(%d,%d) Error",
+                layer, visible);
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wrapper function of ico_window_mgr_set_map_buffer
- *  
- *  @param[in]  shmname     shared memory name(POSIX I/F)
- *  @param[in]  bufsize     buffer size in byte
- *  @param[in]  bufnum      number of buffers
+/**
+ *  @brief   wrapper function of ilm_takeSurfaceScreenshot
+ *
+ *  @param [in] surface     id of wayland surface
+ *  @param [in] filepath    surface image pixel file path
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::setmapBuffer(const char *shmname, int bufsize, int bufnum)
+CicoSCWlWinMgrIF::setmapGet(int surfaceid, const char *filepath)
 {
-    ICO_DBG("called: ico_window_mgr_set_map_buffer(shmname=%s, bufsize=%d, bufnum=%d)",
-            shmname ? shmname : "(null)", bufsize, bufnum);
-    ico_window_mgr_set_map_buffer(m_winmgr, shmname, bufsize, bufnum);
+    ICO_DBG("called: ilm_takeSurfaceScreenshot(filepath=%s,, surface=0x%08x)",
+            filepath ? filepath : "(null)", surfaceid);
+    if ((ilm_takeSurfaceScreenshot(filepath, surfaceid) != ILM_SUCCESS) ||
+        (ilm_commitChanges() != ILM_SUCCESS))   {
+        ICO_ERR("CicoSCWlWinMgrIF::setmapGet ilm_takeSurfaceScreenshot(%s,%x) Error",
+                filepath ? filepath : "(null)", surfaceid);
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
+/**
  *  @brief   wrapper function of ico_window_mgr_map_surface
- *  
+ *
  *  @param [in] surface     id of wayland surface
  *  @param [in] framerate   interval of changed notify[frame per second]
+ *  @param [in] filepath    surface image pixel file path
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::mapSurface(uint32_t surfaceid, int32_t framerate)
+CicoSCWlWinMgrIF::mapSurface(uint32_t surfaceid, int32_t framerate, const char *filepath)
 {
-    ICO_DBG("called: ico_window_mgr_map_surface"
-            "(surfaceid=0x%08X framerate=%d)", surfaceid, framerate);
-    ico_window_mgr_map_surface(m_winmgr, surfaceid, framerate);
+    ICO_DBG("called: ico_window_mgr_map_surface(surfaceid=0x%08X framerate=%d file=%s)",
+            surfaceid, framerate, filepath ? filepath : "(null)");
+    // currently GENIVI genivi-shell not support contents change, so use ico_window_mgr
+    if ((filepath != NULL) && (*filepath != 0) && (*filepath != ' '))   {
+        ico_window_mgr_map_surface(m_winmgr, surfaceid, framerate, filepath);
+    }
+    else    {
+        ico_window_mgr_map_surface(m_winmgr, surfaceid, framerate, " ");
+    }
 }
 
 //--------------------------------------------------------------------------
-/** 
+/**
  *  @brief   wrapper function of ico_window_mgr_unmap_surface
- *  
+ *
  *  @param [in] surface     id of wayland surface
  */
 //--------------------------------------------------------------------------
@@ -377,127 +398,65 @@ CicoSCWlWinMgrIF::unmapSurface(uint32_t surfaceid)
 {
     ICO_DBG("called: ico_window_mgr_unmap_surface"
             "(surfaceid=0x%08X)", surfaceid);
+    // currently GENIVI genivi-shell not support contents change, so use ico_window_mgr
     ico_window_mgr_unmap_surface(m_winmgr, surfaceid);
 }
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wayland surface create callback
- *  
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] winname         surface window name(title)
- *  @param [in] pid             wayland client process Id
- *  @param [in] appid           wayland client application Id
- *  @param [in] layertype       surface layer type
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::createdCB(void                  *data,
-                            struct ico_window_mgr *ico_window_mgr,
-                            uint32_t              surfaceid,
-                            const char            *winname,
-                            int32_t               pid,
-                            const char            *appid,
-                            int32_t               layertype)
-{
-    ICO_WRN("CicoSCWlWinMgrIF::createdCB called.");
-}
-
-//--------------------------------------------------------------------------
 /**
- *  @brief  wayland change surface name callback
+ *  @brief   get creation surface window name(title) and pid
  *
- * @param [in] data            user data(unused)
- * @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- * @param [in] surfaceid       ico_window_mgr surface Id
- * @param [in] winname         surface window name(title)
+ *  @param [in]  id_surface surface id
+ *  @param [out] pid        application process id
  */
 //--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::nameCB(void                  *data,
-                         struct ico_window_mgr *ico_window_mgr,
-                         uint32_t              surfaceid,
-                         const char            *winname)
+const char *
+CicoSCWlWinMgrIF::wlIviCtrlGetSurfaceWaiting(uint32_t id_surface, int *pid)
 {
-    ICO_WRN("CicoSCWlWinMgrIF::nameCB called.");
+    struct creation_surface_wait    *tp = m_wait_surface_creation;
+
+    while (tp)   {
+        if (tp->id_surface == id_surface)   {
+            ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlGetSurfaceWaiting(%x) pid=%d title=<%s>",
+                    id_surface, tp->pid, tp->title);
+            *pid = tp->pid;
+            return tp->title;
+        }
+        tp = tp->next;
+    }
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlGetSurfaceWaiting(%x) dose not exist", id_surface);
+    return NULL;
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland surface destroy callback
+ *  @brief   remove surface window
  *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
+ *  @param [in]  id_surface surface id
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::destroyedCB(void                  *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t              surfaceid)
+CicoSCWlWinMgrIF::wlIviCtrlRemoveSurface(uint32_t id_surface)
 {
-    ICO_WRN("CicoSCWlWinMgrIF::destroyedCB called.");
-}
+    struct creation_surface_wait    *tp = m_wait_surface_creation;
+    struct creation_surface_wait    *bp = NULL;
 
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland surface visible callback
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] visible         surface visible
- *                              (1=visible/0=invisible/other=no change)
- *  @param [in] raise           surface raise
- *                              (1=raise/0=lower/other=no change)
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::visibleCB(void                  *data,
-                            struct ico_window_mgr *ico_window_mgr,
-                            uint32_t              surfaceid,
-                            int32_t               visible,
-                            int32_t               raise,
-                            int32_t               hint)
-{
-    ICO_WRN("CicoSCWlWinMgrIF::visibleCB called.");
-}
+    while (tp)   {
+        if (tp->id_surface == id_surface)   {
+            if (bp) {
+                bp->next = tp->next;
+            }
+            else    {
+                m_wait_surface_creation = tp->next;
+            }
+            tp->next = m_free_surface_creation;
+            m_free_surface_creation = tp;
 
-//--------------------------------------------------------------------------
-/**
- *  @brief  wayland surface configure callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] node            surface node Id
- *  @param [in] layertype       surface layer type
- *  @param [in] layer           surface layer Id
- *  @param [in] x               surface upper-left X coordinate
- *  @param [in] y               surface upper-left Y coordinate
- *  @param [in] width           surface width
- *  @param [in] height          surface height
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::configureCB(void                  *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t              surfaceid,
-                              uint32_t              node,
-                              int32_t               layertype,
-                              uint32_t              layer,
-                              int32_t               x,
-                              int32_t               y,
-                              int32_t               width,
-                              int32_t               height,
-                              int32_t               hint)
-{
-    ICO_WRN("CicoSCWlWinMgrIF::configureCB called.");
+            ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlRemoveSurface(%x) removed", id_surface);
+            return;
+        }
+    }
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlRemoveSurface(%x) dose not exist", id_surface);
 }
 
 //--------------------------------------------------------------------------
@@ -507,62 +466,21 @@ CicoSCWlWinMgrIF::configureCB(void                  *data,
  *  @param [in] data            user data(unused)
  *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
  *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] active          surface active
- *                              (1=active/0=not active)
+ *  @param [in] select          select device(unused)
+ *                              (0=not active/1=pointer/2=touch)
  */
 //--------------------------------------------------------------------------
 void
 CicoSCWlWinMgrIF::activeCB(void                  *data,
                            struct ico_window_mgr *ico_window_mgr,
                            uint32_t              surfaceid,
-                           int32_t               active)
+                           int32_t               select)
 {
     ICO_WRN("CicoSCWlWinMgrIF::activeCB called.");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland layer visible callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] layer           layer Id
- *  @param [in] visible         layer visible
- *                              (1=visible/0=invisible/other=no change)
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::layerVisibleCB(void                  *data,
-                                 struct ico_window_mgr *ico_window_mgr,
-                                 uint32_t              layer,
-                                 int32_t               visible)
-{
-    ICO_WRN("CicoSCWlWinMgrIF::layerVisibleCB called.");
-}
-
-//--------------------------------------------------------------------------
-/**
- *  @brief  query application surface callback
- *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] appid           application Id
- *  @param [in] pid             process Id
- *  @param [in] surface         surface Id array
- */
-//--------------------------------------------------------------------------
-void
-CicoSCWlWinMgrIF::appSurfacesCB(void                  *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                const char            *appid,
-                                int32_t               pid,
-                                struct wl_array       *surfaces)
-{
-    ICO_WRN("CicoSCWlWinMgrIF::appSurfacesCB called.");
-}
-
-//--------------------------------------------------------------------------
-/**
  *  @brief   surface map event callback
  *
  *  @param [in] data            user data(unused)
@@ -570,7 +488,6 @@ CicoSCWlWinMgrIF::appSurfacesCB(void                  *data,
  *  @param [in] event           event
  *  @param [in] surfaceid       surface Id
  *  @param [in] type            surface buffer type(EGL buffer/Shared memory)
- *  @param [in] target          surface buffer target(EGL buffer name)
  *  @param [in] width           surface width
  *  @param [in] height          surface height
  *  @param [in] stride          surface buffer(frame buffer) stride
@@ -583,7 +500,6 @@ CicoSCWlWinMgrIF::mapSurfaceCB(void                  *data,
                                int32_t               event,
                                uint32_t              surfaceid,
                                uint32_t              type,
-                               uint32_t              target,
                                int32_t               width,
                                int32_t               height,
                                int32_t               stride,
@@ -644,6 +560,23 @@ CicoSCWlWinMgrIF::outputModeCB(void             *data,
                                int32_t          refresh)
 {
     ICO_WRN("CicoSCWlWinMgrIF::outputModeCB called.");
+};
+
+//--------------------------------------------------------------------------
+/**
+ *  @brief   wayland genivi ivi-surface create callback
+ *
+ *  @param [in] data            user data(unused)
+ *  @param [in] ivi_controller  wayland ivi-controller plugin interface
+ *  @param [in] id_surface      surface id
+ */
+//--------------------------------------------------------------------------
+void
+CicoSCWlWinMgrIF::createSurfaceCB(void                  *data,
+                                  struct ivi_controller *ivi_controller,
+                                  uint32_t id_surface)
+{
+    ICO_WRN("CicoSCWlWinMgrIF::createSurfaceCB called.");
 }
 
 //==========================================================================
@@ -651,368 +584,419 @@ CicoSCWlWinMgrIF::outputModeCB(void             *data,
 //==========================================================================
 
 //--------------------------------------------------------------------------
-/** 
- *  @brief   wayland surface create callback
- *  
+/**
+ *  @brief  wayland surface active callback
+ *
  *  @param [in] data            user data(unused)
  *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
  *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] winname         surface window name(title)
- *  @param [in] pid             wayland client process Id
- *  @param [in] appid           wayland client application Id
- *  @param [in] layertype       surface layer type
+ *  @param [in] select          select device(unused)
+ *                              (0=not active/1=pointer/2=touch)
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlCreatedCB(void                  *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t              surfaceid,
-                              const char            *winname,
-                              int32_t               pid,
-                              const char            *appid,
-                              int32_t               layertype)
+CicoSCWlWinMgrIF::wlActiveCB(void                  *data,
+                             struct ico_window_mgr *ico_window_mgr,
+                             uint32_t              surfaceid,
+                             int32_t               select)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlCreatedCB Enter");
+//    ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Enter");
+
     if (NULL == data) {
-        ICO_WRN("wlCreatedCB : data is null");
+        ICO_WRN("wlActiveCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->createdCB(data, ico_window_mgr,
-                                                    surfaceid, winname,
-                                                    pid, appid, layertype);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlCreatedCB Leave");
+    static_cast<CicoSCWlWinMgrIF*>(data)->activeCB(data, ico_window_mgr,
+                                                   surfaceid, select);
+//    ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland change surface name callback
+ *  @brief   surface map event callback
  *
- * @param [in] data            user data(unused)
- * @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- * @param [in] surfaceid       ico_window_mgr surface Id
- * @param [in] winname         surface window name(title)
+ *  @param [in] data            user data
+ *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
+ *  @param [in] event           event
+ *  @param [in] surfaceid       surface Id
+ *  @param [IN] type            buffer type(fixed ICO_WINDOW_MGR_MAP_TYPE_EGL)
+ *  @param [in] width           surface width
+ *  @param [in] height          surface height
+ *  @param [in] stride          surface buffer(frame buffer) stride
+ *  @param [in] format          surface buffer format
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlNameCB(void                  *data,
-                           struct ico_window_mgr *ico_window_mgr,
-                           uint32_t              surfaceid,
-                           const char            *winname)
+CicoSCWlWinMgrIF::wlMapSurfaceCB(void                  *data,
+                                 struct ico_window_mgr *ico_window_mgr,
+                                 int32_t               event,
+                                 uint32_t              surfaceid,
+                                 uint32_t              type,
+                                 int32_t               width,
+                                 int32_t               height,
+                                 int32_t               stride,
+                                 uint32_t              format)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlNameCB Enter");
+//    ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Enter");
 
     if (NULL == data) {
-        ICO_WRN("wlNameCB: data is null");
+        ICO_WRN("wlMapSurfaceCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->nameCB(data, ico_window_mgr,
-                                                 surfaceid, winname);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlNameCB Leave");
+    static_cast<CicoSCWlWinMgrIF*>(data)->mapSurfaceCB(data, ico_window_mgr,
+                                                       event, surfaceid,
+                                                       type,
+                                                       width, height,
+                                                       stride, format);
+//    ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland surface destroy callback
+ *  @brief   wayland display attribute callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
+ *  @param [in] wl_output       wayland wl_output interface
+ *  @param [in] x               display upper-left X coordinate
+ *  @param [in] y               display upper-left Y coordinate
+ *  @param [in] physical_width  display physical width
+ *  @param [in] physical_height display physical height
+ *  @param [in] subpixel        display sub pixel
+ *  @param [in] make            display maker
+ *  @param [in] model           display model
+ *  @param [in] transform       transform
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlDestroyedCB(void                  *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                uint32_t              surfaceid)
+CicoSCWlWinMgrIF::wlOutputGeometryCB(void             *data,
+                                     struct wl_output *wl_output,
+                                     int32_t          x,
+                                     int32_t          y,
+                                     int32_t          physical_width,
+                                     int32_t          physical_height,
+                                     int32_t          subpixel,
+                                     const char       *make,
+                                     const char       *model,
+                                     int32_t          transform)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlDestroyedCB Enter");
+//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Enter");
 
     if (NULL == data) {
-        ICO_WRN("wlDestroyedCB: data is null");
+        ICO_WRN("wlOutputGeometryCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->destroyedCB(data, ico_window_mgr,
-                                                      surfaceid);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlDestroyedCB Leave");
+    static_cast<CicoSCWlWinMgrIF*>(data)->outputGeometryCB(data, wl_output,
+                                                           x, y,
+                                                           physical_width,
+                                                           physical_height,
+                                                           subpixel,
+                                                           make,
+                                                           model,
+                                                           transform);
+//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland surface visible callback
+ *  @brief  wayland display mode callback
  *
- *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] visible         surface visible
- *                              (1=visible/0=invisible/other=no change)
- *  @param [in] raise           surface raise
- *                              (1=raise/0=lower/other=no change)
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
+ *  @param [in] data        user data(unused)
+ *  @param [in] wl_output   wayland wl_output interface
+ *  @param [in] flags       flags
+ *  @param [in] width       display width
+ *  @param [in] height      display height
+ *  @param [in] refresh     display refresh rate
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlVisibleCB(void                  *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t              surfaceid,
-                              int32_t               visible,
-                              int32_t               raise,
-                              int32_t               hint)
+CicoSCWlWinMgrIF::wlOutputModeCB(void             *data,
+                                 struct wl_output *wl_output,
+                                 uint32_t         flags,
+                                 int32_t          width,
+                                 int32_t          height,
+                                 int32_t          refresh)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlVisibleCB Enter");
+//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Enter");
 
     if (NULL == data) {
-        ICO_WRN("wlVisibleCB: data is null");
+        ICO_WRN("wlOutputGeometryCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->visibleCB(data, ico_window_mgr,
-                                                    surfaceid, visible,
-                                                    raise, hint);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlVisibleCB Leave");
+    static_cast<CicoSCWlWinMgrIF*>(data)->outputModeCB(data, wl_output, flags,
+                                                       width, height, refresh);
+//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland surface configure callback
+ *  @brief  wayland ivi-shell ivi-application protocol error callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] node            surface node Id
- *  @param [in] layertype       surface layer type
- *  @param [in] layer           surface layer Id
- *  @param [in] x               surface upper-left X coordinate
- *  @param [in] y               surface upper-left Y coordinate
- *  @param [in] width           surface width
- *  @param [in] height          surface height
- *  @param [in] hint            client request
- *                              (1=client request(not changed)/0=changed)
+ *  @param [in] ivi_application wayland ivi-application interface
+ *  @param [in] error_code      error code
+ *  @param [in] error_text      error message
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlConfigureCB(void                  *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                uint32_t              surfaceid,
-                                uint32_t              node,
-                                int32_t               layertype,
-                                uint32_t              layer,
-                                int32_t               x,
-                                int32_t               y,
-                                int32_t               width,
-                                int32_t               height,
-                                int32_t               hint)
+CicoSCWlWinMgrIF::wlIviAppErrorCB(void *data,
+                                 struct ivi_application *ivi_application,
+                                 int32_t error_code, const char *error_text)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlConfigureCB Enter");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviAppErrorCB: Enter(%d,%s)",
+            error_code, error_text ? error_text : "(null)");
 
     if (NULL == data) {
-        ICO_WRN("wlConfigureCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviAppErrorCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->configureCB(data, ico_window_mgr,
-                                                      surfaceid, node, layertype,
-                                                      layer, x, y, width, height,
-                                                      hint);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlConfigureCB Leave");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviAppErrorCB: Leave");
 }
+
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland surface active callback
+ *  @brief  wayland ivi-shell ivi-application protocol create wl_surface callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] surfaceid       ico_window_mgr surface Id
- *  @param [in] active          surface active
- *                              (1=active/0=not active)
+ *  @param [in] ivi_application wayland ivi-application interface
+ *  @param [in] pid             application process id
+ *  @param [in] title           surface title name
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlActiveCB(void                  *data,
-                             struct ico_window_mgr *ico_window_mgr,
-                             uint32_t              surfaceid,
-                             int32_t               active)
+CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB(void *data,
+                                            struct ivi_application *ivi_application,
+                                            int32_t pid, const char *title)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Enter");
+    struct creation_surface_wait    *tp;
+    struct creation_surface_wait    *bp;
+    uint32_t        nowtime;
+
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Enter(%d,<%s>)",
+            pid, title ? title : "(null)");
 
     if (NULL == data) {
-        ICO_WRN("wlActiveCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->activeCB(data, ico_window_mgr,
-                                                   surfaceid, active);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlActiveCB Leave");
+
+    // bind wl_surface to ivi_surface
+    ivi_controller_get_native_handle(m_ivi_ctrl, pid, title ? title : "");
+
+    // save pid and title(window name)
+    nowtime = (time(NULL) >> 2) & 0x3fffffff;
+    tp = m_wait_surface_creation;
+    while (tp)  {
+        if ((tp->pid == pid) && (tp->title[0] == 0))    break;
+        tp = tp->next;
+    }
+    if (! tp)   {
+        tp = m_free_surface_creation;
+        if (tp)  {
+            m_free_surface_creation = tp->next;
+        }
+        else    {
+            tp = m_wait_surface_creation;
+            bp = NULL;
+            while (tp)  {
+                if (((nowtime >= tp->create_time)
+                         && ((nowtime - tp->create_time) > 15)) ||
+                    ((nowtime < tp->create_time)
+                         && ((nowtime + 0x40000000 - tp->create_time) > 15)))   {
+                    if (bp) {
+                        bp->next = tp->next;
+                    }
+                    else    {
+                        m_wait_surface_creation = tp->next;
+                    }
+                    break;
+                }
+                bp = tp;
+                tp = tp->next;
+            }
+            if (! tp)   {
+                tp = (struct creation_surface_wait *)
+                       malloc(sizeof(struct creation_surface_wait));
+                if (! tp)    {
+                    ICO_ERR("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: out of memory");
+                    return;
+                }
+            }
+        }
+        memset(tp, 0, sizeof(struct creation_surface_wait));
+        tp->next = m_wait_surface_creation;
+        m_wait_surface_creation = tp;
+    }
+    tp->pid = pid;
+    strncpy(tp->title, title, ICO_SYC_MAX_WINNAME_LEN-1);
+    tp->create_time = nowtime;
+
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviAppNativeShellInfoCB: Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland layer visible callback
+ *  @brief  wayland ivi-shell ivi-controller protocol create screen callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] layer           layer Id
- *  @param [in] visible         layer visible
- *                              (1=visible/0=invisible/other=no change)
+ *  @param [in] ivi_controller  wayland ivi-controller interface
+ *  @param [in] id_screen       screen id
+ *  @param [in] screen          screen information
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlLayerVisibleCB(void                  *data,
-                                   struct ico_window_mgr *ico_window_mgr,
-                                   uint32_t              layer,
-                                   int32_t               visible)
+CicoSCWlWinMgrIF::wlIviCtrlScreenCB(void *data,
+                                    struct ivi_controller *ivi_controller,
+                                    uint32_t id_screen,
+                                    struct ivi_controller_screen *screen)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlLayerVisibleCB Enter");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlScreenCB: Enter(%x)", id_screen);
 
     if (NULL == data) {
-        ICO_WRN("wlLayerVisibleCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlScreenCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->layerVisibleCB(data, ico_window_mgr,
-                                                         layer, visible);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlLayerVisibleCB Leave");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlScreenCB: Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  query application surface callback
+ *  @brief  wayland ivi-shell ivi-controller protocol create layer callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] appid           application Id
- *  @param [in] pid             process Id
- *  @param [in] surface         surface Id array
+ *  @param [in] ivi_controller  wayland ivi-controller interface
+ *  @param [in] id_layer        layer id
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlAppSurfacesCB(void                  *data,
-                                  struct ico_window_mgr *ico_window_mgr,
-                                  const char            *appid,
-                                  int32_t               pid,
-                                  struct wl_array       *surfaces)
+CicoSCWlWinMgrIF::wlIviCtrlLayerCB(void *data,
+                                   struct ivi_controller *ivi_controller,
+                                   uint32_t id_layer)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlAppSurfacesCB Enter");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlLayerCB: Enter(%x)", id_layer);
 
     if (NULL == data) {
-        ICO_WRN("wlAppSurfacesCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlLayerCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->appSurfacesCB(data, ico_window_mgr,
-                                                        appid, pid, surfaces);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlAppSurfacesCB Leave");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlLayerCB: Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief   surface map event callback
+ *  @brief  wayland ivi-shell ivi-controller protocol create surface callback
  *
- *  @param [in] data            user data
- *  @param [in] ico_window_mgr  wayland ico_window_mgr plugin interface
- *  @param [in] event           event
- *  @param [in] surfaceid       surface Id
- *  @param [IN] type            buffer type(fixed ICO_WINDOW_MGR_MAP_TYPE_EGL)
- *  @param [IN] target          EGL buffer name
- *  @param [in] width           surface width
- *  @param [in] height          surface height
- *  @param [in] stride          surface buffer(frame buffer) stride
- *  @param [in] format          surface buffer format
+ *  @param [in] data            user data(unused)
+ *  @param [in] ivi_controller  wayland ivi-controller interface
+ *  @param [in] id_surface      surface id
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlMapSurfaceCB(void                  *data,
-                                 struct ico_window_mgr *ico_window_mgr,
-                                 int32_t               event,
-                                 uint32_t              surfaceid,
-                                 uint32_t              type,
-                                 uint32_t              target,
-                                 int32_t               width,
-                                 int32_t               height,
-                                 int32_t               stride,
-                                 uint32_t              format)
+CicoSCWlWinMgrIF::wlIviCtrlSurfaceCB(void *data,
+                                     struct ivi_controller *ivi_controller,
+                                     uint32_t id_surface)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Enter");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlSurfaceCB: Enter(%x)", id_surface);
 
     if (NULL == data) {
-        ICO_WRN("wlMapSurfaceCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlSurfaceCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->mapSurfaceCB(data, ico_window_mgr,
-                                                       event, surfaceid,
-                                                       type, target,
-                                                       width, height,
-                                                       stride, format);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlMapSurfaceCB Leave");
+
+    static_cast<CicoSCWlWinMgrIF*>(data)->createSurfaceCB(data, ivi_controller, id_surface);
+
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlSurfaceCB: Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief   wayland display attribute callback
+ *  @brief  wayland ivi-shell ivi-controller protocol error callback
  *
  *  @param [in] data            user data(unused)
- *  @param [in] wl_output       wayland wl_output interface
- *  @param [in] x               display upper-left X coordinate
- *  @param [in] y               display upper-left Y coordinate
- *  @param [in] physical_width  display physical width
- *  @param [in] physical_height display physical height
- *  @param [in] subpixel        display sub pixel
- *  @param [in] make            display maker
- *  @param [in] model           display model
- *  @param [in] transform       transform
+ *  @param [in] ivi_controller  wayland ivi-controller interface
+ *  @param [in] error_code      error code
+ *  @param [in] error_text      error message
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlOutputGeometryCB(void             *data,
-                                     struct wl_output *wl_output,
-                                     int32_t          x,
-                                     int32_t          y,
-                                     int32_t          physical_width,
-                                     int32_t          physical_height,
-                                     int32_t          subpixel,
-                                     const char       *make,
-                                     const char       *model,
-                                     int32_t          transform)
+CicoSCWlWinMgrIF::wlIviCtrlErrorCB(void *data,
+                                   struct ivi_controller *ivi_controller,
+                                   int32_t object_id, int32_t object_type,
+                                   int32_t error_code, const char *error_text)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Enter");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: Enter(%d[%d],%d,<%s>)",
+            object_id, object_type, error_code, error_text ? error_text : "(null)");
 
     if (NULL == data) {
-        ICO_WRN("wlOutputGeometryCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->outputGeometryCB(data, wl_output,
-                                                           x, y,
-                                                           physical_width,
-                                                           physical_height,
-                                                           subpixel,
-                                                           make,
-                                                           model,
-                                                           transform);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputGeometryCB Leave");
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlErrorCB: Leave");
 }
 
 //--------------------------------------------------------------------------
 /**
- *  @brief  wayland display mode callback
+ *  @brief  wayland ivi-shell ivi-controller protocol error callback
  *
- *  @param [in] data        user data(unused)
- *  @param [in] wl_output   wayland wl_output interface
- *  @param [in] flags       flags
- *  @param [in] width       display width
- *  @param [in] height      display height
- *  @param [in] refresh     display refresh rate
+ *  @param [in] data            user data(unused)
+ *  @param [in] ivi_controller  wayland ivi-controller interface
+ *  @param [in] error_code      error code
+ *  @param [in] error_text      error message
  */
 //--------------------------------------------------------------------------
 void
-CicoSCWlWinMgrIF::wlOutputModeCB(void             *data,
-                                 struct wl_output *wl_output,
-                                 uint32_t         flags,
-                                 int32_t          width,
-                                 int32_t          height,
-                                 int32_t          refresh)
+CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB(void *data,
+                                          struct ivi_controller *ivi_controller,
+                                          struct wl_surface *surface)
 {
-//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Enter");
+    uint32_t                        id_surface;
+    struct creation_surface_wait    *tp;
+
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Enter(surface=%08x)", (int)surface);
 
     if (NULL == data) {
-        ICO_WRN("wlOutputGeometryCB: data is null");
+        ICO_WRN("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: data is null");
         return;
     }
-    static_cast<CicoSCWlWinMgrIF*>(data)->outputModeCB(data, wl_output, flags,
-                                                       width, height, refresh);
-//    ICO_TRA("CicoSCWlWinMgrIF::wlOutputModeCB Leave");
+
+    // check same surface
+    tp = m_wait_surface_creation;
+    while (tp)  {
+        if (tp->surface == surface) {
+            ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(same surface)");
+            return;
+        }
+        tp = tp->next;
+    }
+
+    // create ivi-surface and bind to wl_surface
+    m_id_surface ++;
+    if (m_id_surface >= 0x00ffffff)     m_id_surface = 1;
+    id_surface = m_id_surface | 0x40000000;
+
+    if (ivi_application_surface_create(m_ivi_app, id_surface, surface) == NULL) {
+        ICO_ERR("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: "
+                "ivi_application_surface_create(%x) Error", id_surface);
+        if (m_wait_surface_creation)    {
+            tp = m_wait_surface_creation;
+            m_wait_surface_creation = tp->next;
+            tp->next = m_free_surface_creation;
+            m_free_surface_creation = tp;
+        }
+    }
+    else    {
+        tp = m_wait_surface_creation;
+        while (tp)  {
+            if (tp->id_surface == 0)    {
+                tp->id_surface = id_surface;
+                tp->surface = surface;
+                break;
+            }
+            tp = tp->next;
+        }
+        if (! tp)   {
+            ICO_ERR("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: waiting surface dose not exist");
+        }
+    }
+    ICO_TRA("CicoSCWlWinMgrIF::wlIviCtrlNativeHandleCB: Leave(id_surface=%08x)", id_surface);
 }
 // vim:set expandtab ts=4 sw=4:
index dab9d30..1e5671c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, TOYOTA MOTOR CORPORATION.
+ * Copyright (c) 2013-2014, TOYOTA MOTOR CORPORATION.
  *
  * This program is licensed under the terms and conditions of the
  * Apache License, version 2.0.  The full text of the Apache License is at
 #define __CICO_SC_WL_WINMGR_IF_H__
 
 #include <wayland-client.h>
+#include <ilm_client.h>
+#include <ilm_control.h>
 #include <ico_window_mgr-client-protocol.h>
+#include <ivi-controller-client-protocol.h>
+#include <ivi-application-client-protocol.h>
 
+#include "ico_syc_type.h"
 #include "CicoSCWaylandIF.h"
+#include "CicoSCWindow.h"
 
 //--------------------------------------------------------------------------
 /**
  *  @brief  This class is wayland interface of multi window manager
  */
 //--------------------------------------------------------------------------
+struct creation_surface_wait    {
+    struct creation_surface_wait    *next;
+    int32_t     pid;
+    uint32_t    id_surface;
+    struct wl_surface *surface;
+    uint32_t    create_time;
+    char        title[ICO_SYC_MAX_WINNAME_LEN];
+};
+
 class CicoSCWlWinMgrIF : public CicoSCWaylandIF {
 public:
     virtual void initInterface(void               *data,
@@ -35,64 +50,16 @@ public:
                                const char         *interface,
                                uint32_t           version);
 
-    virtual void createdCB(void *data,
-                           struct ico_window_mgr *ico_window_mgr,
-                           uint32_t surfaceid,
-                           const char *winname,
-                           int32_t pid,
-                           const char *appid,
-                           int32_t layertype);
-
-    virtual void nameCB(void *data,
-                        struct ico_window_mgr *ico_window_mgr,
-                        uint32_t surfaceid,
-                        const char *winname);
-
-    virtual void destroyedCB(void *data,
-                             struct ico_window_mgr *ico_window_mgr,
-                             uint32_t surfaceid);
-
-    virtual void visibleCB(void *data,
-                           struct ico_window_mgr *ico_window_mgr,
-                           uint32_t surfaceid,
-                           int32_t visible,
-                           int32_t raise,
-                           int32_t hint);
-
-    virtual void configureCB(void *data,
-                             struct ico_window_mgr *ico_window_mgr,
-                             uint32_t surfaceid,
-                             uint32_t node,
-                             int32_t layertype,
-                             uint32_t layer,
-                             int32_t x,
-                             int32_t y,
-                             int32_t width,
-                             int32_t height,
-                             int32_t hint);
-
     virtual void activeCB(void *data,
                           struct ico_window_mgr *ico_window_mgr,
                           uint32_t surfaceid,
-                          int32_t active);
-
-    virtual void layerVisibleCB(void *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                uint32_t layer,
-                                int32_t visible);
-
-    virtual void appSurfacesCB(void *data,
-                               struct ico_window_mgr *ico_window_mgr,
-                               const char *appid,
-                               int32_t    pid,
-                               struct wl_array *surfaces);
+                          int32_t select);
 
     virtual void mapSurfaceCB(void *data,
                               struct ico_window_mgr *ico_window_mgr,
                               int32_t event,
                               uint32_t surfaceid,
                               uint32_t type,
-                              uint32_t target,
                               int32_t width,
                               int32_t height,
                               int32_t stride,
@@ -110,12 +77,18 @@ public:
                                   const char       *model,
                                   int32_t          transform);
 
-    virtual void outputModeCB(void             *data,
-                              struct wl_output *wl_output,
-                              uint32_t         flags,
-                              int32_t          width,
-                              int32_t          height,
-                              int32_t          refresh);
+    virtual void outputModeCB(void              *data,
+                              struct wl_output  *wl_output,
+                              uint32_t          flags,
+                              int32_t           width,
+                              int32_t           height,
+                              int32_t           refresh);
+
+    virtual void createSurfaceCB(void           *data,
+                                 struct ivi_controller *ivi_controller,
+                                 uint32_t id_surface);
+
+    static void wlIviCtrlRemoveSurface(uint32_t id_surface);
 
 protected:
     // default constructor
@@ -130,11 +103,8 @@ protected:
     // copy constructor
     CicoSCWlWinMgrIF(const CicoSCWlWinMgrIF &object);
 
-    // wrapper function ico_window_mgr_declare_manager
-    void declareManager(int32_t manager);
-
     // wrapper function ico_window_mgr_set_window_layer
-    void setWindowLayer(uint32_t surfaceid, uint32_t layer);
+    void setWindowLayer(uint32_t surfaceid, uint32_t layer, uint32_t oldlayer);
 
     // wrapper function ico_window_mgr_set_positionsize
     void setPositionsize(uint32_t surfaceid, uint32_t node,
@@ -145,96 +115,39 @@ protected:
     void setVisible(uint32_t surfaceid, int32_t  visible,
                     int32_t  raise, int32_t  flags);
 
-    // wrapper function ico_window_mgr_visible_animation
-    void visibleAnimation(uint32_t surfaceid, int32_t visible,
-                          int32_t x, int32_t y,
-                          int32_t width, int32_t height);
-
     // wrapper function of ico_window_mgr_set_animation
     void setAnimation(uint32_t surfaceid, int32_t type,
                       const char *animation, int32_t time);
 
-    // wrapper function of ico_window_mgr_set_attributes
-    void setAttributes(uint32_t surfaceid, uint32_t attributes);
-
     // wrapper function of ico_window_mgr_set_active
     void setActive(uint32_t surfaceid, int32_t active);
 
     // wrapper function of ico_window_mgr_set_layer_visible
     void setLayerVisible(uint32_t layer, int32_t visible);
 
-    // wrapper function of ico_window_mgr_get_surfaces
-    void getSurfaces(const char *appid, int32_t pid);
-
-    // wrapper function of ico_window_mgr_set_map_buffer
-    void setmapBuffer(const char *shmname, int bufsize, int bufnum);
+    // wrapper function of ilm_takeSurfaceScreenshot
+    void setmapGet(int surfaceid, const char *filepath);
 
     // wrapper function of ico_window_mgr_map_surface
-    void mapSurface(uint32_t surfaceid, int32_t framerate);
+    void mapSurface(uint32_t surfaceid, int32_t framerate, const char *filepath);
 
     // wrapper function of ico_window_mgr_unmap_surface
     void unmapSurface(uint32_t surfaceid);
 
+    static const char *wlIviCtrlGetSurfaceWaiting(uint32_t id_surface, int *pid);
+
 private:
     // ico_window_mgr(Multi Window Manager) callback functions
-    static void wlCreatedCB(void                  *data,
-                            struct ico_window_mgr *ico_window_mgr,
-                            uint32_t              surfaceid,
-                            const char            *winname,
-                            int32_t               pid,
-                            const char            *appid,
-                            int32_t               layertype);
-
-    static void wlNameCB(void *data,
-                         struct ico_window_mgr *ico_window_mgr,
-                         uint32_t surfaceid,
-                         const char *winname);
-
-    static void wlDestroyedCB(void *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t surfaceid);
-
-    static void wlVisibleCB(void *data,
-                            struct ico_window_mgr *ico_window_mgr,
-                            uint32_t surfaceid,
-                            int32_t visible,
-                            int32_t raise,
-                            int32_t hint);
-
-    static void wlConfigureCB(void *data,
-                              struct ico_window_mgr *ico_window_mgr,
-                              uint32_t surfaceid,
-                              uint32_t node,
-                              int32_t layertype,
-                              uint32_t layer,
-                              int32_t x,
-                              int32_t y,
-                              int32_t width,
-                              int32_t height,
-                              int32_t hint);
-
     static void wlActiveCB(void *data,
                            struct ico_window_mgr *ico_window_mgr,
                            uint32_t surfaceid,
                            int32_t active);
 
-    static void wlLayerVisibleCB(void *data,
-                                 struct ico_window_mgr *ico_window_mgr,
-                                 uint32_t layer,
-                                 int32_t visible);
-
-    static void wlAppSurfacesCB(void *data,
-                                struct ico_window_mgr *ico_window_mgr,
-                                const char *appid,
-                                int32_t    pid,
-                                struct wl_array *surfaces);
-
     static void wlMapSurfaceCB(void *data,
                                struct ico_window_mgr *ico_window_mgr,
                                int32_t event,
                                uint32_t surfaceid,
                                uint32_t type,
-                               uint32_t target,
                                int32_t width,
                                int32_t height,
                                int32_t stride,
@@ -259,6 +172,39 @@ private:
                                int32_t          height,
                                int32_t          refresh);
 
+    static void wlIviAppErrorCB(void                    *data,
+                                struct ivi_application  *ivi_application,
+                                int32_t                 error_code,
+                                const char              *error_text);
+
+    static void wlIviAppNativeShellInfoCB(void          *data,
+                                          struct ivi_application *ivi_application,
+                                          int32_t       pid,
+                                          const char    *title);
+    static void wlIviCtrlScreenCB(void                  *data,
+                                  struct ivi_controller *ivi_controller,
+                                  uint32_t              id_screen,
+                                  struct ivi_controller_screen *screen);
+
+    static void wlIviCtrlLayerCB(void                   *data,
+                                 struct ivi_controller  *ivi_controller,
+                                 uint32_t               id_layer);
+
+    static void wlIviCtrlSurfaceCB(void                 *data,
+                                   struct ivi_controller *ivi_controller,
+                                   uint32_t             id_surface);
+
+    static void wlIviCtrlErrorCB(void                   *data,
+                                 struct ivi_controller  *ivi_controller,
+                                 int32_t                object_id,
+                                 int32_t                object_type,
+                                 int32_t                error_code,
+                                 const char             *error_text);
+
+    static void wlIviCtrlNativeHandleCB(void            *data,
+                                        struct ivi_controller *ivi_controller,
+                                        struct wl_surface *surface);
+
 protected:
     // ico_window_mgr listener
     struct ico_window_mgr_listener m_listener;
@@ -266,12 +212,30 @@ protected:
     // wayland output listener
     struct wl_output_listener m_wlOutputListener;
 
+    // genivi ivi-application listener
+    struct ivi_application_listener m_ivi_app_listener;
+
+    // genivi ivi-controller listener
+    struct ivi_controller_listener m_ivi_ctrl_listener;
+
     // Wayland's Window Manager PlugIn instance
-    struct ico_window_mgr *m_winmgr;
+    static struct ico_window_mgr *m_winmgr;
+
+    // Wayland's genivi ivi_application instance
+    static struct ivi_application *m_ivi_app;
+
+    // Wayland's genivi ivi_controller instance
+    static struct ivi_controller *m_ivi_ctrl;
 
     // wayland output instance
-    struct wl_output *m_wloutput;
+    static struct wl_output *m_wloutput;
+
+    // surface id for wayland/weston applications
+    static int m_id_surface;
 
+    // creation surface title name
+    static struct creation_surface_wait *m_wait_surface_creation;
+    static struct creation_surface_wait *m_free_surface_creation;
 };
 #endif  // __CICO_SC_WL_WINMGR_IF_H__
 // vim:set expandtab ts=4 sw=4:
index dff2a04..f3c04ac 100644 (file)
@@ -52,6 +52,7 @@ libico_system_controller_la_CPPFLAGS =        \
        @MURPHYRESOURCE_CFLAGS@                         \
        @EDBUS_CFLAGS@                                          \
        $(UWS_CFLAGS)                                           \
+       $(GENIVI_CFLAGS)                                        \
        $(WESTONPLUGIN_CFLAGS)                          \
        -I../../include                                         \
        -I../common                                                     \
@@ -75,6 +76,7 @@ libico_system_controller_la_LIBADD =  \
        @MURPHYRESOURCE_LIBS@                           \
        @EDBUS_LIBS@                                            \
        $(UWS_LIBS)                                                     \
+       $(GENIVI_LIBS)                                          \
        $(WESTONPLUGIN_LIBS)
 
 AM_LDFLAGS = -module -avoid-version -rpath $(libdir)
index 2a5daff..e407551 100644 (file)
@@ -1,14 +1,14 @@
 Name:       ico-uxf-homescreen
 Summary:    Sample homescreen and system controller
-Version:    0.9.14
+Version:    0.9.21
 Release:    1.1
 Group:         Graphics & UI Framework/Automotive UI
 License:    Apache-2.0
 URL:        ""
 Source0:    %{name}-%{version}.tar.bz2
 
-BuildRequires: pkgconfig(wayland-client) >= 1.2
-BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.09
+BuildRequires: pkgconfig(wayland-client) >= 1.4
+BuildRequires: ico-uxf-weston-plugin-devel >= 0.9.21
 BuildRequires: pkgconfig(glib-2.0)
 BuildRequires: pkgconfig(ecore)
 BuildRequires: pkgconfig(ecore-wayland)
@@ -33,10 +33,12 @@ BuildRequires: pkgconfig(murphy-resource)
 BuildRequires: pkgconfig(notification)
 BuildRequires: boost-devel
 BuildRequires: mesa-devel
-BuildRequires: ico-uxf-utilities-devel >= 0.9.06
-Requires: weston >= 1.2
-Requires: ico-uxf-weston-plugin >= 0.9.09
-Requires: ico-uxf-utilities >= 0.9.06
+BuildRequires: genivi-shell
+BuildRequires: ico-uxf-utilities-devel >= 0.9.07
+Requires: weston >= 1.4
+Requires: genivi-shell
+Requires: ico-uxf-weston-plugin >= 0.9.21
+Requires: ico-uxf-utilities >= 0.9.07
 
 %description
 Sample homescreen application and system controller daemon
index d8caf55..cad7f3c 100644 (file)
@@ -116,23 +116,7 @@ CicoHSAppControl::handleCommand(const CicoHSCommand * cmd)
         TerminateApp(it->m_appid);
         break;
     case MSG_CMD_WIN_CHANGE:
-# if 0
-        while( it != opt->arg.end() ) {
-            if ((it->m_appid).empty() == true) {
-                ret =  GetAppId(it->m_pid, it->m_appid);
-                if (ret != 0) {
-                    ++it;
-                    continue;
-                }
-            }
-            // change application window
-            WinChangeApp(it->m_appid, it->m_zone, it->m_visible);
-            ++it;
-        }
-#else
         WinChgControl(opt->arg);
-#endif
-
         break;
     default:
         ICO_WRN("Unknown Command(0x%08X)", cmd->cmdid);
@@ -165,7 +149,7 @@ CicoHSAppControl::GetAppId(int pid, string& appid)
         ICO_TRA("aul items not find");
         return -1;
     }
-    appid = aul->m_appid; 
+    appid = aul->m_appid;
     return 0;
 
     ICO_TRA("CicoHSAppControl::GetAppId Leave");
index bc3eb47..61565ad 100644 (file)
@@ -375,9 +375,7 @@ void CicoHSAppHistoryExt::activeApp(const char* appid)
 {
     ICO_DBG("start %s", appid);
     if (true == m_waitSelApp.empty()) {
-#if 1
         moveHistoryHead(appid);
-#endif
         ICO_DBG("end current none");
         return;
     }
@@ -388,11 +386,9 @@ void CicoHSAppHistoryExt::activeApp(const char* appid)
         return;
     }
     ICO_DBG("end  no match select app(%s)", m_waitSelApp.c_str());
-#if 1
     if (true == moveHistoryHead(appid)) {
         m_waitSelApp.clear();
     }
-#endif
     return;
 }
 
@@ -470,7 +466,7 @@ bool CicoHSAppHistoryExt::moveHistoryHead(const string& app)
 }
 
 /**
- * @breief update appid 
+ * @breief update appid
  * @param pid
  * @param appid  update appid store string
  * @param aulstt value is AUL_R_OK then no update
@@ -690,16 +686,6 @@ bool CicoHSAppHistoryExt::update_pairPidAppid(string& appid)
 void CicoHSAppHistoryExt::update_appid()
 {
     ICO_DBG("start");
-#if 0
-    list<string>::iterator his_appid = m_appHistoryList.begin();
-    while (his_appid != m_appHistoryList.end()) {
-        string appid = *his_appid;
-        if (true == update_pairPidAppid(appid)) {
-            *his_appid = appid;
-        }
-        ++his_appid;
-    }
-#else
     vector<pairPidAppid>::iterator itV = m_vppa.begin();
     vector<int>::iterator itAS = m_aulstt.begin();
     while (itV != m_vppa.end()) {
@@ -719,7 +705,6 @@ void CicoHSAppHistoryExt::update_appid()
         ++itV;
         ++itAS;
     }
-#endif
     ICO_DBG("end");
 }
 
@@ -736,7 +721,7 @@ void CicoHSAppHistoryExt::startupCheckAdd(int pid, const std::string& appid,
     m_vpbpa.push_back(pairBoolPidAppid(false, pairPidAppid(pid, appid)));
     if (true == d) {
         m_subDispApp = appid;
-    } 
+    }
     else {
         m_lastStartupApp = appid;
     }
index dd901f3..391cfa1 100644 (file)
@@ -52,7 +52,7 @@ public:
     /// destructor
     virtual ~CicoHSCmdAppCtlOpt() {}
 
-#if 0
+#if 0           /* for debug    */
     /// dump log this class member variables
     void dump(void)
     {
@@ -86,7 +86,7 @@ public:
     void dump(void);
 
     // get arg
-    bool getArg(const boost::property_tree:: ptree& pt, std::vector<CicoHSCommandArg>& vArg); 
+    bool getArg(const boost::property_tree:: ptree& pt, std::vector<CicoHSCommandArg>& vArg);
 
     // get arg array
     bool getArgArray(const boost::property_tree:: ptree& pt, std::vector<CicoHSCommandArg>& vArg);
@@ -110,8 +110,8 @@ private:
 public:
     unsigned long       cmdid;  //!< id of command
     std::string         appid;  //!< id of application
-    int                 pid;    //!< id of pid 
-    int                 seq_no; //!< id of sequence number 
+    int                 pid;    //!< id of pid
+    int                 seq_no; //!< id of sequence number
     CicoHSCommandOption *opt;   //!< command option instance
 };
 #endif  // __CICO_HS_COMMAND_H__
index 21572d6..b08ddbb 100644 (file)
 #include <ico_window_mgr.h>
 
 /*============================================================================*/
-/* static members                                                             */
-/*============================================================================*/
-static int _CicoHSMenuTile_initialized = 0;
-struct _CicoHSMenuTile_glfunc CicoHSMenuTile::glfunc;
-char *CicoHSMenuTile::thumbmapbuffer = NULL;
-
-static void SetYinvert(Evas_Object *obj);
-
-/*============================================================================*/
 /* functions                                                                  */
 /*============================================================================*/
 /*--------------------------------------------------------------------------*/
@@ -51,69 +42,7 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
                                int page, int subpage,
                                int position, int width, int height)
 {
-    int     shmfd;
-
     ICO_TRA("CicoHSMenuTile::CicoHSMenuTile Enter");
-    if (_CicoHSMenuTile_initialized == 0)  {
-        // Initialize and setting OpenGL/EGL functions
-        ICO_DBG("CicoHSMenuTile::CicoHSMenuTile: initialize OpenGL/EGL functions");
-        _CicoHSMenuTile_initialized = 1;
-
-        CicoHSMenuTile::glfunc.egl_display
-            = eglGetDisplay((EGLNativeDisplayType)ecore_wl_display_get());
-        if (CicoHSMenuTile::glfunc.egl_display) {
-            CicoHSMenuTile::glfunc.create_image
-                = (PFNEGLCREATEIMAGEKHRPROC)eglGetProcAddress("eglCreateImageKHR");
-            CicoHSMenuTile::glfunc.image_target_texture_2d
-                = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)
-                                        eglGetProcAddress("glEGLImageTargetTexture2DOES");
-            CicoHSMenuTile::glfunc.destroy_image
-                = (PFNEGLDESTROYIMAGEKHRPROC)eglGetProcAddress("eglDestroyImageKHR");
-            if ((! CicoHSMenuTile::glfunc.create_image) ||
-                (! CicoHSMenuTile::glfunc.image_target_texture_2d) ||
-                (! CicoHSMenuTile::glfunc.destroy_image))   {
-                ICO_WRN("CicoHSMenuTile::CicoHSMenuTile: can not get EGL functions");
-                _CicoHSMenuTile_initialized = 2;
-            }
-        }
-        else    {
-            _CicoHSMenuTile_initialized = 2;
-            ICO_WRN("CicoHSMenuTile::CicoHSMenuTile: can not initialize OpenGL/EGL");
-        }
-
-        // create shared memory buffer for non EGL surface
-        CicoHSMenuTile::thumbmapbuffer = NULL;
-        shmfd = shm_open(ICO_HS_SHMBUFFER_NAME, O_RDWR|O_CREAT, 0600);
-        if (shmfd == -1)    {
-            ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not open shared memory buffer");
-            _CicoHSMenuTile_initialized = -2;
-        }
-        else    {
-            if (ftruncate(shmfd, ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM) == -1)   {
-                ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not truncate shared memory buffer");
-                _CicoHSMenuTile_initialized = -2;
-            }
-            else    {
-                CicoHSMenuTile::thumbmapbuffer = (char *)
-                                mmap(NULL, ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM,
-                                     PROT_READ|PROT_WRITE, MAP_SHARED, shmfd, 0);
-                if (CicoHSMenuTile::thumbmapbuffer == NULL) {
-                    ICO_ERR("CicoHSMenuTile::CicoHSMenuTile: can not map shared memory buffer");
-                    _CicoHSMenuTile_initialized = -2;
-                }
-                else    {
-                    memset(CicoHSMenuTile::thumbmapbuffer, 0,
-                           ICO_HS_SHMBUFFER_SIZE * ICO_HS_SHMBUFFER_NUM);
-                    ico_syc_map_buffer(ICO_HS_SHMBUFFER_NAME,
-                                       ICO_HS_SHMBUFFER_SIZE, ICO_HS_SHMBUFFER_NUM);
-                }
-            }
-            close(shmfd);
-            if (CicoHSMenuTile::thumbmapbuffer == NULL) {
-                shm_unlink(ICO_HS_SHMBUFFER_NAME);
-            }
-        }
-    }
 
     if (appid != NULL) {
         strncpy(this->appid, appid, ICO_HS_MAX_PROCESS_NAME);
@@ -129,9 +58,6 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
             appid, this->icon_image_path);
     thumb.surface = 0;
     thumb.fbcount = 0;
-    thumb.name = 0;
-    thumb.image = NULL;
-    thumb.texture = 0;
     thumb.pixel_data = NULL;
     this->page = page;
     this->subpage = subpage;
@@ -140,6 +66,10 @@ CicoHSMenuTile::CicoHSMenuTile(const char *appid,
     this->height = height;
     pos_x = GetPositionX();
     pos_y = GetPositionY();
+
+    (void) mkdir(ICO_HS_THUMB_ICODIR, 0755);
+    (void) mkdir(ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR, 0755);
+
     ICO_TRA("CicoHSMenuTile::CicoHSMenuTile Leave");
 }
 
@@ -248,21 +178,17 @@ CicoHSMenuTile::HideTermIcon(void)
 void
 CicoHSMenuTile::FreeObject(void)
 {
+    char    sWork[80];
+
     ICO_DBG("CicoHSMenuTile::FreeObject(appid=%08x<%s>)", (int)this->appid, appid);
 
     if (thumb.surface)  {
+        sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                thumb.surface);
+        (void) unlink(sWork);
         ico_syc_unmap_thumb(thumb.surface);
         thumb.surface = 0;
     }
-    if (thumb.image)    {
-        CicoHSMenuTile::glfunc.destroy_image(
-                            CicoHSMenuTile::glfunc.egl_display, thumb.image);
-        thumb.image = NULL;
-    }
-    if (thumb.texture)  {
-        glDeleteTextures(1, &thumb.texture);
-        thumb.texture = 0;
-    }
     if (tile != NULL){
         evas_object_del(tile);
         tile = NULL;
@@ -595,32 +521,32 @@ CicoHSMenuTile::ValidMenuIcon(void)
 void
 CicoHSMenuTile::ValidThumbnail(int surface)
 {
+    char    sWork[80];
+
     ICO_DBG("CicoHSMenuTile::ValidThumbnail(appid=%08x<%s>) run=%d surf=%08x",
             (int)this->appid, appid, app_running, surface);
 
     if ((! app_running) || (surface == 0))  {
         if (thumb.surface != 0) {
+            sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                    thumb.surface);
+            (void) unlink(sWork);
             ico_syc_unmap_thumb(thumb.surface);
             // delete image and texture
             if ((surface == 0) && (thumb.pixel_data))   {
                 free(thumb.pixel_data);
                 thumb.pixel_data = NULL;
             }
-            if (thumb.image)    {
-                CicoHSMenuTile::glfunc.destroy_image(
-                                    CicoHSMenuTile::glfunc.egl_display, thumb.image);
-                thumb.image = NULL;
-            }
-            if (thumb.texture)  {
-                glDeleteTextures(1, &thumb.texture);
-                thumb.texture = 0;
-            }
         }
         thumb.surface = surface;
         if (surface)    {
             app_running = true;
-            ico_syc_map_thumb(thumb.surface, menu_show ? ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW :
-                                                         ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE);
+            sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                    thumb.surface);
+            (void) unlink(sWork);
+            ico_syc_map_thumb(thumb.surface,
+                              menu_show ? ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW :
+                                          ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE, sWork);
             if (! small_icon)   {
                 small_icon = evas_object_image_filled_add(menu_evas);
                 evas_object_image_file_set(small_icon, icon_image_path, NULL);
@@ -674,17 +600,17 @@ CicoHSMenuTile::ValidThumbnail(int surface)
 void
 CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 {
-    EGLint              attribs[9];
     Evas_Object         *old_icon = icon;
     struct ico_uifw_image_buffer *pixelbuf = NULL;
-    Evas_Native_Surface nsurf;
     int                 svx, svy;
     int                 unmap;
+    int                 fd;
+    char                sWork[80];
 
     ICO_DBG("CicoHSMenuTile::SetThumbnail(appid=%08x<%s>) info=%08x surf=%08x",
             (int)this->appid, appid, (int)info, info ? info->surface : 0);
 
-    if ((info == NULL) || (info->surface == 0) || (info->name == 0))    {
+    if ((info == NULL) || (info->surface == 0)) {
         unmap = 1;
     }
     else    {
@@ -694,212 +620,124 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
                 ICO_DBG("CicoHSMenuTile::SetThumbnail: surface change(%08x->%08x)",
                         thumb.surface, info->surface);
                 ico_syc_unmap_thumb(thumb.surface);
+                sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                        thumb.surface);
+                (void) unlink(sWork);
             }
             thumb.surface = info->surface;
+            sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                    thumb.surface);
+            (void) unlink(sWork);
             ico_syc_map_thumb(thumb.surface,
                               menu_show ? ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW :
-                                          ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE);
+                                          ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE, sWork);
+        }
+        else    {
+            sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                    thumb.surface);
         }
         thumb.type = info->type;
-        thumb.name = info->name;
         thumb.width = info->width;
         thumb.height = info->height;
         thumb.stride = info->stride;
         thumb.format = info->format;
 #if 0       /* too many log */
         ICO_DBG("CicoHSMenuTile::SetThumbnail: make thumbnail %s(%08x) "
-                "type=%d name=%d w/h/s=%d/%d/%d tile w/h=%d/%d",
-                appid, thumb.surface, thumb.type, thumb.name,
+                "type=%d w/h/s=%d/%d/%d tile w/h=%d/%d",
+                appid, thumb.surface, thumb.type,
                 thumb.width, thumb.height, thumb.stride, width, height);
 #endif
-        // delete image and texture
-        if (thumb.image)    {
-            CicoHSMenuTile::glfunc.destroy_image(
-                            CicoHSMenuTile::glfunc.egl_display, thumb.image);
-            thumb.image = NULL;
-        }
-        if (thumb.texture)  {
-            glDeleteTextures(1, &thumb.texture);
-            thumb.texture = 0;
-        }
-
         if ((info->width <= 1) || (info->height <= 1))  {
             ICO_DBG("CicoHSMenuTile::SetThumbnail: small surface(%d,%d) skip",
                     info->width, info->height);
         }
         else    {
-            // create image and texture
-            if (_CicoHSMenuTile_initialized > 0)  {
-                svx = thumb_reduce_x;
-                svy = thumb_reduce_y;
-                if (thumb.width > (thumb.height + 64))  {
-                    thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                    thumb_reduce_y = height / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
-                }
-                else if (thumb.width < (thumb.height - 64)) {
-                    thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                    thumb_reduce_x = width / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
-                }
-                else    {
-                    thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
-                    thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+            // create thumbnail image
+            svx = thumb_reduce_x;
+            svy = thumb_reduce_y;
+            if (thumb.width > (thumb.height + 64))  {
+                thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                thumb_reduce_y = height / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
+            }
+            else if (thumb.width < (thumb.height - 64)) {
+                thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                thumb_reduce_x = width / ICO_HS_MENUTILE_THUMBNAIL_REDUCE_RATE;
+            }
+            else    {
+                thumb_reduce_x = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+                thumb_reduce_y = ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX;
+            }
+            if (! thumb_tile)   {
+                thumb_tile = evas_object_image_filled_add(menu_evas);
+                evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                               height - thumb_reduce_y * 2);
+                evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
+                                 pos_y + thumb_reduce_y);
+                evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_DOWN,
+                                               CicoHSMenuTouch::TouchDownMenu, appid);
+                evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_UP,
+                                               CicoHSMenuTouch::TouchUpMenu, appid);
+                ICO_DBG("CicoHSMenuTile::SetThumbnail: create thumb_tile %s "
+                        "tile=(%d+%d,%d+%d)", appid,
+                        pos_x, thumb_reduce_x, pos_y, thumb_reduce_y);
+                if (small_icon) {
+                    evas_object_move(small_icon,
+                                     pos_x + thumb_reduce_x
+                                         - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
+                                     pos_y + height - thumb_reduce_y - height
+                                         / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
+                                         + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
+                    evas_object_raise(small_icon);
                 }
-                if (! thumb_tile)   {
-                    thumb_tile = evas_object_image_filled_add(menu_evas);
-                    evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                                   height - thumb_reduce_y * 2);
-                    evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
-                                     pos_y + thumb_reduce_y);
-                    evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_DOWN,
-                                                   CicoHSMenuTouch::TouchDownMenu, appid);
-                    evas_object_event_callback_add(thumb_tile, EVAS_CALLBACK_MOUSE_UP,
-                                                   CicoHSMenuTouch::TouchUpMenu, appid);
-                    ICO_DBG("CicoHSMenuTile::SetThumbnail: create thumb_tile %s "
-                            "tile=(%d+%d,%d+%d)", appid,
-                            pos_x, thumb_reduce_x, pos_y, thumb_reduce_y);
-                    if (small_icon) {
-                        evas_object_move(small_icon,
-                                         pos_x + thumb_reduce_x
-                                             - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
-                                         pos_y + height - thumb_reduce_y - height
-                                             / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
-                                             + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
-                        evas_object_raise(small_icon);
-                    }
-                    evas_object_raise(term_icon);
+                evas_object_raise(term_icon);
+            }
+            else if ((svx != thumb_reduce_x) || (svy != thumb_reduce_y))    {
+                evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                               height - thumb_reduce_y * 2);
+                evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
+                                 pos_y + thumb_reduce_y);
+                if (small_icon) {
+                    evas_object_move(small_icon,
+                                     pos_x + thumb_reduce_x
+                                         - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
+                                     pos_y + height - thumb_reduce_y - height
+                                         / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
+                                         + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
                 }
-                else if ((svx != thumb_reduce_x) || (svy != thumb_reduce_y))    {
-                    evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                                   height - thumb_reduce_y * 2);
-                    evas_object_move(thumb_tile, pos_x + thumb_reduce_x,
-                                     pos_y + thumb_reduce_y);
-                    if (small_icon) {
-                        evas_object_move(small_icon,
-                                         pos_x + thumb_reduce_x
-                                             - ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2,
-                                         pos_y + height - thumb_reduce_y - height
-                                             / ICO_HS_MENUTILE_THUMBNAIL_REDUCTION
-                                             + ICO_HS_MENUTILE_THUMBNAIL_REDUCE_PIX2);
-                    }
+            }
+            /* read surface image pixel         */
+            int bufsize = ((thumb.width * thumb.height * 4 + 4096 - 1) / 4096) * 4095;
+            if ((! thumb.pixel_data) || (bufsize > thumb.pixel_bufsize))    {
+                if (thumb.pixel_data)   free(thumb.pixel_data);
+                thumb.pixel_data = (char *)malloc(bufsize);
+                thumb.pixel_bufsize = bufsize;
+            }
+            if (thumb.pixel_data)   {
+                fd = open(sWork, O_RDONLY, 0644);
+                if ((fd < 0) ||
+                    (read(fd, thumb.pixel_data, bufsize) <= 0)) {
+                    ICO_ERR("CicoHSMenuTile::SetThumbnail: can not read pixel file(%s)", sWork);
+                    unmap = 1;
                 }
-                if (thumb.type == ICO_WINDOW_MGR_MAP_TYPE_EGL)  {
-                    /* Intel GPU depend     */
-                    attribs[0] = EGL_WIDTH;
-                    attribs[1] = thumb.width;
-                    attribs[2] = EGL_HEIGHT;
-                    attribs[3] = thumb.height;
-                    attribs[4] = EGL_DRM_BUFFER_FORMAT_MESA;
-                    attribs[5] = EGL_DRM_BUFFER_FORMAT_ARGB32_MESA; /* support only ARGB */
-                    attribs[6] = EGL_DRM_BUFFER_STRIDE_MESA;
-                    attribs[7] = thumb.stride / 4;
-                    attribs[8] = EGL_NONE;
-
-                    thumb.image = CicoHSMenuTile::glfunc.create_image(
-                                        CicoHSMenuTile::glfunc.egl_display, EGL_NO_CONTEXT,
-                                        EGL_DRM_BUFFER_MESA,
-                                        (EGLClientBuffer)thumb.name, attribs);
-                    if (thumb.image)    {
-                        icon = thumb_tile;
-#if 0                   /* too many logs    */
-                        ICO_DBG("CicoHSMenuTile::SetThumbnail: create image = %08x",
-                                (int)thumb.image);
-#endif
-                        /* create texture from image    */
-                        thumb.texture = 0;
-                        glGenTextures(1, &thumb.texture);
-                        glBindTexture(GL_TEXTURE_2D, thumb.texture);
-                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
-                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
-                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
-                        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
-                        CicoHSMenuTile::glfunc.image_target_texture_2d(
-                                                                GL_TEXTURE_2D, thumb.image);
-#if 0                   /* too many logs    */
-                        ICO_DBG("CicoHSMenuTile::SetThumbnail: create texture = %08x",
-                                (int)thumb.texture);
-#endif
-                        /* draw texture to screen       */
-                        memset(&nsurf, 0, sizeof(nsurf));
-                        nsurf.version = EVAS_NATIVE_SURFACE_VERSION;
-                        nsurf.type = EVAS_NATIVE_SURFACE_OPENGL;
-                        nsurf.data.opengl.texture_id = thumb.texture;
-
-                        thumb.fbcount ++;
-                        if (thumb.fbcount <= 0) thumb.fbcount = 1;
-                        nsurf.data.opengl.framebuffer_id = thumb.fbcount;
-
-                        nsurf.data.opengl.internal_format = GL_BGRA_EXT;
-                        nsurf.data.opengl.format = GL_BGRA_EXT;
-                        nsurf.data.opengl.x = 0;
-                        nsurf.data.opengl.y = 0;
-                        nsurf.data.opengl.w = thumb.width;
-                        nsurf.data.opengl.h = thumb.height / 4;
-
-                        evas_object_image_native_surface_set(thumb_tile, &nsurf);
-
-                        // set Y invert to native OpenGL object (Evas bug fix)
-                        SetYinvert(thumb_tile);
-
-                        evas_object_image_data_update_add(thumb_tile,
-                                                          0, 0, thumb.width, thumb.height);
-                        evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
-                        evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                                       height - thumb_reduce_y * 2);
-                        evas_object_move(thumb_tile,
-                                         pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
-                    }
-                    else    {
-                        ICO_ERR("CicoHSMenuTile::SetThumbnail: can not create image");
-                        unmap = 1;
-                    }
+                if (fd >= 0)    {
+                    close(fd);
+                    (void) unlink(sWork);
                 }
-                else    {
-                    if ((CicoHSMenuTile::thumbmapbuffer != NULL) &&
-                        (thumb.name <= ICO_HS_SHMBUFFER_NUM))   {
-                        /* glReadPixels image   */
-#if 0                   /* too many logs    */
-                        ICO_DBG("CicoHSMenuTile::SetThumbnail: %s pixel(idx=%d) "
-                                "tile=(%d+%d,%d+%d)", appid, thumb.name,
-                                pos_x, thumb_reduce_x, pos_y, thumb_reduce_y);
-#endif
-                        pixelbuf = (struct ico_uifw_image_buffer *)
-                                       ((char *)(CicoHSMenuTile::thumbmapbuffer) +
-                                           ICO_HS_SHMBUFFER_SIZE * (thumb.name-1));
-                        if (! thumb.pixel_data) {
-                            thumb.pixel_data = (char *)
-                                malloc(ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE);
-                        }
-                        if (thumb.pixel_data)   {
-                            int bufsize = thumb.width * thumb.height * 4;
-                            if (bufsize >
-                                (ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE))   {
-                                bufsize = ICO_HS_SHMBUFFER_SIZE - ICO_UIFW_IMAGE_HEADER_SIZE;
-                            }
-                            memcpy(thumb.pixel_data, pixelbuf->image, bufsize);
-                            evas_object_image_data_update_add(
+                if (unmap == 0) {
+                    evas_object_image_data_update_add(
                                     thumb_tile, 0, 0, thumb.width, thumb.height);
-                            icon = thumb_tile;
-                            evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
-                            evas_object_image_data_set(thumb_tile, thumb.pixel_data);
-                            evas_object_image_filled_set(thumb_tile, EINA_TRUE);
-                            evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
-                                               height - thumb_reduce_y * 2);
-                            evas_object_move(thumb_tile,
-                                             pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
-                        }
-                        else    {
-                            ICO_ERR("CicoHSMenuTile::SetThumbnail: can not malloc pixel buffer");
-                            unmap = 1;
-                        }
-                    }
-                    else    {
-                        ICO_ERR("CicoHSMenuTile::SetThumbnail: not pixel buffer");
-                        unmap = 1;
-                    }
+                    icon = thumb_tile;
+                    evas_object_image_size_set(thumb_tile, thumb.width, thumb.height);
+                    evas_object_image_data_set(thumb_tile, thumb.pixel_data);
+                    evas_object_image_filled_set(thumb_tile, EINA_TRUE);
+                    evas_object_resize(thumb_tile, width - thumb_reduce_x * 2,
+                                       height - thumb_reduce_y * 2);
+                    evas_object_move(thumb_tile,
+                                     pos_x + thumb_reduce_x, pos_y + thumb_reduce_y);
                 }
             }
             else    {
-                ICO_DBG("CicoHSMenuTile::SetThumbnail: OpenGL/EGL initialize error");
+                ICO_ERR("CicoHSMenuTile::SetThumbnail: can not malloc pixel buffer");
                 unmap = 1;
             }
         }
@@ -907,24 +745,17 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 
     if (unmap > 0)  {
         ICO_DBG("CicoHSMenuTile::SetThumbnail: unmap thumbnail %08x", thumb.surface);
-        if (thumb.pixel_data)   {
-            free(thumb.pixel_data);
-            thumb.pixel_data = NULL;
-        }
         if (thumb.surface)  {
+            sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                    thumb.surface);
+            (void) unlink(sWork);
             ico_syc_unmap_thumb(thumb.surface);
-            // delete image and texture
-            if (thumb.image)    {
-                CicoHSMenuTile::glfunc.destroy_image(
-                                CicoHSMenuTile::glfunc.egl_display, thumb.image);
-                thumb.image = NULL;
-            }
-            if (thumb.texture)  {
-                glDeleteTextures(1, &thumb.texture);
-                thumb.texture = 0;
-            }
             thumb.surface = 0;
         }
+        if (thumb.pixel_data)   {
+            free(thumb.pixel_data);
+            thumb.pixel_data = NULL;
+        }
         icon = tile;
     }
 
@@ -962,314 +793,15 @@ CicoHSMenuTile::SetThumbnail(ico_syc_thumb_info_t *info)
 void
 CicoHSMenuTile::ShowMenu(bool show)
 {
+    char    sWork[80];
     menu_show = show;
     if ((thumb_tile) && (thumb.surface != 0)) {
+        sprintf(sWork, "%s/%08x.pixel", ICO_HS_THUMB_ICODIR ICO_HS_THUMB_FILEDIR,
+                thumb.surface);
+        (void) unlink(sWork);
         ico_syc_map_thumb(thumb.surface,
                           menu_show ? ICO_HS_MENUTILE_THUMBNAIL_FPS_SHOW :
-                                      ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE);
-    }
-}
-
-/*--------------------------------------------------------------------------*/
-/**
- * @brief   SetYinvert (static function)
-*           set Y invert of OpenGL native object
- *
- * @param[in]   obj         target OpenGL native object
- * @return      none
- */
-/*--------------------------------------------------------------------------*/
-static void
-SetYinvert(Evas_Object *obj)
-{
-    // inport from evas-1.7.8/src/lib/canvas/evas_object_image.c _Evas_Object_Image
-    struct local_Evas_Object_Image
-    {
-       uint32_t         magic;
-
-       struct {
-          int                  spread;
-          Evas_Coord_Rectangle fill;
-          struct {
-             short         w, h, stride;
-          } image;
-          struct {
-             short         l, r, t, b;
-             unsigned char fill;
-             double        scale;
-          } border;
-
-          Evas_Object   *source;
-          Evas_Map      *defmap;
-          const char    *file;
-          const char    *key;
-          int           frame;
-          Evas_Colorspace cspace;
-
-          unsigned char smooth_scale : 1;
-          unsigned char has_alpha :1;
-          unsigned char opaque :1;
-          unsigned char opaque_valid :1;
-       } cur, prev;
-
-       int              pixels_checked_out;
-       int              load_error;
-       Eina_List        *pixel_updates;
-
-       struct {
-          unsigned char scale_down_by;
-          double        dpi;
-          short         w, h;
-          struct {
-             short      x, y, w, h;
-          } region;
-          Eina_Bool  orientation : 1;
-       } load_opts;
-
-       struct {
-          Evas_Object_Image_Pixels_Get_Cb get_pixels;
-          void                            *get_pixels_data;
-       } func;
-
-       Evas_Video_Surface video;
-#if 0                               /* delete at evas-1.7.8-15.1    */
-       unsigned int video_caps;
-#endif
-       const char       *tmpf;
-       int              tmpf_fd;
-
-       Evas_Image_Scale_Hint   scale_hint;
-       Evas_Image_Content_Hint content_hint;
-
-       void             *engine_data;
-
-       unsigned char    changed : 1;
-       unsigned char    dirty_pixels : 1;
-       unsigned char    filled : 1;
-       unsigned char    proxyrendering : 1;
-       unsigned char    preloading : 1;
-       unsigned char    video_rendering : 1;
-       unsigned char    video_surface : 1;
-       unsigned char    video_visible : 1;
-       unsigned char    created : 1;
-       unsigned char    proxyerror : 1;
-    };
-
-    // inport from evas-1.7.8/src/lib/include/evas_common.h  _RGBA_Image_Loadopts
-    struct local_RGBA_Image_Loadopts
-    {
-       int              scale_down_by; // if > 1 then use this
-       double           dpi; // if > 0.0 use this
-       unsigned int     w, h; // if > 0 use this
-       unsigned int     degree;//if>0 there is some info related with rotation
-       struct {
-          unsigned int  x, y, w, h;
-       } region;
-
-       Eina_Bool        orientation;
-    };
-    // inport from evas-1.7.8/src/modules/engines/gl_common/evas_gl_common.h  _Evas_GL_Image
-    struct local_Evas_GL_Image
-    {
-       void *gc;
-       void *im;
-       void *tex;
-       struct local_RGBA_Image_Loadopts load_opts;
-       int              references;
-       // if im->im == NULL, it's a render-surface so these here are used
-       int              w, h;
-       struct {
-          int           space;
-          void          *data;
-          unsigned char no_free : 1;
-       } cs;
-
-       struct {
-          void          *data;
-          struct {
-             void (*bind)   (void *data, void *image);
-             void (*unbind) (void *data, void *image);
-             void (*free)   (void *data, void *image);
-             void *data;
-          } func;
-          int           yinvert;
-          int           target;
-          int           mipmap;
-          unsigned char loose : 1;
-       } native;
-
-       int scale_hint, content_hint;
-       int csize;
-
-       Eina_List        *filtered;
-
-       unsigned char    dirty : 1;
-       unsigned char    cached : 1;
-       unsigned char    alpha : 1;
-       unsigned char    tex_only : 1;
-    };
-    // inport evas-1.7.8/src/lib/include/evas_private.h  _Evas_Object
-    struct local_Evas_Object
-    {
-       EINA_INLIST;
-
-       uint32_t                 magic;
-
-       const char               *type;
-       void                     *layer;
-
-       struct {
-          Evas_Map              *map;
-          Evas_Object           *clipper;
-          Evas_Object           *mask;
-          Evas_Object           *map_parent;
-          double                scale;
-          Evas_Coord_Rectangle  geometry;
-          Evas_Coord_Rectangle  bounding_box;
-          struct {
-             struct {
-                Evas_Coord      x, y, w, h;
-                unsigned char   r, g, b, a;
-                Eina_Bool       visible : 1;
-                Eina_Bool       dirty : 1;
-             } clip;
-          } cache;
-          short                 layer;
-          struct {
-             unsigned char      r, g, b, a;
-          } color;
-          Eina_Bool             usemap : 1;
-          Eina_Bool             valid_map : 1;
-          Eina_Bool             visible : 1;
-          Eina_Bool             have_clipees : 1;
-          Eina_Bool             anti_alias : 1;
-          Evas_Render_Op        render_op : 4;
-
-          Eina_Bool             valid_bounding_box : 1;
-          Eina_Bool             cached_surface : 1;
-          Eina_Bool             parent_cached_surface : 1;
-       } cur, prev;
-
-       struct {
-          void                  *surface; // surface holding map if needed
-          int                   surface_w, surface_h; // current surface w & h alloc
-       } map;
-
-       Evas_Map                 *cache_map;
-       char                     *name;
-
-       void                     *interceptors;
-
-       struct {
-          Eina_List             *elements;
-       } data;
-
-       Eina_List                *grabs;
-
-       void                     *callbacks;
-
-       struct {
-          Eina_List             *clipees;
-          Eina_List             *changes;
-       } clip;
-
-       void *func;
-
-       void                     *object_data;
-       struct {
-          Evas_Smart            *smart;
-          Evas_Object           *parent;
-       } smart;
-
-       struct {
-          Eina_List             *proxies;
-          void                  *surface;
-          int                   w,h;
-          Eina_Bool             redraw;
-       } proxy;
-
-    #if 0 // filtering disabled
-       Evas_Filter_Info           *filter;
-    #endif
-
-       void                     *size_hints;
-
-       void                     *spans;
-
-       int                      last_mouse_down_counter;
-       int                      last_mouse_up_counter;
-       int                      mouse_grabbed;
-
-       int                      last_event;
-       Evas_Callback_Type       last_event_type;
-
-       struct {
-            int                 in_move, in_resize;
-       } doing;
-
-      /* ptr array + data blob holding all interfaces private data for
-       * this object */
-       void                     **interface_privates;
-
-       unsigned int             ref;
-
-       unsigned char            delete_me;
-
-       unsigned char            recalculate_cycle;
-       Eina_Clist               calc_entry;
-
-       Evas_Object_Pointer_Mode pointer_mode : 2;
-       Eina_Bool                store : 1;
-       Eina_Bool                pass_events : 1;
-       Eina_Bool                freeze_events : 1;
-       Eina_Bool                repeat_events : 1;
-       struct  {
-          Eina_Bool             pass_events : 1;
-          Eina_Bool             pass_events_valid : 1;
-          Eina_Bool             freeze_events : 1;
-          Eina_Bool             freeze_events_valid : 1;
-       } parent_cache;
-       Eina_Bool                restack : 1;
-       Eina_Bool                is_active : 1;
-       Eina_Bool                precise_is_inside : 1;
-       Eina_Bool                is_static_clip : 1;
-
-       Eina_Bool                render_pre : 1;
-       Eina_Bool                rect_del : 1;
-       Eina_Bool                mouse_in : 1;
-       Eina_Bool                pre_render_done : 1;
-       Eina_Bool                intercepted : 1;
-       Eina_Bool                focused : 1;
-       Eina_Bool                in_layer : 1;
-       Eina_Bool                no_propagate : 1;
-       Eina_Bool                changed : 1;
-       Eina_Bool                changed_move : 1;
-       Eina_Bool                changed_color : 1;
-       Eina_Bool                changed_map : 1;
-       Eina_Bool                changed_pchange : 1;
-       Eina_Bool                del_ref : 1;
-
-       Eina_Bool                is_frame : 1;
-       Eina_Bool                child_has_map : 1;
-    };
-
-    struct local_Evas_Object_Image  *image_obj;
-    struct local_Evas_GL_Image      *im;
-
-    image_obj = (struct local_Evas_Object_Image *)
-                (((struct local_Evas_Object *)obj)->object_data);
-
-    im = (struct local_Evas_GL_Image *)image_obj->engine_data;
-
-    // Evas old version check and revise
-    if (((int)im & 0xffff0000) == 0)    {
-        // Evas old version
-        image_obj = (struct local_Evas_Object_Image *)(((int *)image_obj) + 1);
-        im = (struct local_Evas_GL_Image *)image_obj->engine_data;
-    }
-    if (((int)im & 0xffff0000) != 0)    {
-        if (im->native.yinvert == 0)
-            im->native.yinvert = 1;
+                                      ICO_HS_MENUTILE_THUMBNAIL_FPS_HIDE, sWork);
     }
 }
 // vim: set expandtab ts=4 sw=4:
index ac3cabb..99e340f 100644 (file)
 #include <Ecore_Evas.h>
 #include <Edje.h>
 
-#include <EGL/egl.h>
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
-#include <EGL/eglext.h>
-
 #include "ico_syc_common.h"
 #include "ico_syc_winctl.h"
 #include "ico_window_mgr.h"
 #define ICO_HS_MENUTILE_THUMBNAIL_REDUCTION     4
 
 /*shared memory buffer*/
-#define ICO_HS_SHMBUFFER_NAME       "/HomeScreen_ShmBuffer"
-#define ICO_HS_SHMBUFFER_SIZE       (1920*1080*4+ICO_UIFW_IMAGE_HEADER_SIZE)
-#define ICO_HS_SHMBUFFER_NUM        (3)
-
-struct _CicoHSMenuTile_glfunc {
-    EGLDisplay  egl_display;            // EGL display
-    PFNEGLCREATEIMAGEKHRPROC            create_image;               // create image
-    PFNGLEGLIMAGETARGETTEXTURE2DOESPROC image_target_texture_2d;    // set image target
-    PFNEGLDESTROYIMAGEKHRPROC           destroy_image;              // destroy image
-};
+#define ICO_HS_THUMB_ICODIR       "/tmp/ico"
+#define ICO_HS_THUMB_FILEDIR       "/thumbnail"
+
 struct _CicoHSMenuTile_thumb {
     int         surface;                // surface id
     int         type;                   // frame buffer type
-    int         name;                   // EGL buffer name
     int         width;                  // frame buffer width
     int         height;                 // frame buff height
     int         stride;                 // frame buffer stride
     int         format;                 // frame buffer format(only EGL_TEXTURE_RGBA)
     int         fbcount;                // frame buffer change counter
-    EGLImageKHR image;                  // frame buffer image
-    GLuint      texture;                // texture id
     char        *pixel_data;            // glReadPixels data buffer
+    int         pixel_bufsize;          // data buffer size
 };
 
 class CicoHSMenuTile
@@ -142,9 +128,6 @@ class CicoHSMenuTile
     void ShowMenu(bool show);
 
   private:
-    static struct _CicoHSMenuTile_glfunc glfunc;
-    static char *thumbmapbuffer;
-
     char appid[ICO_HS_MAX_PROCESS_NAME];
     char icon_image_path[ICO_HS_MAX_PATH_BUFF_LEN];
     int page;
index f41439a..e904b3e 100644 (file)
@@ -29,11 +29,8 @@ int CicoHSSwipeTouch::touch_state_b_x;
 int CicoHSSwipeTouch::touch_state_b_y;
 int CicoHSSwipeTouch::touch_state_a_x;
 int CicoHSSwipeTouch::touch_state_a_y;
-int CicoHSSwipeTouch::touch_lasttime;
 
-Ecore_Timer *CicoHSSwipeTouch::timer;
 int CicoHSSwipeTouch::touch_down;
-bool CicoHSSwipeTouch::long_act;
 bool CicoHSSwipeTouch::set_xy_pos;
 
 int CicoHSSwipeTouch::num_windows;
@@ -58,17 +55,14 @@ void
 CicoHSSwipeTouch::Initialize(CicoHSControlBarWindow* ctl_bar, CicoHSAppHistoryExt* apphist,
                              int width, int height)
 {
-    timer = NULL;
     num_windows = 0;
     touch_down = 0;
-    long_act = false;
     set_xy_pos = false;
 
     ctl_bar_window = ctl_bar;
     app_history = apphist;
     full_width = width;
     full_height = height;
-    touch_lasttime = 0;
     ICO_DBG("Initialize: ctlbar=%08x apphist=%08x width=%d height=%d",
             (int)ctl_bar, (int)apphist, width, height);
 }
@@ -105,13 +99,8 @@ CicoHSSwipeTouch::TouchDownSwipe(void *data, Evas *evas, Evas_Object *obj, void
 {
     Evas_Event_Mouse_Down   *info;
     CicoHSSwipeInputWindow  *window;
-    struct timeval ctime;
     int     x, y;
 
-    if (timer)  {
-        ecore_timer_del(timer);
-        timer = NULL;
-    }
     touch_down ++;
 
     info = reinterpret_cast<Evas_Event_Mouse_Down*>(event_info);
@@ -121,13 +110,6 @@ CicoHSSwipeTouch::TouchDownSwipe(void *data, Evas *evas, Evas_Object *obj, void
     ICO_PRF("TOUCH_EVENT Swipe Down (%d,%d)->(%d,%d) (%d)",
             info->output.x, info->output.y, x, y, touch_down);
 
-    if (touch_down == 1)    {
-        gettimeofday(&ctime, NULL);
-        touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
-        long_act = false;
-        timer = ecore_timer_add(ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS,
-                                LongPushed, NULL);
-    }
     if ((x >= 0) && (x < 4096) && (y >= 0) && (y < 4096))   {
         if (set_xy_pos == false)    {
             set_xy_pos = true;
@@ -141,52 +123,6 @@ CicoHSSwipeTouch::TouchDownSwipe(void *data, Evas *evas, Evas_Object *obj, void
 
 /*--------------------------------------------------------------------------*/
 /**
- * @brief   LongPushed::Touch timeout
- *          touch down timeout called from ecore
- *
- * @param[in]   data    user data(unused)
- * @return      fixed ECORE_CALLBACK_CANCEL
- */
-/*--------------------------------------------------------------------------*/
-Eina_Bool
-CicoHSSwipeTouch::LongPushed(void *data)
-{
-    ICO_DBG("LongPushed: timedout");
-
-    long_act = true;
-    timer = NULL;
-
-    if (touch_down > 0) {
-        /* release my grab  */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_RESET);
-        touch_down = 0;
-    }
-    if (set_xy_pos == false)    {
-        ICO_DBG("LongPushed: unknown coordinate, Skip");
-
-        long_act = false;
-        return ECORE_CALLBACK_CANCEL;
-    }
-    ICO_DBG("LongPushed: Not Swipe, send Touch Down event to application");
-
-    /* send touch down event to lower application   */
-    /* send ABS_X/Y     */
-    ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
-                       ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
-    /* send TOUCH Down  */
-    ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                       BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
-    /* send ABS_X/Y     */
-    ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                       ABS_Z, ((touch_state_a_x) << 16) | (touch_state_a_y));
-    set_xy_pos = false;
-
-    return ECORE_CALLBACK_CANCEL;
-}
-
-/*--------------------------------------------------------------------------*/
-/**
  * @brief   CicoHSSwipeTouch::TouchUpSwipe
  *          touch up action at swipe input window
  *
@@ -205,7 +141,6 @@ CicoHSSwipeTouch::TouchUpSwipe(void *data, Evas *evas, Evas_Object *obj, void *e
     CicoHSAppInfo           *appinfo;
     ico_hs_window_info      *wininfo;
     ico_syc_animation_t     animation;
-    struct timeval ctime;
     int sub;
     int idx;
     int swipe = 0;
@@ -232,23 +167,8 @@ CicoHSSwipeTouch::TouchUpSwipe(void *data, Evas *evas, Evas_Object *obj, void *e
         return;
     }
 
-    if(timer != NULL){
-        ecore_timer_del(timer);
-        timer = NULL;
-    }
-
-    gettimeofday(&ctime, NULL);
-    touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
-
     if (touch_down == 0)    {
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        /* send TOUCH Up    */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
         set_xy_pos = false;
-        long_act = false;
         ICO_DBG("TouchUpSwipe: no touch down, Skip");
         return;
     }
@@ -257,35 +177,9 @@ CicoHSSwipeTouch::TouchUpSwipe(void *data, Evas *evas, Evas_Object *obj, void *e
 
     if (set_xy_pos == false)    {
         ICO_DBG("TouchUpSwipe: unknown coordinate, Skip");
-
-        /* send touch release event */
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        /* send TOUCH Up    */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
-        long_act = false;
         return;
     }
     set_xy_pos = false;
-
-    /* long push    */
-    if(long_act == true)    {
-        ICO_DBG("TouchUpSwipe: not down(%d) or timedout(%d)", touch_down, long_act);
-        set_xy_pos = false;
-        touch_down = 0;
-        long_act = false;
-
-        /* send touch release event */
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        /* send TOUCH Up    */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
-        return;
-    }
     sub = touch_state_a_x - touch_state_b_x;
 
     /* check slide left to right or right to left   */
@@ -503,28 +397,6 @@ CicoHSSwipeTouch::TouchUpSwipe(void *data, Evas *evas, Evas_Object *obj, void *e
     }
 #endif
     if (swipe <= 0) {
-        /* send touch press event   */
-        ICO_DBG("TouchUpSwipe: Not Swipe, send event to application");
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
-                           ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
-        /* send TOUCH Down  */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           ABS_Z, ((touch_state_b_x+1) << 16) | (touch_state_b_y+1));
-
-        /* send touch release event */
-        gettimeofday(&ctime, NULL);
-        touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
-
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        /* send TOUCH Up    */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_UP);
         set_xy_pos = false;
     }
 }
@@ -546,7 +418,6 @@ CicoHSSwipeTouch::TouchMoveSwipe(void *data, Evas *evas, Evas_Object *obj, void
 {
     Evas_Event_Mouse_Move   *info;
     CicoHSSwipeInputWindow  *window;
-    struct timeval ctime;
     int x, y;
 
     info = reinterpret_cast<Evas_Event_Mouse_Move*>(event_info);
@@ -578,53 +449,5 @@ CicoHSSwipeTouch::TouchMoveSwipe(void *data, Evas *evas, Evas_Object *obj, void
         ICO_DBG("TouchMoveSwipe: no TouchDown, Skip");
         return;
     }
-
-    if (long_act == true)   {
-        ICO_DBG("TouchMoveSwipe: timedout");
-
-        if(timer != NULL){
-            ecore_timer_del(timer);
-            timer = NULL;
-        }
-
-        /* send ABS_X/Y     */
-        gettimeofday(&ctime, NULL);
-        touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
-
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        long_act = false;
-        return;
-    }
-
-    if (abs(touch_state_b_y - touch_state_a_y)
-        > ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_MOVE_Y)  {
-        /* slide to top or buttom over threashold, swipe cancel */
-        ICO_DBG("TouchMoveSwipe: over Y direction");
-        if(timer != NULL){
-            ecore_timer_del(timer);
-            timer = NULL;
-        }
-        long_act = false;
-
-        if (touch_down > 0) {
-            /* release my grab  */
-            ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                               BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_RESET);
-        }
-        /* send ABS_X/Y     */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 2,
-                           ABS_Z, (touch_state_b_x << 16) | touch_state_b_y);
-        /* send TOUCH Down  */
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime - 1,
-                               BTN_TOUCH, ICO_INPUT_MGR_CONTROL_TOUCH_EVENT_DOWN);
-        touch_down = 0;
-        /* send ABS_X/Y     */
-        gettimeofday(&ctime, NULL);
-        touch_lasttime = (ctime.tv_sec * 1000 + ctime.tv_usec/1000);
-        ico_syc_send_input("\0", 0, ICO_SYC_INPUT_TYPE_TOUCH, 0, touch_lasttime,
-                           ABS_Z, (touch_state_a_x << 16) | touch_state_a_y);
-        set_xy_pos = false;
-    }
 }
 // vim: set expandtab ts=4 sw=4:
index e00beed..9afec56 100644 (file)
@@ -23,9 +23,9 @@
 #include "CicoHSControlBarWindow.h"
 #include "CicoHSAppHistoryExt.h"
 
-#define ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH 80
-#define ICO_HS_SWIPE_TOUCH_SWIPE_HEIGHT 80
-#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY 200
+#define ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH 60
+#define ICO_HS_SWIPE_TOUCH_SWIPE_HEIGHT 60
+#define ICO_HS_SWIPE_TOUCH_DISTANCE_XY 100
 #define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_DISTANCE 80
 #define ICO_HS_SWIPE_TOUCH_SWIPE_THREASHOLD_MOVE_Y 80
 #define ICO_HS_SWIPE_TOUCH_LONG_PUSH_THREASHOLD_TIME_SECONDS 2.0d
@@ -53,11 +53,8 @@ class CicoHSSwipeTouch
     static int touch_state_b_y;
     static int touch_state_a_x;
     static int touch_state_a_y;
-    static int touch_lasttime;
 
-    static Ecore_Timer *timer;
     static int touch_down;
-    static bool long_act;
     static bool set_xy_pos;
     static int num_windows;
     static CicoHSSwipeInputWindow* swipe_windows[ICO_HS_MAX_SWIPEWINDOWS];
index 6fe7bcd..ee4e762 100644 (file)
@@ -741,9 +741,6 @@ CicoHomeScreen::ShowApplicationWindow(ico_syc_win_info_t *win_info)
     ico_syc_animation_t animation;
     animation.name = (char*)ICO_HS_MENU_HIDE_ANIMATION_FADE;
     animation.time = ICO_HS_MENU_ANIMATION_DURATION;
-#if 0
-    ico_syc_show(win_info->appid, win_info->surface, &animation);
-#else
     const string& lastStartupApp = m_appHis->getLastStartupAppid();
     if (true == lastStartupApp.empty()) {
         ICO_DBG("show (empty) %s", win_info->appid);
@@ -751,17 +748,9 @@ CicoHomeScreen::ShowApplicationWindow(ico_syc_win_info_t *win_info)
     }
     else {
         bool bShow = false;
-#if 0
-        const string& subDispApp = m_appHis->getSubDispAppid();
-#endif
         if (0 == lastStartupApp.compare(win_info->appid)) {
             bShow = true;
         }
-#if 0
-        if (0 == subDispApp.compare(win_info->appid)) {
-            bShow = true;
-        }
-#endif
         if (true == bShow) {
             ICO_DBG("show (last) %s", win_info->appid);
             ico_syc_show(win_info->appid, win_info->surface, &animation);
@@ -771,7 +760,6 @@ CicoHomeScreen::ShowApplicationWindow(ico_syc_win_info_t *win_info)
             ico_syc_hide(win_info->appid, win_info->surface, &animation);
         }
     }
-#endif
     ICO_TRA("CicoHomeScreen::ShowApplicationWindow Leave");
 }
 
@@ -1545,18 +1533,20 @@ CicoHomeScreen::CreateSwipeInputWindow(void)
     swipe_input_windows[0] = new CicoHSSwipeInputWindow();
     swipe_input_windows[0]->
             CreateSwipeInputWindow(ICO_HS_WINDOW_POS_X,
-                                   ICO_HS_WINDOW_POS_Y + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
+                                   full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
                                    ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
-                                   full_height - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2), "left");
+                                   full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2),
+                                   "left");
     swipe_input_windows[0]->ShowWindow();
 
     /* right side window    */
     swipe_input_windows[1] = new CicoHSSwipeInputWindow();
     swipe_input_windows[1]->
             CreateSwipeInputWindow(full_width - ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
-                                   ICO_HS_WINDOW_POS_Y + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
+                                   full_height / 2 + ICO_HS_SWIPE_TOUCH_DISTANCE_XY,
                                    ICO_HS_SWIPE_TOUCH_SWIPE_WIDTH,
-                                   full_height - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2), "right");
+                                   full_height / 2 - (ICO_HS_SWIPE_TOUCH_DISTANCE_XY*2),
+                                   "right");
     swipe_input_windows[1]->ShowWindow();
 
 #if 0       /* currently not support(not fix specification) */
@@ -1611,17 +1601,17 @@ CicoHomeScreen::DeleteSwipeInputWindow(void)
  */
 /*--------------------------------------------------------------------------*/
 static Eina_Bool launchApps(void* data)
-{   
-    ICO_DBG("start"); 
+{
+    ICO_DBG("start");
     launcApps_data_t* x = (launcApps_data_t*) data;
     if ((NULL == x) || (NULL == x->hs)) {
         ICO_DBG("end fail");
         return ECORE_CALLBACK_CANCEL;
     }
-    
+
     vector<pairAppidSubd> apps;
     x->hs->readStartupApp(apps);
-    
+
     int sz = apps.size();
     for (int i =sz; i > 0; i--) {
         string appid = apps[i-1].first;
@@ -2434,7 +2424,7 @@ CicoHomeScreen::HideApp(const std::string& app)
  *          move app
  *
  * @param  app appid
- * @param  zone zone 
+ * @param  zone zone
  */
 /*--------------------------------------------------------------------------*/
 void
index fd073fd..36e5015 100644 (file)
@@ -16,6 +16,7 @@
 
 #include <ico_log.h>
 #include <ico_window_mgr-client-protocol.h>
+#include "ico_syc_sysdef.h"
 
 #define ICO_OK 0
 #define ICO_ERROR -1
 #define ICO_HS_CONFIG_HISTORY       "app_history"
 
 /*misc*/
-#define HS_DISPLAY_HOMESCREEN   0           /* HomeScreen target display Id     */
+#define HS_DISPLAY_HOMESCREEN   ICO_SYC_DISPLAY_CENTER  /* HomeScreen target display Id */
 
 /*Layer dicralation*/
-#define HS_LAYER_BACKGROUND     0         /* layer of BackGround */
-#define HS_LAYER_APPLICATION    1         /* layer of Application */
-#define HS_LAYER_METERAPP       2         /* layer of Meter Display Application */
-#define HS_LAYER_HOMESCREEN     3         /* layer of HomeScreen menu */
-#define HS_LAYER_CONTROLBAR     4         /* layer of Control/Status bar */
-#define HS_LAYER_FULLSCREEN     5         /* layer of FullScreen Application */
-#define HS_LAYER_ONSCREEN       6         /* layer of OnScreen   */
-#define HS_LAYER_TOUCHPANEL     ICO_WINDOW_MGR_LAYERTYPE_TOUCH
-                                          /* layer of TouchPanel input */
-#define HS_LAYER_CURSOR         ICO_WINDOW_MGR_LAYERTYPE_CURSOR
-                                            /* layer of Cursor   */
-
-#define HS_LAYER_2NDDISP_APP    3         // second display application layer
+#define HS_LAYER_BACKGROUND     ICO_SYC_LAYER_BACKGROUND    /* layer of BackGround */
+#define HS_LAYER_APPLICATION    ICO_SYC_LAYER_APPLICATION   /* layer of Application */
+#define HS_LAYER_HOMESCREEN     ICO_SYC_LAYER_HOMESCREEN    /* layer of HomeScreen menu */
+#define HS_LAYER_CONTROLBAR     ICO_SYC_LAYER_CONTROLBAR    /* layer of Control/Status bar */
+#define HS_LAYER_FULLSCREEN     ICO_SYC_LAYER_FULLSCREEN    /* layer of FullScreen Application */
+#define HS_LAYER_ONSCREEN       ICO_SYC_LAYER_ONSCREEN      /* layer of OnScreen   */
+#define HS_LAYER_TOUCHPANEL     ICO_SYC_LAYER_TOUCHPANEL    /* layer of TouchPanel input */
+#define HS_LAYER_CURSOR         ICO_SYC_LAYER_CURSOR        /* layer of Cursor   */
+
+#define HS_LAYER_2NDDISP_APP    ICO_SYC_LAYER_MATERAPP      /* second display application layer */
 
 /* config history name */
 #define ICO_HS_CONFIG_HSTRY_KEY1      "timer"
index d8dca01..2e34570 100644 (file)
 #ifndef HOME_SCREEN_RES_H
 #define HOME_SCREEN_RES_H
 
-#if 0
-/* file_path */
-//#define default_path "./"
-#define edj_path "/usr/apps/%s/res/edj/"
-#define image_path "/usr/apps/%s/res/images/"
-#define sound_path "/usr/apps/%s/res/sounds/"
-#define manifest_path "/usr/apps/%s/res/config/"
-#define local_top_path "/home/tizen/HomeScreen"
-#define local_edj_path "%s/src/"
-#define local_image_path "%s/res/images/"
-#define local_sound_path "%s/res/sounds/"
-#define local_manifest_path "%s/res/apps/org.tizen.ico.homescreen/"
-#endif
-
 #define fname_api_all_off   "api_all_off.png"
 #define fname_api_all_on    "api_all_on.png"
 
 #define fname_backboard     "back_b_01.png"
-#define fname_back_bg       "back_b_01.png" 
+#define fname_back_bg       "back_b_01.png"
 
 /* file name (appli list) */
 #define fname_api01_off     "api_s_01_off.png"
diff --git a/src/onscreen/CicoOSPopWindow.cpp b/src/onscreen/CicoOSPopWindow.cpp
new file mode 100644 (file)
index 0000000..724f1f6
--- /dev/null
@@ -0,0 +1,379 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief   On Screen Popup Window
+ *
+ * @date    Feb-17-2014
+ */
+#include <Ecore.h>
+#include <Ecore_Wayland.h>
+#include "CicoOnScreen.h"
+#include "CicoNotification.h"
+#include "CicoOSPopWindow.h"
+#include "ico_syc_type.h"
+#include "ico_syc_appresctl.h"
+
+using namespace std;
+
+//==========================================================================
+// static members
+//==========================================================================
+
+//==========================================================================
+// functions
+//==========================================================================
+
+//--------------------------------------------------------------------------
+/**
+ * @brief   CicoOnScreen::CicoOnScreen
+ *          Constractor
+ *
+ * @param[in]   none
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+CicoOSPopWindow::CicoOSPopWindow(notification_type_e type) : CicoNotification(type)
+{
+    ICO_TRA("Enter type(%d)", (int)type);
+    m_window     = NULL;
+    m_icon       = NULL;
+    m_theme      = NULL;
+    m_resourceId = 0;
+    m_context    = NULL;
+    ICO_TRA("Leave");
+}
+
+CicoOSPopWindow::CicoOSPopWindow(notification_h noti) : CicoNotification(noti)
+{
+    ICO_TRA("Enter");
+    m_window     = NULL;
+    m_icon       = NULL;
+    m_theme      = NULL;
+    m_resourceId = 0;
+    m_context    = NULL;
+    ICO_TRA("Leave");
+}
+//--------------------------------------------------------------------------
+/**
+ * @brief   CicoOnScreen::~CicoOnScreen
+ *          Destractor
+ *
+ * @param[in]   none
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+CicoOSPopWindow::~CicoOSPopWindow(void)
+{
+//    ICO_TRA("Enter");
+    if (NULL != m_window) {
+        ecore_evas_free(m_window);
+        m_window = NULL;
+    }
+    // if (NULL != m_icon) /* import m_window */
+    m_icon = NULL;
+    // if (NULL != m_theme) /* import m_window */
+    m_theme = NULL;
+    if (NULL != m_context) {
+        int r = ico_syc_release_res(m_context);
+        ICO_DBG("_____ %d = ico_syc_release_res", r);
+    }
+
+//    ICO_TRA("Leave");
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief   CicoOnScreen::ShowPopup
+ *          Show popup window
+ *
+ * @param[in]   none
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+bool
+CicoOSPopWindow::showPopup()
+{
+    ICO_TRA("Enter");
+    if (NULL == m_window) {
+        if (false == InitializeWindow()) {
+            ICO_TRA("Leave false");
+            return false;
+        }
+    }
+    // get caller pachage name
+    const char *pkgname = GetPkgname();
+
+    // get priv_id
+    int priv_id = GetPrivId();
+
+    // Get title
+    const char *title = GetTitle();
+
+    // Get content
+    const char *content = GetContent();
+
+    // Get execute option
+    const char *text = NULL;
+    bundle *service_handle = NULL;
+    (void)GetExecuteOption(NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH, &text,
+                           &service_handle);
+
+    // Get icon path
+    const char *icon = GetIconPath();
+    ICO_DBG("Received: %s : %i : %s : %s : %s : %x",
+            pkgname, priv_id, title, content,
+            text, (int)service_handle);
+
+    if (icon) {
+        if (NULL != m_icon) {
+            evas_object_image_file_set(m_icon, icon, NULL);
+            evas_object_show(m_icon);
+        }
+    }
+
+    if (title) {
+        if (!edje_object_part_text_set(m_theme, "title_text", title)) {
+            ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+        }
+    }
+
+    if (content) {
+        if (strlen(content) <= 25) {
+            ICO_DBG("content text center");
+            if (!edje_object_part_text_set(m_theme, "content_text_center", content)) {
+                ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+            }
+            if (!edje_object_part_text_set(m_theme, "content_text_left", "")) {
+                ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+            }
+        }
+        else {
+            ICO_DBG("content text left");
+            if (!edje_object_part_text_set(m_theme, "content_text_left", content)) {
+                ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+            }
+            if (!edje_object_part_text_set(m_theme, "content_text_center", "")) {
+                ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+            }
+        }
+    }
+
+    if (text) {
+        if (!edje_object_part_text_set(m_theme, "button_text", text)) {
+            ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+        }
+    }
+    else {
+        if (!edje_object_part_text_set(m_theme, "button_text", "OK")) {
+            ICO_WRN("could not set the text. Maybe part 'text' does not exist?");
+        }
+    }
+
+    evas_object_show(m_theme);
+    ICO_TRA("Leave true");
+    return true;
+}
+
+bool 
+CicoOSPopWindow::acquireRes()
+{
+    ICO_TRA("Enter");
+    if (NULL != m_context) {
+        ICO_TRA("Leave false");
+        return false;
+    }
+    ico_syc_res_window_t w;
+    makeResWindowT(w);
+    m_context = ico_syc_acquire_res( &w, NULL, NULL, ICO_SYC_RES_ONSCREEN);
+    if (NULL == m_context) {
+        ICO_TRA("Leave false");
+        return false;
+    }
+    ICO_TRA("Leave true");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief   CicoOnScreen::HidePopup
+ *          Hide popup window
+ *
+ * @param[in]   data        The user data passed from the callback
+ *                          registration function
+ * @param[in]   e           The handle to the popup window
+ * @param[in]   obj         The handle to the Evas object
+ * @param[in]   event_info  Event information
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSPopWindow::hidePopup(void)
+{
+    ICO_TRA("Enter");
+    releaseRes();
+
+    ICO_TRA("Leave");
+}
+
+bool    
+CicoOSPopWindow::releaseRes()
+{
+    ICO_TRA("Enter");
+    if (NULL != m_context) {
+        int r = ico_syc_release_res(m_context);
+        ICO_DBG("_____ %d = ico_syc_release_res", r);
+        if (ICO_SYC_ERR_NONE == r) {
+            m_context = NULL;
+            ICO_TRA("Leave true");
+            return true;
+        }
+    }
+    ICO_TRA("Leave false");
+    return false;
+}
+
+
+//--------------------------------------------------------------------------
+/**
+ * @brief   CicoOnScreen::InitializePopup
+ *          Initialize popup window
+ *
+ * @param[in]   none
+ * @return      none
+ */
+//--------------------------------------------------------------------------
+bool
+CicoOSPopWindow::InitializeWindow(void)
+{
+    ICO_TRA("Enter");
+    // Window setup
+    m_window = ecore_evas_new(NULL, 0, 0, WIDTH, HEIGHT, "frame=0");
+    if (NULL == m_window) {
+        ICO_ERR("ecore_evas_new() error");
+        ICO_TRA("Leave(ERR)");
+        return false;
+    }
+    ecore_evas_show(m_window);
+    m_theme = edje_object_add(ecore_evas_get(m_window));
+    if (NULL == m_theme) {
+        ICO_ERR("could not create edje object!");
+        ICO_TRA("Leave(ERR)");
+        return false;
+    }
+    if (!edje_object_file_set(m_theme, ICO_OS_THEMES_EDJ_FILEPATH, "main")) {
+        Edje_Load_Error err = edje_object_load_error_get(m_theme);
+        const char *errmsg = edje_load_error_str(err);
+        ICO_ERR("could not load 'main' from onscreen.edj: %s", errmsg);
+        evas_object_del(m_theme);
+        m_theme = NULL;
+        return false;
+    }
+    // icon setup
+    m_icon = evas_object_image_filled_add(ecore_evas_get(m_window));
+    edje_object_part_swallow(m_theme, "icon", m_icon);
+    /* getting size of screen */
+    /* home screen size is full of display*/
+    int display_width  = 0;
+    int display_height = 0;
+    ecore_wl_screen_size_get(&display_width, &display_height);
+
+    ICO_DBG("display size w/h=%d/%d", display_width, display_height);
+    int popup_x = (display_width / 2) - (POPUP_FRAME_WIDTH / 2);
+    int popup_y = (display_height / 2) - (POPUP_FRAME_HEIGHT/ 2);
+    ICO_DBG("popup postion x/y=%d/%d", popup_x, popup_y);
+    evas_object_move(m_theme, popup_x, popup_y);
+    evas_object_resize(m_theme, POPUP_FRAME_WIDTH, POPUP_FRAME_HEIGHT);
+
+    Evas_Object* obj = NULL;
+    obj = (Evas_Object*)edje_object_part_object_get(m_theme, "button_text");
+    if (NULL != obj) {
+        evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
+                                       evasMouseUpCB, this);
+    }
+
+    obj = (Evas_Object*)edje_object_part_object_get(m_theme, "button");
+    if (NULL != obj) {
+        evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP,
+                                       evasMouseUpCB, this);
+    }
+    evas_object_show(m_theme);
+    ICO_TRA("Leave(OK)");
+    return true;
+}
+
+//--------------------------------------------------------------------------
+/**
+ * @brief   callback function of evas mouse up event
+ *
+ * @param [in] data         The user data passed from the callback
+ *                          registration function
+ * @param [in] e            The handle to the popup window
+ * @param [in] obj          The handle to the Evas object
+ * @param [in] event_info   Event information
+ *
+ */
+//--------------------------------------------------------------------------
+void
+CicoOSPopWindow::evasMouseUpCB(void *data, Evas *e, Evas_Object *obj,
+                               void *event_info)
+{
+    ICO_TRA("Enter %x, %x, %x, %x", data, e, obj, event_info);
+    if (NULL != obj) {
+        ICO_DBG("_____ obj name=%s", evas_object_name_get(obj));
+    }
+    static_cast<CicoOSPopWindow*>(data)->hidePopup();
+    ICO_TRA("Leave");
+}
+
+
+static char id0_ECU[]         = "Center";
+
+static char id00_display[]   = "Center";
+// static char id01_display[]   = "Mid";
+
+// static char id001_layer[]    = "Application";
+// static char id002_layer[]    = "SoftKeyboard";
+// static char id003_layer[]    = "HomeScreen";
+// static char id004_layer[]    = "ControlBar";
+// static char id005_layer[]    = "InterruptApp";
+static char id006_layer[]    = "OnScreen";
+// static char id007_layer[]    = "Touch";
+// static char id008_layer[]    = "Cursor";
+// static char id011_layer[]    = "MainApp";
+// static char id012_layer[]    = "SubDispMainApp";
+// static char id013_layer[]    = "SubDispSubApp";
+
+static char id00611_layout[] = "Whole";
+// static char id00612_layout[] = "Half";
+
+static char id006111_area[]  = "Full";
+// static char id006121_area[]  = "Upper";
+// static char id006122_area[]  = "Lower";
+
+static char role_incoming[] = "incoming";
+static char role_message[]  = "message";
+void
+CicoOSPopWindow::makeResWindowT(ico_syc_res_window_t& w)
+{
+    w.ECU         = id0_ECU;
+    w.display     = id00_display;
+    w.layer       = id006_layer;
+    w.layout      = id00611_layout;
+    w.area        = id006111_area;
+    w.dispatchApp = (char*)GetPkgname();
+    if (0 == strcmp(w.dispatchApp,"org.tizen.dialer")) {
+        w.role    = role_incoming;
+    }
+    else {
+        w.role    = role_message;
+    }
+    w.resourceId  = m_resourceId;
+}
+
+// vim: set expandtab ts=4 sw=4:
diff --git a/src/onscreen/CicoOSPopWindow.h b/src/onscreen/CicoOSPopWindow.h
new file mode 100644 (file)
index 0000000..c6eed98
--- /dev/null
@@ -0,0 +1,143 @@
+/*
+ * Copyright (c) 2014, TOYOTA MOTOR CORPORATION.
+ *
+ * This program is licensed under the terms and conditions of the
+ * Apache License, version 2.0.  The full text of the Apache License is at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ */
+/**
+ * @brief   Pop Window
+ *
+ * @date    Feb-17-2014
+ */
+#ifndef __CICO_ONSCREEN_POP_WINDOW_H__
+#define __CICO_ONSCREEN_POP_WINDOW_H__
+
+#ifdef HAVE_CONFIG_H
+    #include "config.h"
+    #define __UNUSED__
+#else
+    #define __UNUSED__
+#endif
+
+#include <stdio.h>
+#include <unistd.h>
+#include <string.h>
+
+#include <app.h>
+#include <aul.h>
+#include <Ecore_Evas.h>
+#include <Evas.h>
+#include <Edje.h>
+
+#include <stdbool.h>
+#include <CicoNotification.h>
+#include <CicoNotificationService.h>
+
+#include "ico_syc_common.h"
+#include "ico_syc_privilege.h"
+
+#include "ico_log.h"
+
+/*============================================================================*/
+/* Define fixed parameters                                                    */
+/*============================================================================*/
+/* Window Size */
+#define STATUS_BAR_HEIGHT    64
+#define CTRL_BAR_HEIGHT      128
+#define WIDTH                1080
+#define HEIGHT               (1920 - STATUS_BAR_HEIGHT - CTRL_BAR_HEIGHT)
+
+/* Popup Size */
+#define POPUP_WIDTH         640
+#define POPUP_HEIGHT        300
+
+/* Popup Frame Size */
+#define POPUP_FRAME_THICK   10
+#define POPUP_FRAME_WIDTH   (POPUP_WIDTH+POPUP_FRAME_THICK)
+#define POPUP_FRAME_HEIGHT  (POPUP_HEIGHT+POPUP_FRAME_THICK)
+
+#if 0
+#define POPUP_ST_X          ((WIDTH-POPUP_WIDTH)/2)
+#define POPUP_ST_Y          ((HEIGHT-POPUP_HEIGHT)/2)
+
+/* Popup Frame Size */
+#define POPUP_FRAME_THICK   10
+#define POPUP_FRAME_WIDTH   (POPUP_WIDTH+POPUP_FRAME_THICK)
+#define POPUP_FRAME_HEIGHT  (POPUP_HEIGHT+POPUP_FRAME_THICK)
+#define POPUP_FRAME_ST_X    (POPUP_ST_X-POPUP_FRAME_THICK/2)
+#define POPUP_FRAME_ST_Y    (POPUP_ST_Y-POPUP_FRAME_THICK/2)
+
+/* Popup Icon Size */
+#define POPUP_ICON_WIDTH    50
+#define POPUP_ICON_HEIGHT   50
+#define POPUP_ICON_ST_X     POPUP_ST_X
+#define POPUP_ICON_ST_Y     POPUP_ST_Y
+
+/* Popup Title Size */
+#define POPUP_TITLE_WIDTH   (POPUP_WIDTH-POPUP_ICON_WIDTH)
+#define POPUP_TITLE_HEIGHT  POPUP_ICON_HEIGHT
+#define POPUP_TITLE_ST_X    (POPUP_ST_X+POPUP_ICON_WIDTH)
+#define POPUP_TITLE_ST_Y    POPUP_ST_Y
+
+/* Popup Content BG Size */
+#define POPUP_CONTENT_BG_WIDTH  POPUP_WIDTH
+#define POPUP_CONTENT_BG_HEIGHT (POPUP_HEIGHT-POPUP_TITLE_HEIGHT)
+#define POPUP_CONTENT_BG_ST_X   POPUP_ST_X
+#define POPUP_CONTENT_BG_ST_Y   (POPUP_ST_Y+POPUP_TITLE_HEIGHT)
+
+/* Popup Content Size */
+#define POPUP_CONTENT_WIDTH  POPUP_WIDTH
+#define POPUP_CONTENT_HEIGHT POPUP_TITLE_HEIGHT
+#define POPUP_CONTENT_ST_X   POPUP_ST_X
+#define POPUP_CONTENT_ST_Y   (POPUP_ST_Y+POPUP_TITLE_HEIGHT+(POPUP_HEIGHT-POPUP_CONTENT_HEIGHT)/2)
+
+#define ICO_ORIENTATION_VERTICAL (1) 
+#define ICO_ORIENTATION_HORIZONTAL (2)
+
+#define LEMOLO_PKGNAME       "org.tizen.dialer"
+#endif
+
+#define FALSE                0
+#define TRUE                 1
+
+#if 0
+#define ICON_PATH      (char *)"/usr/share/icons/default/small/org.tizen.dialer.png"
+#endif
+#define ICO_OS_THEMES_EDJ_FILEPATH "/usr/apps/org.tizen.ico.onscreen/res/themes/onscreen.edj"
+/*============================================================================*/
+/* Define data types                                                          */
+/*============================================================================*/
+
+/*============================================================================*/
+/* Define class                                                               */
+/*============================================================================*/
+class CicoOSPopWindow :public CicoNotification {
+public:
+    CicoOSPopWindow(notification_type_e type);
+    CicoOSPopWindow(notification_h noti);
+    virtual ~CicoOSPopWindow();
+    bool    showPopup();
+    void    hidePopup();
+    bool    acquireRes();
+    bool    releaseRes();
+    const CicoNotification& getNotif() const {
+        return (const CicoNotification&)*this;
+    }
+private:
+    bool    InitializeWindow(void);
+    static void evasMouseUpCB(void *data, Evas *e, Evas_Object *obj,
+                              void *event_info);
+    void    makeResWindowT(ico_syc_res_window_t& w);
+
+public:
+    Ecore_Evas*  m_window;
+    Evas_Object* m_icon;
+    Evas_Object* m_theme;
+    uint32_t     m_resourceId;
+    struct ico_syc_res_context* m_context;
+};
+
+#endif  // __CICO_ONSCREEN_POP_WINDOW_H__
+// vim:set expandtab ts=4 sw=4:
index 1364aef..d862bb2 100644 (file)
@@ -28,6 +28,7 @@ IcoSysconDaemon_CPPFLAGS =    \
        @MURPHYRESOURCE_CFLAGS@                         \
        @EDBUS_CFLAGS@                                          \
        $(UWS_CFLAGS)                                           \
+       $(GENIVI_CFLAGS)                                        \
        $(WESTONPLUGIN_CFLAGS)                          \
        -I../../include                                         \
     -I../../lib/system-controller              \
@@ -53,6 +54,7 @@ IcoSysconDaemon_LDADD = \
        @MURPHYRESOURCE_LIBS@                   \
        @EDBUS_LIBS@                                    \
        $(UWS_LIBS)                                             \
+       $(GENIVI_LIBS)                                  \
        $(WESTONPLUGIN_LIBS)
 
 CLEANFILES = $(BUILT_SOURCES)
index 9c6ad3b..764fcb1 100644 (file)
@@ -84,6 +84,7 @@ static void
 tst_send_input(const char *appid, int surface, int ev_type,
                int deviceno, int ev_time, int ev_code, int ev_value)
 {
+#if 0           /* SystemController 0.9.21(with GENIVI ivi-shell) not support send_input */
     int ret;
     char *func = "ico_syc_send_input";
 
@@ -94,7 +95,7 @@ tst_send_input(const char *appid, int surface, int ev_type,
         return;
     }
     print_ok("%s", func);
-
+#endif
     return;
 }
 
index 2ffc767..f096b5e 100644 (file)
@@ -494,7 +494,9 @@ _create_msg(const void *data, size_t len)
         break;
     case MSG_CMD_ADD_INPUT:
     case MSG_CMD_DEL_INPUT:
+#if 0           /* SystemController 0.9.21(with GENIVI ivi-shell) not support send_input */
     case MSG_CMD_SEND_INPUT:
+#endif
         gen = NULL;
         break;
     case MSG_CMD_CHANGE_USER:
index 1bf05f3..3ed3999 100644 (file)
@@ -297,7 +297,7 @@ tst_map_thumb(int surface, int framerate)
     int ret;
     char *func = "ico_syc_map_thumb";
 
-    ret = ico_syc_map_thumb(surface, framerate);
+    ret = ico_syc_map_thumb(surface, framerate, " ");
     if (ret != 0) {
         print_ng("%s (ret: %d)", func, ret);
         return;
index 44cc439..93f5fc3 100644 (file)
@@ -9,7 +9,6 @@ AM_CFLAGS = $(GCC_CFLAGS) -I../include -I/usr/include/ico-util $(wayland_ivi_cli
 AM_LDFLAGS = -module -avoid-version -rpath $(libdir) $(GLIB_LIBS)
 
 bin_PROGRAMS =         \
-       ico_clear_screen        \
        ico_change_loginuser
 
 check_LTLIBRARIES = $(TESTS)