forked from enlightenment/efl
efl_ui_popup: Remove inheritance from Efl.Canvas.Object
Summary: Class Efl.Ui.Popup_Part_Backwall inherits from multiple classes, class Efl.Ui.Layout.Part and abstract Efl.Canvas.Object. To remove multiple class inheritance, Efl.Canvas.Object is not derived and its property, repeat_events, is newly defined in Efl.Ui.Popup_Part_Backwall. Test Plan: 1. Execute elementary_test. 2. Select Efl.Ui.Popup. 3. Select "Show Dummy Button". 4. Select "Repeat Event Set". 5. Test if repeat event works. Reviewers: woohyun, felipealmeida, Hermet, segfaultxavi Reviewed By: Hermet, segfaultxavi Subscribers: bu5hm4n, q66, cedric, segfaultxavi, lauromoura, #reviewers, herb, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6984
This commit is contained in:
parent
5cc05b66d6
commit
31be3af62d
|
@ -101,14 +101,14 @@ _repeat_event_cb(void *data EINA_UNUSED, const Efl_Event *ev)
|
|||
{
|
||||
efl_ui_popup_data *p_data = data;
|
||||
if (!p_data->efl_ui_popup) return;
|
||||
if (!efl_canvas_object_repeat_events_get(efl_part(p_data->efl_ui_popup, "backwall")))
|
||||
if (!efl_ui_popup_part_backwall_repeat_events_get(efl_part(p_data->efl_ui_popup, "backwall")))
|
||||
{
|
||||
efl_canvas_object_repeat_events_set(efl_part(p_data->efl_ui_popup, "backwall"), EINA_TRUE);
|
||||
efl_ui_popup_part_backwall_repeat_events_set(efl_part(p_data->efl_ui_popup, "backwall"), EINA_TRUE);
|
||||
efl_text_set(ev->object, "Repeat Event UnSet");
|
||||
}
|
||||
else
|
||||
{
|
||||
efl_canvas_object_repeat_events_set(efl_part(p_data->efl_ui_popup, "backwall"), EINA_FALSE);
|
||||
efl_ui_popup_part_backwall_repeat_events_set(efl_part(p_data->efl_ui_popup, "backwall"), EINA_FALSE);
|
||||
efl_text_set(ev->object, "Repeat Event Set");
|
||||
}
|
||||
}
|
||||
|
@ -1014,7 +1014,7 @@ test_ui_popup_anchor(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void
|
|||
|
||||
Eo *efl_ui_popup = efl_add(EFL_UI_POPUP_ANCHOR_CLASS, win);
|
||||
|
||||
efl_canvas_object_repeat_events_set(efl_part(efl_ui_popup, "backwall"), EINA_TRUE);
|
||||
efl_ui_popup_part_backwall_repeat_events_set(efl_part(efl_ui_popup, "backwall"), EINA_TRUE);
|
||||
|
||||
//Default align priority order is top, left, right, bottom, center.
|
||||
efl_ui_popup_anchor_align_priority_set(efl_ui_popup, EFL_UI_POPUP_ALIGN_TOP,
|
||||
|
|
|
@ -334,7 +334,7 @@ _efl_ui_popup_efl_part_part_get(const Eo *obj, Efl_Ui_Popup_Data *_pd EINA_UNUSE
|
|||
}
|
||||
|
||||
EOLIAN static void
|
||||
_efl_ui_popup_part_backwall_efl_canvas_object_repeat_events_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool repeat)
|
||||
_efl_ui_popup_part_backwall_repeat_events_set(Eo *obj, void *_pd EINA_UNUSED, Eina_Bool repeat)
|
||||
{
|
||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||
Efl_Ui_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_POPUP_CLASS);
|
||||
|
@ -343,7 +343,7 @@ _efl_ui_popup_part_backwall_efl_canvas_object_repeat_events_set(Eo *obj, void *_
|
|||
}
|
||||
|
||||
EOLIAN static Eina_Bool
|
||||
_efl_ui_popup_part_backwall_efl_canvas_object_repeat_events_get(const Eo *obj, void *_pd EINA_UNUSED)
|
||||
_efl_ui_popup_part_backwall_repeat_events_get(const Eo *obj, void *_pd EINA_UNUSED)
|
||||
{
|
||||
Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
|
||||
Efl_Ui_Popup_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_POPUP_CLASS);
|
||||
|
|
|
@ -1,9 +1,30 @@
|
|||
class Efl.Ui.Popup_Part_Backwall (Efl.Ui.Layout.Part, Efl.Canvas.Object, Efl.File)
|
||||
class Efl.Ui.Popup_Part_Backwall (Efl.Ui.Layout.Part, Efl.File)
|
||||
{
|
||||
[[Efl UI Popup internal part backwall class]]
|
||||
data: null;
|
||||
methods {
|
||||
@property repeat_events {
|
||||
set {
|
||||
[[Set whether backwall is to repeat events.
|
||||
|
||||
If $repeat is $true, it will make events on $obj to also be
|
||||
repeated for the next lower object in the objects' stack (see
|
||||
\@ref evas_object_below_get).
|
||||
|
||||
If $repeat is $false, events occurring on $obj will be
|
||||
processed only on it.
|
||||
]]
|
||||
}
|
||||
get {
|
||||
[[Determine whether backwall is set to repeat events.]]
|
||||
}
|
||||
values {
|
||||
repeat: bool; [[Whether $obj is to repeat events ($true) or
|
||||
not ($false).]]
|
||||
}
|
||||
}
|
||||
}
|
||||
implements {
|
||||
Efl.Canvas.Object.repeat_events { set; get; }
|
||||
Efl.File.file { set; }
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue