forked from enlightenment/efl
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
This commit is contained in:
parent
59dab13bfa
commit
282b76e2bd
|
@ -5,8 +5,6 @@
|
|||
efl,panes,unfixed: Used for elm_panes_fixed_set()
|
||||
|
||||
[SIGNAL EMIT]
|
||||
efl,action,click: Used for "clicked" smart callback.
|
||||
efl,action,click,double: Used for "clicked,double" smart callback.
|
||||
efl,action,press: Used for "press" smart callback.
|
||||
efl,action,unpress: Used for "unpress" smart callback.
|
||||
*/
|
||||
|
@ -137,11 +135,8 @@ group { name: "efl/panes/vertical";
|
|||
program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,unpress" "efl";
|
||||
}
|
||||
program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click" "efl";
|
||||
}
|
||||
program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click,double" "efl";
|
||||
program { signal: "mouse,pressed,out"; source: "bar";
|
||||
action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
|
||||
}
|
||||
program { // for elm_panes_fixed_set()
|
||||
signal: "efl,panes,fixed"; source: "efl";
|
||||
|
@ -278,11 +273,8 @@ group { name: "efl/panes/horizontal";
|
|||
program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,unpress" "efl";
|
||||
}
|
||||
program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click" "efl";
|
||||
}
|
||||
program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click,double" "efl";
|
||||
program { signal: "mouse,pressed,out"; source: "bar";
|
||||
action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
|
||||
}
|
||||
program { // for elm_panes_fixed_set()
|
||||
signal: "efl,panes,fixed"; source: "efl";
|
||||
|
@ -478,11 +470,8 @@ group { name: "efl/panes/vertical:flush";
|
|||
program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,unpress" "efl";
|
||||
}
|
||||
program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click" "efl";
|
||||
}
|
||||
program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click,double" "efl";
|
||||
program { signal: "mouse,pressed,out"; source: "bar";
|
||||
action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
|
||||
}
|
||||
program { // for elm_panes_fixed_set()
|
||||
signal: "efl,panes,fixed"; source: "efl";
|
||||
|
@ -734,11 +723,8 @@ group { name: "efl/panes/horizontal:flush";
|
|||
program { signal: "mouse,up,1"; source: "bar"; // for "unpress" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,unpress" "efl";
|
||||
}
|
||||
program { signal: "mouse,clicked,1"; source: "bar"; // for "clicked" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click" "efl";
|
||||
}
|
||||
program { signal: "mouse,down,1,double"; source: "bar"; // for "clicked,double" smart callback
|
||||
action: SIGNAL_EMIT "efl,action,click,double" "efl";
|
||||
program { signal: "mouse,pressed,out"; source: "bar";
|
||||
action: SIGNAL_EMIT "efl,action,mouse_out" "efl";
|
||||
}
|
||||
program { // for elm_panes_fixed_set()
|
||||
signal: "efl,panes,fixed"; source: "efl";
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#define ELM_LAYOUT_PROTECTED
|
||||
#define EFL_GFX_HINT_PROTECTED
|
||||
#define EFL_PART_PROTECTED
|
||||
#define EFL_UI_CLICKABLE_PROTECTED
|
||||
|
||||
#include <Elementary.h>
|
||||
|
||||
|
@ -183,6 +184,7 @@ _on_pressed(void *data,
|
|||
const char *source EINA_UNUSED)
|
||||
{
|
||||
efl_event_callback_legacy_call(data, ELM_PANES_EVENT_PRESS, NULL);
|
||||
efl_ui_clickable_press(data, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -193,7 +195,7 @@ _on_unpressed(void *data,
|
|||
{
|
||||
EFL_UI_PANES_DATA_GET(data, sd);
|
||||
efl_event_callback_legacy_call(data, ELM_PANES_EVENT_UNPRESS, NULL);
|
||||
|
||||
efl_ui_clickable_unpress(data, 1);
|
||||
if (sd->double_clicked)
|
||||
{
|
||||
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
|
|||
}
|
||||
else
|
||||
{
|
||||
edje_object_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,click", "*",
|
||||
_on_clicked, obj);
|
||||
edje_object_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,click,double", "*",
|
||||
_double_clicked, obj);
|
||||
edje_object_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,press", "*",
|
||||
_on_pressed, obj);
|
||||
edje_object_signal_callback_add
|
||||
(wd->resize_obj, "efl,action,unpress", "*",
|
||||
_on_unpressed, obj);
|
||||
efl_ui_clickable_util_bind_to_theme(wd->resize_obj, obj);
|
||||
}
|
||||
evas_object_event_callback_add
|
||||
(wd->resize_obj, EVAS_CALLBACK_RESIZE,
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
/* spec-meta-start
|
||||
{"test-interface":"Efl.Ui.Clickable",
|
||||
"test-widgets": ["Efl.Ui.Button", "Efl.Ui.Image"]
|
||||
"test-widgets": ["Efl.Ui.Button", "Efl.Ui.Image", "Efl.Ui.Panes"]
|
||||
}
|
||||
spec-meta-end
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue