Support sticker option in mobile profile 86/251786/8
authorInHong Han <inhong1.han@samsung.com>
Wed, 6 Jan 2021 09:04:32 +0000 (18:04 +0900)
committerInHong Han <inhong1.han@samsung.com>
Wed, 10 Mar 2021 09:26:48 +0000 (18:26 +0900)
Change-Id: I4a657084b13dc0fd7c8cd1b9bd0384e2a066b5ab

20 files changed:
CMakeLists.txt
data/edc/gengrid/customised_sticker_gengrid.edc [new file with mode: 0644]
data/edc/gengrid/layout_sticker_keypad.edc [new file with mode: 0755]
data/layout/mobile/LYT_CM_POPUP.xml
data/layout/mobile/LYT_LANDSCAPE_STICKER.xml [new file with mode: 0644]
data/layout/mobile/LYT_PORTRAIT_STICKER.xml [new file with mode: 0644]
data/layout/mobile/input_mode_configure.xml
data/pixmaps/default/mobile/icon/54x54/icon_sticker_dim.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon/54x54/icon_sticker_nor.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon/54x54/icon_sticker_press.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon/bubble/icon_sticker.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon/bubble/icon_sticker_dim.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon/bubble/icon_sticker_press.png [new file with mode: 0644]
data/pixmaps/default/mobile/icon_recent.png [new file with mode: 0644]
packaging/ise-default.spec
src/include/ise-sticker-config.h [new file with mode: 0644]
src/include/ise-sticker-mode.h [new file with mode: 0644]
src/include/ise.h
src/ise-sticker-mode.cpp [new file with mode: 0644]
src/ise.cpp

index 0412590..27958c6 100644 (file)
@@ -26,6 +26,7 @@ SET(ISE_SRCS
     src/candidate-multiline-efl.cpp
     src/autofill.cpp
     src/ise-dbus.cpp
+    src/ise-sticker-mode.cpp
 
     src/ise-emoticon-list.cpp
     src/ise-emoticon-mode.cpp
@@ -86,6 +87,8 @@ SET(PKGS_CHECK_MODULES
         dbus-1
         gio-2.0
         pkgmgr-info
+        capi-ui-sticker-consumer
+        capi-content-mime-type
         )
 
 IF (with_cbhm)
@@ -170,6 +173,17 @@ ADD_DEPENDENCIES(${PROJECT_NAME} customised_gengrid.edj)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/customised_gengrid.edj DESTINATION ${ISE_RESDIR}/edje)
 
 ADD_CUSTOM_TARGET(
+    customised_sticker_gengrid.edj
+    COMMAND edje_cc -no-save
+        -id ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid
+        -sd ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid
+        ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/customised_sticker_gengrid.edc
+        ${CMAKE_BINARY_DIR}/customised_sticker_gengrid.edj
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/customised_sticker_gengrid.edc)
+ADD_DEPENDENCIES(${PROJECT_NAME} customised_sticker_gengrid.edj)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/customised_sticker_gengrid.edj DESTINATION ${ISE_RESDIR}/edje)
+
+ADD_CUSTOM_TARGET(
     layout_keypad.edj
     COMMAND edje_cc -no-save
         ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/layout_keypad.edc
@@ -178,6 +192,15 @@ ADD_CUSTOM_TARGET(
 ADD_DEPENDENCIES(${PROJECT_NAME} layout_keypad.edj)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/layout_keypad.edj DESTINATION ${ISE_RESDIR}/edje)
 
+ADD_CUSTOM_TARGET(
+    layout_sticker_keypad.edj
+    COMMAND edje_cc -no-save
+        ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/layout_sticker_keypad.edc
+        ${CMAKE_BINARY_DIR}/layout_sticker_keypad.edj
+        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/layout_sticker_keypad.edc)
+ADD_DEPENDENCIES(${PROJECT_NAME} layout_sticker_keypad.edj)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/layout_sticker_keypad.edj DESTINATION ${ISE_RESDIR}/edje)
+
 if(${TARGET} STREQUAL "mobile")
 ADD_CUSTOM_TARGET( customised_ctxpopup.edj COMMAND edje_cc
         -id ${CMAKE_CURRENT_SOURCE_DIR}/edje/mobile
diff --git a/data/edc/gengrid/customised_sticker_gengrid.edc b/data/edc/gengrid/customised_sticker_gengrid.edc
new file mode 100644 (file)
index 0000000..f96296a
--- /dev/null
@@ -0,0 +1,1138 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+#define GENGRID_PART_BG_COLOR_INC 0 0 0 0
+#define GENGRID_PART_REORDER_DEFAULT_BG_COLOR_INC 0 0 0 77
+#define GENGRID_PART_BACKGROUND_COLOR_INC 0 0 0 0
+#define GENGRID_DEFAULT_LEFT_TOP_PADDING_INC 8 3
+#define GENGRID_DEFAULT_RIGHT_BOTTOM_PADDING_INC 8 3
+#define GENGRID_DEFAULT_ITEM_BG_LEFT_TOP_PADDING_INC 1 1
+#define GENGRID_DEFAULT_ITEM_BG_RIGHT_BOTTOM_PADDING_INC 1 1
+#define GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC 0 0
+#define GENGRID_DEFAULT_LEFT_TOP_FOCUS_PADDING_INC 5 0
+#define GENGRID_DEFAULT_RIGHT_BOTTOM_FOCUS_PADDING_INC 5 2
+
+#define GENGRID_PROGRAM_DEFAULT( TARGET ) \
+               program { name: "default"; \
+               signal: "elm,state,default"; \
+               source: "elm"; \
+               action: STATE_SET "default" 0.0; \
+               target: "focus_bg"; \
+               TARGET \
+               } \
+
+collections {
+   base_scale: 1.8;
+
+   styles {
+      style { name: "gengrid_myfile_in_text_style";
+         base: "font=Tizen:style=Bold font_size="34" color=#3e3e40 color_class=T060E align=center wrap=mixed ellipsis=1.0 text_class=T060E";
+         tag: "br" "\n";
+         tag: "ps" "ps";
+         tag: "tab" "\t";
+         tag: "b" "+ font_weight=Bold";
+      }
+   }
+
+   styles {
+      style { name: "gengrid_myfile_in_text_style_wearable";
+         base: "font=Tizen:style=Bold font_size="60" color=#3e3e40 color_class=T060E align=center wrap=mixed ellipsis=1.0 text_class=T060E";
+         tag: "br" "\n";
+         tag: "ps" "ps";
+         tag: "tab" "\t";
+         tag: "b" "+ font_weight=Bold";
+      }
+   }
+
+   plugins {
+      plugin {
+         name: "touch_sound"; // Name run by RUN_PLUGIN
+         source: "feedback"; // External edje plugin name
+         param: "1 0"; // feedback edje plugin parameters: FEEDBACK_TYPE_SOUND, FEEDBACK_PATTERN_TAP
+          }
+       }
+   group { name: "elm/gengrid/item/ise/customized_default_style_port2/default";
+      data.item: "texts" "elm.text";
+      data.item: "contents" "elm.swallow.icon";
+      images {
+         image : "images/gengrid/handwriting_emoticon_pressed.png" COMP;
+         image : "images/gengrid/00_thumbs_loading_bg.png" COMP;
+      }
+      script {
+         public downed;
+         public movement;
+         public highlight_timer;
+         public focus_off(val) {
+                       if (get_int(highlight_timer))
+                               cancel_timer(get_int(highlight_timer));
+                       set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "default", 0.0);
+         }
+         public focus_mouse_down(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "enabled", 0.0);
+         }
+         public focus_mouse_up(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "default", 0.0);
+         }
+          public select_mouse_down(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"select_clip", "selected", 0.0);
+         }
+         public select_mouse_up(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"select_clip", "default", 0.0);
+         }
+      }
+
+      parts {
+         part { name: "select_clip";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "selected" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "bg";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               color: GENGRID_PART_BACKGROUND_COLOR_INC;
+            }
+         }
+         part { name: "left_top_padding";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_LEFT_TOP_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_RIGHT_BOTTOM_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "item_bg";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "right_bottom_padding";
+               }
+            }
+         }
+         part { name: "item_bg_left_top_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_BG_LEFT_TOP_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "item_bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_bg";
+               }
+            }
+         }
+         part { name: "item_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_BG_RIGHT_BOTTOM_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_bg";
+               }
+               rel2.to: "item_bg";
+            }
+         }
+         part { name: "item_real_bg";
+            type: IMAGE;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_bg_right_bottom_padding";
+               }
+               image.normal: "images/gengrid/00_thumbs_loading_bg.png";
+            }
+         }
+         part { name: "item_real_bg_left_top_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "item_real_bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_real_bg";
+               }
+            }
+         }
+         part { name: "item_real_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_real_bg";
+               }
+               rel2.to: "item_real_bg";
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 48;
+               align: 0.5 1.0;
+               text {
+                  style: "gengrid_myfile_in_text_style";
+                  min: 0 1;
+                  align: 0.0 0.5;
+               }
+            }
+        }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_real_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_real_bg_right_bottom_padding";
+               }
+            }
+         }
+         part { name: "reorder_bg";
+            type: RECT;
+            scale : 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: GENGRID_PART_BG_COLOR_INC;
+               rel1.to: "item_bg";
+               rel2.to: "item_bg";
+            }
+            description { state: "enabled" 0.0;
+               inherit: "default" 0.0;
+               color: GENGRID_PART_REORDER_DEFAULT_BG_COLOR_INC;
+            }
+         }
+         part { name: "focus_bg_left_top_padding";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_LEFT_TOP_FOCUS_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "focus_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_RIGHT_BOTTOM_FOCUS_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "focus_bg";
+            type: IMAGE;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "focus_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "focus_bg_right_bottom_padding";
+               }
+               image.normal: "images/gengrid/handwriting_emoticon_pressed.png";
+               image.border: 3 3 3 6;
+            }
+            description { state: "enabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "touch_snd";
+            signal: "touch_snd,1";
+            source: "elm";
+            action: RUN_PLUGIN "touch_sound";
+               }
+
+         program { name: "go_reorder_disabled";
+            signal: "elm,state,reorder,disabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "reorder_bg";
+            target: "focus_bg";
+            transition: ACCELERATE 0.3;
+         }
+         program { name: "go_reorder_enabled";
+            signal: "elm,state,reorder,enabled";
+            source: "elm";
+            action: STATE_SET "enabled" 0.0;
+            target: "reorder_bg";
+            target: "focus_bg";
+            transition: DECELERATE 0.3;
+         }
+         program { name: "selected";
+            signal: "elm,state,selected";
+            source: "elm";
+            script {
+                set_state(PART:"focus_bg", "enabled", 0.0);
+                set_int(highlight_timer, timer(0.3, "focus_off", 1));
+            }
+            after: "touch_snd";
+         }
+         program { name: "unselected";
+            signal: "elm,state,unselected";
+            source: "elm";
+            script {
+            set_state(PART:"focus_bg", "default", 0.0);
+                if (get_int(highlight_timer)) {
+                    cancel_timer(get_int(highlight_timer));
+                }
+            }
+         }
+         GENGRID_PROGRAM_DEFAULT(
+            target: "item_bg";
+            target: "item_real_bg";
+            target: "elm.swallow.icon";
+         )
+      }
+
+   }
+
+   group { name: "elm/gengrid/item/ise/customized_default_style_wearable/default";
+      data.item: "texts" "elm.text";
+      data.item: "contents" "elm.swallow.icon";
+      images {
+         image : "images/gengrid/handwriting_emoticon_pressed.png" COMP;
+         image : "images/gengrid/00_thumbs_loading_bg.png" COMP;
+      }
+      script {
+         public downed;
+         public movement;
+         public highlight_timer;
+         public focus_off(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "default", 0.0);
+         }
+         public focus_mouse_down(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "enabled", 0.0);
+         }
+         public focus_mouse_up(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"focus_bg", "default", 0.0);
+         }
+          public select_mouse_down(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"select_clip", "selected", 0.0);
+         }
+         public select_mouse_up(val) {
+            if (get_int(highlight_timer))
+               cancel_timer(get_int(highlight_timer));
+            set_int(highlight_timer, 0);
+            set_state(PART:"select_clip", "default", 0.0);
+         }
+      }
+
+      parts {
+         part { name: "select_clip";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+            }
+            description { state: "selected" 0.0;
+               visible: 0;
+            }
+         }
+         part { name: "bg";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               color: GENGRID_PART_BACKGROUND_COLOR_INC;
+            }
+         }
+         part { name: "left_top_padding";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_LEFT_TOP_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_RIGHT_BOTTOM_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "item_bg";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "right_bottom_padding";
+               }
+            }
+         }
+         part { name: "item_bg_left_top_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_BG_LEFT_TOP_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "item_bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_bg";
+               }
+            }
+         }
+         part { name: "item_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_BG_RIGHT_BOTTOM_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_bg";
+               }
+               rel2.to: "item_bg";
+            }
+         }
+         part { name: "item_real_bg";
+            type: IMAGE;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_bg_right_bottom_padding";
+               }
+               image.normal: "images/gengrid/00_thumbs_loading_bg.png";
+            }
+         }
+         part { name: "item_real_bg_left_top_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "item_real_bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_real_bg";
+               }
+            }
+         }
+         part { name: "item_real_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_real_bg";
+               }
+               rel2.to: "item_real_bg";
+            }
+         }
+         part { name: "elm.text";
+            type: TEXTBLOCK;
+            mouse_events: 0;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: 0 48;
+               align: 0.5 1.0;
+               text {
+                  style: "gengrid_myfile_in_text_style_wearable";
+                  min: 0 1;
+                  align: 0.0 0.5;
+               }
+            }
+        }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "item_real_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "item_real_bg_right_bottom_padding";
+               }
+            }
+         }
+         part { name: "reorder_bg";
+            type: RECT;
+            scale : 1;
+            repeat_events: 1;
+            description { state: "default" 0.0;
+               color: GENGRID_PART_BG_COLOR_INC;
+               rel1.to: "item_bg";
+               rel2.to: "item_bg";
+            }
+            description { state: "enabled" 0.0;
+               inherit: "default" 0.0;
+               color: GENGRID_PART_REORDER_DEFAULT_BG_COLOR_INC;
+            }
+         }
+         part { name: "focus_bg_left_top_padding";
+            type: SPACER;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_LEFT_TOP_FOCUS_PADDING_INC;
+               align: 0.0 0.0;
+               fixed: 1 1;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "focus_bg_right_bottom_padding";
+            type: SPACER;
+            scale: 1;
+            description { state: "default" 0.0;
+               min: GENGRID_DEFAULT_RIGHT_BOTTOM_FOCUS_PADDING_INC;
+               align: 1.0 1.0;
+               fixed: 1 1;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "focus_bg";
+            type: IMAGE;
+            scale : 1;
+            description { state: "default" 0.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "focus_bg_left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "focus_bg_right_bottom_padding";
+               }
+               image.normal: "images/gengrid/handwriting_emoticon_pressed.png";
+               image.border: 3 3 3 6;
+            }
+            description { state: "enabled" 0.0;
+               inherit: "default" 0.0;
+               visible: 1;
+            }
+         }
+      }
+      programs {
+         program { name: "touch_snd";
+            signal: "touch_snd,1";
+            source: "elm";
+            action: RUN_PLUGIN "touch_sound";
+         }
+
+         program { name: "go_reorder_disabled";
+            signal: "elm,state,reorder,disabled";
+            source: "elm";
+            action: STATE_SET "default" 0.0;
+            target: "reorder_bg";
+            target: "focus_bg";
+            transition: ACCELERATE 0.3;
+         }
+         program { name: "go_reorder_enabled";
+            signal: "elm,state,reorder,enabled";
+            source: "elm";
+            action: STATE_SET "enabled" 0.0;
+            target: "reorder_bg";
+            target: "focus_bg";
+            transition: DECELERATE 0.3;
+         }
+         program { name: "selected";
+            signal: "elm,state,selected";
+            source: "elm";
+            script {
+                set_state(PART:"focus_bg", "enabled", 0.0);
+                set_int(highlight_timer, timer(0.3, "focus_off", 1));
+            }
+            after: "touch_snd";
+         }
+         program { name: "unselected";
+            signal: "elm,state,unselected";
+            source: "elm";
+            script {
+            set_state(PART:"focus_bg", "default", 0.0);
+                if (get_int(highlight_timer)) {
+                    cancel_timer(get_int(highlight_timer));
+                }
+            }
+         }
+         GENGRID_PROGRAM_DEFAULT(
+            target: "item_bg";
+            target: "item_real_bg";
+            target: "elm.swallow.icon";
+         )
+      }
+
+   }
+
+#define GENGRID_DEFAULT_LEFT_TOP_PADDING_LAND_INC 6 2
+#define GENGRID_DEFAULT_RIGHT_BOTTOM_PADDING_LAND_INC 6 1
+#define GENGRID_DEFAULT_LEFT_TOP_FOCUS_PADDING_LAND_INC 4 0
+#define GENGRID_DEFAULT_RIGHT_BOTTOM_FOCUS_PADDING_LAND_INC 4 0
+
+
+
+   group { name: "elm/gengrid/item/ise/customized_default_style_land2/default";
+                data.item: "texts" "elm.text";
+                data.item: "contents" "elm.swallow.icon";
+                images {
+                       image : "images/gengrid/handwriting_emoticon_pressed.png" COMP;
+                       image : "images/gengrid/00_thumbs_loading_bg.png" COMP;
+                }
+                script {
+                       public downed;
+                       public movement;
+                       public highlight_timer;
+                       public focus_off(val) {
+                          if (get_int(highlight_timer))
+                                  cancel_timer(get_int(highlight_timer));
+                          set_int(highlight_timer, 0);
+                          set_state(PART:"focus_bg", "default", 0.0);
+                       }
+                       public focus_mouse_down(val) {
+                          if (get_int(highlight_timer))
+                                 cancel_timer(get_int(highlight_timer));
+                          set_int(highlight_timer, 0);
+                          set_state(PART:"focus_bg", "enabled", 0.0);
+                       }
+                       public focus_mouse_up(val) {
+                          if (get_int(highlight_timer))
+                                 cancel_timer(get_int(highlight_timer));
+                          set_int(highlight_timer, 0);
+                          set_state(PART:"focus_bg", "default", 0.0);
+                       }
+                        public select_mouse_down(val) {
+                          if (get_int(highlight_timer))
+                                 cancel_timer(get_int(highlight_timer));
+                          set_int(highlight_timer, 0);
+                          set_state(PART:"select_clip", "selected", 0.0);
+                       }
+                       public select_mouse_up(val) {
+                          if (get_int(highlight_timer))
+                                 cancel_timer(get_int(highlight_timer));
+                          set_int(highlight_timer, 0);
+                          set_state(PART:"select_clip", "default", 0.0);
+                       }
+                }
+
+                parts {
+                       part { name: "select_clip";
+                          type: RECT;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 visible: 0;
+                          }
+                          description { state: "selected" 0.0;
+                                 visible: 0;
+                          }
+                       }
+                       part { name: "bg";
+                          type: RECT;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 color: GENGRID_PART_BACKGROUND_COLOR_INC;
+                          }
+                       }
+                       part { name: "left_top_padding";
+                          type: SPACER;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_LEFT_TOP_PADDING_LAND_INC;
+                                 align: 0.0 0.0;
+                                 fixed: 1 1;
+                                 rel1.to: "bg";
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "bg";
+                                 }
+                          }
+                       }
+                       part { name: "right_bottom_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_RIGHT_BOTTOM_PADDING_LAND_INC;
+                                 align: 1.0 1.0;
+                                 fixed: 1 1;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "bg";
+                                 }
+                                 rel2.to: "bg";
+                          }
+                       }
+                       part { name: "item_bg";
+                          type: SPACER;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "left_top_padding";
+                                 }
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "right_bottom_padding";
+                                 }
+                          }
+                       }
+                       part { name: "item_bg_left_top_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_ITEM_BG_LEFT_TOP_PADDING_INC;
+                                 align: 0.0 0.0;
+                                 fixed: 1 1;
+                                 rel1.to: "item_bg";
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "item_bg";
+                                 }
+                          }
+                       }
+                       part { name: "item_bg_right_bottom_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_ITEM_BG_RIGHT_BOTTOM_PADDING_INC;
+                                 align: 1.0 1.0;
+                                 fixed: 1 1;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "item_bg";
+                                 }
+                                 rel2.to: "item_bg";
+                          }
+                       }
+                       part { name: "item_real_bg";
+                          type: IMAGE;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 visible: 0;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "item_bg_left_top_padding";
+                                 }
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "item_bg_right_bottom_padding";
+                                 }
+                                 image.normal: "images/gengrid/00_thumbs_loading_bg.png";
+                          }
+                       }
+                       part { name: "item_real_bg_left_top_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+                                 align: 0.0 0.0;
+                                 fixed: 1 1;
+                                 rel1.to: "item_real_bg";
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "item_real_bg";
+                                 }
+                          }
+                       }
+                       part { name: "item_real_bg_right_bottom_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_ITEM_REAL_BG_RIGHT_PADDING_INC;
+                                 align: 1.0 1.0;
+                                 fixed: 1 1;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "item_real_bg";
+                                 }
+                                 rel2.to: "item_real_bg";
+                          }
+                       }
+                       part { name: "elm.text";
+                               type: TEXTBLOCK;
+                               mouse_events: 0;
+                               scale: 1;
+                               description { state: "default" 0.0;
+                                       min: 0 48;
+                                       align: 0.5 1.0;
+                                       text {
+                                               style: "gengrid_myfile_in_text_style";
+                                               min: 0 1;
+                                               align: 0.0 0.5;
+                                       }
+                               }
+                       }
+                       part { name: "elm.swallow.icon";
+                          type: SWALLOW;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "item_real_bg_left_top_padding";
+                                 }
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "item_real_bg_right_bottom_padding";
+                                 }
+                          }
+                       }
+                       part { name: "reorder_bg";
+                          type: RECT;
+                          scale : 1;
+                          repeat_events: 1;
+                          description { state: "default" 0.0;
+                                 color: GENGRID_PART_BG_COLOR_INC;
+                                 rel1.to: "item_bg";
+                                 rel2.to: "item_bg";
+                          }
+                          description { state: "enabled" 0.0;
+                                 inherit: "default" 0.0;
+                                 color: GENGRID_PART_REORDER_DEFAULT_BG_COLOR_INC;
+                          }
+                       }
+                       part { name: "focus_bg_left_top_padding";
+                          type: SPACER;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_LEFT_TOP_FOCUS_PADDING_LAND_INC;
+                                 align: 0.0 0.0;
+                                 fixed: 1 1;
+                                 rel1.to: "bg";
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "bg";
+                                 }
+                          }
+                       }
+                       part { name: "focus_bg_right_bottom_padding";
+                          type: SPACER;
+                          scale: 1;
+                          description { state: "default" 0.0;
+                                 min: GENGRID_DEFAULT_RIGHT_BOTTOM_FOCUS_PADDING_LAND_INC;
+                                 align: 1.0 1.0;
+                                 fixed: 1 1;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "bg";
+                                 }
+                                 rel2.to: "bg";
+                          }
+                       }
+                       part { name: "focus_bg";
+                          type: IMAGE;
+                          scale : 1;
+                          description { state: "default" 0.0;
+                                 visible: 0;
+                                 rel1 {
+                                        relative: 1.0 1.0;
+                                        to: "focus_bg_left_top_padding";
+                                 }
+                                 rel2 {
+                                        relative: 0.0 0.0;
+                                        to: "focus_bg_right_bottom_padding";
+                                 }
+                                 image.normal: "images/gengrid/handwriting_emoticon_pressed.png";
+                                 image.border: 3 3 3 6;
+                          }
+                          description { state: "enabled" 0.0;
+                                 inherit: "default" 0.0;
+                                 visible: 1;
+                          }
+                       }
+                }
+                programs {
+            program { name: "touch_snd";
+               signal: "touch_snd,1";
+               source: "elm";
+               action: RUN_PLUGIN "touch_sound";
+                          }
+
+                       program { name: "go_reorder_disabled";
+                          signal: "elm,state,reorder,disabled";
+                          source: "elm";
+                          action: STATE_SET "default" 0.0;
+                          target: "reorder_bg";
+                          target: "focus_bg";
+                          transition: ACCELERATE 0.3;
+                       }
+                       program { name: "go_reorder_enabled";
+                          signal: "elm,state,reorder,enabled";
+                          source: "elm";
+                          action: STATE_SET "enabled" 0.0;
+                          target: "reorder_bg";
+                          target: "focus_bg";
+                          transition: DECELERATE 0.3;
+                       }
+            program { name: "selected";
+               signal: "elm,state,selected";
+                          source: "elm";
+               script {
+                   set_state(PART:"focus_bg", "enabled", 0.0);
+                   set_int(highlight_timer, timer(0.3, "focus_off", 1));
+               }
+               after: "touch_snd";
+                       }
+            program { name: "unselected";
+               signal: "elm,state,unselected";
+                          source: "elm";
+               script {
+               set_state(PART:"focus_bg", "default", 0.0);
+                   if (get_int(highlight_timer)) {
+                       cancel_timer(get_int(highlight_timer));
+                   }
+                  }
+                       }
+                       GENGRID_PROGRAM_DEFAULT(
+                          target: "item_bg";
+                          target: "item_real_bg";
+                          target: "elm.swallow.icon";
+                       )
+                }
+
+         }
+
+   group { name: "elm/gengrid/item/ise/customized_default_style_port/default";
+      data.item: "contents" "elm.swallow.icon";
+      parts {
+         part { name: "bg";
+            scale: 1;
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "left_top_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: 12 5;
+               align: 0.0 0.0;
+               visible: 0;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "right_bottom_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: 12 5;
+               align: 1.0 1.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "right_bottom_padding";
+               }
+            }
+         }
+      }
+   }
+
+   group { name: "elm/gengrid/item/ise/customized_default_style_land/default";
+      data.item: "contents" "elm.swallow.icon";
+      parts {
+         part { name: "bg";
+            scale: 1;
+            type: RECT;
+            description { state: "default" 0.0;
+               color: 0 0 0 0;
+            }
+         }
+         part { name: "left_top_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: 12 0;
+               align: 0.0 0.0;
+               visible: 0;
+               rel1.to: "bg";
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "bg";
+               }
+            }
+         }
+         part { name: "right_bottom_padding";
+            type: RECT;
+            scale : 1;
+            description { state: "default" 0.0;
+               min: 12 6;
+               align: 1.0 1.0;
+               visible: 0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "bg";
+               }
+               rel2.to: "bg";
+            }
+         }
+         part { name: "elm.swallow.icon";
+            type: SWALLOW;
+            scale : 1;
+            description { state: "default" 0.0;
+               rel1 {
+                  relative: 1.0 1.0;
+                  to: "left_top_padding";
+               }
+               rel2 {
+                  relative: 0.0 0.0;
+                  to: "right_bottom_padding";
+               }
+            }
+         }
+      }
+   }
+ }
diff --git a/data/edc/gengrid/layout_sticker_keypad.edc b/data/edc/gengrid/layout_sticker_keypad.edc
new file mode 100755 (executable)
index 0000000..12c804a
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+
+#define CANDIDATE_WINDOW_HEIGHT                                                60
+
+#define STICKER_AREA_WIDTH_PORT                                        480
+#define STICKER_AREA_HEIGHT_PORT                                       220
+
+#define STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT            90
+#define STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND            64
+
+#define STICKER_AREA_WIDTH_LAND                                        800
+#define STICKER_AREA_HEIGHT_LAND                                       158
+
+#define TOP_VERTICAL_BORDER_LAND_CANDIDATE_ON          (6 + CANDIDATE_WINDOW_HEIGHT)
+#define TOP_VERTICAL_BORDER_LAND_CANDIDATE_OFF         6
+
+#define BG( COLOR ) \
+       part { name: "bg"; \
+               type: RECT; \
+               scale : 1; \
+               description { state: "default" 0.0; \
+                       rel1.relative: 0.0 0.0; \
+                       rel2.relative: 1.0 1.0; \
+                       color: COLOR; \
+                       visible: 1; \
+               }       \
+       }       \
+
+#define PAD( l, r, t, b) \
+    part { name: "pad_tl"; \
+       type: SPACER; \
+       scale: 1; \
+       description { state: "default" 0.0; \
+         align: 0.0 0.0; \
+         min: l t; \
+         fixed: 1 1; \
+         rel1 { \
+                relative: 0.0 0.0; \
+         } \
+         rel2 { \
+                relative: 0.0 0.0; \
+         } \
+       } \
+    } \
+    part { name: "pad_rb"; \
+       type: SPACER; \
+       scale: 1; \
+       description { state: "default" 0.0; \
+                 align: 1.0 1.0; \
+          min: r b; \
+         fixed: 1 1; \
+         rel1 { \
+                relative: 1.0 1.0; \
+         } \
+         rel2 { \
+                relative: 1.0 1.0; \
+         } \
+       } \
+    } \
+
+
+collections
+{
+       base_scale: 1.8;
+       group
+       {
+               name:   "sticker.main.portrait.candidate.on";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_ON, STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT)
+                       part
+                       {
+                               name:"sticker.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: STICKER_AREA_WIDTH_PORT STICKER_AREA_HEIGHT_PORT + CANDIDATE_WINDOW_HEIGHT;
+                                       //fixed: 1 1;
+                                       //align: 0 0;
+                                       rel1 { relative: 1.0 1.0; to: "pad_tl"; }
+                                       rel2 { relative: 0.0 0.0; to: "pad_rb"; }
+                               }
+                       }
+               }
+       }
+
+       group
+       {
+               name:   "sticker.main.portrait.candidate.off";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_OFF, STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT)
+                       part
+                       {
+                               name:"sticker.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: STICKER_AREA_WIDTH_PORT STICKER_AREA_HEIGHT_PORT;
+                                       //fixed: 1 1;
+                                       //align: 0 0;
+                                       rel1 { relative: 1.0 1.0; to: "pad_tl"; }
+                                       rel2 { relative: 0.0 0.0; to: "pad_rb"; }
+                               }
+                       }
+               }
+       }
+
+       group
+       {
+               name:   "sticker.main.landscape.candidate.on";
+               parts
+               {
+
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_ON, STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND)
+                       part
+                       {
+                               name:"sticker.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: STICKER_AREA_WIDTH_LAND STICKER_AREA_HEIGHT_LAND;
+                                       //fixed: 1 1;
+                                       //align: 0 0;
+                                       rel1 { relative: 1.0 1.0; to: "pad_tl"; }
+                                       rel2 { relative: 0.0 0.0; to: "pad_rb"; }
+                               }
+                       }
+               }
+       }
+
+       group
+       {
+               name:   "sticker.main.landscape.candidate.off";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_OFF, STICKER_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND)
+                       part
+                       {
+                               name:"sticker.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: STICKER_AREA_WIDTH_LAND STICKER_AREA_HEIGHT_LAND;
+                                       //fixed: 1 1;
+                                       //align: 0 0;
+                                       rel1 { relative: 1.0 1.0; to: "pad_tl"; }
+                                       rel2 { relative: 0.0 0.0; to: "pad_rb"; }
+                               }
+                       }
+               }
+       }
+
+}
index 2f43ff6..4351b81 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<layout width="391" height="242" style="popup" key_width="75" key_height="116" key_spacing="0" row_spacing="2" hit_left="1" hit_right="1" hit_top="1" hit_bottom="1" label_type="PUNC_POPUP" vibe_style="DEFAULT" sound_style="DEFAULT">
+<layout width="468" height="242" style="popup" key_width="75" key_height="116" key_spacing="0" row_spacing="2" hit_left="1" hit_right="1" hit_top="1" hit_bottom="1" label_type="PUNC_POPUP" vibe_style="DEFAULT" sound_style="DEFAULT">
   <image_path>
     <button_normal>nine patch/popup_bg.#.png</button_normal>
   </image_path>
