Add landscape emoticon layout 22/41822/1
authorHaifeng Deng <haifeng.deng@samsung.com>
Wed, 29 Apr 2015 08:26:32 +0000 (16:26 +0800)
committerJihoon Kim <jihoon48.kim@samsung.com>
Thu, 18 Jun 2015 04:49:48 +0000 (13:49 +0900)
Change-Id: I3c9f523d167d084fab46ce2c3e29a35f2b8daf73
Signed-off-by: Haifeng Deng <haifeng.deng@samsung.com>
14 files changed:
CMakeLists.txt [changed mode: 0644->0755]
data/edc/gengrid/customised_gengrid.edc [new file with mode: 0755]
data/edc/gengrid/images/gengrid/00_thumbs_loading_bg.png [new file with mode: 0755]
data/edc/gengrid/images/gengrid/handwriting_emoticon_pressed.png [new file with mode: 0755]
data/edc/gengrid/layout_keypad.edc [new file with mode: 0755]
data/layout/sdk/LYT_LANDSCAPE_EMOTICON.xml [new file with mode: 0755]
data/layout/sdk/LYT_PORTRAIT_EMOTICON.xml [changed mode: 0644->0755]
data/layout/sdk/input_mode_configure.xml
data/layout/sdk/label_property.xml
src/include/config.h [changed mode: 0644->0755]
src/include/ise.h [changed mode: 0644->0755]
src/ise-emoticon-mode.cpp
src/ise.cpp [changed mode: 0644->0755]
src/option.cpp

old mode 100644 (file)
new mode 100755 (executable)
index bc31b09..ea8b00d
@@ -106,6 +106,27 @@ ADD_CUSTOM_TARGET(
 ADD_DEPENDENCIES(${PROJECT_NAME} candidate-multiline.edj)
 INSTALL(FILES ${CMAKE_BINARY_DIR}/candidate-multiline.edj DESTINATION ${ISE_RESDIR}/sdk/edc)
 # For edc File end
+# For edc File
+ADD_CUSTOM_TARGET(
+    customised_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_gengrid.edc
+        ${CMAKE_BINARY_DIR}/customised_gengrid.edj
+    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/customised_gengrid.edc)
+ADD_DEPENDENCIES(${PROJECT_NAME} customised_gengrid.edj)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/customised_gengrid.edj DESTINATION ${ISE_RESDIR}/sdk/edc)
+
+ADD_CUSTOM_TARGET(
+    layout_keypad.edj
+    COMMAND edje_cc -no-save
+        ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/layout_keypad.edc
+        ${CMAKE_BINARY_DIR}/layout_keypad.edj
+        DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/data/edc/gengrid/layout_keypad.edc)
+ADD_DEPENDENCIES(${PROJECT_NAME} layout_keypad.edj)
+INSTALL(FILES ${CMAKE_BINARY_DIR}/layout_keypad.edj DESTINATION ${ISE_RESDIR}/sdk/edc)
+# For edc File end
 
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ISE_PKGS_LDFLAGS})
 
diff --git a/data/edc/gengrid/customised_gengrid.edc b/data/edc/gengrid/customised_gengrid.edc
new file mode 100755 (executable)
index 0000000..1690bd6
--- /dev/null
@@ -0,0 +1,801 @@
+/*
+ * Copyright (c) 2011 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";
+      }
+   }
+
+   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";
+               }
+
+         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";
+                          }
+
+                       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/images/gengrid/00_thumbs_loading_bg.png b/data/edc/gengrid/images/gengrid/00_thumbs_loading_bg.png
new file mode 100755 (executable)
index 0000000..021b5bc
Binary files /dev/null and b/data/edc/gengrid/images/gengrid/00_thumbs_loading_bg.png differ
diff --git a/data/edc/gengrid/images/gengrid/handwriting_emoticon_pressed.png b/data/edc/gengrid/images/gengrid/handwriting_emoticon_pressed.png
new file mode 100755 (executable)
index 0000000..11c36b2
Binary files /dev/null and b/data/edc/gengrid/images/gengrid/handwriting_emoticon_pressed.png differ
diff --git a/data/edc/gengrid/layout_keypad.edc b/data/edc/gengrid/layout_keypad.edc
new file mode 100755 (executable)
index 0000000..f81514a
--- /dev/null
@@ -0,0 +1,181 @@
+/*
+ * Copyright (c) 2011 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 EMOTICON_AREA_WIDTH_PORT                                       480
+#define EMOTICON_AREA_HEIGHT_PORT                                      220
+
+#define EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT           90
+#define EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND           64
+
+#define EMOTICON_AREA_WIDTH_LAND                                       800
+#define EMOTICON_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:   "emoticon.main.portrait.candidate.on";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_ON, EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT)
+                       part
+                       {
+                               name:"emoticon.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: EMOTICON_AREA_WIDTH_PORT EMOTICON_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:   "emoticon.main.portrait.candidate.off";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_OFF, EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_PORT)
+                       part
+                       {
+                               name:"emoticon.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: EMOTICON_AREA_WIDTH_PORT EMOTICON_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:   "emoticon.main.landscape.candidate.on";
+               parts
+               {
+
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_ON, EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND)
+                       part
+                       {
+                               name:"emoticon.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: EMOTICON_AREA_WIDTH_LAND EMOTICON_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:   "emoticon.main.landscape.candidate.off";
+               parts
+               {
+                       BG( 0 0 0 0)
+                       PAD( 0, 0, TOP_VERTICAL_BORDER_LAND_CANDIDATE_OFF, EMOTICON_AREA_HEIGHT_OFFSET_FROM_BOTTOM_LAND)
+                       part
+                       {
+                               name:"emoticon.swallow.gengrid";
+                               type: SWALLOW;
+                               scale: 1;
+                               description
+                               {
+                                       state: "default" 0.0;
+                                       //min: EMOTICON_AREA_WIDTH_LAND EMOTICON_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"; }
+                               }
+                       }
+               }
+       }
+
+}
diff --git a/data/layout/sdk/LYT_LANDSCAPE_EMOTICON.xml b/data/layout/sdk/LYT_LANDSCAPE_EMOTICON.xml
new file mode 100755 (executable)
index 0000000..db12371
--- /dev/null
@@ -0,0 +1,114 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<layout direction="landscape" width="960" height="238" magnifier="true" key_width="81" key_height="48" key_spacing="13" row_spacing="7" hit_left="6" hit_right="7" hit_top="7" hit_bottom="7" label_type="QTY_LAND_DEFAULT" vibe_style="DEFAULT" sound_style="DEFAULT">
+  <image_path>
+    <button_normal>B09_panel_h.png</button_normal>
+  </image_path>
+  <background_image>
+    <rec button="normal">button/B09_Qwerty_l_btn_01.png</rec>
+    <rec button="pressed">button/B09_Qwerty_l_btn_press.png</rec>
+    <rec button="disabled">button/B09_Qwerty_l_btn_01.png</rec>
+  </background_image>
+  <row x="16" y="183">
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123" width="128" hit_left="16">
+      <label>
+        <rec>abc</rec>
+      </label>
+      <background_image>
+        <rec button="normal">button/B09_Qwerty_l_btn_02.png</rec>
+        <rec button="pressed">button/B09_Qwerty_l_btn_press.png</rec>
+        <rec button="disabled">button/B09_Qwerty_l_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">button/B09_Qwerty_l_btn_02.png</rec>
+        <rec button="pressed">button/B09_Qwerty_l_btn_press.png</rec>
+        <rec button="disabled">button/B09_Qwerty_l_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" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_recent.png</rec>
+        <rec button="pressed">emoticon/icon_recent_press.png</rec>
+        <rec button="disabled">emoticon/icon_recent_dim.png</rec>
+      </image_label>
+      <key_value>
+      <rec>EMOTICON_GROUP_RECENTLY_USED</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_emotion.png</rec>
+        <rec button="pressed">emoticon/icon_emotion_press.png</rec>
+        <rec button="disabled">emoticon/icon_emotion_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>EMOTICON_GROUP_FACE</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_crown.png</rec>
+        <rec button="pressed">emoticon/icon_crown_press.png</rec>
+        <rec button="disabled">emoticon/icon_crown_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>EMOTICON_GROUP_CROWN</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_dog.png</rec>
+        <rec button="pressed">emoticon/icon_dog_press.png</rec>
+        <rec button="disabled">emoticon/icon_dog_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>EMOTICON_GROUP_DOG</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_house.png</rec>
+        <rec button="pressed">emoticon/icon_house_press.png</rec>
+        <rec button="disabled">emoticon/icon_house_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>EMOTICON_GROUP_HOUSE</rec>
+      </key_value>
+    </key>
+    <key key_type="user" use_magnifier="true" longkey_magnifier="true" multitouch_type="settle_previous">
+      <image_label>
+        <rec button="normal">emoticon/icon_star.png</rec>
+        <rec button="pressed">emoticon/icon_star_press.png</rec>
+        <rec button="disabled">emoticon/icon_star_dim.png</rec>
+      </image_label>
+      <key_value>
+        <rec>EMOTICON_GROUP_STAR</rec>
+      </key_value>
+    </key>
+    <key button_type="selfish" key_type="control" use_magnifier="true" use_repeat_key="true" width="128" hit_right="17">
+      <image_label>
+        <rec button="normal">B09_icon_back.png</rec>
+        <rec button="pressed">B09_icon_back_press.png</rec>
+        <rec button="disabled">B09_icon_back_dim.png</rec>
+      </image_label>
+      <background_image>
+        <rec button="normal">button/B09_Qwerty_l_btn_02.png</rec>
+        <rec button="pressed">button/B09_Qwerty_l_btn_press.png</rec>
+        <rec button="disabled">button/B09_Qwerty_l_btn_02.png</rec>
+      </background_image>
+      <key_value>
+        <rec>BackSpace</rec>
+      </key_value>
+    </key>
+  </row>
+</layout>
old mode 100644 (file)
new mode 100755 (executable)
index f827932..69f551f
       <label>
         <rec>abc</rec>
       </label>
-      <image_label>
-        <rec button="normal">B09_icon_cue.png</rec>
-        <rec button="pressed">B09_icon_cue.png</rec>
-        <rec button="disabled">B09_icon_cue.png</rec>
-      </image_label>
       <background_image>
         <rec button="normal">button/B09_Qwerty_btn_02.png</rec>
         <rec button="pressed">button/B09_Qwerty_btn_press.png</rec>
         <rec>CUR_LANG</rec>
       </key_value>
     </key>
-    <key button_type="selfish" key_type="modechange" label_type="QTY_?123">
+    <key button_type="selfish" key_type="modechange" label_type="QTY_?123_2">
       <label>
         <rec>?123</rec>
       </label>
-      <image_label>
-        <rec button="normal">B09_icon_cue.png</rec>
-        <rec button="pressed">B09_icon_cue.png</rec>
-        <rec button="disabled">B09_icon_cue.png</rec>
-      </image_label>
       <background_image>
         <rec button="normal">button/B09_Qwerty_btn_02.png</rec>
         <rec button="pressed">button/B09_Qwerty_btn_press.png</rec>
         <rec button="disabled">button/B09_Qwerty_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" multitouch_type="settle_previous">
       <image_label>
         <rec>EMOTICON_GROUP_STAR</rec>
       </key_value>
     </key>
-    <key button_type="selfish" key_type="control" use_magnifier="true" hit_right="6" use_repeat_key="true" width="74">
+    <key button_type="selfish" key_type="control" use_magnifier="true" use_repeat_key="true" width="74">
       <image_label>
         <rec button="normal">B09_icon_back_50x50.png</rec>
         <rec button="pressed">B09_icon_back_50x50_press.png</rec>
index 502032b..2d0fc4c 100755 (executable)
   <mode name="EMOTICON_LAYOUT">
     <layouts>
       <portrait>LYT_PORTRAIT_EMOTICON.xml</portrait>
-      <landscape>LYT_LANDSCAPE_3X4_PASSWD.xml</landscape>
+      <landscape>LYT_LANDSCAPE_EMOTICON.xml</landscape>
     </layouts>
   </mode>
   <mode name="EMOTICON_POPUP" dim_window="true">
index bf7ee90..d9df8f9 100755 (executable)
       </font_color_record>
     </label_properties>
   </label_properties_table>
+  <label_properties_table label_type="QTY_?123_2">
+    <label_properties font_name="Tizen:style=Regular" font_size="18" label_alignment="center_middle" padding_X="0" padding_Y="0">
+      <font_color_record>
+        <color button="normal">0x171717ff</color>
+        <color button="pressed">0x000000ff</color>
+        <color button="disabled">0x17171733</color>
+      </font_color_record>
+    </label_properties>
+  </label_properties_table>
   <label_properties_table label_type="QTY_SPACE">
     <label_properties font_name="Tizen:style=Regular" font_size="18" label_alignment="center_top" padding_X="0" padding_Y="8">
       <font_color_record>
old mode 100644 (file)
new mode 100755 (executable)
index 29988f0..faaca29
@@ -32,6 +32,7 @@
 #define ISE_CONFIG_SOUND_ON             "/ise-default/sound_on"
 #define ISE_CONFIG_VIBRATION_ON         "/ise-default/vibration_on"
 #define ISE_CONFIG_PREVIEW_ON           "/ise-default/preview_on"
+#define ISE_CONFIG_RECENT_EMOTICONS_LIST "/ise-default/recent_emoticons_list"
 
 using namespace scl;
 
old mode 100644 (file)
new mode 100755 (executable)
index 3527e7a..2bf7aeb
@@ -86,7 +86,7 @@ const ISE_DEFAULT_VALUES g_ise_default_values[ISE_LAYOUT_STYLE_MAX] = {
     {"",                "DEFAULT",      TRUE },     /* ISE_LAYOUT_STYLE_TERMINAL */
     {"",                "DEFAULT",      TRUE },     /* ISE_LAYOUT_STYLE_PASSWORD */
     {"DATETIME_3X4",    "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_DATETIME */
-    {"EMOTICON_LAYOUT",                "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_EMOTICON */
+    {"EMOTICON_LAYOUT", "DEFAULT",      FALSE },    /* ISE_LAYOUT_STYLE_EMOTICON */
 
     {"NUMONLY_3X4_SIG",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_SIG */
     {"NUMONLY_3X4_DEC",    "DEFAULT",   FALSE },    /* ISE_LAYOUT_STYLE_NUMBERONLY_DEC */
index 6470ff0..4533aab 100644 (file)
 
 #ifdef SUPPORTS_EMOTICONS
 
-#include "ise-emoticon-mode.h"
-#include "ise.h"
 #include <Elementary.h>
 #include <algorithm>
+#include "ise-emoticon-mode.h"
+#include "ise.h"
 
 #undef LOG_TAG
 #define LOG_TAG "ISE_DEFAULT"
 #include <dlog.h>
 
+#define EVAS_CANDIDATE_LAYER    32000
+#define ISE_WIDTH_PORT          540
+#define ISE_HEIGHT_PORT         333
+#define ISE_WIDTH_LAND          960
+#define ISE_HEIGHT_LAND         238
+
+#define EMOTICON_DIR "/usr/share/emoticons/"
+#define EMOTICON_EDJ_FILE_PATH "/usr/share/isf/ise/ise-default/720x1280/default/sdk/edc/layout_keypad.edj"
+#define CUSTOM_GENGRID_EDJ_FILE_PATH "/usr/share/isf/ise/ise-default/720x1280/default/sdk/edc/customised_gengrid.edj"
+
+#define EMOTICON_EDJ_GROUP_PORT_CANDIDATE_ON "emoticon.main.portrait.candidate.on"
+#define EMOTICON_EDJ_GROUP_LAND_CANDIDATE_ON "emoticon.main.landscape.candidate.on"
+
+#define EMOTICON_EDJ_GROUP_PORT_CANDIDATE_OFF "emoticon.main.portrait.candidate.off"
+#define EMOTICON_EDJ_GROUP_LAND_CANDIDATE_OFF "emoticon.main.landscape.candidate.off"
+
+#define EMOTICON_GENGRID_ITEM_STYLE_PORT "ise/customized_default_style_port"
+#define EMOTICON_GENGRID_ITEM_STYLE_LAND "ise/customized_default_style_land"
+
+#define EMOTICON_GENGRID_ITEM_STYLE_PORT2 "ise/customized_default_style_port2"
+#define EMOTICON_GENGRID_ITEM_STYLE_LAND2 "ise/customized_default_style_land2"
+
 #define IND_NUM 20
-#define EMOTICON_ICON_WIDTH_PORT 54
-#define EMOTICON_ICON_HEIGHT_PORT 54
 
-#define EMOTICON_ICON_GAP_WIDTH_PORT 18
+#define EMOTICON_ICON_WIDTH_PORT 30
+#define EMOTICON_ICON_HEIGHT_PORT 30
+
+#define EMOTICON_ICON_GAP_WIDTH_PORT 12
 #define EMOTICON_ICON_GAP_HEIGHT_PORT 6
 
 #define EMOTICON_WIDTH_PORT (EMOTICON_ICON_WIDTH_PORT + EMOTICON_ICON_GAP_WIDTH_PORT)
 #define EMOTICON_HEIGHT_PORT (EMOTICON_ICON_HEIGHT_PORT + EMOTICON_ICON_GAP_HEIGHT_PORT)
 
-#define EMOTICON_ICON_WIDTH_LAND 72
-#define EMOTICON_ICON_HEIGHT_LAND 72
+#define EMOTICON_ICON_WIDTH_LAND 30
+#define EMOTICON_ICON_HEIGHT_LAND 30
 
-#define EMOTICON_ICON_GAP_WIDTH_LAND 24
-#define EMOTICON_ICON_GAP_HEIGHT_LAND 6
+#define EMOTICON_ICON_GAP_WIDTH_LAND 12
+#define EMOTICON_ICON_GAP_HEIGHT_LAND 4
 
 #define EMOTICON_WIDTH_LAND (EMOTICON_ICON_WIDTH_LAND + EMOTICON_ICON_GAP_WIDTH_LAND)
 #define EMOTICON_HEIGHT_LAND (EMOTICON_ICON_HEIGHT_LAND + EMOTICON_ICON_GAP_HEIGHT_LAND)
 
+#define MIN_RECENT_EMOTICON_NEEDED_IN_PORT 22          // (7*3 + 1)
+#define MIN_RECENT_EMOTICON_NEEDED_IN_LAND 27          // (13*2 + 1)
+
 #define MAX_SIZE_AMONG_FIRST_3_EMOTICON_GROUPS  (EMOTICON_GROUP_1_NUM > EMOTICON_GROUP_2_NUM ? (EMOTICON_GROUP_1_NUM > EMOTICON_GROUP_3_NUM ? EMOTICON_GROUP_1_NUM : EMOTICON_GROUP_3_NUM) : (EMOTICON_GROUP_2_NUM > EMOTICON_GROUP_3_NUM ? EMOTICON_GROUP_2_NUM : EMOTICON_GROUP_3_NUM))
 #define MAX_SIZE_AMONG_EMOTICON_GROUPS (EMOTICON_GROUP_4_NUM > EMOTICON_GROUP_5_NUM ? (EMOTICON_GROUP_4_NUM > MAX_SIZE_AMONG_FIRST_3_EMOTICON_GROUPS ? EMOTICON_GROUP_4_NUM : MAX_SIZE_AMONG_FIRST_3_EMOTICON_GROUPS) : (EMOTICON_GROUP_5_NUM > MAX_SIZE_AMONG_FIRST_3_EMOTICON_GROUPS ? EMOTICON_GROUP_5_NUM : MAX_SIZE_AMONG_FIRST_3_EMOTICON_GROUPS))
 
-#define EMOTION_SCREEN_WIDTH     540
-#define EMOTION_SCREEN_HEIGHT    960
-#define EMOTION_ITEM_LEFT_MARGIN 27
-#define EMOTION_ITEM_TOP_MARGIN  9
-#define EMOTION_SCROLLER_WIDTH   540
-#define EMOTION_SCROLLER_HEIGHT  234
 
-static double g_screen_width_rate = 0;
-static double g_screen_height_rate = 0;
 
-static bool is_emoticon_mode = false;
+bool is_emoticon_mode = false;
 emoticon_group_t current_emoticon_group = EMOTICON_GROUP_RECENTLY_USED;
 std::vector <int> emoticon_list_recent;
 bool is_recently_used_emoticon_mode_disabled = true;
+
 extern int * emoticon_list[];
 
 unsigned short int emoticon_group_items[MAX_EMOTICON_GROUP] =
 {
-    EMOTICON_GROUP_RECENTLY_USED_NUM,
-    EMOTICON_GROUP_1_NUM,
-    EMOTICON_GROUP_2_NUM,
-    EMOTICON_GROUP_3_NUM,
-    EMOTICON_GROUP_4_NUM,
-    EMOTICON_GROUP_5_NUM
+       EMOTICON_GROUP_RECENTLY_USED_NUM,
+       EMOTICON_GROUP_1_NUM,
+       EMOTICON_GROUP_2_NUM,
+       EMOTICON_GROUP_3_NUM,
+       EMOTICON_GROUP_4_NUM,
+       EMOTICON_GROUP_5_NUM
 };
 
 struct emoticon_item_t
 {
-    Elm_Object_Item *item;
-    int code;
-    std::string path;
-    Eina_Unicode keyevent;
+       Elm_Object_Item *item;
+       int code;
+       std::string path;
+       Eina_Unicode keyevent;
 };
 
 emoticon_item_t emoticon_items[MAX_SIZE_AMONG_EMOTICON_GROUPS] = {{0,},};
 
-static Evas_Object *g_main_window = NULL;
-static Evas_Object *scroller = NULL;
+// Static variable declarations
 static Evas_Object *layout = NULL;
 static Evas_Object *gengrid = NULL;
 static Elm_Theme *theme = NULL;
 static Elm_Gengrid_Item_Class *gic = NULL;
 
-// Function declarations
+// Static Function declarations
 static void __ise_emoticon_create_gengrid(unsigned short int screen_degree);
 static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group);
+static void __ise_emoticon_create_item_class(unsigned short int screen_degree);
+#if SUPPORTS_EMOTICONS_BY_IMAGE
 static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part);
 static void grid_content_del(void *data, Evas_Object *obj);
+#else
+static char * grid_text_get(void *data, Evas_Object *obj, const char *part);
+#endif
 static void _item_selected(void *data, Evas_Object *obj, void *event_info);
-static void __ise_emoticon_create_item_class(unsigned short int screen_degree);
 static Eina_Bool _focus_done(void *data);
 static void _multi_down(void *data, Evas *e, Evas_Object *o, void *event_info);
 static void _multi_up(void *data, Evas *e, Evas_Object *o, void *event_info);
 
-void ise_show_emoticon_window(emoticon_group_t emoticon_group, const int screen_degree, const bool is_candidate_on, void *main_window)
+void ise_read_recent_emoticon_list_from_scim(void)
 {
-    g_main_window = (Evas_Object *)main_window;
-    ise_destroy_emoticon_window();
-
-    int w = 0;
-    int h = 0;
-    elm_win_screen_size_get(g_main_window, NULL, NULL, &w, &h);
-    g_screen_width_rate = (double)w/EMOTION_SCREEN_WIDTH;
-    g_screen_height_rate = (double)h/EMOTION_SCREEN_HEIGHT;
-    scroller = elm_scroller_add((Evas_Object *)main_window);
-    evas_object_size_hint_weight_set(scroller, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-    evas_object_size_hint_align_set(scroller, EVAS_HINT_FILL, EVAS_HINT_FILL);
-    elm_scroller_bounce_set(scroller, EINA_FALSE, EINA_TRUE);
-    elm_scroller_policy_set(scroller, ELM_SCROLLER_POLICY_OFF, ELM_SCROLLER_POLICY_AUTO);
-    evas_object_move(scroller, g_screen_width_rate*EMOTION_ITEM_LEFT_MARGIN, g_screen_height_rate*EMOTION_ITEM_TOP_MARGIN);
-    evas_object_resize(scroller, g_screen_width_rate*EMOTION_SCROLLER_WIDTH, g_screen_height_rate*EMOTION_SCROLLER_HEIGHT);
-
-    __ise_emoticon_create_gengrid((unsigned short)screen_degree);
-    __ise_emoticon_create_item_class((unsigned short)screen_degree);
-    __ise_emoticon_append_items_to_gengrid(emoticon_group);
-
-    elm_object_content_set(scroller, gengrid);
-
-    evas_object_show(gengrid);
-    evas_object_layer_set(gengrid, 32001);
-    evas_object_layer_set(scroller, 32001);
-    evas_object_show(scroller);
-
-    is_emoticon_mode = true;
-    current_emoticon_group = emoticon_group;
+       //g_core.config_read_int(ISE_CONFIG_RECENT_EMOTICONS_LIST, &emoticon_list_recent);
 }
-void ise_destroy_emoticon_window(void)
-{
-    /* According to UI FW team, when the a parent is deleted, all its child content will
-     * also be deleted. So no need to delete gengrid explicitly. Just setting the gendrid
-     * pointer to NULL should suffice here.
-     * OR
-     * We can first delete all the child elements and then we delete the parent.
-     * This approach is currently used below
-     */
-
-    if(gic) {
-        elm_gengrid_item_class_free(gic);
-        gic = NULL;
-    }
 
-    if(gengrid) {
-        evas_object_hide(gengrid);
-        elm_gengrid_clear(gengrid);
-        evas_object_del(gengrid);
-        gengrid = NULL;
-    }
+void ise_write_recent_emoticon_list_to_scim(void)
+{
+       //g_core.config_read_int(ISE_CONFIG_RECENT_EMOTICONS_LIST, emoticon_list_recent);
+}
 
-    if(scroller) {
-        evas_object_hide(scroller);
-        evas_object_del(scroller);
-        scroller = NULL;
-    }
+void ise_show_emoticon_window(emoticon_group_t emoticon_group, const int screen_degree, const bool is_candidate_on, void *main_window)
+{
+       //xt9_send_flush(0);
+       ise_init_emoticon_list();
+
+       if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
+               ise_read_recent_emoticon_list_from_scim();
+               if(emoticon_list_recent.size() == 0) {
+                       //PRINTFUNC(DLOG_ERROR,"Cannot display recently used emoticons group. No recently used emoticons available");
+                       return;
+               }
+       }
+
+       ise_destroy_emoticon_window();
+
+       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);
+
+/*     Display *display = (Display *)ecore_x_display_get ();
+       int width  = DisplayWidth (display, DefaultScreen (display));
+       int height = DisplayHeight (display, DefaultScreen (display));
+       LOGD ("screen width:%d, height:%d", width, height);*/
+       evas_object_move (layout, 0, 0);
+
+       if(is_candidate_on) {
+               if(screen_degree == 0 || screen_degree == 180)
+                       elm_layout_file_set(layout, EMOTICON_EDJ_FILE_PATH, EMOTICON_EDJ_GROUP_PORT_CANDIDATE_ON);
+               else
+                       elm_layout_file_set(layout, EMOTICON_EDJ_FILE_PATH, EMOTICON_EDJ_GROUP_LAND_CANDIDATE_ON);
+       } else {
+               if(screen_degree == 0 || screen_degree == 180) {
+                       elm_layout_file_set(layout, EMOTICON_EDJ_FILE_PATH, EMOTICON_EDJ_GROUP_PORT_CANDIDATE_OFF);
+                       evas_object_resize (layout, ISE_WIDTH_PORT, ISE_HEIGHT_PORT);
+               } else {
+                       elm_layout_file_set(layout, EMOTICON_EDJ_FILE_PATH, EMOTICON_EDJ_GROUP_LAND_CANDIDATE_OFF);
+                       evas_object_resize (layout, ISE_WIDTH_LAND, ISE_HEIGHT_LAND);
+               }
+       }
+
+       theme = elm_theme_new();
+       elm_theme_ref_set(theme, NULL); // refer to default theme
+       elm_theme_extension_add(theme, CUSTOM_GENGRID_EDJ_FILE_PATH);
+
+       __ise_emoticon_create_gengrid((unsigned short)screen_degree);
+       __ise_emoticon_create_item_class((unsigned short)screen_degree);
+       __ise_emoticon_append_items_to_gengrid(emoticon_group);
+
+       elm_object_part_content_set(layout, "emoticon.swallow.gengrid", gengrid);
+       //elm_win_resize_object_add(main_window, layout);
+
+       evas_object_show(gengrid);
+       evas_object_layer_set(layout, EVAS_CANDIDATE_LAYER-1);
+       evas_object_show(layout);
+
+       is_emoticon_mode = true;
+       current_emoticon_group = emoticon_group;
+}
 
-    is_emoticon_mode = false;
+void ise_destroy_emoticon_window(void)
+{
+       /* According to UI FW team, when the a parent is deleted, all its child content will
+        * also be deleted. So no need to delete gengrid explicitly. Just setting the gendrid
+        * pointer to NULL should suffice here.
+        * OR
+        * We can first delete all the child elements and then we delete the parent.
+        * This approach is currently used below
+        */
+
+       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_change_emoticon_mode(emoticon_group_t emoticon_group)
 {
-    if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
-//        ise_read_recent_emoticon_list_from_scim();
-        if(emoticon_list_recent.size() == 0) {
-//            PRINTFUNC(DLOG_ERROR,"Cannot display recently used emoticons group. No recently used emoticons available");
-            return;
-        }
-    }
-
-    if(gengrid) {
-        elm_gengrid_clear(gengrid);
-    }
-
-    __ise_emoticon_append_items_to_gengrid(emoticon_group);
-    current_emoticon_group = emoticon_group;
+       if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
+               ise_read_recent_emoticon_list_from_scim();
+               if(emoticon_list_recent.size() == 0) {
+                       //PRINTFUNC(DLOG_ERROR,"Cannot display recently used emoticons group. No recently used emoticons available");
+                       return;
+               }
+       }
+
+       if(gengrid) {
+               elm_gengrid_clear(gengrid);
+       }
+
+       __ise_emoticon_append_items_to_gengrid(emoticon_group);
+       current_emoticon_group = emoticon_group;
 }
 
 static Eina_Bool _focus_done(void *data)
 {
-    Elm_Object_Item *item = (Elm_Object_Item *)data;
+       Elm_Object_Item *item = (Elm_Object_Item *)data;
 
-    elm_object_item_signal_emit(item,"mouse,up,1","reorder_bg");
+       elm_object_item_signal_emit(item,"mouse,up,1","reorder_bg");
 
-    return ECORE_CALLBACK_CANCEL;
+       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;
+       Evas_Event_Multi_Down *ev = (Evas_Event_Multi_Down*)event_info;
 
-//    PRINTFUNC(DLOG_DEBUG,"MULTI: down @ %4i %4i | dev: %i\n", ev->canvas.x, ev->canvas.y, ev->device);
-    if (ev->device >= IND_NUM)
-        return;
+//     PRINTFUNC(DLOG_DEBUG,"MULTI: down @ %4i %4i | dev: %i\n", ev->canvas.x, ev->canvas.y, ev->device);
+       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 *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");
+       elm_object_item_signal_emit(item,"mouse,down,1","reorder_bg");
 
-    ecore_timer_add (0.5, _focus_done, item );
+       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;
-//    PRINTFUNC(DLOG_DEBUG,"MULTI: up    @ %4i %4i | dev: %i\n", ev->canvas.x, ev->canvas.y, ev->device);
-    if (ev->device >= IND_NUM)
-        return;
+       Evas_Event_Multi_Up *ev = (Evas_Event_Multi_Up*)event_info;
+//     PRINTFUNC(DLOG_DEBUG,"MULTI: up    @ %4i %4i | dev: %i\n", ev->canvas.x, ev->canvas.y, ev->device);
+       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 *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_object_item_signal_emit(item,"mouse,up,1","reorder_bg");
 
-    elm_gengrid_item_selected_set(item, EINA_TRUE);
+       elm_gengrid_item_selected_set(item, EINA_TRUE);
 }
 
 static void __ise_emoticon_create_gengrid(unsigned short int screen_degree)
 {
-    gengrid = elm_gengrid_add(g_main_window);
-    elm_object_style_set(gengrid,"no_effect");
-    elm_gengrid_align_set(gengrid, 0, 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);
-    if(screen_degree == 0 || screen_degree == 180){
-        elm_gengrid_item_size_set(gengrid, EMOTICON_WIDTH_PORT*g_screen_width_rate, EMOTICON_HEIGHT_PORT*g_screen_height_rate);
-    }
-    else
-        elm_gengrid_item_size_set(gengrid, EMOTICON_WIDTH_LAND, EMOTICON_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_FALSE);
-
-//    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);
+       gengrid = elm_gengrid_add(layout);
+       elm_object_theme_set(gengrid, theme);
+       //elm_object_style_set(gengrid,"no_effect");
+       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);
+
+       if(screen_degree == 0 || screen_degree == 180)
+               elm_gengrid_item_size_set(gengrid, ELM_SCALE_SIZE(EMOTICON_WIDTH_PORT), ELM_SCALE_SIZE(EMOTICON_HEIGHT_PORT));
+       else
+               elm_gengrid_item_size_set(gengrid, ELM_SCALE_SIZE(EMOTICON_WIDTH_LAND), ELM_SCALE_SIZE(EMOTICON_HEIGHT_LAND));
+
+       elm_gengrid_highlight_mode_set(gengrid, EINA_TRUE);
+       elm_gengrid_select_mode_set(gengrid, ELM_OBJECT_SELECT_MODE_ALWAYS);
+//     elm_gengrid_cache_mode_set(gengrid, EINA_TRUE);
+       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);
 }
 
+#if SUPPORTS_EMOTICONS_BY_IMAGE
 static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group)
 {
-    char img_name[10];
-    short int items = 0;
-    std::string file_path = "";
-
-    if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
-        items = emoticon_list_recent.size();
-
-        for(int i = 0; i < items; i++) {
-            emoticon_items[i].code = emoticon_list_recent[i];
-            emoticon_items[i].keyevent = emoticon_list_recent[i];
-            emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
-        }
-    } else {
-        if(emoticon_group != EMOTICON_GROUP_DESTROY) {
-            items = emoticon_group_items[emoticon_group];
-        }
-        for (int i = 0; i < items; i++) {
-            emoticon_items[i].code = emoticon_list[emoticon_group-1][i];
-            emoticon_items[i].keyevent = emoticon_list[emoticon_group-1][i];
-            emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
-        }
-    }
-//    Elm_Object_Item * it = elm_gengrid_first_item_get(gengrid);
-//    elm_gengrid_item_show(it, ELM_GENGRID_ITEM_SCROLLTO_NONE);
+       char img_name[10];
+       short int items = 0;
+       std::string file_path = "";
+
+       if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
+               items = emoticon_list_recent.size();
+
+               for(int i = 0; i < items; i++) {
+                       snprintf(img_name, 10, "%x", emoticon_list_recent[i]);
+                       emoticon_items[i].code = emoticon_list_recent[i];
+                       emoticon_items[i].keyevent = emoticon_list_recent[i];
+                       emoticon_items[i].path = (std::string)EMOTICON_DIR + (std::string)"u" + (std::string)img_name + (std::string)".png";
+                       emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
+               }
+       } else {
+               if(emoticon_group != EMOTICON_GROUP_DESTROY) {
+                       items = emoticon_group_items[emoticon_group];
+               }
+               for (int i = 0; i < items; i++) {
+                       snprintf(img_name, 10, "%x", emoticon_list[emoticon_group-1][i]);
+                       file_path = (std::string)EMOTICON_DIR + (std::string)"u" + (std::string)img_name + (std::string)".png";
+                       if(ise_util_does_file_exists(file_path)) {
+                               emoticon_items[i].code = emoticon_list[emoticon_group-1][i];
+                               emoticon_items[i].keyevent = emoticon_list[emoticon_group-1][i];
+                               emoticon_items[i].path = file_path;
+                               emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
+//                             PRINTFUNC(SECURE_DEBUG,"file_path = %s\n",file_path.c_str());
+                       }
+               }
+       }
+       Elm_Object_Item * it = elm_gengrid_first_item_get(gengrid);
+       elm_gengrid_item_show(it, ELM_GENGRID_ITEM_SCROLLTO_NONE);
 }
 
