Page MenuHomePhabricator

efl_ui_tab_pager: add Efl.Ui.Tab_Pager and related classes
ClosedPublic

Authored by bowonryu on Apr 24 2018, 4:51 AM.

Details

Summary

the basic concept of Efl.Ui.Tab_Pager is similar to elm_toolbar.
user can attach Efl.Ui.Tab_Bar to the tab_pager.
user can create an Efl.Ui.Tab_Page to add tab label, tab icon and set the content of the page.
user can pack Efl.Ui.Tab_Page into tab_pager.
The tab and page match one to one.
user can controls tab and page through tab_pager.

See T5317

Test Plan

elementary_test -to efl.ui.tab_pager

Diff Detail

Repository
rEFL core/efl
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bowonryu requested review of this revision.Apr 24 2018, 4:51 AM
bowonryu created this revision.
bowonryu updated this revision to Diff 14284.Apr 24 2018, 4:56 AM

add missing files

bowonryu edited reviewers, added: Jaehyun_Cho; removed: Jaehyun.Apr 24 2018, 5:15 AM

Overall this seems almost ready to me, pretty good. Let me know what you think of my comment. Also there is a few TODO/FIXME, what are your plan regarding those ?

src/lib/elementary/efl_ui_tab_page.eo
8

I would name it title. What do you think ?

I am also wondering if we shouldn't make tab the default property of Tab_Page (and so make it inherit from Text and Image like Tab_Page.Part_Tab).

18

I don't think there is much difference if we had just one event: "title,changed" when either icon or label where changed. What do you think ?

src/lib/elementary/efl_ui_tab_page_part_tab.eo
7

Shouldn't that be provided by Efl.Ui.Image ?

bowonryu updated this revision to Diff 14310.Apr 25 2018, 6:58 AM

Changed to one event.

@cedric Thanks for comments..!

Overall this seems almost ready to me, pretty good. Let me know what you think of my comment. Also there is a few TODO/FIXME, what are your plan regarding those ?

For ToDo (related with Unpack), it depends on efl.ui.pager.
Once the implements of pager is finished, tab_pager can be quickly implemented.

I would name it title. What do you think ?

I don't care about naming (title? tab?).
But usually, it is called "Tab" in various platforms or apps.
Wouldn't the name "Tab" be better on the user side? What do you think?

I am also wondering if we shouldn't make tab the default property of Tab_Page (and so make it inherit from 

Text and Image like Tab_Page.Part_Tab).

Do you mean to create Efl.Ui.Tab Class?
If make a Efl.Ui.Tab, it will be difficult to guarantee various usability.
Also, the roles of Tab_Pager and Tab_Bar become ambiguous.

