summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunsuChoi <jsuya.choi@samsung.com>2017-01-12 21:18:56 +0900
committerJunsuChoi <jsuya.choi@samsung.com>2017-01-13 13:07:32 +0900
commita04cda8aa4494de549dd3dd4ecb46704656f8d24 (patch)
tree37df9af7ddb9d64adcf8b1f48b1466c0c81d9fc5
parent86b7ef6b628827ee00de0a2a891ef8c92e0b568d (diff)
downloadefl-theme-tizen-mobile-a04cda8aa4494de549dd3dd4ecb46704656f8d24.tar.gz
efl-theme-tizen-mobile-a04cda8aa4494de549dd3dd4ecb46704656f8d24.tar.bz2
efl-theme-tizen-mobile-a04cda8aa4494de549dd3dd4ecb46704656f8d24.zip
[Button] Add set_ignore_flags with ON_HOLD or NONE
It will not be pressed when ON_HOLD due to scroll. Change-Id: I8b548d192244306e7f740d8a9f73b8291b4fb788
-rw-r--r--mobile/widgets/button.edc42
1 files changed, 41 insertions, 1 deletions
diff --git a/mobile/widgets/button.edc b/mobile/widgets/button.edc
index f380f961..c0cb49d6 100644
--- a/mobile/widgets/button.edc
+++ b/mobile/widgets/button.edc
@@ -24,6 +24,10 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
+
+#define IGNORE_FLAGS_NONE 0
+#define IGNORE_FLAGS_ON_HOLD 1
+
group { "elm/button/event/default";
inherit_only: 1;
parts {
@@ -711,11 +715,19 @@
program_remove: "unpressed";
program_remove: "clicked";
programs {
+ program { "load";
+ signal: "load";
+ source: "";
+ script {
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
+ }
+ }
program { "on_pressed";
script {
if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) {
stop_program(PROGRAM:"delay_unpressed_effect");
set_int(mouse_down, 1);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE);
run_program(PROGRAM:"pressed_effect");
}
}
@@ -726,6 +738,7 @@
script {
if (get_int(mouse_down) == 1) {
set_int(mouse_down, 0);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
if (get_int(animate) == 0) {
emit("elm,action,unpress", "");
run_program(PROGRAM:"unpressed_effect");
@@ -1069,11 +1082,19 @@
program_remove: "unpressed";
program_remove: "clicked";
programs {
+ program { "load";
+ signal: "load";
+ source: "";
+ script {
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
+ }
+ }
program { "on_pressed";
script {
if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) {
stop_program(PROGRAM:"delay_unpressed_effect");
set_int(mouse_down, 1);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE);
run_program(PROGRAM:"pressed_effect");
}
}
@@ -1083,7 +1104,8 @@
source: "event";
script {
if (get_int(mouse_down) == 1) {
- set_int(mouse_down, 0);
+ set_int(mouse_down, 0);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
if (get_int(animate) == 0) {
emit("elm,action,unpress", "");
run_program(PROGRAM:"unpressed_effect");
@@ -1354,12 +1376,20 @@
program_remove: "unpressed";
program_remove: "clicked";
programs {
+ program { "load";
+ signal: "load";
+ source: "";
+ script {
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
+ }
+ }
program { "on_pressed";
script {
if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) {
stop_program(PROGRAM:"delay_unpressed_effect");
set_int(mouse_down, 1);
set_int(animate, 1);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE);
set_state(PART:"effect_spacer", "default", 0.0);
get_circumscription_radius(PART:"effect_spacer", rel_x, rel_y);
custom_state(PART:"effect_spacer", "default", 0.0);
@@ -1376,6 +1406,7 @@
script {
if (get_int(mouse_down) == 1) {
set_int(mouse_down, 0);
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD);
if (get_int(disabled) == 0) {
if (get_int(animate) == 0) {
run_program(PROGRAM:"unpressed_effect");
@@ -2084,12 +2115,20 @@ group { "elm/button/base/"style_name; \
program_remove: "unpressed"; \
program_remove: "clicked"; \
programs { \
+ program { "load"; \
+ signal: "load"; \
+ source: ""; \
+ script { \
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); \
+ } \
+ } \
program { "on_pressed"; \
script { \
if ((get_int(multi_down) == 0) && (get_int(mouse_down) == 0) && (get_int(disabled) == 0)) { \
stop_program(PROGRAM:"delay_unpressed_effect"); \
set_int(mouse_down, 1); \
set_int(animate, 1); \
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_NONE); \
get_circumscription_radius(PART:"base", rel_x, rel_y); \
custom_state(PART:"effect_spacer", "default", 0.0); \
set_state(PART:"effect_spacer", "custom",0.0); \
@@ -2105,6 +2144,7 @@ group { "elm/button/base/"style_name; \
script { \
if (get_int(mouse_down) == 1) { \
set_int(mouse_down, 0); \
+ set_ignore_flags(PART:"event", IGNORE_FLAGS_ON_HOLD); \
if (get_int(disabled) == 0) { \
if (get_int(animate) == 0) { \
run_program(PROGRAM:"unpressed_effect"); \