@@ -7,7 +7,7 @@
     <rec button="pressed">nine patch/popup_bg_press_middle.#.png</rec>
   </background_image>
   <row>
-    <key button_type="uiitem" x="0" y="0" width="391" height="242">
+    <key button_type="uiitem" x="0" y="0" width="468" height="242">
       <background_image>
         <rec>nine patch/popup_stroke.#.png</rec>
       </background_image>
         <rec>~</rec>
       </label>
     </key>
+    <key button_type="uiitem" width="2">
+      <background_image>
+        <rec button="normal">nine patch/popup_line.#.png</rec>
+      </background_image>
+    </key>
+    <key hit_right="4">
+      <label>
+        <rec>"</rec>
+      </label>
+    </key>
   </row>
   <row x="0" y="120">
-    <key button_type="uiitem" width="391" height="2">
+    <key button_type="uiitem" width="468" height="2">
       <background_image>
         <rec button="normal">nine patch/popup_line.#.png</rec>
       </background_image>
         <rec button="normal">nine patch/popup_line.#.png</rec>
       </background_image>
     </key>
-    <key key_type="modechange" hit_right="4">
+    <key key_type="modechange">
       <key_value>
         <rec>FLOATING</rec>
       </key_value>
         <rec button="disabled">icon/bubble/icon_floating_keypad_dim.png</rec>
       </image_label>
     </key>