+
 static void __ise_emoticon_create_item_class(unsigned short int screen_degree)
 {
-    if(!gic)
-        gic = elm_gengrid_item_class_new();
+       if(!gic)
+               gic = elm_gengrid_item_class_new();
+
+       if(screen_degree == 0 || screen_degree == 180)
+               gic->item_style = EMOTICON_GENGRID_ITEM_STYLE_PORT2;
+       else
+               gic->item_style = EMOTICON_GENGRID_ITEM_STYLE_LAND2;
+
+       gic->func.text_get = NULL;
+       gic->func.content_get = grid_content_get;
+       gic->func.state_get = NULL;
+       gic->func.del = grid_content_del;
 
-    gic->func.text_get = NULL;
-    gic->func.content_get = grid_content_get;
-    gic->func.state_get = NULL;
-    gic->func.del = grid_content_del;
 }
 
 static Evas_Object * grid_content_get(void *data, Evas_Object *obj, const char *part)
 {
-    emoticon_item_t *ti = (emoticon_item_t *)data;
+       emoticon_item_t *ti = (emoticon_item_t *)data;
     if(ti == NULL)
         return NULL;
 
-    if (!strcmp(part, "elm.swallow.icon")) {
-        char chText[255] = {0};
-        sprintf(chText, "&#x%x;", ti->code);
-        Evas_Object *label = elm_label_add(obj);
-        elm_object_text_set(label, chText);
-        evas_object_resize(label, 72, 72);
-        evas_object_show(label);
-        evas_object_layer_set(label, 32001);
-        return label;
-    }
-
-    return NULL;
+       if (!strcmp(part, "elm.swallow.icon")) {
+               if (ti->path.c_str()) {
+            Eina_Bool is_image_file_set = false;
+            Evas_Object *icon = elm_image_add(obj);
+                       is_image_file_set = elm_image_file_set(icon, ti->path.c_str(), NULL);
+                       if(!is_image_file_set) {
+                               //PRINTFUNC(SECURE_ERROR,"image \"%s\" not set",ti->path.c_str());
+                       } else {
+                               elm_image_aspect_fixed_set(icon, EINA_FALSE);
+                               elm_image_preload_disabled_set(icon, EINA_FALSE);
+                               evas_object_show(icon);
+                       }
+            evas_object_data_set(icon, "code", (void *)ti->code);
+            return icon;
+               }
+       }
+
+       return NULL;
 }
 
 static void grid_content_del(void *data, Evas_Object *obj)
 {
-    emoticon_item_t *ti = (emoticon_item_t *)data;
+       emoticon_item_t *ti = (emoticon_item_t *)data;
     if(!ti)
         return;
 
     Evas_Object *icon = elm_object_item_part_content_get(ti->item, "elm.swallow.icon");
     if(icon) {
-        evas_object_hide(icon);
         evas_object_data_del(icon, "code");
     }
     return;
 }