To support more type of Tabs in the future,
create a new Tab_Bar that inherits from Tab_Bar, (e.g. Tab_Bar_Expandable, Tab_Bar_Scrollable

or the mode of Tab_Bar should be supported. (e.g. efl_ui_tab_bar_mode_set (tb, EFL_UI_TAB_BAR_MODE_SCROLL);

What do you think?

I don't think there is much difference if we had just one event: "title,changed" when either icon or label 

where changed. What do you think ?

I applied it to my patch.
But I don't like the naming of the event enum and struct. Any good ideas?

Shouldn't that be provided by Efl.Ui.Image ?

Efl.Ui.Image has many features, and it is difficult to support all of them.
Tab only needs a small Icon.

And think about it ...

Efl.Ui.Tab_Page pg = new Efl.Ui.Tab_Page();

pg.content_set(content_obj);
pg.tab.text_set("Tab1");

(1) pg.tab.icon_set("/icon_path");
(2) pg.tab.image.icon_set("/icon_path");

(1) Is not it better?

bowonryu updated this revision to Diff 14327.Apr 25 2018, 11:02 PM

fix build break

The following diffs are added to this patch to support unpack and to fix elementary_test errors (win ref error and unpack crash).

diff --git a/src/bin/elementary/test_efl_ui_tab_pager.c b/src/bin/elementary/test_efl_ui_tab_pager.c
index 01b0991..93fc11d 100644

  • a/src/bin/elementary/test_efl_ui_tab_pager.c

+++ b/src/bin/elementary/test_efl_ui_tab_pager.c
@@ -119,11 +119,11 @@ test_efl_ui_tab_pager(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void

char buf[PATH_MAX];
int i;
  • win = efl_add_ref(EFL_UI_WIN_CLASS, NULL,
  • efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
  • efl_text_set(efl_added, "Efl.Ui.Tab_Pager"),
  • efl_ui_win_autodel_set(efl_added, EINA_TRUE),
  • efl_event_callback_add(efl_added, EFL_EVENT_DEL, _win_del_cb, ad));

+ win = efl_add(EFL_UI_WIN_CLASS, efl_main_loop_get(),
+ efl_ui_win_type_set(efl_added, EFL_UI_WIN_BASIC),
+ efl_text_set(efl_added, "Efl.Ui.Tab_Pager"),
+ efl_ui_win_autodel_set(efl_added, EINA_TRUE),
+ efl_event_callback_add(efl_added, EFL_EVENT_DEL, _win_del_cb, ad));

snprintf(buf, sizeof(buf), "%s/objects/test_tab_pager.edj", elm_app_data_dir_get());
layout = efl_add(EFL_UI_LAYOUT_OBJECT_CLASS, win,

@@ -588,4 +588,4 @@ _transition_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info)

efl_text_set(efl_added, "Unset"),
efl_event_callback_add(efl_added, EFL_UI_EVENT_CLICKED, _tran_unset_btn_cb, tab_pager),
efl_pack_end(box, efl_added));

-}
\ No newline at end of file
+}
diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c
index e061abc..26d5d4c 100644

  • a/src/lib/elementary/efl_ui_tab_bar.c

+++ b/src/lib/elementary/efl_ui_tab_bar.c
@@ -286,7 +286,7 @@ _efl_ui_tab_bar_tab_add(Eo *obj, Efl_Ui_Tab_Bar_Data *sd,
EOLIAN static void
_efl_ui_tab_bar_tab_remove(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Bar_Data *sd, int index)
{

  • if (sd->cnt != 0 && sd->cnt >= index)

+ if ((sd->cnt > 0) && (sd->cnt > index) && (index >= 0))

{
   Tab_Info *ti;
   ti = eina_list_nth(sd->tab_infos, index);

@@ -389,4 +389,4 @@ _efl_ui_tab_bar_efl_object_constructor(Eo *obj, Efl_Ui_Tab_Bar_Data *sd)

return obj;

}

-#include "efl_ui_tab_bar.eo.c"
\ No newline at end of file
+#include "efl_ui_tab_bar.eo.c"
diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c
index e79c473..cf42c7d 100644

  • a/src/lib/elementary/efl_ui_tab_pager.c

+++ b/src/lib/elementary/efl_ui_tab_pager.c
@@ -118,26 +118,71 @@ _efl_ui_tab_pager_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Pa
}

EOLIAN static Eina_Bool
-_efl_ui_tab_pager_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED)
+_efl_ui_tab_pager_efl_pack_pack_clear(Eo *obj, Efl_Ui_Tab_Pager_Data *sd)
{

  • /* TODO */
  • ERR("Soon to be implemented");

+ if (sd->tab_bar)
+ {
+ Eo *subobj;
+ Eina_List *l, *l_next;
+ int begin_index = 0;
+ EINA_LIST_FOREACH_SAFE(sd->tab_pages, l, l_next, subobj)
+ {
+ efl_event_callback_del(subobj, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, _tab_changed_cb, obj);
+
+ sd->tab_pages = eina_list_remove(sd->tab_pages, subobj);
+ sd->cnt--;
+
+ efl_ui_tab_bar_tab_remove(sd->tab_bar, begin_index);
+ }
+ efl_pack_clear(efl_super(obj, MY_CLASS));
+
+ return EINA_TRUE;
+ }

return EINA_FALSE;

}

