aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples
diff options
context:
space:
mode:
authorLarry Lira <larry@expertisesolutions.com.br>2018-11-29 15:11:51 -0200
committerVitor Sousa <vitorsousa@expertisesolutions.com.br>2018-11-30 16:56:47 -0200
commit6b0c85cb0da92e1e00d867e115ffe2827e2e3853 (patch)
tree537467990ce39d4917d285f5f7dc40e90c590dff /src/examples
parentelementary: rework Efl.Ui.Layout boolean signal-connection to Models (diff)
downloadefl-6b0c85cb0da92e1e00d867e115ffe2827e2e3853.tar.gz
Efl.Ui.List.View: fixed MVVM life-cycle
Fix bugs on Views and Model related with null items and proper ownership and life-cycle of components. Configure default theme for default factory on finalize.
Diffstat (limited to 'src/examples')
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_1.c5
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_2.c2
-rw-r--r--src/examples/elementary/efl_ui_list_view_example_3.c16
3 files changed, 11 insertions, 12 deletions
diff --git a/src/examples/elementary/efl_ui_list_view_example_1.c b/src/examples/elementary/efl_ui_list_view_example_1.c
index f0a6adcfb8..dc300264aa 100644
--- a/src/examples/elementary/efl_ui_list_view_example_1.c
+++ b/src/examples/elementary/efl_ui_list_view_example_1.c
@@ -22,7 +22,7 @@ const char *styles[] = {
char edj_path[PATH_MAX];
static void
-_realized_cb(void *data, const Efl_Event *event)
+_realized_cb(void *data EINA_UNUSED, const Efl_Event *event)
{
Efl_Ui_List_View_Item_Event *ie = event->info;
if (!ie->layout) return;
@@ -69,7 +69,7 @@ _make_model(Evas_Object *win)
}
EAPI_MAIN int
-elm_main(int argc, char **argv)
+elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Efl_Ui_Factory *factory;
Evas_Object *win, *li;
@@ -110,7 +110,6 @@ elm_main(int argc, char **argv)
evas_object_show(win);
elm_run();
- efl_unref(model);
return 0;
}
diff --git a/src/examples/elementary/efl_ui_list_view_example_2.c b/src/examples/elementary/efl_ui_list_view_example_2.c
index c624cade19..ca56f37d33 100644
--- a/src/examples/elementary/efl_ui_list_view_example_2.c
+++ b/src/examples/elementary/efl_ui_list_view_example_2.c
@@ -15,7 +15,7 @@
#define EFL_MODEL_TEST_FILENAME_PATH "/tmp"
EAPI_MAIN int
-elm_main(int argc, char **argv)
+elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Efl_Ui_Layout_Factory *factory;
Efl_Ui_Image_Factory *imgf;
diff --git a/src/examples/elementary/efl_ui_list_view_example_3.c b/src/examples/elementary/efl_ui_list_view_example_3.c
index 46d5ca5813..eaf5dc975a 100644
--- a/src/examples/elementary/efl_ui_list_view_example_3.c
+++ b/src/examples/elementary/efl_ui_list_view_example_3.c
@@ -66,7 +66,7 @@ _focused(void *data, const Efl_Event *event)
}
static void
-_bt_add_clicked(void *data, Evas_Object *obj, void *event_info)
+_bt_add_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Priv_Data *priv = (Priv_Data*)data;
Eina_Value vtext, value;
@@ -90,7 +90,7 @@ _bt_add_clicked(void *data, Evas_Object *obj, void *event_info)
}
static void
-_bt_del_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_del_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Priv_Data *priv = (Priv_Data*)data;
Eo *child = NULL;
@@ -110,35 +110,35 @@ _bt_del_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
}
static void
-_bt_none_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_none_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *li = data;
efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_NONE);
}
static void
-_bt_donly_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_donly_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *li = data;
efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DISPLAY_ONLY);
}
static void
-_bt_default_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_default_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *li = data;
efl_ui_list_view_select_mode_set(li, ELM_OBJECT_SELECT_MODE_DEFAULT);
}
static void
-_bt_set_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_set_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Priv_Data *priv = data;
efl_ui_view_model_set(priv->list2, priv->model);
}
static void
-_bt_unset_clicked(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
+_bt_unset_clicked(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
{
Evas_Object *li = data;
efl_ui_view_model_set(li, NULL);
@@ -201,7 +201,7 @@ _make_model()
}
EAPI_MAIN int
-elm_main(int argc, char **argv)
+elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
{
Priv_Data *priv;
Evas_Object *win, *bx, *vbx, *bt;