+#else //SUPPORTS_EMOTICONS_BY_IMAGE
+static void __ise_emoticon_append_items_to_gengrid(emoticon_group_t emoticon_group)
+{
+       char img_name[10];
+       short int items = 0;
+       std::string file_path = "";
+
+       if(emoticon_group == EMOTICON_GROUP_RECENTLY_USED) {
+               items = emoticon_list_recent.size();
+
+               for(int i = 0; i < items; i++) {
+                       snprintf(img_name, 10, "%x", emoticon_list_recent[i]);
+                       emoticon_items[i].keyevent = emoticon_list_recent[i];
+                       emoticon_items[i].path = (std::string)img_name;
+                       emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
+               }
+       } else {
+               if(emoticon_group != EMOTICON_GROUP_DESTROY) {
+                       items = emoticon_group_items[emoticon_group];
+               }
+               for (int i = 0; i < items; i++) {
+                       snprintf(img_name, 10, "%x", emoticon_list[emoticon_group-1][i]);
+                       file_path = (std::string)img_name;
+                       emoticon_items[i].keyevent = emoticon_list[emoticon_group-1][i];
+                       emoticon_items[i].path = file_path;
+                       emoticon_items[i].item = elm_gengrid_item_append(gengrid, gic, &(emoticon_items[i]), _item_selected, &(emoticon_items[i]));
+               }
+       }
+       Elm_Object_Item * it = elm_gengrid_first_item_get(gengrid);
+       elm_gengrid_item_show(it, ELM_GENGRID_ITEM_SCROLLTO_NONE);
+}
+
+static void __ise_emoticon_create_item_class(unsigned short int screen_degree)
+{
+       if(!gic)
+               gic = elm_gengrid_item_class_new();
+
+       if(screen_degree == 0 || screen_degree == 180)
+               gic->item_style = EMOTICON_GENGRID_ITEM_STYLE_PORT2;
+       else
+               gic->item_style = EMOTICON_GENGRID_ITEM_STYLE_LAND2;
+
+       gic->func.text_get = grid_text_get;
+       gic->func.content_get = NULL;
+       gic->func.state_get = NULL;
+       gic->func.del = NULL;
+}
+
+static char * grid_text_get(void *data, Evas_Object *obj, const char *part)
+{
+       emoticon_item_t *ti = (emoticon_item_t *)data;
+
+       char *utf_8 = NULL;
+       int length = 0;
+
+       if (!strcmp(part, "elm.text")) {
+               if(ti && !(ti->path.empty())) {
+                       const Eina_Unicode unicode_event[2] = {ti->keyevent,0};
+                       utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
+                       return (utf_8);
+               }
+       }
+
+       return NULL;
+}
+#endif //SUPPORTS_EMOTICONS_BY_IMAGE
+
 
 static void _item_selected(void *data, Evas_Object *obj, void *event_info)
 {
-    emoticon_item_t *ti = (emoticon_item_t *)data;
-    char *utf_8 = NULL;
-    int length = 0;
-
-    std::vector<int>::iterator it;
-
-    if(event_info) {
-        elm_gengrid_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
-        if(ti && ti->keyevent) {
-            const Eina_Unicode unicode_event[2] = {ti->keyevent,0};
-            utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
-            if (utf_8) {
-                ise_send_string((char *)utf_8);
-                free(utf_8);
-            }
-
-            if(current_emoticon_group != EMOTICON_GROUP_RECENTLY_USED) {
-                if(emoticon_list_recent.size() < EMOTICON_GROUP_RECENTLY_USED_NUM) {
-                    it = find(emoticon_list_recent.begin(), emoticon_list_recent.end(), ti->keyevent);
-                    if(it == emoticon_list_recent.end()) {    // Item not found
-                        emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
-                    } else {
-                        emoticon_list_recent.erase(it);
-                        emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
-                    }
-                }
-                else {
-                    it = find(emoticon_list_recent.begin(), emoticon_list_recent.end(), ti->keyevent);
-                    emoticon_list_recent.erase(it);
-                    emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
-                }
-/*
-                ise_write_recent_emoticon_list_to_scim();
-                if(is_recently_used_emoticon_mode_disabled){
-                    ise_disable_recently_used_emoticon_key(false);
-                }
-*/
-            }
-        }
-    }
+       emoticon_item_t *ti = (emoticon_item_t *)data;
+       char *utf_8 = NULL;
+       int length = 0;
+
+       std::vector<int>::iterator it;
+
+/*     static CSCLUtils *utils = CSCLUtils::get_instance();
+       if (utils) {
+               utils->play_sound(FB_SOUND_STYLE_01);
+               utils->play_vibration(FB_VIBE_STYLE_01, DEFAULT_VIBE_DURATION);
+       }*/
+
+       if(event_info) {
+               elm_gengrid_item_selected_set((Elm_Object_Item *)event_info, EINA_FALSE);
+               if(ti && ti->keyevent) {
+                       const Eina_Unicode unicode_event[2] = {ti->keyevent,0};
+//                     PRINTFUNC(DLOG_DEBUG,"unicode_event is %x",unicode_event);
+                       utf_8 = eina_unicode_unicode_to_utf8(unicode_event, &length);
+
+                       if (utf_8) {
+                               ise_send_string((sclchar *)utf_8);
+                               free(utf_8);
+                       }
+
+                       if(current_emoticon_group != EMOTICON_GROUP_RECENTLY_USED) {
+                               if(emoticon_list_recent.size() < EMOTICON_GROUP_RECENTLY_USED_NUM) {
+                                       it = find(emoticon_list_recent.begin(), emoticon_list_recent.end(), ti->keyevent);
+                                       if(it == emoticon_list_recent.end()) {  // Item not found
+                                               emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
+                                       } else {
+                                               emoticon_list_recent.erase(it);
+                                               emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
+                                       }
+                               }
+                               else {
+                                       it = find(emoticon_list_recent.begin(), emoticon_list_recent.end(), ti->keyevent);
+                                       emoticon_list_recent.erase(it);
+                                       emoticon_list_recent.insert(emoticon_list_recent.begin(),ti->keyevent);
+                               }
+                               ise_write_recent_emoticon_list_to_scim();
+                               if(is_recently_used_emoticon_mode_disabled)
+                                       ;//ise_disable_recently_used_emoticon_key(false);
+                       }
+               }
+       }
+       //PRINTFUNC(DLOG_DEBUG,"_item_selected() ends");
 }
 
 bool is_emoticon_show(void)
