+#define ENTRY_FOCUS_DATA \
+ data.item: "focus_highlight" "on";
+
+#define ENTRY_EDITFIELD_FOCUS_DATA \
+ data.item: "focus_highlight" "off";
+
+#define ENTRY_FOCUS_IMAGE \
+ images { \
+ image: "00_focus.png" COMP; \
+ }
+
+#define ENTRY_EDITFIELD_FOCUS_IMAGE \
+ images { \
+ image: "00_edit_field_focus.png" COMP; \
+ image: "00_eidt_field_bg.png" COMP; \
+ }
+
+#define ENTRY_TEXTBLOCK_DEFAULT_REL \
+ rel1 { \
+ to_x: "focus_left_padding"; \
+ relative: 1.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "editfield_space"; \
+ relative: 0.0 1.0; \
+ }
+
+#define ENTRY_SWALLOW_SCRIPT_PUBLIC \
+ script { \
+ public scroll_enabled; \
+ }
+
+#define ENTRY_SWALLOW_PARTS \
+ part { name: "editfield_space"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ align: 1.0 0.5; \
+ min: 0 0; \
+ max: 0 0; \
+ rel1 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 1.0; \
+ } \
+ } \
+ description { state: "rename_visible" 0.0; \
+ inherit: "default" 0.0; \
+ min: 9 0; \
+ max: 9 0; \
+ rel1 { \
+ to_x: "elm.swallow.rename"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "elm.swallow.rename"; \
+ relative: 0.0 1.0; \
+ } \
+ } \
+ description { state: "clear_visible" 0.0; \
+ inherit: "default" 0.0; \
+ min: 9 0; \
+ max: 9 0; \
+ rel1 { \
+ to_x: "elm.swallow.clear"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "elm.swallow.clear"; \
+ relative: 0.0 1.0; \
+ } \
+ } \
+ } \
+ part { name: "elm.swallow.clear"; \
+ type: SWALLOW; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ align: 1.0 0.5; \
+ fixed: 1 1; \
+ rel1 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 1.0; \
+ } \
+ visible: 0; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ } \
+ part { name: "elm.swallow.rename"; \
+ type: SWALLOW; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ align: 1.0 0.5; \
+ fixed: 1 1; \
+ rel1 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_right_padding"; \
+ relative: 0.0 1.0; \
+ } \
+ visible: 0; \
+ } \
+ description { state: "visible" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define ENTRY_FOCUS_PARTS \
+ part { name: "focus_bg"; \
+ type: RECT; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ } \
+ } \
+ part { name: "focus_left_padding"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 10 0; \
+ max: 10 0; \
+ fixed: 1 0; \
+ align: 0.0 0.5; \
+ rel1 { \
+ to_x: "focus_bg"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_bg"; \
+ relative: 0.0 1.0; \
+ } \
+ } \
+ description { state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ min: 0 0; \
+ max: 0 0; \
+ } \
+ } \
+ part { name: "focus_right_padding"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 10 0; \
+ max: 10 0; \
+ align: 1.0 0.5; \
+ fixed: 1 0; \
+ rel1 { \
+ to_x: "focus_bg"; \
+ relative: 1.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_bg"; \
+ relative: 1.0 1.0; \
+ } \
+ } \
+ description { state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ min: 0 0; \
+ max: 0 0; \
+ } \
+ } \
+ part { name: "focus_image"; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ image { \
+ normal: "00_focus.png"; \
+ border: 6 6 6 6; \
+ border_scale: 1; \
+ } \
+ rel1 { \
+ to_x: "focus_bg"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_bg"; \
+ relative: 1.0 1.0; \
+ } \
+ } \
+ description { state: "focused" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define ENTRY_EDITFIELD_FOCUS_PARTS \
+ part { name: "focus_bg"; \
+ type: IMAGE; \
+ scale: 1; \
+ mouse_events: 0; \
+ repeat_events: 1; \
+ description { state: "default" 0.0; \
+ visible: 1; \
+ image { \
+ normal: "00_edit_field_bg.png"; \
+ border: 8 8 8 8; \
+ border_scale: 1; \
+ } \
+ rel1.relative: 0.0 0.0; \
+ rel2.relative: 1.0 1.0; \
+ } \
+ description { state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 0; \
+ } \
+ } \
+ part { name: "focus_left_padding"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 10 0; \
+ max: 10 0; \
+ fixed: 1 0; \
+ align: 0.0 0.5; \
+ rel1 { \
+ to_x: "focus_bg"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_bg"; \
+ relative: 0.0 1.0; \
+ } \
+ } \
+ description { state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ min: 0 0; \
+ max: 0 0; \
+ } \
+ } \
+ part { name: "focus_right_padding"; \
+ type: SPACER; \
+ scale: 1; \
+ description { state: "default" 0.0; \
+ min: 10 0; \
+ max: 10 0; \
+ align: 1.0 0.5; \
+ fixed: 1 0; \
+ rel1 { \
+ to_x: "focus_bg"; \
+ relative: 1.0 0.0; \
+ } \
+ rel2 { \
+ to_x: "focus_bg"; \
+ relative: 1.0 1.0; \
+ } \
+ } \
+ description { state: "hidden" 0.0; \
+ inherit: "default" 0.0; \
+ min: 0 0; \
+ max: 0 0; \
+ } \
+ } \
+ part { name: "focus_image"; \
+ scale: 1; \
+ mouse_events: 0; \
+ description { state: "default" 0.0; \
+ visible: 0; \
+ image { \
+ normal: "00_edit_field_focus.png"; \
+ border: 8 8 8 8; \
+ border_scale: 1; \
+ } \
+ rel1 { \
+ to: "focus_bg"; \
+ relative: 0.0 0.0; \
+ } \
+ rel2 { \
+ to: "focus_bg"; \
+ relative: 1.0 1.0; \
+ } \
+ } \
+ description { state: "focused" 0.0; \
+ inherit: "default" 0.0; \
+ visible: 1; \
+ } \
+ }
+
+#define ENTRY_SWALLOW_PROGRAMS \
+ program { name: "scroll_enabled"; \
+ signal: "elm,state,scroll,enabled"; \
+ source: "*"; \
+ script { \
+ set_int(scroll_enabled, 1); \
+ set_state(PART:"focus_bg", "hidden", 0.0); \
+ set_state(PART:"focus_left_padding", "hidden", 0.0); \
+ set_state(PART:"focus_right_padding", "hidden", 0.0); \
+ } \
+ } \
+ program { name: "scroll_disabled"; \
+ signal: "elm,state,scroll,disabled"; \
+ source: "*"; \
+ script { \
+ set_int(scroll_enabled, 0); \
+ set_state(PART:"focus_bg", "default", 0.0); \
+ set_state(PART:"focus_left_padding", "default", 0.0); \
+ set_state(PART:"focus_right_padding", "default", 0.0); \
+ } \
+ } \
+ program { name: "clear_show"; \
+ signal: "elm,state,clear,visible"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"elm.swallow.clear", "visible", 0.0); \
+ set_state(PART:"editfield_space", "clear_visible", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "clear_hide"; \
+ signal: "elm,state,clear,hidden"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"elm.swallow.clear", "default", 0.0); \
+ set_state(PART:"editfield_space", "default", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "rename_show"; \
+ signal: "elm,state,rename,visible"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"elm.swallow.rename", "visible", 0.0); \
+ set_state(PART:"editfield_space", "rename_visible", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "rename_hide"; \
+ signal: "elm,state,rename,hidden"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"elm.swallow.rename", "default", 0.0); \
+ set_state(PART:"editfield_space", "default", 0.0); \
+ } \
+ } \
+ }
+
+#define ENTRY_FOCUS_PROGRAMS \
+ program { name: "action_focus"; \
+ signal: "elm,action,focus_highlight,show"; \
+ source: "elm"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"focus_image", "focused", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "action_unfocus"; \
+ signal: "elm,action,focus_highlight,hide"; \
+ source: "elm"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"focus_image", "default", 0.0); \
+ } \
+ } \
+ }
+
+#define ENTRY_EDITFIELD_FOCUS_PROGRAMS \
+ program { name: "action_focus"; \
+ signal: "elm,state,focus,on"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"focus_image", "focused", 0.0); \
+ } \
+ } \
+ } \
+ program { name: "action_unfocus"; \
+ signal: "elm,state,focus,off"; \
+ source: "*"; \
+ script { \
+ new v; \
+ v = get_int(scroll_enabled); \
+ if (!v) { \
+ set_state(PART:"focus_image", "default", 0.0); \
+ } \
+ } \
+ }
+
+sounds {
+ sample {
+ name: "touch_sound" AS_IS;
+ source: "S_Touch_30ms.wav";
+ }
+}
+