EOLIAN static Eina_Bool
-_efl_ui_tab_pager_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED)
+_efl_ui_tab_pager_efl_pack_unpack_all(Eo *obj, Efl_Ui_Tab_Pager_Data *sd)
{

  • /* TODO */
  • ERR("Soon to be implemented");

+ if (sd->tab_bar)
+ {
+ Eo *subobj;
+ Eina_List *l, *l_next;
+ int begin_index = 0;
+ EINA_LIST_FOREACH_SAFE(sd->tab_pages, l, l_next, subobj)
+ {
+ efl_event_callback_del(subobj, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, _tab_changed_cb, obj);
+
+ sd->tab_pages = eina_list_remove(sd->tab_pages, subobj);
+ sd->cnt--;
+
+ efl_ui_tab_bar_tab_remove(sd->tab_bar, begin_index);
+ }
+ efl_pack_unpack_all(efl_super(obj, MY_CLASS));
+
+ return EINA_TRUE;
+ }

return EINA_FALSE;

}

EOLIAN static Eina_Bool
-_efl_ui_tab_pager_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED, Efl_Gfx_Entity *subobj EINA_UNUSED)
+_efl_ui_tab_pager_efl_pack_unpack(Eo *obj, Efl_Ui_Tab_Pager_Data *sd, Efl_Gfx_Entity *subobj)
{

  • /* TODO */
  • ERR("Soon to be implemented");

+ if (sd->tab_bar)
+ {
+ efl_event_callback_del(subobj, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, _tab_changed_cb, obj);
+
+ int index = eina_list_data_idx(sd->tab_pages, (void *)subobj);
+
+ sd->tab_pages = eina_list_remove(sd->tab_pages, subobj);
+ sd->cnt--;
+
+ efl_ui_tab_bar_tab_remove(sd->tab_bar, index);
+ efl_pack_unpack(efl_super(obj, MY_CLASS), subobj);
+
+
+ return EINA_TRUE;
+ }

return EINA_FALSE;

}

@@ -269,10 +314,24 @@ _efl_ui_tab_pager_efl_pack_linear_pack_at(Eo *obj,
}

EOLIAN static Efl_Gfx_Entity *
-_efl_ui_tab_pager_efl_pack_linear_pack_unpack_at(Eo *obj EINA_UNUSED, Efl_Ui_Tab_Pager_Data *sd EINA_UNUSED, int index EINA_UNUSED)
+_efl_ui_tab_pager_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Tab_Pager_Data *sd, int index)
{

  • /* TODO */
  • ERR("Soon to be implemented");

+ if (sd->tab_bar)
+ {
+ Efl_Gfx_Entity *existing = NULL;
+ existing = eina_list_nth(sd->tab_pages, index);
+ if (!existing) return NULL;
+
+ efl_event_callback_del(existing, EFL_UI_TAB_PAGE_EVENT_TAB_CHANGED, _tab_changed_cb, obj);
+
+ sd->tab_pages = eina_list_remove(sd->tab_pages, existing);
+ sd->cnt--;
+
+ efl_ui_tab_bar_tab_remove(sd->tab_bar, index);
+ efl_pack_unpack_at(efl_super(obj, MY_CLASS), index);
+
+ return existing;
+ }

return NULL;

}

@@ -292,4 +351,4 @@ _efl_ui_tab_pager_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED,

return eina_list_data_idx(sd->tab_pages, (void *)subobj);

}

-#include "efl_ui_tab_pager.eo.c"
\ No newline at end of file
+#include "efl_ui_tab_pager.eo.c"

The following diff is added to this patch to apply new theme naming rule.
Otherwise, page content set and transition do not work.

diff --git a/data/elementary/themes/edc/efl/tab_bar.edc b/data/elementary/themes/edc/efl/tab_bar.edc
index 778c091..f7f039c 100644

  • a/data/elementary/themes/edc/efl/tab_bar.edc