+    <key button_type="uiitem" width="2">
+      <background_image>
+        <rec button="normal">nine patch/popup_line.#.png</rec>
+      </background_image>
+    </key>
+    <key key_type="modechange" hit_right="4" custom_id="STICKER_KEY">
+      <key_value>
+        <rec>STICKER_LAYOUT</rec>
+      </key_value>
+      <image_label>
+        <rec button="normal">icon/bubble/icon_sticker.png</rec>
+        <rec button="pressed">icon/bubble/icon_sticker_press.png</rec>
+        <rec button="disabled">icon/bubble/icon_sticker_dim.png</rec>
+      </image_label>
+    </key>
   </row>
 </layout>
diff --git a/data/layout/mobile/LYT_LANDSCAPE_STICKER.xml b/data/layout/mobile/LYT_LANDSCAPE_STICKER.xml
new file mode 100644 (file)
index 0000000..75003cd
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layout direction="landscape" width="1280" height="318" magnifier="true" key_width="96" key_height="65" key_spacing="16" row_spacing="8" hit_left="8" hit_right="8" hit_top="4" hit_bottom="8" label_type="QTY_LAND_DEFAULT" vibe_style="DEFAULT" sound_style="DEFAULT" sw_background="true">
+  <background_color>
+    <r>210</r>
+    <g>213</g>
+    <b>217</b>
+    <a>255</a>
+  </background_color>
+  <row x="87" y="244">
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123" width="153" hit_left="87">
+      <label>
+        <rec>abc</rec>
+      </label>
+      <background_image>
+        <rec button="normal">nine patch/btn_02.#.png</rec>
+        <rec button="pressed">nine patch/btn_press.#.png</rec>
+        <rec button="disabled">nine patch/btn_02.#.png</rec>
+      </background_image>
+      <key_value>
+        <rec>CUR_LANG</rec>
+      </key_value>
+    </key>
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123_2">
+      <label>
+        <rec>?123</rec>
+      </label>
+      <background_image>
+        <rec button="normal">nine patch/btn_02.#.png</rec>
+        <rec button="pressed">nine patch/btn_press.#.png</rec>
+        <rec button="disabled">nine patch/btn_02.#.png</rec>
+      </background_image>
+      <key_value>
+        <rec>SYM_QTY_1</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_RECENTLY_USED" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">icon_recent.png</rec>
+      </image_label>
+      <key_value>
+      <rec>STICKER_GROUP_RECENTLY_USED</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_1" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_1</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_2" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_2</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_3" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_3</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_4" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_4</rec>
+      </key_value>
+    </key>
+    <key button_type="selfish" key_type="control" use_magnifier="true" use_repeat_key="true" width="153" hit_right="87">
+      <image_label>
+        <rec button="normal">icon/54x54/icon_back_nor.png</rec>
+        <rec button="pressed">icon/54x54/icon_back_press.png</rec>
+        <rec button="disabled">icon/54x54/icon_back_dim.png</rec>
+      </image_label>
+      <background_image>
+        <rec button="normal">nine patch/btn_02.#.png</rec>
+        <rec button="pressed">nine patch/btn_press.#.png</rec>
+        <rec button="disabled">nine patch/btn_02.#.png</rec>
+      </background_image>
+      <key_value>
+        <rec>BackSpace</rec>
+      </key_value>
+    </key>
+  </row>
+</layout>
diff --git a/data/layout/mobile/LYT_PORTRAIT_STICKER.xml b/data/layout/mobile/LYT_PORTRAIT_STICKER.xml
new file mode 100644 (file)
index 0000000..b12b71f
--- /dev/null
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layout width="720" height="442" magnifier="true" key_width="65" key_height="104" key_spacing="16" row_spacing="0" hit_left="3" hit_right="3" hit_top="0" hit_bottom="0" label_type="QTY_DEFAULT" vibe_style="DEFAULT" sound_style="DEFAULT" sw_background="true">
+  <background_color>
+    <r>237</r>
+    <g>238</g>
+    <b>240</b>
+    <a>255</a>
+  </background_color>
+  <background_image>
+    <rec button="pressed">btn_bg_press.png</rec>
+  </background_image>
+  <row x="8" y="338">
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123_DARK" width="100">
+      <label>
+        <rec>abc</rec>
+      </label>
+      <key_value>
+        <rec>CUR_LANG</rec>
+      </key_value>
+    </key>
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123_2_DARK">
+      <label>
+        <rec>?123</rec>
+      </label>
+      <key_value>
+        <rec>SYM_QTY_1</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_RECENTLY_USED" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">icon_recent.png</rec>
+      </image_label>
+      <key_value>
+      <rec>STICKER_GROUP_RECENTLY_USED</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_1" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_1</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_2" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_2</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_3" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_3</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" custom_id="STICKER_GROUP_4" multitouch_type="settle_previous">
+      <key_value>
+        <rec>STICKER_GROUP_4</rec>
+      </key_value>
+    </key>
+    <key button_type="selfish" key_type="control" use_magnifier="true" use_repeat_key="true" width="101">
+      <image_label>
+        <rec button="normal">icon_back_nor.png</rec>
+        <rec button="pressed">icon_back_press.png</rec>
+        <rec button="disabled">icon_back_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>BackSpace</rec>
+      </key_value>
+    </key>
+  </row>
+</layout>
index 7e675d2..2235cd8 100644 (file)
       <landscape>LYT_CM_POPUP.xml</landscape>
     </layouts>
   </mode>
