From 9d7a44ac7ca0636ebaf76c3cd2952b58293288ef Mon Sep 17 00:00:00 2001 From: Youngbok Shin Date: Tue, 8 May 2018 22:16:30 +0900 Subject: [PATCH] elementary: fix layout_part_cursor things and eo hierarchy of part_box/part_table All elm_layout_part_cursor_* had worked at box and table parts. After applying new interfaces, all elm_layout_part_cursor_* ignored box/table parts. It caused a lot of problems. I don't know why part_box/part_table didn't inherit Efl.Ui.Part. But, it needs Efl.Ui.Part for keeping backward compatiblity. @tizen_fix Change-Id: I35152f46d14b6d9f71ad328d0de1d4b8e8e957ce --- src/lib/elementary/efl_ui_layout_object.c | 34 ++++++++++++++++++++++++++ src/lib/elementary/efl_ui_layout_pack.c | 6 +++++ src/lib/elementary/efl_ui_layout_part_box.eo | 7 +++++- src/lib/elementary/efl_ui_layout_part_table.eo | 6 ++++- 4 files changed, 51 insertions(+), 2 deletions(-) diff --git a/src/lib/elementary/efl_ui_layout_object.c b/src/lib/elementary/efl_ui_layout_object.c index 31adc65..63bc28f 100644 --- a/src/lib/elementary/efl_ui_layout_object.c +++ b/src/lib/elementary/efl_ui_layout_object.c @@ -366,6 +366,7 @@ _parts_text_fix(Efl_Ui_Layout_Object_Data *sd) } /* END */ +/* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table static void _part_cursor_part_apply(const Efl_Ui_Layout_Sub_Object_Cursor *pc) { @@ -373,6 +374,15 @@ _part_cursor_part_apply(const Efl_Ui_Layout_Sub_Object_Cursor *pc) elm_object_cursor_style_set(pc->obj, pc->style); elm_object_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only); } + */ +static void +_part_cursor_part_apply(Efl_Ui_Layout_Data *sd, const Efl_Ui_Layout_Sub_Object_Cursor *pc) +{ + elm_object_sub_cursor_set(pc->obj, sd->obj, pc->cursor); + elm_object_sub_cursor_style_set(pc->obj, pc->style); + elm_object_sub_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only); +} +/* END */ static void _parts_cursors_apply(Efl_Ui_Layout_Object_Data *sd) @@ -407,7 +417,11 @@ _parts_cursors_apply(Efl_Ui_Layout_Object_Data *sd) } pc->obj = obj; + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table _part_cursor_part_apply(pc); + */ + _part_cursor_part_apply(sd, pc); + /* END */ } } @@ -1967,7 +1981,11 @@ _efl_ui_layout_part_cursor_get(Efl_Ui_Layout_Object_Data *sd, const char *part_n EINA_SAFETY_ON_NULL_RETURN_VAL(pc, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, NULL); + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table return elm_object_cursor_get(pc->obj); + */ + return elm_object_sub_cursor_get(pc->obj); + /* END */ } static Eina_Bool @@ -2002,7 +2020,11 @@ _efl_ui_layout_part_cursor_style_set(Efl_Ui_Layout_Object_Data *sd, const char * EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE); eina_stringshare_replace(&pc->style, style); + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table elm_object_cursor_style_set(pc->obj, pc->style); + */ + elm_object_sub_cursor_style_set(pc->obj, pc->style); + /* END */ return EINA_TRUE; } @@ -2016,7 +2038,11 @@ _efl_ui_layout_part_cursor_style_get(Efl_Ui_Layout_Object_Data *sd, const char * EINA_SAFETY_ON_NULL_RETURN_VAL(pc, NULL); EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, NULL); + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table return elm_object_cursor_style_get(pc->obj); + */ + return elm_object_sub_cursor_style_get(pc->obj); + /* END */ } static Eina_Bool @@ -2029,7 +2055,11 @@ _efl_ui_layout_part_cursor_engine_only_set(Efl_Ui_Layout_Object_Data *sd, const EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE); pc->engine_only = !!engine_only; + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table elm_object_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only); + */ + elm_object_sub_cursor_theme_search_enabled_set(pc->obj, !pc->engine_only); + /* END */ return EINA_TRUE; } @@ -2043,7 +2073,11 @@ _efl_ui_layout_part_cursor_engine_only_get(Efl_Ui_Layout_Object_Data *sd, const EINA_SAFETY_ON_NULL_RETURN_VAL(pc, EINA_FALSE); EINA_SAFETY_ON_NULL_RETURN_VAL(pc->obj, EINA_FALSE); + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table return !elm_object_cursor_theme_search_enabled_get(pc->obj); + */ + return !elm_object_sub_cursor_theme_search_enabled_get(pc->obj); + /* END */ } EAPI Eina_Bool diff --git a/src/lib/elementary/efl_ui_layout_pack.c b/src/lib/elementary/efl_ui_layout_pack.c index d4f8293..af02630 100644 --- a/src/lib/elementary/efl_ui_layout_pack.c +++ b/src/lib/elementary/efl_ui_layout_pack.c @@ -46,9 +46,15 @@ _efl_ui_layout_pack_proxy_get(Efl_Ui_Layout_Object *obj, Edje_Part_Type type, co { if (type == EDJE_PART_TYPE_BOX) return efl_add(BOX_CLASS, obj, + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table */ + _elm_part_initialize(efl_added, obj, part), + /* END */ efl_ui_layout_part_box_real_part_set(efl_added, obj, part)); else if (type == EDJE_PART_TYPE_TABLE) return efl_add(TABLE_CLASS, obj, + /* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table */ + _elm_part_initialize(efl_added, obj, part), + /* END */ efl_ui_layout_part_table_real_part_set(efl_added, obj, part)); else return NULL; diff --git a/src/lib/elementary/efl_ui_layout_part_box.eo b/src/lib/elementary/efl_ui_layout_part_box.eo index 6526c56..7e48129 100644 --- a/src/lib/elementary/efl_ui_layout_part_box.eo +++ b/src/lib/elementary/efl_ui_layout_part_box.eo @@ -1,5 +1,10 @@ -class Efl.Ui.Layout.Part_Box (Efl.Object, Efl.Pack_Linear, +/* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table +class Efl.Ui.Layout.Part.Box (Efl.Object, Efl.Pack_Linear, Efl.Ui.Direction) + */ +class Efl.Ui.Layout.Part.Box (Efl.Ui.Layout.Part, Efl.Pack_Linear, + Efl.Ui.Direction) +/* END */ { [[Represents a Box created as part of a layout. diff --git a/src/lib/elementary/efl_ui_layout_part_table.eo b/src/lib/elementary/efl_ui_layout_part_table.eo index 6f75c49..7524a0a 100644 --- a/src/lib/elementary/efl_ui_layout_part_table.eo +++ b/src/lib/elementary/efl_ui_layout_part_table.eo @@ -1,4 +1,8 @@ -class Efl.Ui.Layout.Part_Table (Efl.Object, Efl.Pack_Table) +/* TIZEN_ONLY(20180508): fix layout_part_cursor things and eo hierarchy of part_box/part_table +class Efl.Ui.Layout.Part.Table (Efl.Object, Efl.Pack_Table) + */ +class Efl.Ui.Layout.Part.Table (Efl.Ui.Layout.Part, Efl.Pack_Table) +/* END */ { [[Represents a Table created as part of a layout. -- 2.7.4