+++ b/data/elementary/themes/edc/efl/tab_bar.edc
@@ -29,7 +29,7 @@ group { "efl/tab_bar";

      fill.smooth: 0;
   }
}
  • swallow { "content";

+ swallow { "efl.content";

scale;
desc { "default";
   rel.to: "base";

@@ -77,48 +77,48 @@ group { "efl/tab_bar/tab";

new d = m & DISABLE;
if (m1 == (ICON | LABEL)) {
   if (!d) {
  • set_state(PART:"icon", "default", 0.0);

+ set_state(PART:"efl.icon", "default", 0.0);

   set_state(PART:"icon_clip", "default", 0.0);
   set_state(PART:"efl.text", "default", 0.0);
   set_state(PART:"label2", "default", 0.0);
} else {
  • set_state(PART:"icon", "default", 0.0);

+ set_state(PART:"efl.icon", "default", 0.0);

      set_state(PART:"icon_clip", "disabled", 0.0);
      set_state(PART:"efl.text", "disabled", 0.0);
      set_state(PART:"label2", "default", 0.0);
   }
} else if (m1 == (ICON)) {
   if (!d) {
  • set_state(PART:"icon", "icononly", 0.0);

+ set_state(PART:"efl.icon", "icononly", 0.0);

   set_state(PART:"icon_clip", "default", 0.0);
   set_state(PART:"efl.text", "icononly", 0.0);
   set_state(PART:"label2", "icononly", 0.0);
} else {
  • set_state(PART:"icon", "icononly", 0.0);

+ set_state(PART:"efl.icon", "icononly", 0.0);

      set_state(PART:"icon_clip", "disabled", 0.0);
      set_state(PART:"efl.text", "icononly", 0.0);
      set_state(PART:"label2", "icononly", 0.0);
   }
} else if (m1 == (LABEL)) {
   if (!d) {
  • set_state(PART:"icon", "noicon", 0.0);

+ set_state(PART:"efl.icon", "noicon", 0.0);

   set_state(PART:"icon_clip", "default", 0.0);
   set_state(PART:"efl.text", "noicon", 0.0);
   set_state(PART:"label2", "noicon", 0.0);
} else {
  • set_state(PART:"icon", "noicon", 0.0);

+ set_state(PART:"efl.icon", "noicon", 0.0);

      set_state(PART:"icon_clip", "disabled", 0.0);
      set_state(PART:"efl.text", "noicon_disabled", 0.0);
      set_state(PART:"label2", "noicon_disabled", 0.0);
   }
} else {
   if (!d) {
  • set_state(PART:"icon", "noicon", 0.0);

+ set_state(PART:"efl.icon", "noicon", 0.0);

   set_state(PART:"icon_clip", "default", 0.0);
   set_state(PART:"efl.text", "noicon", 0.0);
   set_state(PART:"label2", "noicon", 0.0);
} else {
  • set_state(PART:"icon", "noicon", 0.0);

+ set_state(PART:"efl.icon", "noicon", 0.0);

set_state(PART:"icon_clip", "disabled", 0.0);
set_state(PART:"efl.text", "noicon_disabled", 0.0);
set_state(PART:"label2", "noicon_disabled", 0.0);

@@ -211,7 +211,7 @@ group { "efl/tab_bar/tab";

      hid;
   }
}
  • swallow { "icon";

+ swallow { "efl.icon";

clip_to: "icon_clip1";
desc { "default";
   align: 0.5 0.5;

@@ -248,7 +248,7 @@ group { "efl/tab_bar/tab";

      vis;
   }
}
  • swallow { "icon_new";

+ swallow { "efl.icon_new";

clip_to: "icon_clip2";
desc { "default";
   align: 0.5 0.5;

@@ -424,13 +424,13 @@ group { "efl/tab_bar/tab";

   }
programs {
   program {
  • signal: "elm,orient,horizontal"; source: "elm";

+ signal: "efl,orient,horizontal"; source: "efl";

   action: STATE_SET "default" 0.0;
   target: "base";
   target: "bend_clip";
}
program {
  • signal: "elm,orient,vertical"; source: "elm";

+ signal: "efl,orient,vertical"; source: "efl";

action: STATE_SET "vert" 0.0;
target: "base";
target: "bend_clip";

@@ -442,7 +442,7 @@ group { "efl/tab_bar/tab";

   }
}
program {
  • signal: "elm,state,selected"; source: "elm";

+ signal: "efl,state,selected"; source: "efl";

action: STATE_SET "selected" 0.0;
target: "efl.text";
target: "label2";

@@ -452,7 +452,7 @@ group { "efl/tab_bar/tab";

   target: "bend";
}
program {
  • signal: "elm,state,unselected"; source: "elm";

+ signal: "efl,state,unselected"; source: "efl";

action: STATE_SET "default" 0.0;
target: "efl.text";
target: "label2";

@@ -463,28 +463,28 @@ group { "efl/tab_bar/tab";

}
program {
   signal: "mouse,up,1"; source: "event";
  • action: SIGNAL_EMIT "elm,action,click" "elm";

+ action: SIGNAL_EMIT "efl,action,click" "efl";

}
program {
  • signal: "elm,highlight,on"; source: "elm";

+ signal: "efl,highlight,on"; source: "efl";

   action: STATE_SET "selected" 0.0;
   target: "highlight";
}
program {
  • signal: "elm,highlight,off"; source: "elm";

+ signal: "efl,highlight,off"; source: "efl";

   action: STATE_SET "default" 0.0;
   target: "highlight";
}
program {
   signal:  "mouse,in"; source:  "event";
  • action: SIGNAL_EMIT "elm,mouse,in" "elm";

+ action: SIGNAL_EMIT "efl,mouse,in" "efl";

}
program { name: "mouse,out";
   signal:  "mouse,out"; source:  "event";
  • action: SIGNAL_EMIT "elm,mouse,out" "elm";

+ action: SIGNAL_EMIT "efl,mouse,out" "efl";

}
program { name: "st1";
  • signal: "elm,text,hidden"; source: "elm";

+ signal: "efl,text,hidden"; source: "efl";

script {
   new m = get_int(btmode);
   m &= ~LABEL; set_int(btmode, m);

@@ -492,7 +492,7 @@ group { "efl/tab_bar/tab";

   }
}
program { name: "st2";
  • signal: "elm,text,visible"; source: "elm";

+ signal: "efl,text,visible"; source: "efl";

script {
   new m = get_int(btmode);
   m |= LABEL; set_int(btmode, m);

@@ -500,7 +500,7 @@ group { "efl/tab_bar/tab";

   }
}
program { name: "st3";
  • signal: "elm,icon,hidden"; source: "elm";

+ signal: "efl,icon,hidden"; source: "efl";

script {
   new m = get_int(btmode);
   m &= ~ICON; set_int(btmode, m);

@@ -508,7 +508,7 @@ group { "efl/tab_bar/tab";

   }
}
program { name: "st4";
  • signal: "elm,icon,visible"; source: "elm";

+ signal: "efl,icon,visible"; source: "efl";

script {
   new m = get_int(btmode);
   m |= ICON; set_int(btmode, m);

@@ -516,7 +516,7 @@ group { "efl/tab_bar/tab";

   }
}
program { name: "st5";
  • signal: "elm,state,disabled"; source: "elm";

+ signal: "efl,state,disabled"; source: "efl";

script {
   new m = get_int(btmode);
   m |= DISABLE; set_int(btmode, m);

@@ -524,7 +524,7 @@ group { "efl/tab_bar/tab";

   }
}
program { name: "st6";
  • signal: "elm,state,enabled"; source: "elm";

+ signal: "efl,state,enabled"; source: "efl";

script {
   new m = get_int(btmode);
   m &= ~DISABLE; set_int(btmode, m);

@@ -532,21 +532,21 @@ group { "efl/tab_bar/tab";

   }
}
program {
  • signal: "elm,state,moving"; source: "elm";

+ signal: "efl,state,moving"; source: "efl";

   action: STATE_SET "default" 0.0;
   target: "shadow1";
   target: "shadow2";
}
program {
  • signal: "elm,state,icon_set,forward"; source: "elm";

+ signal: "efl,state,icon_set,forward"; source: "efl";

   after: "icon_set,animation";
}
program {
  • signal: "elm,state,icon_set,backward"; source: "elm";

+ signal: "efl,state,icon_set,backward"; source: "efl";

   after: "icon_set,animation";
}
program { name: "icon_set,animation";
  • signal: "elm,state,icon_set"; source: "elm";

+ signal: "efl,state,icon_set"; source: "efl";

action: STATE_SET "animation" 0.0;
target: "icon_clip1";
target: "icon_clip2";

@@ -554,24 +554,24 @@ group { "efl/tab_bar/tab";

   after: "icon_set,animation,done";
}
program { name: "icon_set,animation,done";
  • action: SIGNAL_EMIT "elm,state,icon_set,done" "elm";

+ action: SIGNAL_EMIT "efl,state,icon_set,done" "efl";

}
program {
  • signal: "elm,state,icon,reset"; source: "elm";

+ signal: "efl,state,icon,reset"; source: "efl";

   action: STATE_SET "default" 0.0;
   target: "icon_clip1";
   target: "icon_clip2";
}
program {
  • signal: "elm,state,label_set,forward"; source: "elm";

+ signal: "efl,state,label_set,forward"; source: "efl";

   after: "label_set,animation";
}
program {
  • signal: "elm,state,label_set,backward"; source: "elm";

+ signal: "efl,state,label_set,backward"; source: "efl";

   after: "label_set,animation";
}
program { name: "label_set,animation";
  • signal: "elm,state,label_set"; source: "elm";

+ signal: "efl,state,label_set"; source: "efl";

action: STATE_SET "animation" 0.0;
target: "text_clip1";
target: "text_clip2";

@@ -579,10 +579,10 @@ group { "efl/tab_bar/tab";

   after: "label_set,animation,done";
}
program { name: "label_set,animation,done";
  • action: SIGNAL_EMIT "elm,state,label_set,done" "elm";

+ action: SIGNAL_EMIT "efl,state,label_set,done" "efl";

}
program {
  • signal: "elm,state,label,reset"; source: "elm";

+ signal: "efl,state,label,reset"; source: "efl";

action: STATE_SET "default" 0.0;
target: "text_clip1";
target: "text_clip2";

diff --git a/data/elementary/themes/edc/efl/tab_pager.edc b/data/elementary/themes/edc/efl/tab_pager.edc
index d246e2f..fb63e58 100644

  • a/data/elementary/themes/edc/efl/tab_pager.edc

+++ b/data/elementary/themes/edc/efl/tab_pager.edc
@@ -5,7 +5,7 @@ group { "efl/tab_pager";

   desc { "default";
   }
}
  • swallow { "tab_root";

+ swallow { "efl.tab_root";

scale;
desc { "default";
   rel.to: "base";

@@ -15,19 +15,19 @@ group { "efl/tab_pager";

      fixed: 0 1;
   }
}
  • swallow { "page_root";

+ swallow { "efl.page_root";

scale;
desc { "default";
  • rel1.to: "tab_root";

+ rel1.to: "efl.tab_root";

      rel2.to: "base";
      rel1.relative: 0 1;
   }
}
  • swallow { "event";

+ swallow { "efl.event";

scale;
repeat_events: 1;
desc { "default";
  • rel.to: "page_root";

+ rel.to: "efl.page_root";

      }
   }
}

diff --git a/src/lib/elementary/efl_ui_tab_bar.c b/src/lib/elementary/efl_ui_tab_bar.c
index 26d5d4c..ffbc1fd 100644

  • a/src/lib/elementary/efl_ui_tab_bar.c

+++ b/src/lib/elementary/efl_ui_tab_bar.c
@@ -40,16 +40,16 @@ static void
_tab_icon_update(Tab_Info *ti)
{

Eo *old_icon =
  • efl_content_get(efl_part(ti->tab, "icon"));

+ efl_content_get(efl_part(ti->tab, "efl.icon"));

_elm_widget_sub_object_redirect_to_top(ti->tab, old_icon);
  • efl_content_unset(efl_part(ti->tab, "icon"));
  • efl_content_set(efl_part(ti->tab, "icon"), ti->icon);

+ efl_content_unset(efl_part(ti->tab, "efl.icon"));
+ efl_content_set(efl_part(ti->tab, "efl.icon"), ti->icon);

if (ti->icon)
  • efl_layout_signal_emit(ti->tab, "elm,state,icon,visible", "elm");

+ efl_layout_signal_emit(ti->tab, "efl,state,icon,visible", "efl");

else
  • efl_layout_signal_emit(ti->tab, "elm,state,icon,hidden", "elm");

+ efl_layout_signal_emit(ti->tab, "efl,state,icon,hidden", "efl");

efl_del(old_icon);

}
@@ -64,7 +64,7 @@ _tab_icon_set_cb(void *data,

_tab_icon_update(ti);
 
efl_layout_signal_callback_del(obj, emission, source, _tab_icon_set_cb, NULL);
  • efl_layout_signal_emit(ti->tab, "elm,state,icon,reset", "elm");

+ efl_layout_signal_emit(ti->tab, "efl,state,icon,reset", "efl");
}

static void
@@ -96,17 +96,17 @@ _tab_icon_obj_set(Eo *obj,

if ((s) && (atoi(s)))
  {
     old_icon = efl_content_get
  • (efl_part(ti->tab, "icon_new"));

+ (efl_part(ti->tab, "efl.icon_new"));

if (old_icon)
  {
     _elm_widget_sub_object_redirect_to_top(ti->tab, old_icon);
     efl_gfx_entity_visible_set(old_icon, EINA_FALSE);
  }
efl_content_set
  • (efl_part(ti->tab, "icon_new"), ti->icon);
  • efl_layout_signal_emit(ti->tab, sig, "elm");

+ (efl_part(ti->tab, "efl.icon_new"), ti->icon);
+ efl_layout_signal_emit(ti->tab, sig, "efl");

efl_layout_signal_callback_add
  • (ti->tab, "elm,state,icon_set,done", "elm", _tab_icon_set_cb, ti);

+ (ti->tab, "efl,state,icon_set,done", "efl", _tab_icon_set_cb, ti);

  }
else
  _tab_icon_update(ti);

@@ -139,9 +139,9 @@ _tab_unselect(Efl_Ui_Tab_Bar_Data *sd, Tab_Info *ti)

ti->selected = EINA_FALSE;
  • efl_layout_signal_emit(ti->tab, "elm,state,unselected", "elm");

+ efl_layout_signal_emit(ti->tab, "efl,state,unselected", "efl");

if (ti->icon)
  • elm_widget_signal_emit(ti->icon, "elm,state,unselected", "elm");

+ elm_widget_signal_emit(ti->icon, "efl,state,unselected", "efl");

sd->cur = -1;

}
@@ -159,9 +159,9 @@ _tab_select(Efl_Ui_Tab_Bar_Data *sd, Tab_Info *ti)

ti->selected = EINA_TRUE;
sd->selected_tab = ti;
  • efl_layout_signal_emit(ti->tab, "elm,state,selected", "elm");

+ efl_layout_signal_emit(ti->tab, "efl,state,selected", "efl");

if (ti->icon)
  • elm_widget_signal_emit(ti->icon, "elm,state,selected", "elm");

+ elm_widget_signal_emit(ti->icon, "efl,state,selected", "efl");

index = eina_list_data_idx(sd->tab_infos, ti);

@@ -220,31 +220,31 @@ _tab_add(Eo *obj, const char *label, const char *icon)

  CRI("Failed to set layout!");
 
efl_layout_signal_callback_add
  • (tab, "elm,action,click", "elm", _action_click_cb, ti);

+ (tab, "efl,action,click", "efl", _action_click_cb, ti);

if (ti->icon)
  {
  • efl_content_set(efl_part(tab, "icon"), ti->icon);
  • efl_layout_signal_emit(tab, "elm,state,icon,visible", "elm");
  • efl_layout_signal_emit(tab, "elm,icon,visible", "elm");

+ efl_content_set(efl_part(tab, "efl.icon"), ti->icon);
+ efl_layout_signal_emit(tab, "efl,state,icon,visible", "efl");
+ efl_layout_signal_emit(tab, "efl,icon,visible", "efl");

     efl_gfx_entity_visible_set(ti->icon, EINA_TRUE);
  }
else
  {
  • efl_layout_signal_emit(tab, "elm,state,icon,hidden", "elm");
  • efl_layout_signal_emit(tab, "elm,icon,hidden", "elm");

+ efl_layout_signal_emit(tab, "efl,state,icon,hidden", "efl");
+ efl_layout_signal_emit(tab, "efl,icon,hidden", "efl");

  }
 
if (ti->label)
  {
     efl_text_set(efl_part(tab, "efl.text"), ti->label);
  • efl_layout_signal_emit(tab, "elm,state,text,visible", "elm");
  • efl_layout_signal_emit(tab, "elm,text,visible", "elm");

+ efl_layout_signal_emit(tab, "efl,state,text,visible", "efl");
+ efl_layout_signal_emit(tab, "efl,text,visible", "efl");

  }
else
  {
  • efl_layout_signal_emit(tab, "elm,state,text,hidden", "elm");
  • efl_layout_signal_emit(tab, "elm,text,hidden", "elm");

+ efl_layout_signal_emit(tab, "efl,state,text,hidden", "efl");
+ efl_layout_signal_emit(tab, "efl,text,hidden", "efl");

  }
 
efl_ui_widget_focus_allow_set(tab, EINA_TRUE);

@@ -323,10 +323,10 @@ _efl_ui_tab_bar_tab_icon_set(Eo *obj, Efl_Ui_Tab_Bar_Data *sd, int index, const

icon_obj = elm_icon_add(obj);
if (!icon_obj) return;
if (_tab_icon_set(icon_obj, "toolbar/", icon))
  • _tab_icon_obj_set(obj, ti, icon_obj, icon, "elm,state,icon_set");

+ _tab_icon_obj_set(obj, ti, icon_obj, icon, "efl,state,icon_set");

else
  {
  • _tab_icon_obj_set(obj, ti, NULL, NULL, "elm,state,icon_set");

+ _tab_icon_obj_set(obj, ti, NULL, NULL, "efl,state,icon_set");

   efl_del(icon_obj);
}

}
@@ -378,7 +378,7 @@ _efl_ui_tab_bar_efl_object_constructor(Eo *obj, Efl_Ui_Tab_Bar_Data *sd)

efl_ui_widget_focus_allow_set(obj, EINA_TRUE);
  • efl_content_set(efl_part(obj, "content"), sd->bx);

+ efl_content_set(efl_part(obj, "efl.content"), sd->bx);

sd->cnt = 0;
sd->cur = -1;

diff --git a/src/lib/elementary/efl_ui_tab_pager.c b/src/lib/elementary/efl_ui_tab_pager.c
index cf42c7d..5fbae19 100644

  • a/src/lib/elementary/efl_ui_tab_pager.c

+++ b/src/lib/elementary/efl_ui_tab_pager.c
@@ -62,12 +62,12 @@ _efl_ui_tab_pager_tab_bar_set(Eo *obj, Efl_Ui_Tab_Pager_Data *sd, Efl_Canvas_Obj

if (sd->tab_bar != NULL)
  {
     efl_event_callback_del(sd->tab_bar, EFL_UI_EVENT_SELECTED, _tab_select_cb, obj);
  • efl_content_unset(efl_part(obj, "tab_root"));

+ efl_content_unset(efl_part(obj, "efl.tab_root"));

     efl_del(sd->tab_bar);
  }
 
sd->tab_bar = tab_bar;
  • efl_content_set(efl_part(obj, "tab_root"), sd->tab_bar);

+ efl_content_set(efl_part(obj, "efl.tab_root"), sd->tab_bar);

efl_event_callback_add(sd->tab_bar, EFL_UI_EVENT_SELECTED, _tab_select_cb, obj);

}

test_efl_ui_tab_pager is changed to test_ui_tab_pager to synchronize with other cases.

Jaehyun_Cho accepted this revision.May 2 2018, 5:09 AM
This revision is now accepted and ready to land.May 2 2018, 5:09 AM
This revision was automatically updated to reflect the committed changes.

Be careful with namespace and symbol clashes. This currently breaks the bindings, and in the future Eolian will reject such symbols.

For example: Tab_Page and Tab_Page.Part_Tab. The current solution for "inner symbols" is to separate them with underscores: Tab_Page_Part_Tab.