efl_ui : change efl_ui_view_list to efl_ui_list_view.
Summary:
View is not a namespace, but an interface,
So, View_List cannot be under the view namespace for now.
it looks more suite to be end as View than List on this widget name.
Firstly, it follows our common naming rules of class.
Also, List_View is commonly presentable name on most UI frameworks,
so it is very easy to understand what this widget can do for the user.
Test Plan:
Make works.
Example is not works for now til stable model interface.
Reviewers: felipealmeida, woohyun, cedric, Hermet
Reviewed By: Hermet
Subscribers: larryolj, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7234
2018-11-04 21:27:05 -08:00
|
|
|
// gcc -o efl_ui_list_view_example_2 efl_ui_list_view_example_2.c `pkg-config --cflags --libs elementary`
|
2017-12-12 16:59:48 -08:00
|
|
|
|
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "config.h"
|
|
|
|
#else
|
|
|
|
# define EFL_BETA_API_SUPPORT 1
|
|
|
|
#endif
|
|
|
|
|
2019-03-07 07:39:06 -08:00
|
|
|
#include <Efl_Ui.h>
|
2017-12-12 16:59:48 -08:00
|
|
|
#include <Elementary.h>
|
|
|
|
#include <Efl.h>
|
|
|
|
#include <Eio.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
|
|
|
|
|
|
|
|
EAPI_MAIN int
|
2018-11-29 09:11:51 -08:00
|
|
|
elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
|
2017-12-12 16:59:48 -08:00
|
|
|
{
|
|
|
|
Efl_Ui_Layout_Factory *factory;
|
2018-08-01 14:42:13 -07:00
|
|
|
Efl_Ui_Image_Factory *imgf;
|
2017-12-12 16:59:48 -08:00
|
|
|
Evas_Object *win;
|
2018-08-01 14:42:13 -07:00
|
|
|
Eo *model, *li;
|
2017-12-12 16:59:48 -08:00
|
|
|
char *dirname;
|
|
|
|
|
efl_ui : change efl_ui_view_list to efl_ui_list_view.
Summary:
View is not a namespace, but an interface,
So, View_List cannot be under the view namespace for now.
it looks more suite to be end as View than List on this widget name.
Firstly, it follows our common naming rules of class.
Also, List_View is commonly presentable name on most UI frameworks,
so it is very easy to understand what this widget can do for the user.
Test Plan:
Make works.
Example is not works for now til stable model interface.
Reviewers: felipealmeida, woohyun, cedric, Hermet
Reviewed By: Hermet
Subscribers: larryolj, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7234
2018-11-04 21:27:05 -08:00
|
|
|
win = elm_win_util_standard_add("list_view2", "List_View2");
|
2017-12-12 16:59:48 -08:00
|
|
|
elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
|
|
|
|
|
|
|
|
elm_win_autodel_set(win, EINA_TRUE);
|
|
|
|
|
|
|
|
if (argv[1] != NULL) dirname = argv[1];
|
|
|
|
else dirname = EFL_MODEL_TEST_FILENAME_PATH;
|
|
|
|
|
efl_model : rename all efl_model based classes.
Summary:
As the result of discussion in T7458,
we need to rename all efl_model based classes with efl_XXX_Model sequence.
I've run few vote for this, see V42, V43
few classes are totally renamed as our consideration of misnaming.
| Efl.Model_Loop | Efl.Loop_Model |
| Efl.Model_Item | Efl.Generic_Model |
| Efl.Model_Container | Efl.Container_Model |
| Efl.Model_Container_Item | Efl.Container_Model_Item |
| Efl.Model_Composite | Efl.Composite_Model |
| Efl.Model_Composite_Boolean | Efl.Boolean_Model |
| Efl.Model_Composite_Boolean_Chlidren | Efl.Boolean_Model_Item |
| Efl.Model_Composite_Selection | Efl.Select_Model |
| Efl.Model_Composite_Selection_Chlidren | Efl.Select_Model_Item |
| Efl.Model_View | Efl.View_Model |
| Eio.Model | Efl.Io.Model |
| Efl.Ui.Model_State | Efl.Ui.State_Model |
| Efl.Ui.Model_Size | Efl.Ui.Size_Model |
| Efl.Ui.Model_Exact | Efl.Ui.Exact_Model |
| Efl.Ui.Model_Average | Efl.Ui.Average_Model |
| Efl.Ui.Model_Homogeneous | Efl.Ui.Homogeneous_Model |
I worried about Efl.Io.Model changes, cause it is widely used,
but as I tested, there is no issue found yet.
Eldbus.Model also may can changed Efl.Dbus.Model,
but I cannot found any class who using Efl.Dbus namespace,
so I left it future work.
Test Plan:
Run the Make Test,
it works well except Efl test about selection.
there are class inheritance problem exist in select_model,
I reported it and will fix it in another patch.
Reviewers: cedric, felipealmeida, woohyun, Hermet
Reviewed By: cedric
Subscribers: lauromoura
Tags: #efl, #do_not_merge
Differential Revision: https://phab.enlightenment.org/D7533
2019-01-30 20:35:34 -08:00
|
|
|
model = efl_add(EFL_IO_MODEL_CLASS, win, efl_io_model_path_set(efl_added, dirname));
|
2017-12-12 16:59:48 -08:00
|
|
|
factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
|
2019-04-23 00:34:32 -07:00
|
|
|
efl_ui_widget_factory_item_class_set(factory, EFL_UI_LIST_DEFAULT_ITEM_CLASS);
|
2019-01-31 03:59:19 -08:00
|
|
|
efl_ui_property_bind(factory, "efl.text", "filename");
|
2017-12-12 16:59:48 -08:00
|
|
|
|
efl_ui : change efl_ui_view_list to efl_ui_list_view.
Summary:
View is not a namespace, but an interface,
So, View_List cannot be under the view namespace for now.
it looks more suite to be end as View than List on this widget name.
Firstly, it follows our common naming rules of class.
Also, List_View is commonly presentable name on most UI frameworks,
so it is very easy to understand what this widget can do for the user.
Test Plan:
Make works.
Example is not works for now til stable model interface.
Reviewers: felipealmeida, woohyun, cedric, Hermet
Reviewed By: Hermet
Subscribers: larryolj, cedric, #reviewers, #committers
Tags: #efl
Differential Revision: https://phab.enlightenment.org/D7234
2018-11-04 21:27:05 -08:00
|
|
|
li = efl_add(EFL_UI_LIST_VIEW_CLASS, win);
|
|
|
|
efl_ui_list_view_layout_factory_set(li, factory);
|
2017-12-12 16:59:48 -08:00
|
|
|
efl_ui_view_model_set(li, model);
|
|
|
|
|
|
|
|
evas_object_size_hint_weight_set(li, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
|
|
|
|
evas_object_size_hint_align_set(li, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
|
|
|
|
|
|
|
|
2018-08-01 14:42:13 -07:00
|
|
|
imgf = efl_add(EFL_UI_IMAGE_FACTORY_CLASS, win);
|
2019-01-31 03:59:19 -08:00
|
|
|
efl_ui_property_bind(imgf, "", "path"); //connect to "path" property
|
|
|
|
efl_ui_factory_bind(factory, "efl.icon", imgf);
|
2017-12-12 16:59:48 -08:00
|
|
|
|
|
|
|
elm_win_resize_object_add(win, li);
|
|
|
|
|
|
|
|
//showall
|
|
|
|
evas_object_show(li);
|
|
|
|
evas_object_resize(win, 320, 320);
|
|
|
|
evas_object_show(win);
|
|
|
|
|
|
|
|
elm_run();
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
ELM_MAIN()
|