old mode 100644 (file)
new mode 100755 (executable)
index 63f17b3..a8d2bef
@@ -54,6 +54,9 @@ CSCLUI *g_ui = NULL;
 static CCoreEventCallback g_core_event_callback;
 CSCLCore g_core(&g_core_event_callback);
 
+extern emoticon_group_t current_emoticon_group;
+extern std::vector <int> emoticon_list_recent;
+
 extern CONFIG_VALUES g_config_values;
 static sclboolean g_need_send_shift_event = FALSE;
 #ifdef WAYLAND
@@ -258,6 +261,14 @@ void CCoreEventCallback::on_set_accessibility_state(const sclboolean state)
 void CCoreEventCallback::on_set_rotation_degree(sclint degree)
 {
     ise_set_screen_rotation(degree);
+
+    LOGD ("degree=%d", degree);
+    if(is_emoticon_show()){
+        ise_destroy_emoticon_window();
+    }
+    if(g_keyboard_state.layout == ISE_LAYOUT_STYLE_EMOTICON){
+        ise_show_emoticon_window(current_emoticon_group, degree, false, g_core.get_main_window());
+    }
 }
 
 void CCoreEventCallback::on_set_caps_mode(sclu32 mode)
@@ -453,7 +464,12 @@ on_input_mode_changed(const sclchar *key_value, sclulong key_event, sclint key_t
         }
         const sclchar *input_mode = g_ui->get_input_mode();
         if(!strcmp(key_value, "EMOTICON_LAYOUT")){
-            ise_show_emoticon_window(EMOTICON_GROUP_1, 0, false, g_core.get_main_window());
+            if(emoticon_list_recent.size() == 0)
+                current_emoticon_group = EMOTICON_GROUP_1;
+            else
+                current_emoticon_group = EMOTICON_GROUP_RECENTLY_USED;
+            SCLRotation rotation = g_ui->get_rotation();
+            ise_show_emoticon_window(current_emoticon_group, ROTATION_TO_DEGREE(rotation), false, g_core.get_main_window());
         }
     }
 
