summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-10-24 14:43:43 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-10-24 14:49:12 +0900
commit006546a042a4f945a4936e2f29a55bb1c67648ea (patch)
tree6eb255f69a8c5c88fc8c7048841f0697b69b2094
parent1b481f0ae85b503b2e6afa64b907bba4bf41e006 (diff)
elm: Use auto_unref for parts
This avoids leaks.
-rw-r--r--src/lib/elementary/efl_ui_layout.c18
-rw-r--r--src/lib/elementary/efl_ui_layout_pack.c64
-rw-r--r--src/lib/elementary/efl_ui_progressbar.c5
-rw-r--r--src/lib/elementary/efl_ui_win.c5
-rw-r--r--src/lib/elementary/elementary_config.h2
-rw-r--r--src/lib/elementary/elm_part_helper.h40
-rw-r--r--src/lib/elementary/elm_widget.c17
7 files changed, 63 insertions, 88 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index 55035d5eb4..6ae329897c 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -2401,14 +2401,14 @@ _efl_ui_layout_efl_part_part(const Eo *obj, Efl_Ui_Layout_Data *sd, const char *
2401 return _efl_ui_layout_pack_proxy_get((Eo *) obj, type, part); 2401 return _efl_ui_layout_pack_proxy_get((Eo *) obj, type, part);
2402 case EFL_CANVAS_LAYOUT_PART_TYPE_TEXT: 2402 case EFL_CANVAS_LAYOUT_PART_TYPE_TEXT:
2403 case EFL_CANVAS_LAYOUT_PART_TYPE_TEXTBLOCK: 2403 case EFL_CANVAS_LAYOUT_PART_TYPE_TEXTBLOCK:
2404 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_TEXT_CLASS); 2404 return ELM_PART_IMPLEMENT(EFL_UI_LAYOUT_PART_TEXT_CLASS, obj, part);
2405 case EFL_CANVAS_LAYOUT_PART_TYPE_SWALLOW: 2405 case EFL_CANVAS_LAYOUT_PART_TYPE_SWALLOW:
2406 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_CONTENT_CLASS); 2406 return ELM_PART_IMPLEMENT(EFL_UI_LAYOUT_PART_CONTENT_CLASS, obj, part);
2407 case EFL_CANVAS_LAYOUT_PART_TYPE_NONE: 2407 case EFL_CANVAS_LAYOUT_PART_TYPE_NONE:
2408 DBG("No such part '%s' in group '%s'", part, sd->group); 2408 DBG("No such part '%s' in group '%s'", part, sd->group);
2409 return NULL; 2409 return NULL;
2410 default: 2410 default:
2411 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_LAYOUT_PART_CLASS); 2411 return ELM_PART_IMPLEMENT(EFL_UI_LAYOUT_PART_CLASS, obj, part);
2412 } 2412 }
2413} 2413}
2414 2414
@@ -2437,7 +2437,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_set(Eo *obj, void *_pd EINA_UNUSED, con
2437{ 2437{
2438 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2438 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2439 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2439 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2440 ELM_PART_RETURN_VAL(_efl_ui_layout_part_cursor_set(sd, pd->part, cursor)); 2440 return _efl_ui_layout_part_cursor_set(sd, pd->part, cursor);
2441} 2441}
2442 2442
2443EOLIAN static const char * 2443EOLIAN static const char *
@@ -2445,7 +2445,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_get(Eo *obj, void *_pd EINA_UNUSED)
2445{ 2445{
2446 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2446 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2447 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2447 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2448 ELM_PART_RETURN_VAL(_efl_ui_layout_part_cursor_get(sd, pd->part)); 2448 return _efl_ui_layout_part_cursor_get(sd, pd->part);
2449} 2449}
2450 2450
2451EOLIAN static Eina_Bool 2451EOLIAN static Eina_Bool
@@ -2453,7 +2453,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_style_set(Eo *obj, void *_pd EINA_UNUSE
2453{ 2453{
2454 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2454 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2455 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2455 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2456 ELM_PART_RETURN_VAL(_efl_ui_layout_part_cursor_style_set(sd, pd->part, style)); 2456 return _efl_ui_layout_part_cursor_style_set(sd, pd->part, style);
2457} 2457}
2458 2458
2459EOLIAN static const char * 2459EOLIAN static const char *
@@ -2461,7 +2461,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_style_get(Eo *obj, void *_pd EINA_UNUSE
2461{ 2461{
2462 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2462 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2463 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2463 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2464 ELM_PART_RETURN_VAL(_efl_ui_layout_part_cursor_style_get(sd, pd->part)); 2464 return _efl_ui_layout_part_cursor_style_get(sd, pd->part);
2465} 2465}
2466 2466
2467EOLIAN static Eina_Bool 2467EOLIAN static Eina_Bool
@@ -2469,7 +2469,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_theme_search_enabled_set(Eo *obj, void
2469{ 2469{
2470 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2470 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2471 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2471 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2472 ELM_PART_RETURN_VAL(_efl_ui_layout_part_cursor_engine_only_set(sd, pd->part, !allow)); 2472 return _efl_ui_layout_part_cursor_engine_only_set(sd, pd->part, !allow);
2473} 2473}
2474 2474
2475EOLIAN static Eina_Bool 2475EOLIAN static Eina_Bool
@@ -2477,7 +2477,7 @@ _efl_ui_layout_part_efl_ui_cursor_cursor_theme_search_enabled_get(Eo *obj, void
2477{ 2477{
2478 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 2478 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
2479 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 2479 Efl_Ui_Layout_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
2480 ELM_PART_RETURN_VAL(!_efl_ui_layout_part_cursor_engine_only_get(sd, pd->part)); 2480 return !_efl_ui_layout_part_cursor_engine_only_get(sd, pd->part);
2481} 2481}
2482 2482
2483/* Efl.Ui.Layout.Part_Content */ 2483/* Efl.Ui.Layout.Part_Content */
diff --git a/src/lib/elementary/efl_ui_layout_pack.c b/src/lib/elementary/efl_ui_layout_pack.c
index 76a1315504..9cbf0a9b68 100644
--- a/src/lib/elementary/efl_ui_layout_pack.c
+++ b/src/lib/elementary/efl_ui_layout_pack.c
@@ -136,32 +136,32 @@ _efl_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box
136 Eina_Iterator *it; 136 Eina_Iterator *it;
137 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 137 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
138 it = evas_object_box_iterator_new(pack); 138 it = evas_object_box_iterator_new(pack);
139 ELM_PART_RETURN_VAL(_part_item_iterator_create(obj, it, NULL)); 139 return _part_item_iterator_create(obj, it, NULL);
140} 140}
141 141
142EOLIAN static int 142EOLIAN static int
143_efl_ui_layout_part_box_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) 143_efl_ui_layout_part_box_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
144{ 144{
145 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 145 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
146 ELM_PART_RETURN_VAL(evas_obj_box_count(pack)); 146 return evas_obj_box_count(pack);
147} 147}
148 148
149EOLIAN static Eina_Bool 149EOLIAN static Eina_Bool
150_efl_ui_layout_part_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) 150_efl_ui_layout_part_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
151{ 151{
152 ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_TRUE)); 152 return _efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_TRUE);
153} 153}
154 154
155EOLIAN static Eina_Bool 155EOLIAN static Eina_Bool
156_efl_ui_layout_part_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd) 156_efl_ui_layout_part_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
157{ 157{
158 ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_FALSE)); 158 return _efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_FALSE);
159} 159}
160 160
161EOLIAN static Eina_Bool 161EOLIAN static Eina_Bool
162_efl_ui_layout_part_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj) 162_efl_ui_layout_part_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
163{ 163{
164 ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL); 164 return _efl_ui_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL;
165} 165}
166 166
167EOLIAN static Eina_Bool 167EOLIAN static Eina_Bool
@@ -174,25 +174,25 @@ _efl_ui_layout_part_box_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_Box_
174EOLIAN static Eina_Bool 174EOLIAN static Eina_Bool
175_efl_ui_layout_part_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj) 175_efl_ui_layout_part_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
176{ 176{
177 ELM_PART_RETURN_VAL(_efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj)); 177 return _efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj);
178} 178}
179 179
180EOLIAN static Eina_Bool 180EOLIAN static Eina_Bool
181_efl_ui_layout_part_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj) 181_efl_ui_layout_part_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
182{ 182{
183 ELM_PART_RETURN_VAL(_efl_ui_layout_box_prepend(pd->obj, pd->sd, pd->part, subobj)); 183 return _efl_ui_layout_box_prepend(pd->obj, pd->sd, pd->part, subobj);
184} 184}
185 185
186EOLIAN static Eina_Bool 186EOLIAN static Eina_Bool
187_efl_ui_layout_part_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj) 187_efl_ui_layout_part_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
188{ 188{
189 ELM_PART_RETURN_VAL(_efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj)); 189 return _efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj);
190} 190}
191 191
192EOLIAN static Eina_Bool 192EOLIAN static Eina_Bool
193_efl_ui_layout_part_box_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing) 193_efl_ui_layout_part_box_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
194{ 194{
195 ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, existing)); 195 return _efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, existing);
196} 196}
197 197
198EOLIAN static Eina_Bool 198EOLIAN static Eina_Bool
@@ -202,19 +202,19 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_Ui_L
202 int index; 202 int index;
203 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 203 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
204 index = efl_pack_index_get(pack, existing); 204 index = efl_pack_index_get(pack, existing);
205 if (index < 0) ELM_PART_RETURN_VAL(EINA_FALSE); 205 if (index < 0) return EINA_FALSE;
206 206
207 other = efl_pack_content_get(pack, index + 1); 207 other = efl_pack_content_get(pack, index + 1);
208 if (other) 208 if (other)
209 ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other)); 209 return _efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other);
210 210
211 ELM_PART_RETURN_VAL(efl_pack_end(obj, subobj)); 211 return efl_pack_end(obj, subobj);
212} 212}
213 213
214EOLIAN static Eina_Bool 214EOLIAN static Eina_Bool
215_efl_ui_layout_part_box_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, int index) 215_efl_ui_layout_part_box_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, int index)
216{ 216{
217 ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index)); 217 return _efl_ui_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index);
218} 218}
219 219
220EOLIAN static Efl_Gfx * 220EOLIAN static Efl_Gfx *
@@ -226,8 +226,8 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Ef
226 226
227 priv = efl_data_scope_get(pack, EVAS_BOX_CLASS); 227 priv = efl_data_scope_get(pack, EVAS_BOX_CLASS);
228 opt = eina_list_nth(priv->children, index); 228 opt = eina_list_nth(priv->children, index);
229 if (!opt) ELM_PART_RETURN_VAL(NULL); 229 if (!opt) return NULL;
230 ELM_PART_RETURN_VAL(opt->obj); 230 return opt->obj;
231} 231}
232 232
233EOLIAN static Efl_Gfx * 233EOLIAN static Efl_Gfx *
@@ -237,19 +237,19 @@ _efl_ui_layout_part_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Bo
237 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 237 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
238 238
239 subobj = efl_pack_content_get(pack, index); 239 subobj = efl_pack_content_get(pack, index);
240 if (!subobj) ELM_PART_RETURN_VAL(NULL); 240 if (!subobj) return NULL;
241 if (efl_pack_unpack(obj, subobj)) 241 if (efl_pack_unpack(obj, subobj))
242 ELM_PART_RETURN_VAL(subobj); 242 return subobj;
243 243
244 ERR("failed to remove %p from %p (item %d)", subobj, pd->obj, index); 244 ERR("failed to remove %p from %p (item %d)", subobj, pd->obj, index);
245 ELM_PART_RETURN_VAL(NULL); 245 return NULL;
246} 246}
247 247
248EOLIAN static int 248EOLIAN static int
249_efl_ui_layout_part_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx *subobj) 249_efl_ui_layout_part_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx *subobj)
250{ 250{
251 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 251 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
252 ELM_PART_RETURN_VAL(efl_pack_index_get(pack, subobj)); 252 return efl_pack_index_get(pack, subobj);
253} 253}
254 254
255EOLIAN static Efl_Ui_Dir 255EOLIAN static Efl_Ui_Dir
@@ -257,7 +257,7 @@ _efl_ui_layout_part_box_efl_ui_direction_direction_get(Eo *obj EINA_UNUSED, Efl_
257{ 257{
258 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_DIR_DEFAULT); 258 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_DIR_DEFAULT);
259 259
260 ELM_PART_RETURN_VAL(efl_ui_direction_get(efl_part(wd->resize_obj, pd->part))); 260 return efl_ui_direction_get(efl_part(wd->resize_obj, pd->part));
261} 261}
262 262
263 263
@@ -289,33 +289,33 @@ _efl_ui_layout_part_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_T
289 289
290 it = evas_object_table_iterator_new(pack); 290 it = evas_object_table_iterator_new(pack);
291 291
292 ELM_PART_RETURN_VAL(_part_item_iterator_create(obj, it, NULL)); 292 return _part_item_iterator_create(obj, it, NULL);
293} 293}
294 294
295EOLIAN static int 295EOLIAN static int
296_efl_ui_layout_part_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 296_efl_ui_layout_part_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
297{ 297{
298 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 298 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
299 ELM_PART_RETURN_VAL(evas_obj_table_count(pack)); 299 return evas_obj_table_count(pack);
300} 300}
301 301
302EOLIAN static Eina_Bool 302EOLIAN static Eina_Bool
303_efl_ui_layout_part_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 303_efl_ui_layout_part_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
304{ 304{
305 ELM_PART_RETURN_VAL(_efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_TRUE)); 305 return _efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_TRUE);
306} 306}
307 307
308EOLIAN static Eina_Bool 308EOLIAN static Eina_Bool
309_efl_ui_layout_part_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd) 309_efl_ui_layout_part_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
310{ 310{
311 ELM_PART_RETURN_VAL(_efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_FALSE)); 311 return _efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_FALSE);
312} 312}
313 313
314EOLIAN static Eina_Bool 314EOLIAN static Eina_Bool
315_efl_ui_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj) 315_efl_ui_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj)
316{ 316{
317 if (!subobj) ELM_PART_RETURN_VAL(EINA_FALSE); 317 if (!subobj) return EINA_FALSE;
318 ELM_PART_RETURN_VAL(_efl_ui_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj); 318 return _efl_ui_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj;
319} 319}
320 320
321EOLIAN static Eina_Bool 321EOLIAN static Eina_Bool
@@ -328,14 +328,14 @@ _efl_ui_layout_part_table_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_Ta
328EOLIAN static Eina_Bool 328EOLIAN static Eina_Bool
329_efl_ui_layout_part_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan) 329_efl_ui_layout_part_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
330{ 330{
331 ELM_PART_RETURN_VAL(_efl_ui_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan)); 331 return _efl_ui_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan);
332} 332}
333 333
334EOLIAN static Efl_Gfx * 334EOLIAN static Efl_Gfx *
335_efl_ui_layout_part_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row) 335_efl_ui_layout_part_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
336{ 336{
337 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 337 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
338 ELM_PART_RETURN_VAL(evas_object_table_child_get(pack, col, row)); 338 return evas_object_table_child_get(pack, col, row);
339} 339}
340 340
341EOLIAN static Eina_Iterator * 341EOLIAN static Eina_Iterator *
@@ -364,7 +364,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, E
364 } 364 }
365 } 365 }
366 366
367 ELM_PART_RETURN_VAL(_part_item_iterator_create(pd->obj, eina_list_iterator_new(l), l)); 367 return _part_item_iterator_create(pd->obj, eina_list_iterator_new(l), l);
368} 368}
369 369
370EOLIAN static Eina_Bool 370EOLIAN static Eina_Bool
@@ -380,7 +380,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, E
380 if (colspan) *colspan = cs; 380 if (colspan) *colspan = cs;
381 if (rowspan) *rowspan = rs; 381 if (rowspan) *rowspan = rs;
382 382
383 ELM_PART_RETURN_VAL(ret); 383 return ret;
384} 384}
385 385
386EOLIAN static void 386EOLIAN static void
@@ -396,7 +396,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Ef
396 int cols, rows; 396 int cols, rows;
397 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 397 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
398 evas_object_table_col_row_size_get(pack, &cols, &rows); 398 evas_object_table_col_row_size_get(pack, &cols, &rows);
399 ELM_PART_RETURN_VAL(cols); 399 return cols;
400} 400}
401 401
402EOLIAN static int 402EOLIAN static int
@@ -405,7 +405,7 @@ _efl_ui_layout_part_table_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_U
405 int cols, rows; 405 int cols, rows;
406 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part); 406 Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
407 evas_object_table_col_row_size_get(pack, &cols, &rows); 407 evas_object_table_col_row_size_get(pack, &cols, &rows);
408 ELM_PART_RETURN_VAL(rows); 408 return rows;
409} 409}
410 410
411#include "efl_ui_layout_part_box.eo.c" 411#include "efl_ui_layout_part_box.eo.c"
diff --git a/src/lib/elementary/efl_ui_progressbar.c b/src/lib/elementary/efl_ui_progressbar.c
index 90520bb584..ba15caeda0 100644
--- a/src/lib/elementary/efl_ui_progressbar.c
+++ b/src/lib/elementary/efl_ui_progressbar.c
@@ -624,7 +624,7 @@ _efl_ui_progressbar_efl_part_part(const Eo *obj, Efl_Ui_Progressbar_Data *sd EIN
624 624
625 // Progress bars are dragable types 625 // Progress bars are dragable types
626 if (edje_object_part_drag_dir_get(wd->resize_obj, part) != EFL_UI_DRAG_DIR_NONE) 626 if (edje_object_part_drag_dir_get(wd->resize_obj, part) != EFL_UI_DRAG_DIR_NONE)
627 return ELM_PART_OVERRIDE_IMPLEMENT(EFL_UI_PROGRESSBAR_PART_CLASS); 627 return ELM_PART_IMPLEMENT(EFL_UI_PROGRESSBAR_PART_CLASS, obj, part);
628 628
629 return efl_part(efl_super(obj, MY_CLASS), part); 629 return efl_part(efl_super(obj, MY_CLASS), part);
630} 630}
@@ -636,7 +636,6 @@ _efl_ui_progressbar_part_efl_ui_range_range_value_set(Eo *obj, void *_pd EINA_UN
636 Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS); 636 Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS);
637 637
638 _progressbar_part_value_set(pd->obj, sd, pd->part, val); 638 _progressbar_part_value_set(pd->obj, sd, pd->part, val);
639 ELM_PART_RETURN_VOID;
640} 639}
641 640
642EOLIAN static double 641EOLIAN static double
@@ -645,7 +644,7 @@ _efl_ui_progressbar_part_efl_ui_range_range_value_get(Eo *obj, void *_pd EINA_UN
645 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 644 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
646 Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS); 645 Efl_Ui_Progressbar_Data *sd = efl_data_scope_get(pd->obj, EFL_UI_PROGRESSBAR_CLASS);
647 646
648 ELM_PART_RETURN_VAL(_progressbar_part_value_get(sd, pd->part)); 647 return _progressbar_part_value_get(sd, pd->part);
649} 648}
650 649
651#include "efl_ui_progressbar_part.eo.c" 650#include "efl_ui_progressbar_part.eo.c"
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index b05f3493a8..14e34b8313 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -7012,7 +7012,6 @@ _efl_ui_win_part_efl_gfx_color_set(Eo *obj, void *_pd EINA_UNUSED, int r, int g,
7012 ERR("Evas only handles premultiplied colors (0 <= R,G,B <= A <= 255)"); 7012 ERR("Evas only handles premultiplied colors (0 <= R,G,B <= A <= 255)");
7013 7013
7014 _efl_ui_win_part_color_set(pd->obj, sd, pd->part, r, g, b, a); 7014 _efl_ui_win_part_color_set(pd->obj, sd, pd->part, r, g, b, a);
7015 ELM_PART_RETURN_VOID;
7016} 7015}
7017 7016
7018static void 7017static void
@@ -7021,7 +7020,6 @@ _efl_ui_win_part_efl_gfx_color_get(Eo *obj, void *_pd EINA_UNUSED, int *r, int *
7021 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 7020 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7022 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 7021 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7023 _efl_ui_win_part_color_get(pd->obj, sd, pd->part, r, g, b, a); 7022 _efl_ui_win_part_color_get(pd->obj, sd, pd->part, r, g, b, a);
7024 ELM_PART_RETURN_VOID;
7025} 7023}
7026 7024
7027static Eina_Bool 7025static Eina_Bool
@@ -7029,7 +7027,7 @@ _efl_ui_win_part_efl_file_file_set(Eo *obj, void *_pd EINA_UNUSED, const char *f
7029{ 7027{
7030 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 7028 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7031 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 7029 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7032 ELM_PART_RETURN_VAL(_efl_ui_win_part_file_set(pd->obj, sd, pd->part, file, key)); 7030 return _efl_ui_win_part_file_set(pd->obj, sd, pd->part, file, key);
7033} 7031}
7034 7032
7035static void 7033static void
@@ -7038,7 +7036,6 @@ _efl_ui_win_part_efl_file_file_get(Eo *obj, void *_pd EINA_UNUSED, const char **
7038 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); 7036 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS);
7039 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS); 7037 Efl_Ui_Win_Data *sd = efl_data_scope_get(pd->obj, MY_CLASS);
7040 _efl_ui_win_part_file_get(pd->obj, sd, pd->part, file, key); 7038 _efl_ui_win_part_file_get(pd->obj, sd, pd->part, file, key);
7041 ELM_PART_RETURN_VOID;
7042} 7039}
7043 7040
7044ELM_PART_OVERRIDE(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data) 7041ELM_PART_OVERRIDE(efl_ui_win, EFL_UI_WIN, Efl_Ui_Win_Data)
diff --git a/src/lib/elementary/elementary_config.h b/src/lib/elementary/elementary_config.h
index 776c634b4d..ce1a00f338 100644
--- a/src/lib/elementary/elementary_config.h
+++ b/src/lib/elementary/elementary_config.h
@@ -13,3 +13,5 @@
13#define EFL_CANVAS_OBJECT_PROTECTED 13#define EFL_CANVAS_OBJECT_PROTECTED
14#define EFL_CANVAS_GROUP_PROTECTED 14#define EFL_CANVAS_GROUP_PROTECTED
15#define EFL_CANVAS_GROUP_BETA 15#define EFL_CANVAS_GROUP_BETA
16#define EFL_OBJECT_BETA
17#define EFL_OBJECT_PROTECTED
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
index 20d13035cb..eb84c04467 100644
--- a/src/lib/elementary/elm_part_helper.h
+++ b/src/lib/elementary/elm_part_helper.h
@@ -6,18 +6,11 @@
6//#define ELM_PART_HOOK do { ERR("%s@%p:%s [%d]", efl_class_name_get(pd->obj), pd->obj, pd->part, (int) pd->temp); } while(0) 6//#define ELM_PART_HOOK do { ERR("%s@%p:%s [%d]", efl_class_name_get(pd->obj), pd->obj, pd->part, (int) pd->temp); } while(0)
7#define ELM_PART_HOOK do {} while(0) 7#define ELM_PART_HOOK do {} while(0)
8 8
9//#define ELM_PART_REF(obj, pd) do { if (!(pd->temp++)) efl_ref(obj); } while(0)
10#define ELM_PART_UNREF(obj, pd) do { if (pd->temp) { if (!(--pd->temp)) efl_del(obj); } } while(0)
11#define ELM_PART_RETURN_VAL(a) do { ELM_PART_HOOK; typeof(a) _ret = a; ELM_PART_UNREF(obj, pd); return _ret; } while(0)
12#define ELM_PART_RETURN_VOID do { ELM_PART_HOOK; ELM_PART_UNREF(obj, pd); return; } while(0)
13//#define ELM_PART_CALL(a) ({ ELM_PART_REF(obj, pd); a; })
14
15typedef struct _Elm_Part_Data Elm_Part_Data; 9typedef struct _Elm_Part_Data Elm_Part_Data;
16struct _Elm_Part_Data 10struct _Elm_Part_Data
17{ 11{
18 Eo *obj; 12 Eo *obj;
19 Eina_Tmpstr *part; 13 Eina_Tmpstr *part;
20 unsigned char temp;
21}; 14};
22 15
23// Note: this generic implementation can be improved to support part object 16// Note: this generic implementation can be improved to support part object
@@ -70,15 +63,16 @@ _elm_part_alias_find(const Elm_Layout_Part_Alias_Description *aliases, const cha
70 return EINA_FALSE; 63 return EINA_FALSE;
71} 64}
72 65
73#define ELM_PART_OVERRIDE_IMPLEMENT(PART_CLASS) ({ \ 66#define ELM_PART_IMPLEMENT(PART_CLASS, _obj, _part) ({ \
74 Eo *proxy = efl_add(PART_CLASS, (Eo *) obj); \ 67 EINA_SAFETY_ON_NULL_RETURN_VAL(_obj, NULL); \
68 EINA_SAFETY_ON_NULL_RETURN_VAL(_part, NULL); \
69 Eo *proxy = efl_add(PART_CLASS, (Eo *) _obj); \
75 Elm_Part_Data *pd = efl_data_scope_get(proxy, EFL_UI_WIDGET_PART_CLASS); \ 70 Elm_Part_Data *pd = efl_data_scope_get(proxy, EFL_UI_WIDGET_PART_CLASS); \
76 if (pd) \ 71 EINA_SAFETY_ON_NULL_RETURN_VAL(pd, NULL); \
77 { \ 72 pd->obj = (Eo *) _obj; \
78 pd->obj = (Eo *) obj; \ 73 pd->part = eina_tmpstr_add(_part); \
79 pd->part = eina_tmpstr_add(part); \ 74 efl_allow_parent_unref_set(proxy, 1); \
80 pd->temp = 1; \ 75 efl_auto_unref_set(proxy, 1); \
81 } \
82 proxy; }) 76 proxy; })
83 77
84#define ELM_PART_OVERRIDE_ONLY_ALIASES(type, TYPE, typedata, aliases) \ 78#define ELM_PART_OVERRIDE_ONLY_ALIASES(type, TYPE, typedata, aliases) \
@@ -87,7 +81,7 @@ _elm_part_alias_find(const Elm_Layout_Part_Alias_Description *aliases, const cha
87 { \ 81 { \
88 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \ 82 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
89 if (_elm_part_alias_find(aliases, part)) \ 83 if (_elm_part_alias_find(aliases, part)) \
90 return ELM_PART_OVERRIDE_IMPLEMENT(TYPE ## _PART_CLASS); \ 84 return ELM_PART_IMPLEMENT(TYPE ## _PART_CLASS, obj, part); \
91 return efl_part(efl_super(obj, MY_CLASS), part); \ 85 return efl_part(efl_super(obj, MY_CLASS), part); \
92 } 86 }
93 87
@@ -96,7 +90,7 @@ EOLIAN static Efl_Object * \
96_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \ 90_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
97{ \ 91{ \
98 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \ 92 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
99 return ELM_PART_OVERRIDE_IMPLEMENT(TYPE ## _PART_CLASS); \ 93 return ELM_PART_IMPLEMENT(TYPE ## _PART_CLASS, obj, part); \
100} 94}
101 95
102#define ELM_PART_OVERRIDE_CONTENT_SET_FULL(full, type, TYPE, typedata) \ 96#define ELM_PART_OVERRIDE_CONTENT_SET_FULL(full, type, TYPE, typedata) \
@@ -105,7 +99,7 @@ _ ## full ## _efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx
105{ \ 99{ \
106 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 100 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
107 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 101 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
108 ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, sd, pd->part, content)); \ 102 return _ ## type ## _content_set(pd->obj, sd, pd->part, content); \
109} 103}
110 104
111#define ELM_PART_OVERRIDE_CONTENT_GET_FULL(full, type, TYPE, typedata) \ 105#define ELM_PART_OVERRIDE_CONTENT_GET_FULL(full, type, TYPE, typedata) \
@@ -114,7 +108,7 @@ _ ## full ## _efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED) \
114{ \ 108{ \
115 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 109 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
116 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 110 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
117 ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, sd, pd->part)); \ 111 return _ ## type ## _content_get(pd->obj, sd, pd->part); \
118} 112}
119 113
120#define ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(full, type, TYPE, typedata) \ 114#define ELM_PART_OVERRIDE_CONTENT_UNSET_FULL(full, type, TYPE, typedata) \
@@ -123,7 +117,7 @@ _ ## full ## _efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED) \
123{ \ 117{ \
124 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 118 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
125 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 119 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
126 ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, sd, pd->part)); \ 120 return _ ## type ## _content_unset(pd->obj, sd, pd->part); \
127} 121}
128 122
129#define ELM_PART_OVERRIDE_TEXT_SET_FULL(full, type, TYPE, typedata) \ 123#define ELM_PART_OVERRIDE_TEXT_SET_FULL(full, type, TYPE, typedata) \
@@ -133,7 +127,6 @@ _ ## full ## _efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text
133 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 127 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
134 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 128 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
135 _ ## type ## _text_set(pd->obj, sd, pd->part, text); \ 129 _ ## type ## _text_set(pd->obj, sd, pd->part, text); \
136 ELM_PART_RETURN_VOID; \
137} 130}
138 131
139#define ELM_PART_OVERRIDE_TEXT_GET_FULL(full, type, TYPE, typedata) \ 132#define ELM_PART_OVERRIDE_TEXT_GET_FULL(full, type, TYPE, typedata) \
@@ -142,7 +135,7 @@ _ ## full ## _efl_text_text_get(Eo *obj, void *_pd EINA_UNUSED) \
142{ \ 135{ \
143 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 136 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
144 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 137 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
145 ELM_PART_RETURN_VAL(_ ## type ## _text_get(pd->obj, sd, pd->part)); \ 138 return _ ## type ## _text_get(pd->obj, sd, pd->part); \
146} 139}
147 140
148#define ELM_PART_OVERRIDE_TEXT_MARKUP_GET_FULL(full, type, TYPE, typedata) \ 141#define ELM_PART_OVERRIDE_TEXT_MARKUP_GET_FULL(full, type, TYPE, typedata) \
@@ -151,7 +144,7 @@ _ ## full ## _efl_text_markup_markup_get(Eo *obj, void *_pd EINA_UNUSED) \
151{ \ 144{ \
152 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 145 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
153 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 146 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
154 ELM_PART_RETURN_VAL(_ ## type ## _text_markup_get(pd->obj, sd, pd->part)); \ 147 return _ ## type ## _text_markup_get(pd->obj, sd, pd->part); \
155} 148}
156 149
157#define ELM_PART_OVERRIDE_TEXT_MARKUP_SET_FULL(full, type, TYPE, typedata) \ 150#define ELM_PART_OVERRIDE_TEXT_MARKUP_SET_FULL(full, type, TYPE, typedata) \
@@ -161,7 +154,6 @@ _ ## full ## _efl_text_markup_markup_set(Eo *obj, void *_pd EINA_UNUSED, const c
161 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \ 154 Elm_Part_Data *pd = efl_data_scope_get(obj, EFL_UI_WIDGET_PART_CLASS); \
162 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \ 155 typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
163 _ ## type ## _text_markup_set(pd->obj, sd, pd->part, markup); \ 156 _ ## type ## _text_markup_set(pd->obj, sd, pd->part, markup); \
164 ELM_PART_RETURN_VOID; \
165} 157}
166 158
167#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \ 159#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, typedata) \
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index bea9f132ce..c7af125ba0 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -5557,22 +5557,7 @@ elm_widget_signal_callback_del(Eo *obj, const char *emission, const char *source
5557EOLIAN static Efl_Object * 5557EOLIAN static Efl_Object *
5558_elm_widget_efl_part_part(const Eo *obj, Elm_Widget_Smart_Data *wd EINA_UNUSED, const char *part) 5558_elm_widget_efl_part_part(const Eo *obj, Elm_Widget_Smart_Data *wd EINA_UNUSED, const char *part)
5559{ 5559{
5560 Elm_Part_Data *pd; 5560 return ELM_PART_IMPLEMENT(EFL_UI_WIDGET_PART_CLASS, obj, part);
5561 Eo *proxy;
5562
5563 EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL);
5564
5565 // Generic parts for every kind of widget
5566 proxy = efl_add(EFL_UI_WIDGET_PART_CLASS, (Eo *) obj);
5567 pd = efl_data_scope_get(proxy, EFL_UI_WIDGET_PART_CLASS);
5568 if (pd)
5569 {
5570 pd->obj = (Eo *) obj;
5571 pd->part = eina_tmpstr_add(part);
5572 pd->temp = 1;
5573 }
5574
5575 return proxy;
5576} 5561}
5577 5562
5578EOLIAN static void \ 5563EOLIAN static void \