summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-05-14 15:50:53 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-05-14 15:50:53 -0400
commit282b76e2bd39a66a891d09d555ac38d45e675b44 (patch)
treedd395b82c5f555b7d4a1e74240c0708399ae7958
parent59dab13bfacae2d0bdd1d4976b481e3d39c64fea (diff)
efl_ui_panes: migrate to efl_ui_clickable
Summary: the implementation of efl_ui_clickable is now used to tricker the events. efl,action,click and efl,action,click,double is not needed anymore from the theme. Depends on D8824 Reviewers: zmike, segfaultxavi, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8825
-rw-r--r--data/elementary/themes/edc/efl/panes.edc30
-rw-r--r--src/lib/elementary/efl_ui_panes.c17
-rw-r--r--src/tests/elementary/spec/efl_test_clickable.c2
3 files changed, 13 insertions, 36 deletions
diff --git a/data/elementary/themes/edc/efl/panes.edc b/data/elementary/themes/edc/efl/panes.edc
index 6dc5e26..6809817 100644
--- a/data/elementary/themes/edc/efl/panes.edc
+++ b/data/elementary/themes/edc/efl/panes.edc
@@ -5,8 +5,6 @@
5 efl,panes,unfixed: Used for elm_panes_fixed_set() 5 efl,panes,unfixed: Used for elm_panes_fixed_set()
6 6
7 [SIGNAL EMIT] 7 [SIGNAL EMIT]
8 efl,action,click: Used for "clicked" smart callback.
9 efl,action,click,double: Used for "clicked,double" smart callback.
10 efl,action,press: Used for "press" smart callback. 8 efl,action,press: Used for "press" smart callback.
11 efl,action,unpress: Used for "unpress" smart callback. 9 efl,action,unpress: Used for "unpress" smart callback.
12*/ 10*/
@@ -137,11 +135,8 @@ group { name: "efl/panes/vertical";
137 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback 135 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
138 action: SIGNAL_EMIT "efl,action,unpress" "efl"; 136 action: SIGNAL_EMIT "efl,action,unpress" "efl";
139 } 137 }
140 program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback 138 program { signal: "mouse,pressed,out"; source: "bar";
141 action: SIGNAL_EMIT "efl,action,click" "efl"; 139 action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
142 }
143 program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
144 action: SIGNAL_EMIT "efl,action,click,double" "efl";
145 } 140 }
146 program { // for elm_panes_fixed_set() 141 program { // for elm_panes_fixed_set()
147 signal: "efl,panes,fixed"; source: "efl"; 142 signal: "efl,panes,fixed"; source: "efl";
@@ -278,11 +273,8 @@ group { name: "efl/panes/horizontal";
278 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback 273 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
279 action: SIGNAL_EMIT "efl,action,unpress" "efl"; 274 action: SIGNAL_EMIT "efl,action,unpress" "efl";
280 } 275 }
281 program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback 276 program { signal: "mouse,pressed,out"; source: "bar";
282 action: SIGNAL_EMIT "efl,action,click" "efl"; 277 action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
283 }
284 program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
285 action: SIGNAL_EMIT "efl,action,click,double" "efl";
286 } 278 }
287 program { // for elm_panes_fixed_set() 279 program { // for elm_panes_fixed_set()
288 signal: "efl,panes,fixed"; source: "efl"; 280 signal: "efl,panes,fixed"; source: "efl";
@@ -478,11 +470,8 @@ group { name: "efl/panes/vertical:flush";
478 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback 470 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
479 action: SIGNAL_EMIT "efl,action,unpress" "efl"; 471 action: SIGNAL_EMIT "efl,action,unpress" "efl";
480 } 472 }
481 program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback 473 program { signal: "mouse,pressed,out"; source: "bar";
482 action: SIGNAL_EMIT "efl,action,click" "efl"; 474 action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
483 }
484 program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
485 action: SIGNAL_EMIT "efl,action,click,double" "efl";
486 } 475 }
487 program { // for elm_panes_fixed_set() 476 program { // for elm_panes_fixed_set()
488 signal: "efl,panes,fixed"; source: "efl"; 477 signal: "efl,panes,fixed"; source: "efl";
@@ -734,11 +723,8 @@ group { name: "efl/panes/horizontal:flush";
734 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback 723 program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
735 action: SIGNAL_EMIT "efl,action,unpress" "efl"; 724 action: SIGNAL_EMIT "efl,action,unpress" "efl";
736 } 725 }
737 program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback 726 program { signal: "mouse,pressed,out"; source: "bar";
738 action: SIGNAL_EMIT "efl,action,click" "efl"; 727 action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
739 }
740 program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
741 action: SIGNAL_EMIT "efl,action,click,double" "efl";
742 } 728 }
743 program { // for elm_panes_fixed_set() 729 program { // for elm_panes_fixed_set()
744 signal: "efl,panes,fixed"; source: "efl"; 730 signal: "efl,panes,fixed"; source: "efl";
diff --git a/src/lib/elementary/efl_ui_panes.c b/src/lib/elementary/efl_ui_panes.c
index af96c84..fe3ed5c 100644
--- a/src/lib/elementary/efl_ui_panes.c
+++ b/src/lib/elementary/efl_ui_panes.c
@@ -6,6 +6,7 @@
6#define ELM_LAYOUT_PROTECTED 6#define ELM_LAYOUT_PROTECTED
7#define EFL_GFX_HINT_PROTECTED 7#define EFL_GFX_HINT_PROTECTED
8#define EFL_PART_PROTECTED 8#define EFL_PART_PROTECTED
9#define EFL_UI_CLICKABLE_PROTECTED
9 10
10#include <Elementary.h> 11#include <Elementary.h>
11 12
@@ -183,6 +184,7 @@ _on_pressed(void *data,
183 const char *source EINA_UNUSED) 184 const char *source EINA_UNUSED)
184{ 185{
185 efl_event_callback_legacy_call(data, ELM_PANES_EVENT_PRESS, NULL); 186 efl_event_callback_legacy_call(data, ELM_PANES_EVENT_PRESS, NULL);
187 efl_ui_clickable_press(data, 1);
186} 188}
187 189
188static void 190static void
@@ -193,7 +195,7 @@ _on_unpressed(void *data,
193{ 195{
194 EFL_UI_PANES_DATA_GET(data, sd); 196 EFL_UI_PANES_DATA_GET(data, sd);
195 efl_event_callback_legacy_call(data, ELM_PANES_EVENT_UNPRESS, NULL); 197 efl_event_callback_legacy_call(data, ELM_PANES_EVENT_UNPRESS, NULL);
196 198 efl_ui_clickable_unpress(data, 1);
197 if (sd->double_clicked) 199 if (sd->double_clicked)
198 { 200 {
199 evas_object_smart_callback_call(data, "clicked,double", NULL); 201 evas_object_smart_callback_call(data, "clicked,double", NULL);
@@ -437,18 +439,7 @@ _efl_ui_panes_efl_canvas_group_group_add(Eo *obj, Efl_Ui_Panes_Data *_pd EINA_UN
437 } 439 }
438 else 440 else
439 { 441 {
440 edje_object_signal_callback_add 442 efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj);
441 (wd->resize_obj, "efl,action,click", "*",
442 _on_clicked, obj);
443 edje_object_signal_callback_add
444 (wd->resize_obj, "efl,action,click,double", "*",
445 _double_clicked, obj);
446 edje_object_signal_callback_add
447 (wd->resize_obj, "efl,action,press", "*",
448 _on_pressed, obj);
449 edje_object_signal_callback_add
450 (wd->resize_obj, "efl,action,unpress", "*",
451 _on_unpressed, obj);
452 } 443 }
453 evas_object_event_callback_add 444 evas_object_event_callback_add
454 (wd->resize_obj, EVAS_CALLBACK_RESIZE, 445 (wd->resize_obj, EVAS_CALLBACK_RESIZE,
diff --git a/src/tests/elementary/spec/efl_test_clickable.c b/src/tests/elementary/spec/efl_test_clickable.c
index 554c782..a184053 100644
--- a/src/tests/elementary/spec/efl_test_clickable.c
+++ b/src/tests/elementary/spec/efl_test_clickable.c
@@ -8,7 +8,7 @@
8 8
9/* spec-meta-start 9/* spec-meta-start
10 {"test-interface":"Efl.Ui.Clickable", 10 {"test-interface":"Efl.Ui.Clickable",
11 "test-widgets": ["Efl.Ui.Button", "Efl.Ui.Image"] 11 "test-widgets": ["Efl.Ui.Button", "Efl.Ui.Image", "Efl.Ui.Panes"]
12 } 12 }
13 spec-meta-end 13 spec-meta-end
14 */ 14 */