+  <mode name="STICKER_LAYOUT">
+    <layouts>
+      <portrait>LYT_PORTRAIT_STICKER.xml</portrait>
+      <landscape>LYT_LANDSCAPE_STICKER.xml</landscape>
+    </layouts>
+  </mode>
 </input_mode_table>
diff --git a/data/pixmaps/default/mobile/icon/54x54/icon_sticker_dim.png b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_dim.png
new file mode 100644 (file)
index 0000000..adb21a5
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_dim.png differ
diff --git a/data/pixmaps/default/mobile/icon/54x54/icon_sticker_nor.png b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_nor.png
new file mode 100644 (file)
index 0000000..adb21a5
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_nor.png differ
diff --git a/data/pixmaps/default/mobile/icon/54x54/icon_sticker_press.png b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_press.png
new file mode 100644 (file)
index 0000000..adb21a5
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/54x54/icon_sticker_press.png differ
diff --git a/data/pixmaps/default/mobile/icon/bubble/icon_sticker.png b/data/pixmaps/default/mobile/icon/bubble/icon_sticker.png
new file mode 100644 (file)
index 0000000..a440023
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/bubble/icon_sticker.png differ
diff --git a/data/pixmaps/default/mobile/icon/bubble/icon_sticker_dim.png b/data/pixmaps/default/mobile/icon/bubble/icon_sticker_dim.png
new file mode 100644 (file)
index 0000000..d29a90a
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/bubble/icon_sticker_dim.png differ
diff --git a/data/pixmaps/default/mobile/icon/bubble/icon_sticker_press.png b/data/pixmaps/default/mobile/icon/bubble/icon_sticker_press.png
new file mode 100644 (file)
index 0000000..a440023
Binary files /dev/null and b/data/pixmaps/default/mobile/icon/bubble/icon_sticker_press.png differ
diff --git a/data/pixmaps/default/mobile/icon_recent.png b/data/pixmaps/default/mobile/icon_recent.png
new file mode 100644 (file)
index 0000000..6def112
Binary files /dev/null and b/data/pixmaps/default/mobile/icon_recent.png differ
index 38adb49..f31c42d 100644 (file)
@@ -29,6 +29,8 @@ BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(pkgmgr-info)
+BuildRequires:  pkgconfig(capi-ui-sticker-consumer)
+BuildRequires:  pkgconfig(capi-content-mime-type)
 Requires:       ise-engine-glm
 Requires:       ise-engine-default
 
