summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
authorJehun Lim <jehun.lim@samsung.com>2015-08-21 13:12:54 +0900
committerJehun Lim <jehun.lim@samsung.com>2015-08-24 13:17:00 +0900
commitfe751c4e9afd894f9a2e56ee4ee61f81b0800119 (patch)
tree6ee9147bcb84cb4627899921b3eb47c8fab5a3ee /res
parentf72cb4d065fde2439e4c3570a3edb4960c79b6b0 (diff)
downloadair_mediahub-fe751c4e9afd894f9a2e56ee4ee61f81b0800119.tar.gz
air_mediahub-fe751c4e9afd894f9a2e56ee4ee61f81b0800119.tar.bz2
air_mediahub-fe751c4e9afd894f9a2e56ee4ee61f81b0800119.zip
action_menu: add clicked callback for favorite menu button
Change-Id: Iaa315b6fa6ec9e13691a59f14d275d2b50ed1dc6 Signed-off-by: Jehun Lim <jehun.lim@samsung.com>
Diffstat (limited to 'res')
-rw-r--r--res/edc/widgets/button.edc128
1 files changed, 125 insertions, 3 deletions
diff --git a/res/edc/widgets/button.edc b/res/edc/widgets/button.edc
index 3973cc9..a854c6b 100644
--- a/res/edc/widgets/button.edc
+++ b/res/edc/widgets/button.edc
@@ -18,6 +18,7 @@
#define STATE_FOCUSED 1
#define STATE_SELECTED 2
#define STATE_DISABLED 3
+#define STATE_TOGGLED 4
#define STATE_SHOW 0
#define STATE_HIDE 1
@@ -3417,6 +3418,14 @@ group {
color: COLOR_ITEM_FOCUS;
}
description {
+ state: "default_toggle" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "focused_toggle" 0.0;
+ inherit: "focused" 0.0;
+ }
+ description {
state: "selected" 0.0;
inherit: "default" 0.0;
}
@@ -3515,6 +3524,16 @@ group {
image.normal: IMAGE_ACTION_FAVORITE_FOC;
}
description {
+ state: "default_toggle" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IMAGE_ACTION_FAVORITE_NOR;
+ }
+ description {
+ state: "focused_toggle" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IMAGE_ACTION_FAVORITE_FOC;
+ }
+ description {
state: "selected" 0.0;
inherit: "default" 0.0;
image.normal: IMAGE_ACTION_FAVORITE_SEL;
@@ -3568,6 +3587,14 @@ group {
color: COLOR_TEXT_FOCUS;
}
description {
+ state: "default_toggle" 0.0;
+ inherit: "default" 0.0;
+ }
+ description {
+ state: "focused_toggle" 0.0;
+ inherit: "focused" 0.0;
+ }
+ description {
state: "selected" 0.0;
inherit: "default" 0.0;
color: COLOR_ITEM_SELECTED;
@@ -3578,6 +3605,15 @@ group {
color: COLOR_TEXT_DISABLED;
}
}
+ part {
+ name: "event";
+ type: RECT;
+ scale: 1;
+ description {
+ state: "default" 0.0;
+ color: 0 0 0 0;
+ }
+ }
}
programs {
program {
@@ -3589,9 +3625,57 @@ group {
}
}
program {
+ name: "button_clicked";
+ signal: "mouse,clicked,1";
+ source: "event";
+ action: SIGNAL_EMIT "elm,action,click" "";
+ }
+ program {
+ name: "anim,clicked,default";
+ action: STATE_SET "focused_toggle" 0.0;
+ target: "bg";
+ target: "menu_icon";
+ target: "elm.text";
+ transition: TRANSITION_CLICK;
+ }
+ program {
+ name: "anim,clicked,toggle";
+ action: STATE_SET "focused" 0.0;
+ target: "bg";
+ target: "menu_icon";
+ target: "elm.text";
+ transition: TRANSITION_CLICK;
+ }
+ program {
name: "go_active";
signal: SIG_ELM_FOCUS;
source: SIG_SOURCE_ELM;
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_NORMAL)
+ run_program(PROGRAM:"focus,default");
+ else
+ run_program(PROGRAM:"focus,toggle");
+ }
+ }
+ program {
+ name: "go_passive";
+ signal: SIG_ELM_UNFOCUS;
+ source: SIG_SOURCE_ELM;
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_NORMAL)
+ run_program(PROGRAM:"unfocus,default");
+ else
+ run_program(PROGRAM:"unfocus,toggle");
+ }
+ }
+ program {
+ name: "focus,default";
action: STATE_SET "focused" 0.0;
target: "bg";
target: "menu_icon";
@@ -3599,9 +3683,15 @@ group {
transition: TRANSITION_FOCUS;
}
program {
- name: "go_passive";
- signal: SIG_ELM_UNFOCUS;
- source: SIG_SOURCE_ELM;
+ name: "focus,toggle";
+ action: STATE_SET "focused_toggle" 0.0;
+ target: "bg";
+ target: "menu_icon";
+ target: "elm.text";
+ transition: TRANSITION_FOCUS;
+ }
+ program {
+ name: "unfocus,default";
action: STATE_SET "default" 0.0;
target: "bg";
target: "menu_icon";
@@ -3609,6 +3699,28 @@ group {
transition: TRANSITION_FOCUS;
}
program {
+ name: "unfocus,toggle";
+ action: STATE_SET "default_toggle" 0.0;
+ target: "bg";
+ target: "menu_icon";
+ target: "elm.text";
+ transition: TRANSITION_FOCUS;
+ }
+ program {
+ name: SIG_ITEM_TOGGLED;
+ signal: SIG_ITEM_TOGGLED;
+ source: SIG_SOURCE_SRC;
+ script {
+ new state;
+ state = get_int(cur_state);
+
+ if (state == STATE_NORMAL) {
+ set_int(cur_state, STATE_TOGGLED);
+ set_state(PART:"menu_icon","default_toggle",0.0);
+ }
+ }
+ }
+ program {
name: SIG_ITEM_SELECTED;
signal: SIG_ITEM_SELECTED;
source: SIG_SOURCE_SRC;
@@ -3651,6 +3763,16 @@ group {
image.normal: IMAGE_ACTION_DELETE_FOC;
}
description {
+ state: "default_toggle" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IMAGE_ACTION_DELETE_NOR;
+ }
+ description {
+ state: "focused_toggle" 0.0;
+ inherit: "default" 0.0;
+ image.normal: IMAGE_ACTION_DELETE_FOC;
+ }
+ description {
state: "selected" 0.0;
inherit: "default" 0.0;
image.normal: IMAGE_ACTION_DELETE_SEL;