summaryrefslogtreecommitdiff
path: root/src/examples/elementary
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2018-03-15 12:50:20 -0400
committerCedric Bail <cedric@osg.samsung.com>2018-03-20 17:20:56 -0700
commit4c4177ac207f982de8139c47c7afedd26ff9e15a (patch)
tree1913e890dc525621f4dec3ce281b340d81608a72 /src/examples/elementary
parenta1bf513920e813037756e01cc2e01770befea77c (diff)
efl: use efl_add_ref to create objects which have no parent
Signed-off-by: Mike Blumenkrantz <zmike@osg.samsung.com>
Diffstat (limited to 'src/examples/elementary')
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c2
-rw-r--r--src/examples/elementary/efl_ui_list_example_2.c2
-rw-r--r--src/examples/elementary/efl_ui_list_example_3.c2
-rw-r--r--src/examples/elementary/efl_ui_scroller_example.c2
-rw-r--r--src/examples/elementary/filemvc.c10
-rw-r--r--src/examples/elementary/fileviewlist.c4
-rw-r--r--src/examples/elementary/layout_model_connect.c4
7 files changed, 13 insertions, 13 deletions
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index 145861e286..eeb2f2329e 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -49,7 +49,7 @@ _make_model()
49 unsigned int i, s; 49 unsigned int i, s;
50 char buf[256]; 50 char buf[256];
51 51
52 model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 52 model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 53 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
54 54
55 for (i = 0; i < (NUM_ITEMS); i++) 55 for (i = 0; i < (NUM_ITEMS); i++)
diff --git a/src/examples/elementary/efl_ui_list_example_2.c b/src/examples/elementary/efl_ui_list_example_2.c
index 187cee0d54..9826487c78 100644
--- a/src/examples/elementary/efl_ui_list_example_2.c
+++ b/src/examples/elementary/efl_ui_list_example_2.c
@@ -43,7 +43,7 @@ elm_main(int argc, char **argv)
43 if (argv[1] != NULL) dirname = argv[1]; 43 if (argv[1] != NULL) dirname = argv[1];
44 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 44 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
45 45
46 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 46 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
47 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win); 47 factory = efl_add(EFL_UI_LAYOUT_FACTORY_CLASS, win);
48 efl_ui_model_connect(factory, "elm.text", "filename"); 48 efl_ui_model_connect(factory, "elm.text", "filename");
49 efl_ui_layout_factory_theme_config(factory, "list", "item", "default"); 49 efl_ui_layout_factory_theme_config(factory, "list", "item", "default");
diff --git a/src/examples/elementary/efl_ui_list_example_3.c b/src/examples/elementary/efl_ui_list_example_3.c
index 32d5b1951d..0e211e03fe 100644
--- a/src/examples/elementary/efl_ui_list_example_3.c
+++ b/src/examples/elementary/efl_ui_list_example_3.c
@@ -173,7 +173,7 @@ _make_model()
173 Efl_Model_Item *model, *child; 173 Efl_Model_Item *model, *child;
174 unsigned int i, len; 174 unsigned int i, len;
175 175
176 model = efl_add(EFL_MODEL_ITEM_CLASS, NULL); 176 model = efl_add_ref(EFL_MODEL_ITEM_CLASS, NULL);
177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING); 177 eina_value_setup(&vtext, EINA_VALUE_TYPE_STRING);
178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR); 178 eina_value_setup(&value, EINA_VALUE_TYPE_UCHAR);
179 179
diff --git a/src/examples/elementary/efl_ui_scroller_example.c b/src/examples/elementary/efl_ui_scroller_example.c
index b09756c272..64886337b2 100644
--- a/src/examples/elementary/efl_ui_scroller_example.c
+++ b/src/examples/elementary/efl_ui_scroller_example.c
@@ -15,7 +15,7 @@ efl_main(void *data EINA_UNUSED, const Efl_Event *ev)
15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED); 15 elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);
16 elm_app_info_set(efl_main, "elementary", "images/plant_01.jpg"); 16 elm_app_info_set(efl_main, "elementary", "images/plant_01.jpg");
17 17
18 win = efl_add(EFL_UI_WIN_CLASS, NULL, "TEST", ELM_WIN_BASIC, 18 win = efl_add_ref(EFL_UI_WIN_CLASS, NULL, "TEST", ELM_WIN_BASIC,
19 efl_ui_win_autodel_set(efl_added, EINA_TRUE)); 19 efl_ui_win_autodel_set(efl_added, EINA_TRUE));
20 efl_gfx_size_set(win, EINA_SIZE2D(300, 400)); 20 efl_gfx_size_set(win, EINA_SIZE2D(300, 400));
21 21
diff --git a/src/examples/elementary/filemvc.c b/src/examples/elementary/filemvc.c
index f09657bafc..657148c0e0 100644
--- a/src/examples/elementary/filemvc.c
+++ b/src/examples/elementary/filemvc.c
@@ -67,7 +67,7 @@ _promise_then(void *data, const Efl_Event *event)
67 Eina_Value* value = info->value; 67 Eina_Value* value = info->value;
68 68
69 eina_value_get(value, &path); 69 eina_value_get(value, &path);
70 model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path)); 70 model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, path));
71 elm_view_list_model_set(priv->fileview, model); 71 elm_view_list_model_set(priv->fileview, model);
72} 72}
73 73
@@ -150,12 +150,12 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
150 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 150 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
151 151
152 //treemodel 152 //treemodel
153 priv.treemodel = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 153 priv.treemodel = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL); 154 eio_model_children_filter_set(priv.treemodel, _filter_cb, NULL);
155 155
156 //treeview 156 //treeview
157 genlist = elm_genlist_add(win); 157 genlist = elm_genlist_add(win);
158 priv.treeview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL)); 158 priv.treeview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, NULL));
159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text"); 159 elm_view_list_property_connect(priv.treeview, "filename", "elm.text");
160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon"); 160 elm_view_list_property_connect(priv.treeview, "icon", "elm.swallow.icon");
161 elm_view_list_model_set(priv.treeview, priv.treemodel); 161 elm_view_list_model_set(priv.treeview, priv.treemodel);
@@ -170,7 +170,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
170 170
171 //listview 171 //listview
172 genlist = elm_genlist_add(win); 172 genlist = elm_genlist_add(win);
173 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label")); 173 priv.fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, "double_label"));
174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text"); 174 elm_view_list_property_connect(priv.fileview, "filename", "elm.text");
175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub"); 175 elm_view_list_property_connect(priv.fileview, "mime_type", "elm.text.sub");
176 176
@@ -184,7 +184,7 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
184 bxr = elm_box_add(win); 184 bxr = elm_box_add(win);
185 _widget_init(bxr); 185 _widget_init(bxr);
186 elm_object_part_content_set(vpanes, "right", bxr); 186 elm_object_part_content_set(vpanes, "right", bxr);
187 priv.formview = efl_add(ELM_VIEW_FORM_CLASS, NULL); 187 priv.formview = efl_add_ref(ELM_VIEW_FORM_CLASS, NULL);
188 188
189 /*Label widget */ 189 /*Label widget */
190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name")); 190 elm_view_form_widget_add(priv.formview, "filename", _label_init(win, bxr, "File Name"));
diff --git a/src/examples/elementary/fileviewlist.c b/src/examples/elementary/fileviewlist.c
index af14785118..39df4f87c0 100644
--- a/src/examples/elementary/fileviewlist.c
+++ b/src/examples/elementary/fileviewlist.c
@@ -54,8 +54,8 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 54 evas_object_size_hint_weight_set(genlist, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
55 evas_object_show(genlist); 55 evas_object_show(genlist);
56 56
57 priv.filemodel = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 57 priv.filemodel = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
58 priv.fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label")); 58 priv.fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_TREE, "double_label"));
59 elm_view_list_model_set(priv.fileview, priv.filemodel); 59 elm_view_list_model_set(priv.fileview, priv.filemodel);
60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv); 60 evas_object_event_callback_add(win, EVAS_CALLBACK_DEL, _cleanup_cb, &priv);
61 61
diff --git a/src/examples/elementary/layout_model_connect.c b/src/examples/elementary/layout_model_connect.c
index 5c6660eb1d..e93b34437d 100644
--- a/src/examples/elementary/layout_model_connect.c
+++ b/src/examples/elementary/layout_model_connect.c
@@ -111,10 +111,10 @@ elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
111 if (argv[1] != NULL) dirname = argv[1]; 111 if (argv[1] != NULL) dirname = argv[1];
112 else dirname = EFL_MODEL_TEST_FILENAME_PATH; 112 else dirname = EFL_MODEL_TEST_FILENAME_PATH;
113 113
114 priv->model = efl_add(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname)); 114 priv->model = efl_add_ref(EIO_MODEL_CLASS, NULL, eio_model_path_set(efl_added, dirname));
115 115
116 genlist = elm_genlist_add(win); 116 genlist = elm_genlist_add(win);
117 priv->fileview = efl_add(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL)); 117 priv->fileview = efl_add_ref(ELM_VIEW_LIST_CLASS, NULL, elm_view_list_genlist_set(efl_added, genlist, ELM_GENLIST_ITEM_NONE, NULL));
118 elm_view_list_property_connect(priv->fileview, "filename", "elm.text"); 118 elm_view_list_property_connect(priv->fileview, "filename", "elm.text");
119 elm_view_list_model_set(priv->fileview, priv->model); 119 elm_view_list_model_set(priv->fileview, priv->model);
120 _widget_init(genlist); 120 _widget_init(genlist);