diff --git a/src/include/ise-sticker-config.h b/src/include/ise-sticker-config.h
new file mode 100644 (file)
index 0000000..5963ee2
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ISE_STICKER_CONFIG_H_
+#define _ISE_STICKER_CONFIG_H_
+
+#define EVAS_CANDIDATE_LAYER    32000
+#define STICKER_RECENTLY_USED_NUM 28
+
+#define ISE_HEIGHT_PORT         442
+#define ISE_HEIGHT_LAND         318
+
+#define STICKER_LAYOUT_LEFT_MARGIN 88
+#define IND_NUM 20
+
+#define STICKER_ICON_WIDTH_LAND 70
+#define STICKER_ICON_HEIGHT_LAND 70
+
+#define STICKER_ICON_WIDTH_PORT 50
+#define STICKER_ICON_HEIGHT_PORT 50
+
+#define STICKER_ICON_GAP_WIDTH_PORT 10
+#define STICKER_ICON_GAP_HEIGHT_PORT 2
+
+#ifdef _COMMON
+#define STICKER_ICON_GAP_WIDTH_LAND 16
+#define STICKER_ICON_GAP_HEIGHT_LAND 16
+#else
+#define STICKER_ICON_GAP_WIDTH_LAND 4
+#define STICKER_ICON_GAP_HEIGHT_LAND 0
+#endif
+
+#define STICKER_GENGRID_ITEM_STYLE_PORT2 "ise/customized_default_style_port2"
+#define STICKER_GENGRID_ITEM_STYLE_LAND2 "ise/customized_default_style_land2"
+
+#define STICKER_WIDTH_PORT (STICKER_ICON_WIDTH_PORT + STICKER_ICON_GAP_WIDTH_PORT)
+#define STICKER_HEIGHT_PORT (STICKER_ICON_HEIGHT_PORT + STICKER_ICON_GAP_HEIGHT_PORT)
+
+#define STICKER_WIDTH_LAND (STICKER_ICON_WIDTH_LAND + STICKER_ICON_GAP_WIDTH_LAND)
+#define STICKER_HEIGHT_LAND (STICKER_ICON_HEIGHT_LAND + STICKER_ICON_GAP_HEIGHT_LAND)
+
+#define STICKER_EDJ_FILE_PATH RESDIR"/edje/layout_sticker_keypad.edj"
+#define CUSTOM_GENGRID_EDJ_FILE_PATH RESDIR"/edje/customised_sticker_gengrid.edj"
+
+#define STICKER_EDJ_GROUP_PORT_CANDIDATE_ON "sticker.main.portrait.candidate.on"
+#define STICKER_EDJ_GROUP_LAND_CANDIDATE_ON "sticker.main.landscape.candidate.on"
+
+#define STICKER_EDJ_GROUP_PORT_CANDIDATE_OFF "sticker.main.portrait.candidate.off"
+#define STICKER_EDJ_GROUP_LAND_CANDIDATE_OFF "sticker.main.landscape.candidate.off"
+
+#endif /* _ISE_STICKER_CONFIG_H_ */
\ No newline at end of file
diff --git a/src/include/ise-sticker-mode.h b/src/include/ise-sticker-mode.h
new file mode 100644 (file)
index 0000000..54f9cb0
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ISE_STICKER_MODE_H_
+#define _ISE_STICKER_MODE_H_
+
+#include <string>
+
+enum sticker_search_type_e {
+    STICKER_SEARCH_BY_RECENTLY_USED,
+    STICKER_SEARCH_BY_GROUP_NAME,
+};
+
+enum sticker_group_e {
+    STICKER_GROUP_DESTROY = -1,
+    STICKER_GROUP_RECENTLY_USED,
+    STICKER_GROUP_1,
+    STICKER_GROUP_2,
+    STICKER_GROUP_3,
+    STICKER_GROUP_4,
+    MAX_STICKER_GROUP,
+};
+
+struct sticker_info_s{
+    std::string uri;
+    std::string group;
+    std::string thumbnail;
+    std::string description;
+};
+
+void ise_sticker_show_layout(sticker_group_e sticker_group, int screen_degree, bool is_candidate_on, void *main_window);
+void ise_sticker_destroy_layout();
+void ise_sticker_change_group(sticker_group_e sticker_group);
+bool ise_sticker_is_show();
+sticker_group_e ise_sticker_get_group_id(const char *group_name);
+bool ise_sticker_check_sticker_exists();
+
+#endif /* _ISE_STICKER_MODE_H_ */
\ No newline at end of file
index 762a1be..6cacc9b 100644 (file)
@@ -67,6 +67,7 @@ enum ISE_LAYOUT{
     ISE_LAYOUT_STYLE_DATETIME,
     ISE_LAYOUT_STYLE_EMOTICON,
     ISE_LAYOUT_STYLE_VOICE,
+    ISE_LAYOUT_STYLE_STICKER,
 
     ISE_LAYOUT_STYLE_NUMBERONLY_SIG,
     ISE_LAYOUT_STYLE_NUMBERONLY_DEC,
@@ -106,6 +107,7 @@ const ISE_DEFAULT_VALUES g_ise_default_values[ISE_LAYOUT_STYLE_MAX] = {
     {"NUMONLY_QTY",     "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_DATETIME */
     {"",                "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_EMOTICON */
     {"STT_3X4",         "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_VOICE */
+    {"",                "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_STICKER */
 
     {"NUMONLY_QTY",     "DEFAULT",   FALSE },       /* ISE_LAYOUT_STYLE_NUMBERONLY_SIG */
     {"NUMONLY_QTY",     "DEFAULT",   FALSE },       /* ISE_LAYOUT_STYLE_NUMBERONLY_DEC */
@@ -130,6 +132,7 @@ const ISE_DEFAULT_VALUES g_ise_default_values[ISE_LAYOUT_STYLE_MAX] = {
     {"DATETIME_3X4",    "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_DATETIME */
     {"EMOTICON_LAYOUT", "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_EMOTICON */
     {"STT_3X4",         "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_VOICE */
+    {"",                "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_STICKER */
 
     {"NUMONLY_3X4_SIG",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_SIG */
     {"NUMONLY_3X4_DEC",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_DEC */
@@ -154,6 +157,7 @@ const ISE_DEFAULT_VALUES g_ise_default_values[ISE_LAYOUT_STYLE_MAX] = {
     {"DATETIME_3X4",    "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_DATETIME */
     {"EMOTICON_LAYOUT", "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_EMOTICON */
     {"STT_3X4",         "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_VOICE */
+    {"STICKER_LAYOUT",  "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_STICKER */
 
     {"NUMONLY_3X4_SIG",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_SIG */
     {"NUMONLY_3X4_DEC",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_DEC */
diff --git a/src/ise-sticker-mode.cpp b/src/ise-sticker-mode.cpp
new file mode 100644 (file)
index 0000000..3e45799
--- /dev/null
@@ -0,0 +1,601 @@
+/*
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include "ise-sticker-mode.h"
+#include "ise-sticker-config.h"
+#include "config.h"
+#include "candidate-factory.h"
+#include "ise.h"
+#include <sticker_consumer.h>
+#include <inputmethod.h>
+#include <mime_type.h>
+#include <sclutils.h>
+#include <sclfeedback.h>
+#include <vector>
+#include <string>
+
+#undef LOG_TAG
+#define LOG_TAG "ISE_DEFAULT"
+
+using namespace std;
+
+const char *sticker_group_name[] =
+{
+    "STICKER_GROUP_RECENTLY_USED",
+    "STICKER_GROUP_1",
+    "STICKER_GROUP_2",
+    "STICKER_GROUP_3",
+    "STICKER_GROUP_4"
+};
+
+static sticker_consumer_h sticker_consumer = NULL;
+static map<int, string> sticker_group_list;
+static map<string, string> sticker_group_image_list;
+static vector<pair<string, sticker_info_s>> sticker_list;
+static vector<sticker_info_s> recent_sticker_list;
+
+static Evas_Object *layout = NULL;
+static Evas_Object *gengrid = NULL;
+static Elm_Theme *theme = NULL;
+static Elm_Gengrid_Item_Class *gic = NULL;
+
+static bool is_sticker_mode = false;
+static sticker_group_e current_sticker_group = STICKER_GROUP_DESTROY;
+static bool sticker_exists = false;
+static int sticker_group_cnt = 0;
+
+static void ise_sticker_create_consumer_handle()
+{
+    int ret = sticker_consumer_create(&sticker_consumer);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to create sticker consumer. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+}
+
+static void ise_sticker_destroy_consumer_handle()
+{
+    int ret = sticker_consumer_destroy(sticker_consumer);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to destroy sticker consumer. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+    sticker_consumer = NULL;
+}
+
+static void get_sticker_data(sticker_search_type_e type, sticker_data_h sticker_data)
+{
+    int ret;
+    sticker_data_uri_type_e uri_type;
+    char *uri = NULL;
+    char *group = NULL;
+    char *thumbnail = NULL;
+    char *description = NULL;
+
+    ret = sticker_data_get_uri(sticker_data, &uri_type, &uri);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to get sticker URI. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    ret = sticker_data_get_group_name(sticker_data, &group);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to get sticker group. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    ret = sticker_data_get_thumbnail(sticker_data, &thumbnail);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to get sticker thumbnail. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    ret = sticker_data_get_description(sticker_data, &description);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to get sticker description. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    if (uri && strlen(uri)) {
+        sticker_info_s sticker_info;
+        sticker_info.uri = string(uri);
+        sticker_info.group = string(group);
+        sticker_info.thumbnail = (thumbnail && strlen(thumbnail)) ? string(thumbnail) : string(uri);
+        sticker_info.description = string(description);
+
+        if (type == STICKER_SEARCH_BY_RECENTLY_USED)
+            recent_sticker_list.push_back(sticker_info);
+        else
+            sticker_list.push_back(make_pair(sticker_info.group, sticker_info));
+    }
+
+    if (uri) {
+        free(uri);
+        uri = NULL;
+    }
+
+    if (group) {
+        free(group);
+        group = NULL;
+    }
+
+    if (thumbnail) {
+        free(thumbnail);
+        thumbnail = NULL;
+    }
+
+    if (description) {
+        free(description);
+        description = NULL;
+    }
+}
+
+static void _sticker_info_cb(sticker_data_h sticker_data, void *user_data)
+{
+    get_sticker_data(STICKER_SEARCH_BY_GROUP_NAME, sticker_data);
+}
+
+static void _recent_sticker_info_cb(sticker_data_h sticker_data, void *user_data)
+{
+    get_sticker_data(STICKER_SEARCH_BY_RECENTLY_USED, sticker_data);
+}
+
+static void _group_list_cb(const char *group, void *user_data)
+{
+    int ret;
+    int offset = 0;
+    int count = 1000;
+    int result = 0;
+
+    LOGD("group_list_cb (group : %s)", group);
+
+    sticker_group_list.insert(make_pair(++sticker_group_cnt, string(group)));
+    sticker_group_image_list.insert(make_pair(string(group), ""));
+
+    ret = sticker_consumer_data_foreach_by_group(sticker_consumer, offset, count, &result, group, _sticker_info_cb, NULL);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("sticker_consumer_data_foreach_all() failed. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+}
+
+static void _group_image_list_cb(const char *group, sticker_data_uri_type_e type, const char *uri, void *user_data)
+{
+    sticker_group_image_list.find(string(group))->second = string(uri);
+}
+
+static void ise_sticker_get_all_sticker()
+{
+    int ret = 0;
+    sticker_group_cnt = 0;
+
+    if (!sticker_consumer)
+        return;
+
+    ret = sticker_consumer_group_list_foreach_all(sticker_consumer, _group_list_cb, NULL);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("sticker_consumer_group_list_foreach_all() failed. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+}
+
+static void ise_sticker_get_recent_sticker()
+{
+    int ret = 0;
+    int result = 0;
+
+    if (!sticker_consumer)
+        return;
+
+    ret = sticker_consumer_get_recent_data_list(sticker_consumer, STICKER_RECENTLY_USED_NUM, &result, _recent_sticker_info_cb, NULL);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("sticker_consumer_get_recent_data_list() failed. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+}
+
+static void ise_sticker_get_group_image()
+{
+    int ret = 0;
+
+    if (!sticker_consumer)
+        return;
+
+    ret = sticker_consumer_group_image_list_foreach_all(sticker_consumer, _group_image_list_cb, NULL);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("sticker_consumer_group_image_list_foreach_all() failed. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+}
+
+static void ise_sticker_set_group_image()
+{
+    CSCLUI *ui = get_ui();
+    if (ui) {
+        for (int i = 1; i <= sticker_group_cnt; i++) {
+            const char *current_group = sticker_group_name[i];
+            const string group_name = sticker_group_list.find(i)->second;
+            const string file_path = sticker_group_image_list.find(group_name)->second;
+            sclchar* current_label[SCL_BUTTON_STATE_MAX] = {const_cast<sclchar*>(file_path.c_str()), const_cast<sclchar*>(file_path.c_str()), const_cast<sclchar*>(file_path.c_str())};
+            ui->set_private_key(current_group, const_cast<sclchar*>(""), current_label, NULL, 0, const_cast<sclchar*>(current_group), TRUE);
+        }
+    }
+}
+
+static Eina_Bool _focus_done(void *data)
+{
+    Elm_Object_Item *item = (Elm_Object_Item *)data;
+    elm_object_item_signal_emit(item, "mouse,up,1", "reorder_bg");
+    return ECORE_CALLBACK_CANCEL;
+}
+
+static void _multi_down(void *data, Evas *e, Evas_Object *o, void *event_info)
+{
+    Evas_Event_Multi_Down *ev = (Evas_Event_Multi_Down*)event_info;
+    if (ev->device >= IND_NUM)
+        return;
+
+    Elm_Object_Item *item;
+    item = elm_gengrid_at_xy_item_get(o, ev->canvas.x, ev->canvas.y, NULL, NULL);
+
+    elm_object_item_signal_emit(item, "mouse,down,1", "reorder_bg");
+    ecore_timer_add(0.5, _focus_done, item);
+}
+
+static void _multi_up(void *data, Evas *e, Evas_Object *o, void *event_info)
+{
+    Evas_Event_Multi_Up *ev = (Evas_Event_Multi_Up*)event_info;
+    if (ev->device >= IND_NUM)
+        return;
+
+    Elm_Object_Item *item = NULL;
+    item = elm_gengrid_at_xy_item_get(o, ev->canvas.x, ev->canvas.y, NULL, NULL);
+
+    elm_object_item_signal_emit(item, "mouse,up,1", "reorder_bg");
+    elm_gengrid_item_selected_set(item, EINA_TRUE);
+}
+
+static void ise_sticker_create_gengrid(unsigned short int screen_degree)
+{
+    gengrid = elm_gengrid_add(layout);
+    elm_object_theme_set(gengrid, theme);
+    elm_gengrid_align_set(gengrid, 0.5, 0);
+
+    evas_object_size_hint_weight_set(gengrid, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(gengrid, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+    bool landscape_device = get_landscape_device(screen_degree);
+
+    if (screen_degree == 0 || screen_degree == 180) {
+        elm_gengrid_item_size_set(gengrid,
+                                  ELM_SCALE_SIZE(landscape_device ? STICKER_WIDTH_LAND : STICKER_WIDTH_PORT),
+                                  ELM_SCALE_SIZE(landscape_device ? STICKER_HEIGHT_LAND : STICKER_HEIGHT_PORT));
+    }
+    else {
+        elm_gengrid_item_size_set(gengrid,
+                                  ELM_SCALE_SIZE(landscape_device ? STICKER_WIDTH_PORT : STICKER_WIDTH_LAND),
+                                  ELM_SCALE_SIZE(landscape_device ? STICKER_HEIGHT_PORT: STICKER_HEIGHT_LAND));
+    }
+
+    elm_gengrid_highlight_mode_set(gengrid, EINA_TRUE);
+    elm_gengrid_select_mode_set(gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
+    elm_gengrid_multi_select_set(gengrid, EINA_TRUE);
+
+    evas_object_event_callback_add(gengrid, EVAS_CALLBACK_MULTI_DOWN, _multi_down, NULL);
+    evas_object_event_callback_add(gengrid, EVAS_CALLBACK_MULTI_UP, _multi_up, NULL);
+}
+
+static const char *get_item_style_for_degree(int screen_degree)
+{
+    bool landscape_device = get_landscape_device(screen_degree);
+
+    if (screen_degree == 0 || screen_degree == 180) {
+        if (landscape_device)
+            return STICKER_GENGRID_ITEM_STYLE_LAND2;
+        else
+            return STICKER_GENGRID_ITEM_STYLE_PORT2;
+    }
+    else {
+        if (landscape_device)
+            return STICKER_GENGRID_ITEM_STYLE_PORT2;
+        else
+            return STICKER_GENGRID_ITEM_STYLE_LAND2;
+    }
+}
+
+static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part)
+{
+    sticker_info_s *sticker = (sticker_info_s *)data;
+
+    if (!sticker) return NULL;
+    if (strcmp(part, "elm.swallow.icon")) return NULL;
+
+    Evas_Object *icon = elm_icon_add(obj);
+    if (!(elm_image_file_set(icon, sticker->uri.c_str(), NULL)))
+        LOGE("failed to set file path. (%s)", sticker->uri.c_str());
+    elm_image_aspect_fixed_set(icon, EINA_FALSE);
+    elm_image_preload_disabled_set(icon, EINA_FALSE);
+    evas_object_show(icon);
+
+    return icon;
+}
+
+static void ise_sticker_create_item_class(unsigned short int screen_degree)
+{
+    if (!gic)
+        gic = elm_gengrid_item_class_new();
+
+    if (gic) {
+        gic->item_style = get_item_style_for_degree(screen_degree);
+        gic->func.text_get = NULL;
+        gic->func.content_get = grid_content_get;
+        gic->func.state_get = NULL;
+        gic->func.del = NULL;
+    }
+}
+
+void update_recent_sticker(sticker_info_s *sticker)
+{
+    int ret;
+    sticker_data_h sticker_data = NULL;
+
+    ret = sticker_data_get_handle(sticker->uri.c_str(), &sticker_data);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("Failed to get sticker handle. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    if (sticker_data) {
+        ret = sticker_consumer_add_recent_data(sticker_consumer, sticker_data);
+        if (ret != STICKER_ERROR_NONE)
+            LOGE("Failed to add recent sticker. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+        sticker_data_destroy(sticker_data);
+    }
+}
+
+static void _sticker_selected(void *data, Evas_Object *obj, void *event_info)
+{
+    sticker_info_s *sticker = (sticker_info_s *)data;
+    CONFIG_VALUES *config_values = get_config_values();
+    static CSCLUtils *utils = CSCLUtils::get_instance();
+
+    if (utils && config_values) {
+        if (config_values->sound_on)
+            utils->play_sound(DEFAULT_SOUND_STYLE);
+        if (config_values->vibration_on)
+            utils->play_vibration(DEFAULT_VIBRATION_STYLE, DEFAULT_VIBRATION_DURATION);
+    }
+
+    char *mime_type = NULL;
+    mime_type_get_mime_type_for_file(sticker->uri.c_str(), &mime_type);
+    ime_commit_content(sticker->uri.c_str(), sticker->description.c_str(), mime_type);
+    update_recent_sticker(sticker);
+
+    if (mime_type) {
+        free(mime_type);
+        mime_type = NULL;
+    }
+}
+
+static void ise_sticker_append_items_to_gengrid(sticker_group_e sticker_group)
+{
+    if (sticker_group != STICKER_GROUP_DESTROY) {
+        if (sticker_group == STICKER_GROUP_RECENTLY_USED) {
+            recent_sticker_list.clear();
+            ise_sticker_get_recent_sticker();
+            short int items = recent_sticker_list.size();
+            for (int i = 0; i < items; i++)
+                elm_gengrid_item_append(gengrid, gic, &(recent_sticker_list[i]), _sticker_selected, &(recent_sticker_list[i]));
+        } else {
+            const string group_name = sticker_group_list.find(sticker_group)->second;
+            vector<pair<string, sticker_info_s>>::iterator iter = sticker_list.begin();
+
+            while(!sticker_list.empty()) {
+                iter = find_if(iter, sticker_list.end(), [&group_name](const pair<string, sticker_info_s>& p) { return p.first == group_name;});
+                if (iter == sticker_list.end())
+                    break;
+
+                elm_gengrid_item_append(gengrid, gic, &(iter->second), _sticker_selected, &(iter->second));
+                ++iter;
+            }
+        }
+    }
+
+    Elm_Object_Item * it = elm_gengrid_first_item_get(gengrid);
+    elm_gengrid_item_show(it, ELM_GENGRID_ITEM_SCROLLTO_NONE);
+}
+
+void ise_sticker_show_layout(sticker_group_e sticker_group, int screen_degree, bool is_candidate_on, void *main_window)
+{
+    CSCLUI *ui = get_ui();
+    if (!ui)
+        return;
+
+    CONFIG_VALUES *config_values = get_config_values();
+    if (!config_values)
+        return;
+
+    if (sticker_consumer)
+        ise_sticker_destroy_layout();
+
+    if (sticker_group_list.size() != 0)
+        sticker_group_list.clear();
+
+    if (sticker_group_image_list.size() != 0)
+        sticker_group_image_list.clear();
+
+    if (sticker_list.size() != 0)
+        sticker_list.clear();
+
+    if (recent_sticker_list.size() != 0)
+        recent_sticker_list.clear();
+
+    ise_sticker_create_consumer_handle();
+    ise_sticker_get_all_sticker();
+    ise_sticker_get_recent_sticker();
+    ise_sticker_get_group_image();
+    ise_sticker_set_group_image();
+
+    layout = elm_layout_add((Evas_Object *)main_window);
+    evas_object_size_hint_weight_set(layout, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
+    evas_object_size_hint_align_set(layout, EVAS_HINT_FILL, EVAS_HINT_FILL);
+
+    int y = 0;
+    Candidate *candidate = get_candidate();
+    if (candidate && candidate->get_visible())
+        y = candidate->get_height();
+
+    read_ise_config_values();
+    if (config_values->floating_mode)
+        evas_object_move(layout, 0, y + FLOATING_TITLE_BAR_HEIGHT);
+    else
+        evas_object_move(layout, 0, y);
+
+    bool landscape_device = get_landscape_device(screen_degree);
+    if (is_candidate_on) {
+        if (screen_degree == 0 || screen_degree == 180) {
+            elm_layout_file_set(layout, STICKER_EDJ_FILE_PATH,
+                                landscape_device ?
+                                STICKER_EDJ_GROUP_LAND_CANDIDATE_ON :
+                                STICKER_EDJ_GROUP_PORT_CANDIDATE_ON);
+        }
+        else {
+            elm_layout_file_set(layout, STICKER_EDJ_FILE_PATH,
+                                landscape_device ?
+                                STICKER_EDJ_GROUP_PORT_CANDIDATE_ON :
+                                STICKER_EDJ_GROUP_LAND_CANDIDATE_ON);
+        }
+    } else {
+        sclint width = 0;
+        sclint height = 0;
+        ui->get_screen_resolution(&width, &height);
+        LOGD("screen width:%d, height:%d\n", width, height);
+        if (screen_degree == 0 || screen_degree == 180) {
+            elm_layout_file_set(layout, STICKER_EDJ_FILE_PATH,
+                                landscape_device ?
+                                STICKER_EDJ_GROUP_LAND_CANDIDATE_OFF :
+                                STICKER_EDJ_GROUP_PORT_CANDIDATE_OFF);
+
+            if (config_values->floating_mode)
+                evas_object_resize(layout, width * FLOATING_SCALE_RATE, ui->get_scaled_y(ISE_HEIGHT_PORT) - ELM_SCALE_SIZE(STICKER_HEIGHT_PORT));
+            else
+                evas_object_resize(layout, width, ui->get_scaled_y(landscape_device ? ISE_HEIGHT_LAND : ISE_HEIGHT_PORT));
+        } else {
+            elm_layout_file_set(layout, STICKER_EDJ_FILE_PATH,
+                                landscape_device ?
+                                STICKER_EDJ_GROUP_PORT_CANDIDATE_OFF :
+                                STICKER_EDJ_GROUP_LAND_CANDIDATE_OFF);
+
+            if (config_values->floating_mode)
+                evas_object_resize(layout, width * FLOATING_SCALE_RATE, ui->get_scaled_y(ISE_HEIGHT_LAND) * FLOATING_SCALE_RATE);
+            else {
+                evas_object_resize(layout, width, ui->get_scaled_y(landscape_device ? ISE_HEIGHT_PORT : ISE_HEIGHT_LAND));
+            }
+        }
+
+        if (screen_degree == 0 || screen_degree == 180) {
+            if (landscape_device) {
+                evas_object_resize(layout, width - ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN*2), ui->get_scaled_y(ISE_HEIGHT_LAND));
+                evas_object_move(layout, ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN), y);
+            }
+        } else {
+            if (config_values->floating_mode) {
+                evas_object_resize(layout, (width - ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN*2)) * FLOATING_SCALE_RATE, (ui->get_scaled_y(ISE_HEIGHT_LAND)) * FLOATING_SCALE_RATE);
+                evas_object_move(layout, ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN), y + FLOATING_TITLE_BAR_HEIGHT);
+            } else {
+                evas_object_resize(layout, width - ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN*2), ui->get_scaled_y(landscape_device ? ISE_HEIGHT_PORT : ISE_HEIGHT_LAND));
+                evas_object_move(layout, ui->get_scaled_y(STICKER_LAYOUT_LEFT_MARGIN), y);
+            }
+        }
+    }
+
+    theme = elm_theme_new();
+    elm_theme_ref_set(theme, NULL);
+    elm_theme_extension_add(theme, CUSTOM_GENGRID_EDJ_FILE_PATH);
+
+    ise_sticker_create_gengrid((unsigned short)screen_degree);
+    ise_sticker_create_item_class((unsigned short)screen_degree);
+    ise_sticker_append_items_to_gengrid(sticker_group);
+
+    elm_object_part_content_set(layout, "sticker.swallow.gengrid", gengrid);
+
+    evas_object_show(gengrid);
+    evas_object_layer_set(layout, EVAS_CANDIDATE_LAYER-1);
+    evas_object_show(layout);
+
+    is_sticker_mode = true;
+}
+
+void ise_sticker_destroy_layout()
+{
+    is_sticker_mode = false;
+    sticker_group_list.clear();
+    sticker_group_image_list.clear();
+    sticker_list.clear();
+    recent_sticker_list.clear();
+
+    if (current_sticker_group != STICKER_GROUP_DESTROY) {
+        CSCLUI *ui = get_ui();
+        if (ui) {
+            const char *group = sticker_group_name[current_sticker_group];
+            if (group)
+                ui->unset_private_key(group);
+        }
+        current_sticker_group = STICKER_GROUP_DESTROY;
+    }
+
+    if (sticker_consumer)
+        ise_sticker_destroy_consumer_handle();
+
+    if (gengrid) {
+        elm_gengrid_clear(gengrid);
+        evas_object_del(gengrid);
+        gengrid = NULL;
+    }
+
+    if (layout) {
+        evas_object_del(layout);
+        layout = NULL;
+    }
+
+    if (theme) {
+        elm_theme_free(theme);
+        theme = NULL;
+    }
+}
+
+void ise_sticker_change_group(sticker_group_e sticker_group)
+{
+    if (gengrid)
+        elm_gengrid_clear(gengrid);
+
+    ise_sticker_append_items_to_gengrid(sticker_group);
+}
+
+bool ise_sticker_is_show()
+{
+    return is_sticker_mode;
+}
+
+sticker_group_e ise_sticker_get_group_id(const char *group_name)
+{
+    int i = 0;
+    for (; i < MAX_STICKER_GROUP; ++i) {
+        if (0 == strcmp (group_name, sticker_group_name[i]))
+            return (sticker_group_e)i;
+    }
+    return (sticker_group_e)0;
+}
+
+static void group_list_foreach_cb(const char *group, void *user_data)
+{
+    sticker_exists = true;
+}
+
+bool ise_sticker_check_sticker_exists()
+{
+    sticker_exists = false;
+
+    if (!sticker_consumer)
+        ise_sticker_create_consumer_handle();
+
+    int ret = sticker_consumer_group_list_foreach_all(sticker_consumer, group_list_foreach_cb, NULL);
+    if (ret != STICKER_ERROR_NONE)
+        LOGE("sticker_consumer_group_list_foreach_all() failed. error code : 0x%X, message : '%s'", ret, get_error_message(ret));
+
+    if (sticker_consumer)
+        ise_sticker_destroy_consumer_handle();
+
+    return sticker_exists;
+}
\ No newline at end of file
index ea84389..35c70a4 100644 (file)
@@ -48,6 +48,7 @@
 #include "w-input-smartreply.h"
 #include "ise-floating-mode.h"
 #include "ise-dbus.h"
+#include "ise-sticker-mode.h"
 
 #define EDJ_FILE                        RESDIR"/edje/" PROFILE_NAME"/customised_ctxpopup.edj"
 
@@ -205,18 +206,19 @@ static CandidateEventListener g_candidate_event_listener;
 #define MVK_space 0x020
 #define MVK_Done 0xff0d
 
-#define CM_KEY_LIST_SIZE         5
+#define CM_KEY_LIST_SIZE         6
 #define MULTITAP_TIMEOUT         3.0
 #define USER_KEYSTRING_OPTION    "OPTION"
 #define USER_KEYSTRING_EMOTICON  "EMOTICON_LAYOUT"
 #define USER_KEYSTRING_CLIPBOARD "CLIPBOARD"
 #define USER_KEYSTRING_VOICE     "STT_3X4"
 #define USER_KEYSTRING_FLOATING  "FLOATING"
+#define USER_KEYSTRING_STICKER   "STICKER_LAYOUT"
 
 #define USER_VOICE_LANGUAGE     "LANGUAGE"
 
 static sclboolean           _cm_popup_opened = FALSE;
-static const char          *_cm_key_list[CM_KEY_LIST_SIZE] = {USER_KEYSTRING_OPTION, USER_KEYSTRING_EMOTICON, USER_KEYSTRING_CLIPBOARD, USER_KEYSTRING_VOICE, USER_KEYSTRING_FLOATING};
+static const char          *_cm_key_list[CM_KEY_LIST_SIZE] = {USER_KEYSTRING_OPTION, USER_KEYSTRING_EMOTICON, USER_KEYSTRING_CLIPBOARD, USER_KEYSTRING_VOICE, USER_KEYSTRING_FLOATING, USER_KEYSTRING_STICKER};
 static scluint              _current_cm_key_id = 0;
 static Evas_Object* _guide_popup_setting = NULL;
 static Evas_Object* _guide_popup_space = NULL;
@@ -414,6 +416,12 @@ static void ise_set_cm_private_key(scluint cm_key_id)
             const_cast<sclchar*>("icon/54x54/icon_floating_keypad_press.png"),
             const_cast<sclchar*>("icon/54x54/icon_floating_keypad_dim.png")};
         ui->set_private_key("CM_KEY", const_cast<sclchar*>(" "), imagelabel, NULL, 0, const_cast<sclchar*>(USER_KEYSTRING_FLOATING), TRUE);
+    } else if (strcmp(_cm_key_list[cm_key_id], USER_KEYSTRING_STICKER) == 0) {
+        sclchar* imagelabel[SCL_BUTTON_STATE_MAX] = {
+            const_cast<sclchar*>("icon/54x54/icon_sticker_nor.png"),
+            const_cast<sclchar*>("icon/54x54/icon_sticker_press.png"),
+            const_cast<sclchar*>("icon/54x54/icon_sticker_dim.png")};
+        ui->set_private_key("CM_KEY", const_cast<sclchar*>(" "), imagelabel, NULL, 0, const_cast<sclchar*>(USER_KEYSTRING_STICKER), TRUE);
     }
 }
 
@@ -674,6 +682,10 @@ on_input_mode_changed(const sclchar *key_value, sclulong key_event, sclint key_t
                 }
             }
         }
+
+        if (ise_sticker_is_show())
+            ise_sticker_destroy_layout();
+
         if (ise_emoticon_is_show()) {
             ise_emoticon_destroy_layout();
         }
@@ -745,6 +757,9 @@ SCLEventReturnType CUIEventCallback::on_event_notification(SCLUINotiType noti_ty
         }
         SclNotiPopupOpeningDesc *openingDesc = (SclNotiPopupOpeningDesc *)etc_info;
         if (ui && 0 == strcmp(openingDesc->input_mode, "CM_POPUP")) {
+            if (!ise_sticker_check_sticker_exists())
+                ui->enable_button("STICKER_KEY", EINA_FALSE);
+
             if (ise_is_emoticons_disabled())
                 ui->enable_button("EMOTICON_KEY", false);
             else
@@ -1286,13 +1301,17 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
                 write_ise_config_values();
 
                 ret = SCL_EVENT_DONE;
+            } else if (strcmp(event_desc.key_value, USER_KEYSTRING_STICKER) == 0) {
+                SCLRotation rotation = ui->get_rotation();
+                ise_sticker_show_layout(STICKER_GROUP_RECENTLY_USED, ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
             } else if (on_input_mode_changed(event_desc.key_value, event_desc.key_event, event_desc.key_type)) {
                 ret = SCL_EVENT_DONE;
             }
             if (_cm_popup_opened) {
                 if (strcmp(event_desc.key_value, USER_KEYSTRING_EMOTICON) == 0 ||
                     strcmp(event_desc.key_value, USER_KEYSTRING_VOICE) == 0 ||
-                    strcmp(event_desc.key_value, USER_KEYSTRING_FLOATING) == 0) {
+                    strcmp(event_desc.key_value, USER_KEYSTRING_FLOATING) == 0 ||
+                    strcmp(event_desc.key_value, USER_KEYSTRING_STICKER) == 0) {
                     scluint id = ise_get_cm_key_id(event_desc.key_value);
                     if (id != _current_cm_key_id) {
                         _current_cm_key_id = id;
@@ -1303,7 +1322,7 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
             }
             if (strlen(event_desc.key_value) == 1) {
                 const char allowed_chars_in_modechange[] = {
-                    ',', '?', '!', '`', '~'
+                    ',', '?', '!', '`', '~', '"'
                 };
                 const int allowed_chars_in_modechange_num =
                     sizeof(allowed_chars_in_modechange) / sizeof(char);
@@ -1363,6 +1382,11 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
                         ise_emoticon_show_layout(group_id, ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
                     }
                 }
+
+                if (input_mode && (!strcmp(input_mode, "STICKER_LAYOUT"))) {
+                    if (ise_sticker_is_show())
+                        ise_sticker_change_group(ise_sticker_get_group_id(event_desc.key_value));
+                }
             }
             if (_cm_popup_opened) {
                 if (strcmp(event_desc.key_value, USER_KEYSTRING_OPTION) == 0 ||
@@ -1689,6 +1713,9 @@ ise_show(int ic)
                     SCLRotation rotation = ui->get_rotation();
                     ise_emoticon_show_layout(ise_emoticon_get_current_group(), ROTATION_TO_DEGREE(rotation), false, ime_get_main_window());
                 }
+
+                if (ise_sticker_is_show())
+                    ise_sticker_destroy_layout();
             }
         }