summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-05-30 15:07:42 +0900
committerSangHyeon Jade Lee <sh10233.lee@samsung.com>2019-05-30 15:40:31 +0900
commit57233f552c49eb8958a76ef575d794bc3b78f177 (patch)
tree5961bbe905c49fb6a247d48eb936965e2477242c
parent01cb1c32bd8be0854348740f93dcaa1c45a7dff7 (diff)
downloadefl-57233f552c49eb8958a76ef575d794bc3b78f177.tar.gz
efl_ui: rename list empty item to list placeholder item.
Summary: legacy full style item is introduced Efl.Ui.ListEmptyItem Class in new Efl Interface, but using "Empty" name is too ambiguous to present style usage. Thanks to @cedric and @segfaultxavi, I found better name for this class, Efl.Ui.ListPlaceHolderItem, as item hold the place which need to be replaced and relayouted by user generated content. Depends on D8582 Reviewers: cedric, segfaultxavi, eagleeye Reviewed By: eagleeye Subscribers: cedric, #reviewers, segfaultxavi, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9034
-rw-r--r--data/elementary/themes/edc/efl/list.edc2
-rw-r--r--src/Makefile_Elementary.am4
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c12
-rw-r--r--src/lib/elementary/Elementary.h2
-rw-r--r--src/lib/elementary/efl_ui_list_empty_item.c57
-rw-r--r--src/lib/elementary/efl_ui_list_placeholder_item.c57
-rw-r--r--src/lib/elementary/efl_ui_list_placeholder_item.eo (renamed from src/lib/elementary/efl_ui_list_empty_item.eo)6
-rw-r--r--src/lib/elementary/meson.build4
-rw-r--r--src/tests/elementary/spec/efl_test_content.c2
9 files changed, 73 insertions, 73 deletions
diff --git a/data/elementary/themes/edc/efl/list.edc b/data/elementary/themes/edc/efl/list.edc
index e10c64b49a..b0a08c1e50 100644
--- a/data/elementary/themes/edc/efl/list.edc
+++ b/data/elementary/themes/edc/efl/list.edc
@@ -293,7 +293,7 @@ group { "efl/list_item";
}
}
-group { "efl/list_item:empty";
+group { "efl/list_item:placeholder";
data.item: "selectraise" "on";
data.item: "focusraise" "on";
images.image: "bevel_curved_horiz_out.png" COMP;
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index e3fb705e8e..972edc7274 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -87,7 +87,7 @@ elm_public_eolian_files = \
lib/elementary/efl_ui_item.eo \
lib/elementary/efl_ui_list_item.eo \
lib/elementary/efl_ui_list_default_item.eo \
- lib/elementary/efl_ui_list_empty_item.eo \
+ lib/elementary/efl_ui_list_placeholder_item.eo \
lib/elementary/efl_ui_list.eo \
lib/elementary/efl_ui_grid_item.eo \
lib/elementary/efl_ui_grid_default_item.eo \
@@ -1176,7 +1176,7 @@ lib_elementary_libelementary_la_SOURCES = \
lib/elementary/efl_ui_item.c \
lib/elementary/efl_ui_list_item.c \
lib/elementary/efl_ui_list_default_item.c \
- lib/elementary/efl_ui_list_empty_item.c \
+ lib/elementary/efl_ui_list_placeholder_item.c \
lib/elementary/efl_ui_list.c \
lib/elementary/efl_ui_grid_item.c \
lib/elementary/efl_ui_grid_default_item.c \
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index f3c29e96e6..f204e7bf09 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -106,7 +106,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
Eo *slider, *scrl_btn;
int i;
char buf[256];
- Eina_Bool emptystyle = EINA_FALSE;
+ Eina_Bool placeholder = EINA_FALSE;
win = elm_win_util_standard_add("list", "list");
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
@@ -119,8 +119,8 @@ elm_main(int argc EINA_UNUSED, char **argv)
efl_gfx_hint_fill_set(wbox, EINA_TRUE, EINA_TRUE);
if ((argv[1] != NULL) &&
- (!strcmp(argv[1], "empty")))
- emptystyle = EINA_TRUE;
+ (!strcmp(argv[1], "placeholder")))
+ placeholder = EINA_TRUE;
priv_d.list = list = efl_add(EFL_UI_LIST_CLASS, wbox);
efl_gfx_hint_weight_set(list, EFL_GFX_HINT_EXPAND, 0.9);
@@ -133,13 +133,13 @@ elm_main(int argc EINA_UNUSED, char **argv)
for (i = 0; i < NUM_ITEMS; i++)
{
- if (emptystyle) item = efl_add(EFL_UI_LIST_EMPTY_ITEM_CLASS, list);
+ if (placeholder) item = efl_add(EFL_UI_LIST_PLACEHOLDER_ITEM_CLASS, list);
else item = efl_add(EFL_UI_LIST_DEFAULT_ITEM_CLASS, list);
/* disable case test */
if (i == 1) efl_ui_widget_disabled_set(item, EINA_TRUE);
- if (emptystyle)
+ if (placeholder)
{
ibox = efl_add(EFL_UI_BOX_CLASS, item);
efl_ui_layout_orientation_set(ibox, EFL_UI_LAYOUT_ORIENTATION_HORIZONTAL);
@@ -148,7 +148,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
efl_gfx_hint_weight_set(txt, 0.95, EFL_GFX_HINT_EXPAND);
efl_text_halign_set(txt, 0.2);
efl_text_interactive_selection_allowed_set(txt, EINA_FALSE);
- snprintf(buf, sizeof(buf), "empty style item [%d]", i);
+ snprintf(buf, sizeof(buf), "placeholder style item [%d]", i);
efl_text_set(txt, buf);
efl_pack_end(ibox, txt);
diff --git a/src/lib/elementary/Elementary.h b/src/lib/elementary/Elementary.h
index 07075d247f..d062183d79 100644
--- a/src/lib/elementary/Elementary.h
+++ b/src/lib/elementary/Elementary.h
@@ -341,7 +341,7 @@ typedef Eo Efl_Ui_Focus_Manager;
# include <efl_ui_item.eo.h>
# include <efl_ui_list_item.eo.h>
# include <efl_ui_list_default_item.eo.h>
-# include <efl_ui_list_empty_item.eo.h>
+# include <efl_ui_list_placeholder_item.eo.h>
# include <efl_ui_list.eo.h>
# include <efl_ui_grid_item.eo.h>
# include <efl_ui_grid_default_item.eo.h>
diff --git a/src/lib/elementary/efl_ui_list_empty_item.c b/src/lib/elementary/efl_ui_list_empty_item.c
deleted file mode 100644
index 8df9b78685..0000000000
--- a/src/lib/elementary/efl_ui_list_empty_item.c
+++ /dev/null
@@ -1,57 +0,0 @@
-#ifdef HAVE_CONFIG_H
-# include "elementary_config.h"
-#endif
-
-#define EFL_UI_LIST_EMPTY_ITEM_PROTECTED
-#define EFL_PART_PROTECTED
-
-#include <Elementary.h>
-
-#include "elm_priv.h"
-#include "elm_part_helper.h"
-
-#define MY_CLASS EFL_UI_LIST_EMPTY_ITEM_CLASS
-#define MY_CLASS_PFX efl_ui_list_empty_item
-
-#define MY_CLASS_NAME "Efl.Ui.List_Empty_Item"
-
-EOLIAN static Efl_Object *
-_efl_ui_list_empty_item_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
-{
- Eo *eo;
- eo = efl_finalize(efl_super(obj, MY_CLASS));
- ELM_WIDGET_DATA_GET_OR_RETURN(eo, wd, eo);
- Eina_Error theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, "empty");
-
- if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
- CRI("Empty Item(%p) failed to set theme [efl/list_item:empty]!", eo);
- return eo;
-}
-
-EOLIAN static void
-_efl_ui_list_empty_item_efl_object_destructor(Eo *obj, void *pd EINA_UNUSED)
-{
- efl_destructor(efl_super(obj, MY_CLASS));
-}
-
-/* Efl.Part */
-ELM_PART_CONTENT_DEFAULT_GET(efl_ui_list_empty_item, "efl.content")
-ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_list_empty_item, void)
-/* Efl.Part end */
-
-EOLIAN static Efl_Object *
-_efl_ui_list_empty_item_efl_part_part_get(const Eo *obj, void *wd EINA_UNUSED, const char *part)
-{
- EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
- if (eina_streq(part, "content"))
- return ELM_PART_IMPLEMENT(EFL_UI_ITEM_PART_CONTENT_CLASS, obj, "efl.content");
-
- return efl_part_get(efl_super(obj, MY_CLASS), part);
-}
-
-/* Internal EO APIs and hidden overrides */
-
-#define EFL_UI_LIST_EMPTY_ITEM_EXTRA_OPS \
- ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_list_empty_item)
-
-#include "efl_ui_list_empty_item.eo.c"
diff --git a/src/lib/elementary/efl_ui_list_placeholder_item.c b/src/lib/elementary/efl_ui_list_placeholder_item.c
new file mode 100644
index 0000000000..1e4d291fe5
--- /dev/null
+++ b/src/lib/elementary/efl_ui_list_placeholder_item.c
@@ -0,0 +1,57 @@
+#ifdef HAVE_CONFIG_H
+# include "elementary_config.h"
+#endif
+
+#define EFL_UI_LIST_PLACEHOLDER_ITEM_PROTECTED
+#define EFL_PART_PROTECTED
+
+#include <Elementary.h>
+
+#include "elm_priv.h"
+#include "elm_part_helper.h"
+
+#define MY_CLASS EFL_UI_LIST_PLACEHOLDER_ITEM_CLASS
+#define MY_CLASS_PFX efl_ui_list_placeholder_item
+
+#define MY_CLASS_NAME "Efl.Ui.List_Placeholder_Item"
+
+EOLIAN static Efl_Object *
+_efl_ui_list_placeholder_item_efl_object_finalize(Eo *obj, void *pd EINA_UNUSED)
+{
+ Eo *eo;
+ eo = efl_finalize(efl_super(obj, MY_CLASS));
+ ELM_WIDGET_DATA_GET_OR_RETURN(eo, wd, eo);
+ Eina_Error theme_apply_ret = efl_ui_layout_theme_set(obj, "list_item", NULL, "placeholder");
+
+ if (theme_apply_ret == EFL_UI_THEME_APPLY_ERROR_GENERIC)
+ CRI("Empty Item(%p) failed to set theme [efl/list_item:placeholder]!", eo);
+ return eo;
+}
+
+EOLIAN static void
+_efl_ui_list_placeholder_item_efl_object_destructor(Eo *obj, void *pd EINA_UNUSED)
+{
+ efl_destructor(efl_super(obj, MY_CLASS));
+}
+
+/* Efl.Part */
+ELM_PART_CONTENT_DEFAULT_GET(efl_ui_list_placeholder_item, "efl.content")
+ELM_PART_CONTENT_DEFAULT_IMPLEMENT(efl_ui_list_placeholder_item, void)
+/* Efl.Part end */
+
+EOLIAN static Efl_Object *
+_efl_ui_list_placeholder_item_efl_part_part_get(const Eo *obj, void *wd EINA_UNUSED, const char *part)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
+ if (eina_streq(part, "content"))
+ return ELM_PART_IMPLEMENT(EFL_UI_ITEM_PART_CONTENT_CLASS, obj, "efl.content");
+
+ return efl_part_get(efl_super(obj, MY_CLASS), part);
+}
+
+/* Internal EO APIs and hidden overrides */
+
+#define EFL_UI_LIST_PLACEHOLDER_ITEM_EXTRA_OPS \
+ ELM_PART_CONTENT_DEFAULT_OPS(efl_ui_list_placeholder_item)
+
+#include "efl_ui_list_placeholder_item.eo.c"
diff --git a/src/lib/elementary/efl_ui_list_empty_item.eo b/src/lib/elementary/efl_ui_list_placeholder_item.eo
index a656c75537..e9dbcab477 100644
--- a/src/lib/elementary/efl_ui_list_empty_item.eo
+++ b/src/lib/elementary/efl_ui_list_placeholder_item.eo
@@ -1,12 +1,12 @@
-class @beta Efl.Ui.List_Empty_Item extends Efl.Ui.List_Item implements Efl.Content
+class @beta Efl.Ui.List_Placeholder_Item extends Efl.Ui.List_Item implements Efl.Content
{
- [[List Empty Item class. This item have only one swallow space,
+ [[List Placeholder Item class. This item have only one swallow space,
thus user can decorate item by filling the swallow with
any kind of container.]]
data: null;
parts {
- content: Efl.Ui.Item_Part_Content; [[the content part for list empty item.
+ content: Efl.Ui.Item_Part_Content; [[the content part for list placeholder item.
the content part is empty slot for user customizing.
fill the place with container widget such as layout, box, table.]]
}
diff --git a/src/lib/elementary/meson.build b/src/lib/elementary/meson.build
index 6aaa474eec..3d5372b5dc 100644
--- a/src/lib/elementary/meson.build
+++ b/src/lib/elementary/meson.build
@@ -122,7 +122,7 @@ pub_eo_files = [
'efl_ui_item.eo',
'efl_ui_list_item.eo',
'efl_ui_list_default_item.eo',
- 'efl_ui_list_empty_item.eo',
+ 'efl_ui_list_placeholder_item.eo',
'efl_ui_list.eo',
'efl_ui_grid_item.eo',
'efl_ui_grid_default_item.eo',
@@ -898,7 +898,7 @@ elementary_src = [
'efl_ui_item.c',
'efl_ui_list_item.c',
'efl_ui_list_default_item.c',
- 'efl_ui_list_empty_item.c',
+ 'efl_ui_list_placeholder_item.c',
'efl_ui_list.c',
'efl_ui_grid_item.c',
'efl_ui_grid_default_item.c',
diff --git a/src/tests/elementary/spec/efl_test_content.c b/src/tests/elementary/spec/efl_test_content.c
index 58736843ee..4800a1ba53 100644
--- a/src/tests/elementary/spec/efl_test_content.c
+++ b/src/tests/elementary/spec/efl_test_content.c
@@ -9,7 +9,7 @@
/* spec-meta-start
{"test-interface":"Efl.Content",
"test-widgets": ["Efl.Ui.Button", "Efl.Ui.Frame", "Efl.Ui.Grid_Default_Item",
- "Efl.Ui.List_Default_Item", "Efl.Ui.List_Empty_Item",
+ "Efl.Ui.List_Default_Item", "Efl.Ui.List_Placeholder_Item",
"Efl.Ui.Navigation_Layout", "Efl.Ui.Panel", "Efl.Ui.Progressbar",
"Efl.Ui.Radio", "Efl.Ui.Popup", "Efl.Ui.Tab_Page", "Efl.Ui.Scroller"]}