@@ -623,7 +639,8 @@ SCLEventReturnType CUIEventCallback::on_event_key_clicked(SclUIEventDesc event_d
                     emoticon_group_t group_id = ise_get_emoticon_group_id(event_desc.key_value);
                     if((group_id >= 0) && (group_id < MAX_EMOTICON_GROUP))
                     {
-                        ise_show_emoticon_window(group_id, 0, false, g_core.get_main_window());
+                        SCLRotation rotation = g_ui->get_rotation();
+                        ise_show_emoticon_window(group_id, ROTATION_TO_DEGREE(rotation), false, g_core.get_main_window());
                     }
                 }
             }
@@ -799,7 +816,12 @@ ise_show(int ic)
                     ise_destroy_emoticon_window();
                 }
                 if(g_keyboard_state.layout == ISE_LAYOUT_STYLE_EMOTICON){
-                    ise_show_emoticon_window(EMOTICON_GROUP_1, 0, false, g_core.get_main_window());
+                    if(emoticon_list_recent.size() == 0)
+                        current_emoticon_group = EMOTICON_GROUP_1;
+                    else
+                        current_emoticon_group = EMOTICON_GROUP_RECENTLY_USED;
+                    SCLRotation rotation = g_ui->get_rotation();
+                    ise_show_emoticon_window(current_emoticon_group, ROTATION_TO_DEGREE(rotation), false, g_core.get_main_window());
                 }
             }
         }
index ac00ec3..95b6c5a 100644 (file)
 #include <string.h>
 #include <sclcommon.h>
 #include <Ecore.h>
-
-#ifdef WAYLAND
-#include <Ecore_Wayland.h>
-#else
-#include <X11/Xlib.h>
-#include <X11/Xatom.h>
-#include <Ecore_X.h>
-#endif
-
 #include <vconf.h>
 #include <vconf-keys.h>
 #include <glib.h>