summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile_Edje.am4
-rw-r--r--src/Makefile_Elementary.am17
-rw-r--r--src/lib/edje/edje_containers.c272
-rw-r--r--src/lib/edje/edje_object.eo3
-rw-r--r--src/lib/edje/edje_private.h5
-rw-r--r--src/lib/edje/edje_util.c30
-rw-r--r--src/lib/edje/efl_canvas_layout_internal.eo15
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_box.eo17
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_swallow.eo16
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_table.eo13
-rw-r--r--src/lib/efl/interfaces/efl_container.eo28
-rw-r--r--src/lib/elementary/elc_ctxpopup.c44
-rw-r--r--src/lib/elementary/elc_fileselector_entry.c31
-rw-r--r--src/lib/elementary/elc_naviframe.c25
-rw-r--r--src/lib/elementary/elc_player.c23
-rw-r--r--src/lib/elementary/elc_popup.c69
-rw-r--r--src/lib/elementary/elm_button.c16
-rw-r--r--src/lib/elementary/elm_button.eo2
-rw-r--r--src/lib/elementary/elm_button_internal_part.eo7
-rw-r--r--src/lib/elementary/elm_ctxpopup.eo4
-rw-r--r--src/lib/elementary/elm_ctxpopup_internal_part.eo9
-rw-r--r--src/lib/elementary/elm_dayselector.c26
-rw-r--r--src/lib/elementary/elm_dayselector.eo3
-rw-r--r--src/lib/elementary/elm_dayselector_internal_part.eo8
-rw-r--r--src/lib/elementary/elm_entry.c24
-rw-r--r--src/lib/elementary/elm_entry.eo3
-rw-r--r--src/lib/elementary/elm_entry_internal_part.eo8
-rw-r--r--src/lib/elementary/elm_fileselector_entry.eo4
-rw-r--r--src/lib/elementary/elm_fileselector_entry_internal_part.eo9
-rw-r--r--src/lib/elementary/elm_flip.c25
-rw-r--r--src/lib/elementary/elm_flip.eo6
-rw-r--r--src/lib/elementary/elm_flip_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_hover.c47
-rw-r--r--src/lib/elementary/elm_hover.eo4
-rw-r--r--src/lib/elementary/elm_hover_internal_part.eo9
-rw-r--r--src/lib/elementary/elm_inwin.c13
-rw-r--r--src/lib/elementary/elm_inwin.eo1
-rw-r--r--src/lib/elementary/elm_layout.c77
-rw-r--r--src/lib/elementary/elm_layout.eo9
-rw-r--r--src/lib/elementary/elm_layout_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_layout_pack.c4
-rw-r--r--src/lib/elementary/elm_mapbuf.c51
-rw-r--r--src/lib/elementary/elm_mapbuf.eo3
-rw-r--r--src/lib/elementary/elm_mapbuf_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_naviframe.eo4
-rw-r--r--src/lib/elementary/elm_naviframe_internal_part.eo9
-rw-r--r--src/lib/elementary/elm_notify.c43
-rw-r--r--src/lib/elementary/elm_notify.eo3
-rw-r--r--src/lib/elementary/elm_notify_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_panel.c38
-rw-r--r--src/lib/elementary/elm_panel.eo4
-rw-r--r--src/lib/elementary/elm_panel_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_part_helper.h120
-rw-r--r--src/lib/elementary/elm_player.eo2
-rw-r--r--src/lib/elementary/elm_player_internal_part.eo7
-rw-r--r--src/lib/elementary/elm_popup.eo4
-rw-r--r--src/lib/elementary/elm_popup_internal_part.eo9
-rw-r--r--src/lib/elementary/elm_progressbar.c17
-rw-r--r--src/lib/elementary/elm_progressbar.eo2
-rw-r--r--src/lib/elementary/elm_progressbar_internal_part.eo7
-rw-r--r--src/lib/elementary/elm_scroller.c45
-rw-r--r--src/lib/elementary/elm_scroller.eo4
-rw-r--r--src/lib/elementary/elm_scroller_internal_part.eo10
-rw-r--r--src/lib/elementary/elm_toolbar.c11
-rw-r--r--src/lib/elementary/elm_widget.c10
-rw-r--r--src/tests/edje/edje_test_edje.c6
-rw-r--r--src/tests/elementary/elm_test_layout.c8
67 files changed, 927 insertions, 470 deletions
diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 45934d6467..8dc400cb2f 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -9,8 +9,10 @@ edje_eolian_type_files = \
9 lib/edje/edje_types.eot 9 lib/edje/edje_types.eot
10 10
11edje_eolian_priv_files = \ 11edje_eolian_priv_files = \
12 lib/edje/efl_canvas_layout_internal.eo \
12 lib/edje/efl_canvas_layout_internal_box.eo \ 13 lib/edje/efl_canvas_layout_internal_box.eo \
13 lib/edje/efl_canvas_layout_internal_table.eo 14 lib/edje/efl_canvas_layout_internal_table.eo \
15 lib/edje/efl_canvas_layout_internal_swallow.eo
14 16
15edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c) 17edje_eolian_c = $(edje_eolian_files:%.eo=%.eo.c)
16edje_eolian_h = $(edje_eolian_files:%.eo=%.eo.h) \ 18edje_eolian_h = $(edje_eolian_files:%.eo=%.eo.h) \
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index c5f8e6fa5a..550a54a36a 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -119,6 +119,22 @@ elm_public_eolian_files = \
119 lib/elementary/efl_ui_grid.eo \ 119 lib/elementary/efl_ui_grid.eo \
120 lib/elementary/efl_ui_layout_internal_box.eo \ 120 lib/elementary/efl_ui_layout_internal_box.eo \
121 lib/elementary/efl_ui_layout_internal_table.eo \ 121 lib/elementary/efl_ui_layout_internal_table.eo \
122 lib/elementary/elm_button_internal_part.eo \
123 lib/elementary/elm_ctxpopup_internal_part.eo \
124 lib/elementary/elm_dayselector_internal_part.eo \
125 lib/elementary/elm_entry_internal_part.eo \
126 lib/elementary/elm_fileselector_entry_internal_part.eo \
127 lib/elementary/elm_flip_internal_part.eo \
128 lib/elementary/elm_hover_internal_part.eo \
129 lib/elementary/elm_layout_internal_part.eo \
130 lib/elementary/elm_mapbuf_internal_part.eo \
131 lib/elementary/elm_naviframe_internal_part.eo \
132 lib/elementary/elm_notify_internal_part.eo \
133 lib/elementary/elm_panel_internal_part.eo \
134 lib/elementary/elm_player_internal_part.eo \
135 lib/elementary/elm_progressbar_internal_part.eo \
136 lib/elementary/elm_popup_internal_part.eo \
137 lib/elementary/elm_scroller_internal_part.eo \
122 $(NULL) 138 $(NULL)
123 139
124# Legacy classes - not part of public EO API 140# Legacy classes - not part of public EO API
@@ -508,6 +524,7 @@ includesub_HEADERS = \
508 lib/elementary/elm_win_standard.h \ 524 lib/elementary/elm_win_standard.h \
509 lib/elementary/elm_helper.h \ 525 lib/elementary/elm_helper.h \
510 lib/elementary/efl_ui_box_private.h \ 526 lib/elementary/efl_ui_box_private.h \
527 lib/elementary/elm_part_helper.h \
511 $(NULL) 528 $(NULL)
512 529
513includesubdir = $(includedir)/elementary-@VMAJ@/ 530includesubdir = $(includedir)/elementary-@VMAJ@/
diff --git a/src/lib/edje/edje_containers.c b/src/lib/edje/edje_containers.c
index 037af612b2..d0f4f0a6cf 100644
--- a/src/lib/edje/edje_containers.c
+++ b/src/lib/edje/edje_containers.c
@@ -1,19 +1,25 @@
1#include "edje_private.h" 1#include "edje_private.h"
2 2
3#define EFL_CANVAS_LAYOUT_INTERNAL_PROTECTED
3#define EFL_CANVAS_LAYOUT_INTERNAL_BOX_PROTECTED 4#define EFL_CANVAS_LAYOUT_INTERNAL_BOX_PROTECTED
4#define EFL_CANVAS_LAYOUT_INTERNAL_TABLE_PROTECTED 5#define EFL_CANVAS_LAYOUT_INTERNAL_TABLE_PROTECTED
6#define EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_PROTECTED
5 7
8#include "efl_canvas_layout_internal.eo.h"
6#include "efl_canvas_layout_internal_box.eo.h" 9#include "efl_canvas_layout_internal_box.eo.h"
7#include "efl_canvas_layout_internal_table.eo.h" 10#include "efl_canvas_layout_internal_table.eo.h"
11#include "efl_canvas_layout_internal_swallow.eo.h"
8 12
9#include "../evas/canvas/evas_box.eo.h" 13#include "../evas/canvas/evas_box.eo.h"
10#include "../evas/canvas/evas_table.eo.h" 14#include "../evas/canvas/evas_table.eo.h"
11 15
12#define BOX_CLASS EFL_CANVAS_LAYOUT_INTERNAL_BOX_CLASS 16#define BOX_CLASS EFL_CANVAS_LAYOUT_INTERNAL_BOX_CLASS
13#define TABLE_CLASS EFL_CANVAS_LAYOUT_INTERNAL_TABLE_CLASS 17#define TABLE_CLASS EFL_CANVAS_LAYOUT_INTERNAL_TABLE_CLASS
18#define SWALLOW_CLASS EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_CLASS
14 19
15typedef struct _Edje_Part_Data Edje_Box_Data; 20typedef struct _Edje_Part_Data Edje_Box_Data;
16typedef struct _Edje_Part_Data Edje_Table_Data; 21typedef struct _Edje_Part_Data Edje_Table_Data;
22typedef struct _Edje_Part_Data Edje_Swallow_Data;
17typedef struct _Part_Item_Iterator Part_Item_Iterator; 23typedef struct _Part_Item_Iterator Part_Item_Iterator;
18 24
19struct _Edje_Part_Data 25struct _Edje_Part_Data
@@ -38,92 +44,109 @@ struct _Part_Item_Iterator
38#define RETURN_VOID do { PROXY_UNREF(obj, pd); return; } while(0) 44#define RETURN_VOID do { PROXY_UNREF(obj, pd); return; } while(0)
39#define PROXY_CALL(a) ({ PROXY_REF(obj, pd); a; }) 45#define PROXY_CALL(a) ({ PROXY_REF(obj, pd); a; })
40 46
47/* ugly macros to avoid code duplication */
48
49#define PROXY_RESET(type) \
50 do { if (_ ## type ## _proxy) \
51 { \
52 eo_del_intercept_set(_ ## type ## _proxy, NULL); \
53 eo_unref(_ ## type ## _proxy); \
54 _ ## type ## _proxy = NULL; \
55 } } while (0)
56
57#define PROXY_DEL_CB(type) \
58static void \
59type ## _del_cb(Eo *proxy) \
60{ \
61 if (_ ## type ## _proxy) \
62 { \
63 eo_del_intercept_set(proxy, NULL); \
64 eo_unref(proxy); \
65 return; \
66 } \
67 if (eo_parent_get(proxy)) \
68 { \
69 eo_ref(proxy); \
70 eo_parent_set(proxy, NULL); \
71 } \
72 _ ## type ## _proxy = proxy; \
73}
74
75#define PROXY_IMPLEMENTATION(type, TYPE, datatype) \
76Eo * \
77_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) \
78{ \
79 Edje_Box_Data *pd; \
80 Eo *proxy; \
81 \
82 pd = eo_data_scope_get(_ ## type ## _proxy, TYPE ## _CLASS); \
83 if (!pd) \
84 { \
85 if (_ ## type ## _proxy) \
86 { \
87 ERR("Found invalid handle for efl_part. Reset."); \
88 _ ## type ## _proxy = NULL; \
89 } \
90 return eo_add(TYPE ## _CLASS, ed->obj, \
91 _edje_real_part_set(eo_self, ed, rp, rp->part->name)); \
92 } \
93 \
94 if (EINA_UNLIKELY(pd->temp)) \
95 { \
96 /* warn about misuse, since non-implemented functions may trigger this \
97 * misuse by accident. */ \
98 ERR("Misuse of efl_part detected. Handles returned by efl_part() are " \
99 "valid for a single function call! Did you call a non implemented " \
100 "function?"); \
101 } \
102 proxy = _ ## type ## _proxy; \
103 _ ## type ## _proxy = NULL; \
104 _edje_real_part_set(proxy, ed, rp, rp->part->name); \
105 return proxy; \
106} \
107\
108EOLIAN static void \
109_efl_canvas_layout_internal_ ## type ## _efl_canvas_layout_internal_real_part_set(Eo *obj, datatype *pd, void *ed, void *rp, const char *part) \
110{ \
111 pd->ed = ed; \
112 pd->rp = rp; \
113 pd->part = part; \
114 pd->temp = 1; \
115 eo_del_intercept_set(obj, type ## _del_cb); \
116 eo_parent_set(obj, pd->ed->obj); \
117} \
118\
119EOLIAN static Eo_Base * \
120_efl_canvas_layout_internal_ ## type ## _eo_base_finalize(Eo *obj, datatype *pd) \
121{ \
122 EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL); \
123 return eo_finalize(eo_super(obj, TYPE ## _CLASS)); \
124}
125
41static Eo *_box_proxy = NULL; 126static Eo *_box_proxy = NULL;
42static Eo *_table_proxy = NULL; 127static Eo *_table_proxy = NULL;
128static Eo *_swallow_proxy = NULL;
43 129
44void 130void
45_edje_internal_proxy_shutdown(void) 131_edje_internal_proxy_shutdown(void)
46{ 132{
47 if (_box_proxy) 133 PROXY_RESET(box);
48 { 134 PROXY_RESET(table);
49 eo_del_intercept_set(_box_proxy, NULL); 135 PROXY_RESET(swallow);
50 eo_unref(_box_proxy);
51 _box_proxy = NULL;
52 }
53 if (_table_proxy)
54 {
55 eo_del_intercept_set(_table_proxy, NULL);
56 eo_unref(_table_proxy);
57 _table_proxy = NULL;
58 }
59} 136}
60 137
61static void 138PROXY_DEL_CB(box)
62_box_del_cb(Eo *proxy) 139PROXY_DEL_CB(table)
63{ 140PROXY_DEL_CB(swallow)
64 if (_box_proxy)
65 {
66 eo_del_intercept_set(proxy, NULL);
67 eo_unref(proxy);
68 return;
69 }
70 if (eo_parent_get(proxy))
71 {
72 eo_ref(proxy);
73 eo_parent_set(proxy, NULL);
74 }
75 _box_proxy = proxy;
76}
77 141
78Eo * 142PROXY_IMPLEMENTATION(box, BOX, Edje_Box_Data)
79_edje_box_internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) 143PROXY_IMPLEMENTATION(table, TABLE, Edje_Table_Data)
80{ 144PROXY_IMPLEMENTATION(swallow, SWALLOW, Edje_Swallow_Data)
81 Edje_Box_Data *pd;
82 Eo *proxy;
83 145
84 pd = eo_data_scope_get(_box_proxy, BOX_CLASS); 146#undef PROXY_RESET
85 if (!pd) 147#undef PROXY_DEL_CB
86 { 148#undef PROXY_IMPLEMENTATION
87 if (_box_proxy)
88 {
89 ERR("Found invalid handle for efl_part. Reset.");
90 _box_proxy = NULL;
91 }
92 return eo_add
93 (BOX_CLASS, ed->obj,
94 efl_canvas_layout_internal_box_real_part_set(eo_self, ed, rp, rp->part->name));
95 }
96 if (EINA_UNLIKELY(pd->temp))
97 {
98 /* warn about misuse, since non-implemented functions may trigger this
99 * misuse by accident. */
100 ERR("Misuse of efl_part detected. Handles returned by efl_part() are "
101 "valid for a single function call! Did you call a non implemented "
102 "function?");
103 }
104 proxy = _box_proxy;
105 _box_proxy = NULL;
106 efl_canvas_layout_internal_box_real_part_set(proxy, ed, rp, rp->part->name);
107 return proxy;
108}
109 149
110EOLIAN static void
111_efl_canvas_layout_internal_box_real_part_set(Eo *obj, Edje_Box_Data *pd, void *ed, void *rp, const char *part)
112{
113 pd->ed = ed;
114 pd->rp = rp;
115 pd->part = part;
116 pd->temp = 1;
117 eo_del_intercept_set(obj, _box_del_cb);
118 eo_parent_set(obj, pd->ed->obj);
119}
120
121EOLIAN static Eo_Base *
122_efl_canvas_layout_internal_box_eo_base_finalize(Eo *obj, Edje_Box_Data *pd)
123{
124 EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL);
125 return eo_finalize(eo_super(obj, BOX_CLASS));
126}
127 150
128/* Legacy features */ 151/* Legacy features */
129 152
@@ -313,76 +336,6 @@ _efl_canvas_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj, Edje
313 RETURN_VAL(EFL_ORIENT_NONE); 336 RETURN_VAL(EFL_ORIENT_NONE);
314} 337}
315 338
316/* Table */
317
318static void
319_table_del_cb(Eo *proxy)
320{
321 if (_table_proxy)
322 {
323 eo_del_intercept_set(proxy, NULL);
324 eo_unref(proxy);
325 return;
326 }
327 if (eo_parent_get(proxy))
328 {
329 eo_ref(proxy);
330 eo_parent_set(proxy, NULL);
331 }
332 _table_proxy = proxy;
333}
334
335Eo *
336_edje_table_internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp)
337{
338 Edje_Box_Data *pd;
339 Eo *proxy;
340
341 pd = eo_data_scope_get(_table_proxy, TABLE_CLASS);
342 if (!pd)
343 {
344 if (_table_proxy)
345 {
346 ERR("Found invalid handle for efl_part. Reset.");
347 _table_proxy = NULL;
348 }
349 return eo_add
350 (TABLE_CLASS, ed->obj,
351 efl_canvas_layout_internal_table_real_part_set(eo_self, ed, rp, rp->part->name));
352 }
353
354 if (EINA_UNLIKELY(pd->temp))
355 {
356 /* warn about misuse, since non-implemented functions may trigger this
357 * misuse by accident. */
358 ERR("Misuse of efl_part detected. Handles returned by efl_part() are "
359 "valid for a single function call! Did you call a non implemented "
360 "function?");
361 }
362 proxy = _table_proxy;
363 _table_proxy = NULL;
364 efl_canvas_layout_internal_table_real_part_set(proxy, ed, rp, rp->part->name);
365 return proxy;
366}
367
368EOLIAN static void
369_efl_canvas_layout_internal_table_real_part_set(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, void *ed, void *rp, const char *part)
370{
371 pd->ed = ed;
372 pd->rp = rp;
373 pd->part = part;
374 pd->temp = 1;
375 eo_del_intercept_set(obj, _table_del_cb);
376 eo_parent_set(obj, pd->ed->obj);
377}
378
379EOLIAN static Eo_Base *
380_efl_canvas_layout_internal_table_eo_base_finalize(Eo *obj, Edje_Table_Data *pd)
381{
382 EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL);
383 return eo_finalize(eo_super(obj, TABLE_CLASS));
384}
385
386EOLIAN static Eina_Iterator * 339EOLIAN static Eina_Iterator *
387_efl_canvas_layout_internal_table_efl_container_content_iterate(Eo *obj, Edje_Table_Data *pd) 340_efl_canvas_layout_internal_table_efl_container_content_iterate(Eo *obj, Edje_Table_Data *pd)
388{ 341{
@@ -546,6 +499,29 @@ _efl_canvas_layout_internal_table_efl_pack_grid_grid_position_get(Eo *obj, Edje_
546 RETURN_VAL(ret); 499 RETURN_VAL(ret);
547} 500}
548 501
502/* Swallow parts */
503EOLIAN static Efl_Gfx *
504_efl_canvas_layout_internal_swallow_efl_container_content_get(Eo *obj, Edje_Swallow_Data *pd)
505{
506 RETURN_VAL(_edje_efl_container_content_get(pd->ed, pd->part));
507}
508
509EOLIAN static Eina_Bool
510_efl_canvas_layout_internal_swallow_efl_container_content_set(Eo *obj, Edje_Swallow_Data *pd, Efl_Gfx *content)
511{
512 RETURN_VAL(_edje_efl_container_content_set(pd->ed, pd->part, content));
513}
514
515EOLIAN static Efl_Gfx *
516_efl_canvas_layout_internal_swallow_efl_container_content_unset(Eo *obj, Edje_Swallow_Data *pd)
517{
518 Efl_Gfx *content = _edje_efl_container_content_get(pd->ed, pd->part);
519 if (!content) RETURN_VAL(NULL);
520 PROXY_CALL(efl_content_remove(obj, content));
521 RETURN_VAL(content);
522}
523
524
549/* Legacy API implementation */ 525/* Legacy API implementation */
550 526
551#ifdef DEGUG 527#ifdef DEGUG
@@ -681,5 +657,7 @@ edje_object_part_table_clear(Edje_Object *obj, const char *part, Eina_Bool clear
681 return efl_pack_unpack_all(table); 657 return efl_pack_unpack_all(table);
682} 658}
683 659
660#include "efl_canvas_layout_internal.eo.c"
684#include "efl_canvas_layout_internal_box.eo.c" 661#include "efl_canvas_layout_internal_box.eo.c"
685#include "efl_canvas_layout_internal_table.eo.c" 662#include "efl_canvas_layout_internal_table.eo.c"
663#include "efl_canvas_layout_internal_swallow.eo.c"
diff --git a/src/lib/edje/edje_object.eo b/src/lib/edje/edje_object.eo
index d79cd9338a..dedd11f64d 100644
--- a/src/lib/edje/edje_object.eo
+++ b/src/lib/edje/edje_object.eo
@@ -2000,9 +2000,6 @@ class Edje.Object (Evas.Smart.Clipped, Efl.File, Efl.Container, Efl.Part)
2000 Efl.File.file.get; 2000 Efl.File.file.get;
2001 Efl.File.mmap.set; 2001 Efl.File.mmap.set;
2002 Efl.File.mmap.get; 2002 Efl.File.mmap.get;
2003 Efl.Container.content.set;
2004 Efl.Container.content.get;
2005 Efl.Container.content_unset;
2006 Efl.Container.content_remove; 2003 Efl.Container.content_remove;
2007 Efl.Container.content_part_name.get; 2004 Efl.Container.content_part_name.get;
2008 Efl.Part.part; 2005 Efl.Part.part;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index d307ea6974..05b0b6480d 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -2959,6 +2959,11 @@ Eina_Bool _edje_part_table_unpack(Edje *ed, const char *part, Evas_Object *child
2959Eina_Bool _edje_part_table_col_row_size_get(Edje *ed, const char *part, int *cols, int *rows); 2959Eina_Bool _edje_part_table_col_row_size_get(Edje *ed, const char *part, int *cols, int *rows);
2960Eina_Bool _edje_part_table_clear(Edje *ed, const char *part, Eina_Bool clear); 2960Eina_Bool _edje_part_table_clear(Edje *ed, const char *part, Eina_Bool clear);
2961 2961
2962/* part containers: swallow */
2963Eo *_edje_swallow_internal_proxy_get(Edje_Object *obj, Edje *ed, Edje_Real_Part *rp);
2964Efl_Gfx *_edje_efl_container_content_get(Edje *ed, const char *part);
2965Eina_Bool _edje_efl_container_content_set(Edje *ed, const char *part, Efl_Gfx *obj_swallow);
2966
2962void _edje_internal_proxy_shutdown(void); 2967void _edje_internal_proxy_shutdown(void);
2963 2968
2964#ifdef HAVE_LIBREMIX 2969#ifdef HAVE_LIBREMIX
diff --git a/src/lib/edje/edje_util.c b/src/lib/edje/edje_util.c
index a01eda4112..ad87ef7da4 100644
--- a/src/lib/edje/edje_util.c
+++ b/src/lib/edje/edje_util.c
@@ -3511,9 +3511,8 @@ _edje_object_text_markup_filter_callback_del_full(Eo *obj EINA_UNUSED, Edje *ed,
3511 return NULL; 3511 return NULL;
3512} 3512}
3513 3513
3514EOLIAN Eina_Bool 3514Eina_Bool
3515_edje_object_efl_container_content_set(Eo *obj EINA_UNUSED, Edje *ed, 3515_edje_efl_container_content_set(Edje *ed, const char *part, Efl_Gfx *obj_swallow)
3516 const char *part, Efl_Gfx *obj_swallow)
3517{ 3516{
3518 Edje_Real_Part *rp, *rpcur; 3517 Edje_Real_Part *rp, *rpcur;
3519 Edje_User_Defined *eud = NULL; 3518 Edje_User_Defined *eud = NULL;
@@ -3872,8 +3871,8 @@ _edje_object_efl_container_content_remove(Eo *obj EINA_UNUSED, Edje *ed, Evas_Ob
3872 return EINA_TRUE; 3871 return EINA_TRUE;
3873} 3872}
3874 3873
3875EOLIAN Efl_Gfx * 3874Efl_Gfx *
3876_edje_object_efl_container_content_get(Eo *obj EINA_UNUSED, Edje *ed, const char *part) 3875_edje_efl_container_content_get(Edje *ed, const char *part)
3877{ 3876{
3878 Edje_Real_Part *rp; 3877 Edje_Real_Part *rp;
3879 3878
@@ -3897,21 +3896,6 @@ _edje_object_efl_container_content_get(Eo *obj EINA_UNUSED, Edje *ed, const char
3897} 3896}
3898 3897
3899/* new in eo */ 3898/* new in eo */
3900EOLIAN Efl_Gfx *
3901_edje_object_efl_container_content_unset(Eo *obj, Edje *ed EINA_UNUSED, const char *part)
3902{
3903 Efl_Gfx *content;
3904
3905 content = efl_content_get(obj, part);
3906 if (!content) return NULL;
3907
3908 if (efl_content_remove(obj, content))
3909 return content;
3910
3911 return NULL;
3912}
3913
3914/* new in eo */
3915EOLIAN const char * 3899EOLIAN const char *
3916_edje_object_efl_container_content_part_name_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Efl_Gfx *content) 3900_edje_object_efl_container_content_part_name_get(Eo *obj EINA_UNUSED, Edje *ed EINA_UNUSED, Efl_Gfx *content)
3917{ 3901{
@@ -3940,6 +3924,8 @@ _edje_object_efl_part_part(Eo *obj, Edje *ed, const char *part)
3940 return _edje_box_internal_proxy_get(obj, ed, rp); 3924 return _edje_box_internal_proxy_get(obj, ed, rp);
3941 else if (rp->part->type == EDJE_PART_TYPE_TABLE) 3925 else if (rp->part->type == EDJE_PART_TYPE_TABLE)
3942 return _edje_table_internal_proxy_get(obj, ed, rp); 3926 return _edje_table_internal_proxy_get(obj, ed, rp);
3927 else if (rp->part->type == EDJE_PART_TYPE_SWALLOW)
3928 return _edje_swallow_internal_proxy_get(obj, ed, rp);
3943 else return NULL; /* FIXME/TODO: text & others (color, ...) */ 3929 else return NULL; /* FIXME/TODO: text & others (color, ...) */
3944} 3930}
3945 3931
@@ -6822,7 +6808,7 @@ _edje_part_mask_flags_set(Edje *ed EINA_UNUSED, Edje_Real_Part *rp, Evas_Event_F
6822EAPI Eina_Bool 6808EAPI Eina_Bool
6823edje_object_part_swallow(Edje_Object *obj, const char *part, Evas_Object *obj_swallow) 6809edje_object_part_swallow(Edje_Object *obj, const char *part, Evas_Object *obj_swallow)
6824{ 6810{
6825 return efl_content_set(obj, part, obj_swallow); 6811 return efl_content_set(efl_part(obj, part), obj_swallow);
6826} 6812}
6827 6813
6828EAPI void 6814EAPI void
@@ -6834,7 +6820,7 @@ edje_object_part_unswallow(Edje_Object *obj, Evas_Object *obj_swallow)
6834EAPI Evas_Object * 6820EAPI Evas_Object *
6835edje_object_part_swallow_get(const Edje_Object *obj, const char *part) 6821edje_object_part_swallow_get(const Edje_Object *obj, const char *part)
6836{ 6822{
6837 return efl_content_get(obj, part); 6823 return efl_content_get(efl_part(obj, part));
6838} 6824}
6839 6825
6840/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/ 6826/* vim:set ts=8 sw=3 sts=3 expandtab cino=>5n-2f0^-2{2(0W1st0 :*/
diff --git a/src/lib/edje/efl_canvas_layout_internal.eo b/src/lib/edje/efl_canvas_layout_internal.eo
new file mode 100644
index 0000000000..38ff692a95
--- /dev/null
+++ b/src/lib/edje/efl_canvas_layout_internal.eo
@@ -0,0 +1,15 @@
1interface Efl.Canvas.Layout_Internal ()
2{
3 [[Internal APIs used by Edje part objects.]]
4 eo_prefix: _edje;
5 methods {
6 @property real_part @protected {
7 set {}
8 values {
9 ed: void*;
10 rp: void*;
11 part: const(char)*;
12 }
13 }
14 }
15}
diff --git a/src/lib/edje/efl_canvas_layout_internal_box.eo b/src/lib/edje/efl_canvas_layout_internal_box.eo
index 48284b901a..a84499d26a 100644
--- a/src/lib/edje/efl_canvas_layout_internal_box.eo
+++ b/src/lib/edje/efl_canvas_layout_internal_box.eo
@@ -1,23 +1,14 @@
1class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Pack.Linear) 1class Efl.Canvas.Layout_Internal.Box (Eo.Base, Efl.Canvas.Layout_Internal, Efl.Pack.Linear)
2{ 2{
3 [[Represents a Box created as part of a layout. 3 [[Represents a Box created as part of a layout.
4 4
5 Can not be deleted, this is only a representation of an internal object 5 Its lifetime is limited to one function call only, unless an extra
6 of an EFL layout. 6 reference is explicitely held.
7 ]] 7 ]]
8 data: Edje_Box_Data; 8 data: Edje_Box_Data;
9 methods {
10 @property real_part @protected {
11 set {}
12 values {
13 ed: void*;
14 rp: void*;
15 part: const(char)*;
16 }
17 }
18 }
19 implements { 9 implements {
20 Eo.Base.finalize; 10 Eo.Base.finalize;
11 Efl.Canvas.Layout_Internal.real_part.set;
21 Efl.Container.content_iterate; 12 Efl.Container.content_iterate;
22 Efl.Container.content_count; 13 Efl.Container.content_count;
23 Efl.Container.content_remove; 14 Efl.Container.content_remove;
diff --git a/src/lib/edje/efl_canvas_layout_internal_swallow.eo b/src/lib/edje/efl_canvas_layout_internal_swallow.eo
new file mode 100644
index 0000000000..dbfc694c6a
--- /dev/null
+++ b/src/lib/edje/efl_canvas_layout_internal_swallow.eo
@@ -0,0 +1,16 @@
1class Efl.Canvas.Layout_Internal.Swallow (Eo.Base, Efl.Canvas.Layout_Internal, Efl.Container)
2{
3 [[Represents a SWALLOW part of an Edje object.
4
5 Its lifetime is limited to one function call only, unless an extra
6 reference is explicitely held.
7 ]]
8 data: Edje_Swallow_Data;
9 implements {
10 Eo.Base.finalize;
11 Efl.Canvas.Layout_Internal.real_part.set;
12 Efl.Container.content.get;
13 Efl.Container.content.set;
14 Efl.Container.content_unset;
15 }
16}
diff --git a/src/lib/edje/efl_canvas_layout_internal_table.eo b/src/lib/edje/efl_canvas_layout_internal_table.eo
index ddebbc9ce6..b52a244c42 100644
--- a/src/lib/edje/efl_canvas_layout_internal_table.eo
+++ b/src/lib/edje/efl_canvas_layout_internal_table.eo
@@ -1,4 +1,4 @@
1class Efl.Canvas.Layout_Internal.Table (Eo.Base, Efl.Pack.Grid) 1class Efl.Canvas.Layout_Internal.Table (Eo.Base, Efl.Canvas.Layout_Internal, Efl.Pack.Grid)
2{ 2{
3 [[Represents a Table created as part of a layout. 3 [[Represents a Table created as part of a layout.
4 4
@@ -6,18 +6,9 @@ class Efl.Canvas.Layout_Internal.Table (Eo.Base, Efl.Pack.Grid)
6 of an EFL layout. 6 of an EFL layout.
7 ]] 7 ]]
8 data: Edje_Table_Data; 8 data: Edje_Table_Data;
9 methods {
10 @property real_part @protected {
11 set {}
12 values {
13 ed: void*;
14 rp: void*;
15 part: const(char)*;
16 }
17 }
18 }
19 implements { 9 implements {
20 Eo.Base.finalize; 10 Eo.Base.finalize;
11 Efl.Canvas.Layout_Internal.real_part.set;
21 Efl.Container.content_iterate; 12 Efl.Container.content_iterate;
22 Efl.Container.content_count; 13 Efl.Container.content_count;
23 Efl.Container.content_remove; 14 Efl.Container.content_remove;
diff --git a/src/lib/efl/interfaces/efl_container.eo b/src/lib/efl/interfaces/efl_container.eo
index a64c8f8500..f66c128102 100644
--- a/src/lib/efl/interfaces/efl_container.eo
+++ b/src/lib/efl/interfaces/efl_container.eo
@@ -4,19 +4,6 @@ interface Efl.Container (Efl.Gfx)
4 eo_prefix: efl_content; 4 eo_prefix: efl_content;
5 event_prefix: efl_container; 5 event_prefix: efl_container;
6 methods { 6 methods {
7 @property content {
8 [[Swallowed sub-object contained in this object.]]
9 set {
10 return: bool;
11 }
12 get {}
13 keys {
14 part: const(char)*; [[the part in which to swallow the object]]
15 }
16 values {
17 content: Efl.Gfx; [[the object to swallow.]]
18 }
19 }
20 @property content_part_name { 7 @property content_part_name {
21 [[The name of the part under which an object is swallowed.]] 8 [[The name of the part under which an object is swallowed.]]
22 get {} 9 get {}
@@ -27,11 +14,18 @@ interface Efl.Container (Efl.Gfx)
27 name: const(char)*; 14 name: const(char)*;
28 } 15 }
29 } 16 }
30 content_unset { 17 @property content {
31 [[Unswallow the object in the given part of the container and return it.]] 18 [[Swallowed sub-object contained in this object.]]
32 params { 19 set {
33 @in name: const(char)* @nullable; 20 return: bool;
34 } 21 }
22 get {}
23 values {
24 content: Efl.Gfx; [[the object to swallow.]]
25 }
26 }
27 content_unset {
28 [[Unswallow the object in the current container and return it.]]
35 return: Efl.Gfx; 29 return: Efl.Gfx;
36 } 30 }
37 content_remove { 31 content_remove {
diff --git a/src/lib/elementary/elc_ctxpopup.c b/src/lib/elementary/elc_ctxpopup.c
index 4e227c81a7..4e070fd481 100644
--- a/src/lib/elementary/elc_ctxpopup.c
+++ b/src/lib/elementary/elc_ctxpopup.c
@@ -13,6 +13,9 @@
13#include "elm_priv.h" 13#include "elm_priv.h"
14#include "elm_widget_ctxpopup.h" 14#include "elm_widget_ctxpopup.h"
15 15
16#include "elm_ctxpopup_internal_part.eo.h"
17#include "elm_part_helper.h"
18
16#define MY_CLASS ELM_CTXPOPUP_CLASS 19#define MY_CLASS ELM_CTXPOPUP_CLASS
17 20
18#define MY_CLASS_NAME "Elm_Ctxpopup" 21#define MY_CLASS_NAME "Elm_Ctxpopup"
@@ -772,15 +775,12 @@ _elm_ctxpopup_elm_widget_theme_apply(Eo *obj, Elm_Ctxpopup_Data *sd)
772 775
773/* kind of a big and tricky override here: an internal box will hold 776/* kind of a big and tricky override here: an internal box will hold
774 * the actual content. content aliases won't be of much help here */ 777 * the actual content. content aliases won't be of much help here */
775EOLIAN static Eina_Bool 778static Eina_Bool
776_elm_ctxpopup_efl_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part, Evas_Object *content) 779_elm_ctxpopup_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part, Evas_Object *content)
777{ 780{
778 Eina_Bool int_ret = EINA_TRUE;
779
780 if ((part) && (strcmp(part, "default"))) 781 if ((part) && (strcmp(part, "default")))
781 { 782 {
782 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 783 return efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
783 return int_ret;
784 } 784 }
785 785
786 if (!content) return EINA_FALSE; 786 if (!content) return EINA_FALSE;
@@ -806,30 +806,22 @@ _elm_ctxpopup_efl_container_content_set(Eo *obj, Elm_Ctxpopup_Data *sd, const ch
806 return EINA_TRUE; 806 return EINA_TRUE;
807} 807}
808 808
809EOLIAN static Evas_Object* 809static Evas_Object*
810_elm_ctxpopup_efl_container_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) 810_elm_ctxpopup_content_get(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part)
811{ 811{
812
813 if ((part) && (strcmp(part, "default"))) 812 if ((part) && (strcmp(part, "default")))
814 { 813 return efl_content_get(efl_part(eo_super(obj, MY_CLASS), part));
815 Evas_Object *ret = NULL;
816 ret = efl_content_get(eo_super(obj, MY_CLASS), part);
817 return ret;
818 }
819 814
820 return sd->content; 815 return sd->content;
821} 816}
822 817
823EOLIAN static Evas_Object* 818static Evas_Object*
824_elm_ctxpopup_efl_container_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part) 819_elm_ctxpopup_content_unset(Eo *obj, Elm_Ctxpopup_Data *sd, const char *part)
825{ 820{
826 Evas_Object *content = NULL; 821 Evas_Object *content = NULL;
827 822
828 if ((part) && (strcmp(part, "default"))) 823 if ((part) && (strcmp(part, "default")))
829 { 824 return efl_content_unset(efl_part(eo_super(obj, MY_CLASS), part));
830 content = efl_content_unset(eo_super(obj, MY_CLASS), part);
831 return content;
832 }
833 825
834 content = sd->content; 826 content = sd->content;
835 if (!content) return content; 827 if (!content) return content;
@@ -1131,7 +1123,7 @@ _elm_ctxpopup_evas_object_smart_add(Eo *obj, Elm_Ctxpopup_Data *priv)
1131 (priv->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj); 1123 (priv->box, EVAS_CALLBACK_RESIZE, _on_content_resized, obj);
1132 1124
1133 /* box will be our content placeholder, thus the parent's version call */ 1125 /* box will be our content placeholder, thus the parent's version call */
1134 efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.content", priv->box); 1126 efl_content_set(efl_part(eo_super(obj, MY_CLASS), "elm.swallow.content"), priv->box);
1135 1127
1136 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL); 1128 evas_object_event_callback_add(obj, EVAS_CALLBACK_SHOW, _on_show, NULL);
1137 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL); 1129 evas_object_event_callback_add(obj, EVAS_CALLBACK_HIDE, _on_hide, NULL);
@@ -1482,5 +1474,15 @@ _elm_ctxpopup_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Ctxpopup
1482 return ret; 1474 return ret;
1483} 1475}
1484 1476
1477/* Efl.Part begin */
1478
1479ELM_PART_OVERRIDE(elm_ctxpopup, ELM_CTXPOPUP, ELM_LAYOUT, Elm_Ctxpopup_Data, Elm_Part_Data)
1480ELM_PART_OVERRIDE_CONTENT_SET(elm_ctxpopup, ELM_CTXPOPUP, ELM_LAYOUT, Elm_Ctxpopup_Data, Elm_Part_Data)
1481ELM_PART_OVERRIDE_CONTENT_GET(elm_ctxpopup, ELM_CTXPOPUP, ELM_LAYOUT, Elm_Ctxpopup_Data, Elm_Part_Data)
1482ELM_PART_OVERRIDE_CONTENT_UNSET(elm_ctxpopup, ELM_CTXPOPUP, ELM_LAYOUT, Elm_Ctxpopup_Data, Elm_Part_Data)
1483#include "elm_ctxpopup_internal_part.eo.c"
1484
1485/* Efl.Part end */
1486
1485#include "elm_ctxpopup_item.eo.c" 1487#include "elm_ctxpopup_item.eo.c"
1486#include "elm_ctxpopup.eo.c" 1488#include "elm_ctxpopup.eo.c"
diff --git a/src/lib/elementary/elc_fileselector_entry.c b/src/lib/elementary/elc_fileselector_entry.c
index f4ad6d7dc8..1941eb88ac 100644
--- a/src/lib/elementary/elc_fileselector_entry.c
+++ b/src/lib/elementary/elc_fileselector_entry.c
@@ -10,6 +10,9 @@
10#include "elm_interface_fileselector.h" 10#include "elm_interface_fileselector.h"
11#include "elm_widget_fileselector_entry.h" 11#include "elm_widget_fileselector_entry.h"
12 12
13#include "elm_fileselector_entry_internal_part.eo.h"
14#include "elm_part_helper.h"
15
13#define MY_CLASS ELM_FILESELECTOR_ENTRY_CLASS 16#define MY_CLASS ELM_FILESELECTOR_ENTRY_CLASS
14 17
15#define MY_CLASS_NAME "Elm_Fileselector_Entry" 18#define MY_CLASS_NAME "Elm_Fileselector_Entry"
@@ -230,12 +233,12 @@ _elm_fileselector_entry_elm_layout_text_get(Eo *obj, Elm_Fileselector_Entry_Data
230 return elm_object_text_get(sd->button); 233 return elm_object_text_get(sd->button);
231} 234}
232 235
233EOLIAN static Eina_Bool 236static Eina_Bool
234_elm_fileselector_entry_efl_container_content_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, Evas_Object *content) 237_elm_fileselector_entry_content_set(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part, Evas_Object *content)
235{ 238{
236 if (part && strcmp(part, "button icon")) 239 if (part && strcmp(part, "button icon"))
237 { 240 {
238 return efl_content_set(eo_super(obj, MY_CLASS), part, content); 241 return efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
239 } 242 }
240 243
241 elm_layout_content_set(sd->button, NULL, content); 244 elm_layout_content_set(sd->button, NULL, content);
@@ -243,23 +246,23 @@ _elm_fileselector_entry_efl_container_content_set(Eo *obj, Elm_Fileselector_Entr
243 return EINA_TRUE; 246 return EINA_TRUE;
244} 247}
245 248
246EOLIAN static Evas_Object * 249static Evas_Object *
247_elm_fileselector_entry_efl_container_content_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) 250_elm_fileselector_entry_content_get(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part)
248{ 251{
249 if (part && strcmp(part, "button icon")) 252 if (part && strcmp(part, "button icon"))
250 { 253 {
251 return efl_content_get(eo_super(obj, MY_CLASS), part); 254 return efl_content_get(efl_part(eo_super(obj, MY_CLASS), part));
252 } 255 }
253 256
254 return elm_layout_content_get(sd->button, NULL); 257 return elm_layout_content_get(sd->button, NULL);
255} 258}
256 259
257EOLIAN static Evas_Object * 260static Evas_Object *
258_elm_fileselector_entry_efl_container_content_unset(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part) 261_elm_fileselector_entry_content_unset(Eo *obj, Elm_Fileselector_Entry_Data *sd, const char *part)
259{ 262{
260 if (part && strcmp(part, "button icon")) 263 if (part && strcmp(part, "button icon"))
261 { 264 {
262 return efl_content_unset(eo_super(obj, MY_CLASS), part); 265 return efl_content_unset(efl_part(eo_super(obj, MY_CLASS), part));
263 } 266 }
264 267
265 return elm_layout_content_unset(sd->button, NULL); 268 return elm_layout_content_unset(sd->button, NULL);
@@ -550,4 +553,14 @@ _elm_fileselector_entry_class_constructor(Eo_Class *klass)
550 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 553 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
551} 554}
552 555
556/* Efl.Part begin */
557
558ELM_PART_OVERRIDE(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, ELM_LAYOUT, Elm_Fileselector_Entry_Data, Elm_Part_Data)
559ELM_PART_OVERRIDE_CONTENT_SET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, ELM_LAYOUT, Elm_Fileselector_Entry_Data, Elm_Part_Data)
560ELM_PART_OVERRIDE_CONTENT_GET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, ELM_LAYOUT, Elm_Fileselector_Entry_Data, Elm_Part_Data)
561ELM_PART_OVERRIDE_CONTENT_UNSET(elm_fileselector_entry, ELM_FILESELECTOR_ENTRY, ELM_LAYOUT, Elm_Fileselector_Entry_Data, Elm_Part_Data)
562#include "elm_fileselector_entry_internal_part.eo.c"
563
564/* Efl.Part end */
565
553#include "elm_fileselector_entry.eo.c" 566#include "elm_fileselector_entry.eo.c"
diff --git a/src/lib/elementary/elc_naviframe.c b/src/lib/elementary/elc_naviframe.c
index c5865dc228..0728eceeaa 100644
--- a/src/lib/elementary/elc_naviframe.c
+++ b/src/lib/elementary/elc_naviframe.c
@@ -11,6 +11,9 @@
11#include "elm_widget_naviframe.h" 11#include "elm_widget_naviframe.h"
12#include "elm_widget_container.h" 12#include "elm_widget_container.h"
13 13
14#include "elm_naviframe_internal_part.eo.h"
15#include "elm_part_helper.h"
16
14#define MY_CLASS ELM_NAVIFRAME_CLASS 17#define MY_CLASS ELM_NAVIFRAME_CLASS
15 18
16#define MY_CLASS_NAME "Elm_Naviframe" 19#define MY_CLASS_NAME "Elm_Naviframe"
@@ -1043,8 +1046,8 @@ _elm_naviframe_elm_layout_text_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED,
1043 1046
1044/* we have to keep a "manual" set here because of the callbacks on the 1047/* we have to keep a "manual" set here because of the callbacks on the
1045 * children */ 1048 * children */
1046EOLIAN static Eina_Bool 1049static Eina_Bool
1047_elm_naviframe_efl_container_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part, Evas_Object *content) 1050_elm_naviframe_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part, Evas_Object *content)
1048{ 1051{
1049 Elm_Object_Item *it; 1052 Elm_Object_Item *it;
1050 1053
@@ -1059,8 +1062,8 @@ _elm_naviframe_efl_container_content_set(Eo *obj, Elm_Naviframe_Data *sd EINA_UN
1059 return EINA_FALSE; 1062 return EINA_FALSE;
1060} 1063}
1061 1064
1062EOLIAN static Evas_Object* 1065static Evas_Object*
1063_elm_naviframe_efl_container_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) 1066_elm_naviframe_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part)
1064{ 1067{
1065 Elm_Object_Item *it = elm_naviframe_top_item_get(obj); 1068 Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
1066 1069
@@ -1069,8 +1072,8 @@ _elm_naviframe_efl_container_content_get(Eo *obj, Elm_Naviframe_Data *sd EINA_UN
1069 return elm_object_item_part_content_get(it, part); 1072 return elm_object_item_part_content_get(it, part);
1070} 1073}
1071 1074
1072EOLIAN static Evas_Object* 1075static Evas_Object*
1073_elm_naviframe_efl_container_content_unset(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part) 1076_elm_naviframe_content_unset(Eo *obj, Elm_Naviframe_Data *sd EINA_UNUSED, const char *part)
1074{ 1077{
1075 Elm_Object_Item *it = elm_naviframe_top_item_get(obj); 1078 Elm_Object_Item *it = elm_naviframe_top_item_get(obj);
1076 1079
@@ -2003,5 +2006,15 @@ _elm_naviframe_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UN
2003 return &atspi_actions[0]; 2006 return &atspi_actions[0];
2004} 2007}
2005 2008
2009/* Efl.Part begin */
2010
2011ELM_PART_OVERRIDE(elm_naviframe, ELM_NAVIFRAME, ELM_LAYOUT, Elm_Naviframe_Data, Elm_Part_Data)
2012ELM_PART_OVERRIDE_CONTENT_SET(elm_naviframe, ELM_NAVIFRAME, ELM_LAYOUT, Elm_Naviframe_Data, Elm_Part_Data)
2013ELM_PART_OVERRIDE_CONTENT_GET(elm_naviframe, ELM_NAVIFRAME, ELM_LAYOUT, Elm_Naviframe_Data, Elm_Part_Data)
2014ELM_PART_OVERRIDE_CONTENT_UNSET(elm_naviframe, ELM_NAVIFRAME, ELM_LAYOUT, Elm_Naviframe_Data, Elm_Part_Data)
2015#include "elm_naviframe_internal_part.eo.c"
2016
2017/* Efl.Part end */
2018
2006#include "elm_naviframe_item.eo.c" 2019#include "elm_naviframe_item.eo.c"
2007#include "elm_naviframe.eo.c" 2020#include "elm_naviframe.eo.c"
diff --git a/src/lib/elementary/elc_player.c b/src/lib/elementary/elc_player.c
index 5c2cf73a99..16e3dfc2bc 100644
--- a/src/lib/elementary/elc_player.c
+++ b/src/lib/elementary/elc_player.c
@@ -12,6 +12,9 @@
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13#include "elm_widget_player.h" 13#include "elm_widget_player.h"
14 14
15#include "elm_player_internal_part.eo.h"
16#include "elm_part_helper.h"
17
15#define MY_CLASS ELM_PLAYER_CLASS 18#define MY_CLASS ELM_PLAYER_CLASS
16 19
17#define MY_CLASS_NAME "Elm_Player" 20#define MY_CLASS_NAME "Elm_Player"
@@ -576,8 +579,8 @@ _str_free(char *data)
576 * treating this special case here and delegating other objects to own 579 * treating this special case here and delegating other objects to own
577 * layout */ 580 * layout */
578 581
579EOLIAN static Eina_Bool 582static Eina_Bool
580_elm_player_efl_container_content_set(Eo *obj, Elm_Player_Data *sd, const char *part, Evas_Object *content) 583_elm_player_content_set(Eo *obj, Elm_Player_Data *sd, const char *part, Evas_Object *content)
581{ 584{
582 Eina_Bool int_ret = EINA_FALSE; 585 Eina_Bool int_ret = EINA_FALSE;
583 double pos, length; 586 double pos, length;
@@ -585,11 +588,11 @@ _elm_player_efl_container_content_set(Eo *obj, Elm_Player_Data *sd, const char *
585 588
586 if (part && strcmp(part, "video")) 589 if (part && strcmp(part, "video"))
587 { 590 {
588 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 591 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
589 return int_ret; 592 return int_ret;
590 } 593 }
591 if ((!part) || (!strcmp(part, "video"))) part = "elm.swallow.content"; 594 if ((!part) || (!strcmp(part, "video"))) part = "elm.swallow.content";
592 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 595 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
593 596
594 if (!_elm_video_check(content)) return EINA_FALSE; 597 if (!_elm_video_check(content)) return EINA_FALSE;
595 if (sd->video == content) goto end; 598 if (sd->video == content) goto end;
@@ -641,6 +644,7 @@ end:
641 return EINA_TRUE; 644 return EINA_TRUE;
642} 645}
643 646
647
644EOLIAN static void 648EOLIAN static void
645_elm_player_evas_object_smart_add(Eo *obj, Elm_Player_Data *priv) 649_elm_player_evas_object_smart_add(Eo *obj, Elm_Player_Data *priv)
646{ 650{
@@ -714,8 +718,7 @@ EAPI Evas_Object *
714elm_player_add(Evas_Object *parent) 718elm_player_add(Evas_Object *parent)
715{ 719{
716 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL); 720 EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
717 Evas_Object *obj = eo_add(MY_CLASS, parent); 721 return eo_add(MY_CLASS, parent);
718 return obj;
719} 722}
720 723
721EOLIAN static Eo * 724EOLIAN static Eo *
@@ -747,4 +750,12 @@ _elm_player_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSE
747 return &atspi_actions[0]; 750 return &atspi_actions[0];
748} 751}
749 752
753/* Efl.Part implementation */
754
755ELM_PART_OVERRIDE(elm_player, ELM_PLAYER, ELM_LAYOUT, Elm_Player_Data, Elm_Part_Data)
756ELM_PART_OVERRIDE_CONTENT_SET(elm_player, ELM_PLAYER, ELM_LAYOUT, Elm_Player_Data, Elm_Part_Data)
757#include "elm_player_internal_part.eo.c"
758
759/* End of Efl.Part */
760
750#include "elm_player.eo.c" 761#include "elm_player.eo.c"
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index c5c57e56f9..7eaf31c284 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -13,6 +13,9 @@
13 13
14#include "elm_popup_item.eo.h" 14#include "elm_popup_item.eo.h"
15 15
16#include "elm_popup_internal_part.eo.h"
17#include "elm_part_helper.h"
18
16#define MY_CLASS ELM_POPUP_CLASS 19#define MY_CLASS ELM_POPUP_CLASS
17 20
18#define MY_CLASS_NAME "Elm_Popup" 21#define MY_CLASS_NAME "Elm_Popup"
@@ -527,7 +530,7 @@ _elm_popup_elm_widget_sub_object_del(Eo *obj, Elm_Popup_Data *sd, Evas_Object *s
527 { 530 {
528 if (sobj == it->icon) 531 if (sobj == it->icon)
529 { 532 {
530 efl_content_unset(VIEW(it), CONTENT_PART); 533 efl_content_unset(efl_part(VIEW(it), CONTENT_PART));
531 elm_layout_signal_emit(VIEW(it), 534 elm_layout_signal_emit(VIEW(it),
532 "elm,state,item,icon,hidden", "elm"); 535 "elm,state,item,icon,hidden", "elm");
533 it->icon = NULL; 536 it->icon = NULL;
@@ -672,8 +675,8 @@ _create_scroller(Evas_Object *obj)
672 _on_table_del, obj); 675 _on_table_del, obj);
673 if (!sd->scroll) 676 if (!sd->scroll)
674 { 677 {
675 efl_content_set(sd->content_area, CONTENT_PART, sd->tbl); 678 efl_content_set(efl_part(sd->content_area, CONTENT_PART), sd->tbl);
676 efl_content_set(sd->main_layout, CONTENT_PART, sd->content_area); 679 efl_content_set(efl_part(sd->main_layout, CONTENT_PART), sd->content_area);
677 } 680 }
678 681
679 //spacer 682 //spacer
@@ -789,7 +792,7 @@ _item_icon_set(Elm_Popup_Item_Data *it,
789 { 792 {
790 elm_widget_sub_object_add(WIDGET(it), it->icon); 793 elm_widget_sub_object_add(WIDGET(it), it->icon);
791 evas_object_data_set(it->icon, "_popup_icon_parent_item", it); 794 evas_object_data_set(it->icon, "_popup_icon_parent_item", it);
792 efl_content_set(VIEW(it), CONTENT_PART, it->icon); 795 efl_content_set(efl_part(VIEW(it), CONTENT_PART), it->icon);
793 elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,visible", "elm"); 796 elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,visible", "elm");
794 } 797 }
795 else 798 else
@@ -833,7 +836,7 @@ _item_icon_unset(Elm_Popup_Item_Data *it)
833 if (!it->icon) return NULL; 836 if (!it->icon) return NULL;
834 elm_widget_sub_object_del(WIDGET(it), icon); 837 elm_widget_sub_object_del(WIDGET(it), icon);
835 evas_object_data_del(icon, "_popup_icon_parent_item"); 838 evas_object_data_del(icon, "_popup_icon_parent_item");
836 efl_content_unset(VIEW(it), CONTENT_PART); 839 efl_content_unset(efl_part(VIEW(it), CONTENT_PART));
837 elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,hidden", "elm"); 840 elm_layout_signal_emit(VIEW(it), "elm,state,item,icon,hidden", "elm");
838 it->icon = NULL; 841 it->icon = NULL;
839 842
@@ -1005,7 +1008,7 @@ _content_text_set(Evas_Object *obj,
1005 else 1008 else
1006 { 1009 {
1007 if (!sd->scroll) 1010 if (!sd->scroll)
1008 efl_content_set(sd->main_layout, CONTENT_PART, sd->content_area); 1011 efl_content_set(efl_part(sd->main_layout, CONTENT_PART), sd->content_area);
1009 else 1012 else
1010 elm_object_content_set(sd->scr, sd->content_area); 1013 elm_object_content_set(sd->scr, sd->content_area);
1011 } 1014 }
@@ -1013,7 +1016,7 @@ _content_text_set(Evas_Object *obj,
1013 1016
1014 if (sd->text_content_obj) 1017 if (sd->text_content_obj)
1015 { 1018 {
1016 sd->text_content_obj = efl_content_unset(sd->content_area, CONTENT_PART); 1019 sd->text_content_obj = efl_content_unset(efl_part(sd->content_area, CONTENT_PART));
1017 evas_object_del(sd->text_content_obj); 1020 evas_object_del(sd->text_content_obj);
1018 sd->text_content_obj = NULL; 1021 sd->text_content_obj = NULL;
1019 } 1022 }
@@ -1032,7 +1035,7 @@ _content_text_set(Evas_Object *obj,
1032 evas_object_size_hint_align_set 1035 evas_object_size_hint_align_set
1033 (sd->text_content_obj, EVAS_HINT_FILL, EVAS_HINT_FILL); 1036 (sd->text_content_obj, EVAS_HINT_FILL, EVAS_HINT_FILL);
1034 efl_content_set 1037 efl_content_set
1035 (sd->content_area, CONTENT_PART, sd->text_content_obj); 1038 (efl_part(sd->content_area, CONTENT_PART), sd->text_content_obj);
1036 1039
1037 /* access */ 1040 /* access */
1038 if (_elm_config->access_mode) 1041 if (_elm_config->access_mode)
@@ -1120,7 +1123,7 @@ _title_icon_set(Evas_Object *obj,
1120 title_visibility_current = (sd->title_text) || (sd->title_icon); 1123 title_visibility_current = (sd->title_text) || (sd->title_icon);
1121 1124
1122 efl_content_set 1125 efl_content_set
1123 (sd->main_layout, "elm.swallow.title.icon", sd->title_icon); 1126 (efl_part(sd->main_layout, "elm.swallow.title.icon"), sd->title_icon);
1124 1127
1125 if (sd->title_icon) 1128 if (sd->title_icon)
1126 elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm"); 1129 elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm");
@@ -1146,13 +1149,11 @@ _content_set(Evas_Object *obj,
1146 if (content) 1149 if (content)
1147 { 1150 {
1148 if (!sd->scroll) 1151 if (!sd->scroll)
1149 efl_content_set 1152 efl_content_set(efl_part(sd->main_layout, CONTENT_PART), sd->content_area);
1150 (sd->main_layout, CONTENT_PART, sd->content_area);
1151 else 1153 else
1152 elm_object_content_set(sd->scr, sd->content_area); 1154 elm_object_content_set(sd->scr, sd->content_area);
1153 1155
1154 efl_content_set 1156 efl_content_set(efl_part(sd->content_area, CONTENT_PART), content);
1155 (sd->content_area, CONTENT_PART, content);
1156 1157
1157 evas_object_event_callback_add 1158 evas_object_event_callback_add
1158 (content, EVAS_CALLBACK_DEL, _on_content_del, obj); 1159 (content, EVAS_CALLBACK_DEL, _on_content_del, obj);
@@ -1208,8 +1209,7 @@ _action_button_set(Evas_Object *obj,
1208 evas_object_event_callback_add 1209 evas_object_event_callback_add
1209 (sd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS, 1210 (sd->action_area, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
1210 _size_hints_changed_cb, sd->main_layout); 1211 _size_hints_changed_cb, sd->main_layout);
1211 efl_content_set 1212 efl_content_set(efl_part(sd->main_layout, "elm.swallow.action_area"), sd->action_area);
1212 (sd->main_layout, "elm.swallow.action_area", sd->action_area);
1213 1213
1214 _visuals_set(obj); 1214 _visuals_set(obj);
1215 } 1215 }
@@ -1223,8 +1223,8 @@ _action_button_set(Evas_Object *obj,
1223 (sd->action_area, buf, sd->buttons[idx]->btn); 1223 (sd->action_area, buf, sd->buttons[idx]->btn);
1224} 1224}
1225 1225
1226EOLIAN static Eina_Bool 1226static Eina_Bool
1227_elm_popup_efl_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 1227_elm_popup_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
1228{ 1228{
1229 unsigned int i; 1229 unsigned int i;
1230 Eina_Bool ret = EINA_TRUE; 1230 Eina_Bool ret = EINA_TRUE;
@@ -1246,7 +1246,7 @@ _elm_popup_efl_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c
1246 _action_button_set(obj, content, i); 1246 _action_button_set(obj, content, i);
1247 } 1247 }
1248 else 1248 else
1249 ret = efl_content_set(_pd->main_layout, part, content); 1249 ret = efl_content_set(efl_part(_pd->main_layout, part), content);
1250 1250
1251 elm_layout_sizing_eval(obj); 1251 elm_layout_sizing_eval(obj);
1252 1252
@@ -1280,8 +1280,8 @@ _action_button_get(const Evas_Object *obj,
1280 return button; 1280 return button;
1281} 1281}
1282 1282
1283EOLIAN static Evas_Object* 1283static Evas_Object*
1284_elm_popup_efl_container_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *part) 1284_elm_popup_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *part)
1285{ 1285{
1286 Evas_Object *content = NULL; 1286 Evas_Object *content = NULL;
1287 unsigned int i; 1287 unsigned int i;
@@ -1300,7 +1300,7 @@ _elm_popup_efl_container_content_get(Eo *obj, Elm_Popup_Data *_pd, const char *p
1300 content = _action_button_get(obj, i); 1300 content = _action_button_get(obj, i);
1301 } 1301 }
1302 else 1302 else
1303 content = efl_content_get(_pd->main_layout, part); 1303 content = efl_content_get(efl_part(_pd->main_layout, part));
1304 1304
1305 if (!content) 1305 if (!content)
1306 goto err; 1306 goto err;
@@ -1324,7 +1324,7 @@ _content_unset(Evas_Object *obj)
1324 evas_object_event_callback_del 1324 evas_object_event_callback_del
1325 (sd->content, EVAS_CALLBACK_DEL, _on_content_del); 1325 (sd->content, EVAS_CALLBACK_DEL, _on_content_del);
1326 1326
1327 content = efl_content_unset(sd->content_area, CONTENT_PART); 1327 content = efl_content_unset(efl_part(sd->content_area, CONTENT_PART));
1328 sd->content = NULL; 1328 sd->content = NULL;
1329 1329
1330 elm_layout_sizing_eval(obj); 1330 elm_layout_sizing_eval(obj);
@@ -1342,14 +1342,14 @@ _title_icon_unset(Evas_Object *obj)
1342 if (!sd->title_icon) return NULL; 1342 if (!sd->title_icon) return NULL;
1343 1343
1344 icon = sd->title_icon; 1344 icon = sd->title_icon;
1345 efl_content_unset(sd->main_layout, "elm.swallow.title.icon"); 1345 efl_content_unset(efl_part(sd->main_layout, "elm.swallow.title.icon"));
1346 sd->title_icon = NULL; 1346 sd->title_icon = NULL;
1347 1347
1348 return icon; 1348 return icon;
1349} 1349}
1350 1350
1351EOLIAN static Evas_Object* 1351static Evas_Object*
1352_elm_popup_efl_container_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part) 1352_elm_popup_content_unset(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, const char *part)
1353{ 1353{
1354 Evas_Object *content = NULL; 1354 Evas_Object *content = NULL;
1355 unsigned int i; 1355 unsigned int i;
@@ -1798,8 +1798,7 @@ _elm_popup_item_append(Eo *obj, Elm_Popup_Data *sd, const char *label, Evas_Obje
1798 ELM_POPUP_ITEM_DATA_GET(eo_it, it); 1798 ELM_POPUP_ITEM_DATA_GET(eo_it, it);
1799 if (sd->content || sd->text_content_obj) 1799 if (sd->content || sd->text_content_obj)
1800 { 1800 {
1801 prev_content = 1801 prev_content = efl_content_get(efl_part(sd->content_area, CONTENT_PART));
1802 efl_content_get(sd->content_area, CONTENT_PART);
1803 evas_object_del(prev_content); 1802 evas_object_del(prev_content);
1804 } 1803 }
1805 1804
@@ -1840,14 +1839,14 @@ _elm_popup_scrollable_set(Eo *obj, Elm_Popup_Data *pd, Eina_Bool scroll)
1840 1839
1841 if (!pd->scroll) 1840 if (!pd->scroll)
1842 { 1841 {
1843 efl_content_set(pd->content_area, CONTENT_PART, pd->tbl); 1842 efl_content_set(efl_part(pd->content_area, CONTENT_PART), pd->tbl);
1844 efl_content_set(pd->main_layout, CONTENT_PART, pd->content_area); 1843 efl_content_set(efl_part(pd->main_layout, CONTENT_PART), pd->content_area);
1845 if (pd->theme_scroll) 1844 if (pd->theme_scroll)
1846 elm_layout_signal_emit(pd->content_area, "elm,scroll,disable", "elm"); 1845 elm_layout_signal_emit(pd->content_area, "elm,scroll,disable", "elm");
1847 } 1846 }
1848 else 1847 else
1849 { 1848 {
1850 efl_content_set(pd->main_layout, CONTENT_PART, pd->tbl); 1849 efl_content_set(efl_part(pd->main_layout, CONTENT_PART), pd->tbl);
1851 if (pd->theme_scroll) 1850 if (pd->theme_scroll)
1852 elm_layout_signal_emit(pd->content_area, "elm,scroll,enable", "elm"); 1851 elm_layout_signal_emit(pd->content_area, "elm,scroll,enable", "elm");
1853 } 1852 }
@@ -1902,5 +1901,15 @@ _elm_popup_elm_interface_atspi_accessible_state_set_get(Eo *obj, Elm_Popup_Data
1902 return ret; 1901 return ret;
1903} 1902}
1904 1903
1904/* Efl.Part begin */
1905
1906ELM_PART_OVERRIDE(elm_popup, ELM_POPUP, ELM_LAYOUT, Elm_Popup_Data, Elm_Part_Data)
1907ELM_PART_OVERRIDE_CONTENT_SET(elm_popup, ELM_POPUP, ELM_LAYOUT, Elm_Popup_Data, Elm_Part_Data)
1908ELM_PART_OVERRIDE_CONTENT_GET(elm_popup, ELM_POPUP, ELM_LAYOUT, Elm_Popup_Data, Elm_Part_Data)
1909ELM_PART_OVERRIDE_CONTENT_UNSET(elm_popup, ELM_POPUP, ELM_LAYOUT, Elm_Popup_Data, Elm_Part_Data)
1910#include "elm_popup_internal_part.eo.c"
1911
1912/* Efl.Part end */
1913
1905#include "elm_popup.eo.c" 1914#include "elm_popup.eo.c"
1906#include "elm_popup_item.eo.c" 1915#include "elm_popup_item.eo.c"
diff --git a/src/lib/elementary/elm_button.c b/src/lib/elementary/elm_button.c
index fcafecd409..24334b6a20 100644
--- a/src/lib/elementary/elm_button.c
+++ b/src/lib/elementary/elm_button.c
@@ -10,6 +10,8 @@
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_button.h" 11#include "elm_widget_button.h"
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13#include "elm_button_internal_part.eo.h"
14#include "elm_part_helper.h"
13 15
14#define MY_CLASS ELM_BUTTON_CLASS 16#define MY_CLASS ELM_BUTTON_CLASS
15 17
@@ -148,12 +150,12 @@ _elm_button_elm_widget_sub_object_del(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED,
148/* FIXME: replicated from elm_layout just because button's icon spot 150/* FIXME: replicated from elm_layout just because button's icon spot
149 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we 151 * is elm.swallow.content, not elm.swallow.icon. Fix that whenever we
150 * can changed the theme API */ 152 * can changed the theme API */
151EOLIAN static Eina_Bool 153static Eina_Bool
152_elm_button_efl_container_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 154_elm_button_content_set(Eo *obj, Elm_Button_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
153{ 155{
154 Eina_Bool int_ret = EINA_FALSE; 156 Eina_Bool int_ret = EINA_FALSE;
155 157
156 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 158 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
157 if (!int_ret) return EINA_FALSE; 159 if (!int_ret) return EINA_FALSE;
158 160
159 _icon_signal_emit(obj); 161 _icon_signal_emit(obj);
@@ -443,4 +445,12 @@ _elm_button_class_constructor(Eo_Class *klass)
443 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 445 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
444} 446}
445 447
448/* Efl.Part begin */
449
450ELM_PART_OVERRIDE(elm_button, ELM_BUTTON, ELM_LAYOUT, Elm_Button_Data, Elm_Part_Data)
451ELM_PART_OVERRIDE_CONTENT_SET(elm_button, ELM_BUTTON, ELM_LAYOUT, Elm_Button_Data, Elm_Part_Data)
452#include "elm_button_internal_part.eo.c"
453
454/* Efl.Part end */
455
446#include "elm_button.eo.c" 456#include "elm_button.eo.c"
diff --git a/src/lib/elementary/elm_button.eo b/src/lib/elementary/elm_button.eo
index 397667579d..a4c3fc265e 100644
--- a/src/lib/elementary/elm_button.eo
+++ b/src/lib/elementary/elm_button.eo
@@ -82,10 +82,10 @@ class Elm.Button (Elm.Layout, Evas.Clickable_Interface,
82 Elm.Widget.theme_apply; 82 Elm.Widget.theme_apply;
83 Elm.Widget.sub_object_del; 83 Elm.Widget.sub_object_del;
84 Elm.Widget.event; 84 Elm.Widget.event;
85 Efl.Container.content.set;
86 Elm.Layout.text_aliases.get; 85 Elm.Layout.text_aliases.get;
87 Elm.Layout.content_aliases.get; 86 Elm.Layout.content_aliases.get;
88 Elm.Layout.sizing_eval; 87 Elm.Layout.sizing_eval;
89 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 88 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
89 Efl.Part.part;
90 } 90 }
91} 91}
diff --git a/src/lib/elementary/elm_button_internal_part.eo b/src/lib/elementary/elm_button_internal_part.eo
new file mode 100644
index 0000000000..99b57dd6be
--- /dev/null
+++ b/src/lib/elementary/elm_button_internal_part.eo
@@ -0,0 +1,7 @@
1class Elm.Button.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 }
7}
diff --git a/src/lib/elementary/elm_ctxpopup.eo b/src/lib/elementary/elm_ctxpopup.eo
index e99b06779b..42afb26cdc 100644
--- a/src/lib/elementary/elm_ctxpopup.eo
+++ b/src/lib/elementary/elm_ctxpopup.eo
@@ -214,14 +214,12 @@ class Elm.Ctxpopup (Elm.Layout, Elm.Interface.Atspi_Widget_Action, Efl.Orientati
214 Elm.Widget.translate; 214 Elm.Widget.translate;
215 Elm.Widget.theme_apply; 215 Elm.Widget.theme_apply;
216 Elm.Widget.event; 216 Elm.Widget.event;
217 Efl.Container.content.get;
218 Efl.Container.content.set;
219 Efl.Container.content_unset;
220 Elm.Layout.sub_object_add_enable; 217 Elm.Layout.sub_object_add_enable;
221 Elm.Layout.sizing_eval; 218 Elm.Layout.sizing_eval;
222 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 219 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
223 Elm.Interface.Atspi_Accessible.state_set.get; 220 Elm.Interface.Atspi_Accessible.state_set.get;
224 Efl.Orientation.orientation; 221 Efl.Orientation.orientation;
222 Efl.Part.part;
225 } 223 }
226 events { 224 events {
227 dismissed; 225 dismissed;
diff --git a/src/lib/elementary/elm_ctxpopup_internal_part.eo b/src/lib/elementary/elm_ctxpopup_internal_part.eo
new file mode 100644
index 0000000000..6538d4067c
--- /dev/null
+++ b/src/lib/elementary/elm_ctxpopup_internal_part.eo
@@ -0,0 +1,9 @@
1class Elm.Ctxpopup.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content.get;
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/elm_dayselector.c b/src/lib/elementary/elm_dayselector.c
index f97381a478..500db014ab 100644
--- a/src/lib/elementary/elm_dayselector.c
+++ b/src/lib/elementary/elm_dayselector.c
@@ -9,6 +9,9 @@
9#include "elm_widget_dayselector.h" 9#include "elm_widget_dayselector.h"
10#include "elm_widget_container.h" 10#include "elm_widget_container.h"
11 11
12#include "elm_dayselector_internal_part.eo.h"
13#include "elm_part_helper.h"
14
12#define MY_CLASS ELM_DAYSELECTOR_CLASS 15#define MY_CLASS ELM_DAYSELECTOR_CLASS
13 16
14#define MY_CLASS_NAME "Elm_Dayselector" 17#define MY_CLASS_NAME "Elm_Dayselector"
@@ -216,8 +219,8 @@ _item_find(const Evas_Object *obj,
216 return NULL; 219 return NULL;
217} 220}
218 221
219EOLIAN static Eina_Bool 222static Eina_Bool
220_elm_dayselector_efl_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content) 223_elm_dayselector_content_set(Eo *obj, Elm_Dayselector_Data *sd, const char *item, Evas_Object *content)
221{ 224{
222 Eina_Bool int_ret = EINA_FALSE; 225 Eina_Bool int_ret = EINA_FALSE;
223 226
@@ -239,7 +242,7 @@ _elm_dayselector_efl_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, co
239 { 242 {
240 snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it)); 243 snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it));
241 244
242 int_ret = efl_content_set(eo_super(obj, MY_CLASS), buf, content); 245 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), buf), content);
243 if (!int_ret) return EINA_FALSE; 246 if (!int_ret) return EINA_FALSE;
244 247
245 if (!content) return EINA_TRUE; /* item deletion already handled */ 248 if (!content) return EINA_TRUE; /* item deletion already handled */
@@ -255,7 +258,7 @@ _elm_dayselector_efl_container_content_set(Eo *obj, Elm_Dayselector_Data *sd, co
255 258
256 snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it)); 259 snprintf(buf, sizeof(buf), "day%d", _item_location_get(sd, it));
257 260
258 int_ret = efl_content_set(eo_super(obj, MY_CLASS), buf, content); 261 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), buf), content);
259 if (!int_ret) 262 if (!int_ret)
260 { 263 {
261 eo_unref(eo_it); 264 eo_unref(eo_it);
@@ -298,8 +301,8 @@ _elm_dayselector_item_eo_base_constructor(Eo *eo_item, Elm_Dayselector_Item_Data
298 return eo_item; 301 return eo_item;
299} 302}
300 303
301EOLIAN static Evas_Object* 304static Evas_Object*
302_elm_dayselector_efl_container_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *item) 305_elm_dayselector_content_unset(Eo *obj, Elm_Dayselector_Data *sd, const char *item)
303{ 306{
304 int day; 307 int day;
305 char buf[1024]; 308 char buf[1024];
@@ -314,7 +317,7 @@ _elm_dayselector_efl_container_content_unset(Eo *obj, Elm_Dayselector_Data *sd,
314 317
315 content = VIEW(it); 318 content = VIEW(it);
316 319
317 content = efl_content_unset(eo_super(obj, MY_CLASS), buf); 320 content = efl_content_unset(efl_part(eo_super(obj, MY_CLASS), buf));
318 if (!content) return NULL; 321 if (!content) return NULL;
319 322
320 sd->items = eina_list_remove(sd->items, it); 323 sd->items = eina_list_remove(sd->items, it);
@@ -612,6 +615,15 @@ _elm_dayselector_class_constructor(Eo_Class *klass)
612 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 615 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
613} 616}
614 617
618/* Efl.Part begin */
619
620ELM_PART_OVERRIDE(elm_dayselector, ELM_DAYSELECTOR, ELM_LAYOUT, Elm_Dayselector_Data, Elm_Part_Data)
621ELM_PART_OVERRIDE_CONTENT_SET(elm_dayselector, ELM_DAYSELECTOR, ELM_LAYOUT, Elm_Dayselector_Data, Elm_Part_Data)
622ELM_PART_OVERRIDE_CONTENT_UNSET(elm_dayselector, ELM_DAYSELECTOR, ELM_LAYOUT, Elm_Dayselector_Data, Elm_Part_Data)
623#include "elm_dayselector_internal_part.eo.c"
624
625/* Efl.Part end */
626
615#include "elm_dayselector.eo.c" 627#include "elm_dayselector.eo.c"
616#include "elm_dayselector_item.eo.c" 628#include "elm_dayselector_item.eo.c"
617 629
diff --git a/src/lib/elementary/elm_dayselector.eo b/src/lib/elementary/elm_dayselector.eo
index 3604836812..a0d2935925 100644
--- a/src/lib/elementary/elm_dayselector.eo
+++ b/src/lib/elementary/elm_dayselector.eo
@@ -155,9 +155,8 @@ class Elm.Dayselector (Elm.Layout)
155 Elm.Widget.theme_apply; 155 Elm.Widget.theme_apply;
156 Elm.Widget.focus_direction_manager_is; 156 Elm.Widget.focus_direction_manager_is;
157 Elm.Widget.translate; 157 Elm.Widget.translate;
158 Efl.Container.content_unset;
159 Efl.Container.content.set;
160 Elm.Layout.sizing_eval; 158 Elm.Layout.sizing_eval;
159 Efl.Part.part;
161 } 160 }
162 events { 161 events {
163 dayselector,changed; 162 dayselector,changed;
diff --git a/src/lib/elementary/elm_dayselector_internal_part.eo b/src/lib/elementary/elm_dayselector_internal_part.eo
new file mode 100644
index 0000000000..9cf6c32abb
--- /dev/null
+++ b/src/lib/elementary/elm_dayselector_internal_part.eo
@@ -0,0 +1,8 @@
1class Elm.Dayselector.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content_unset;
7 }
8}
diff --git a/src/lib/elementary/elm_entry.c b/src/lib/elementary/elm_entry.c
index 466e397513..1134ee1443 100644
--- a/src/lib/elementary/elm_entry.c
+++ b/src/lib/elementary/elm_entry.c
@@ -12,6 +12,9 @@
12#include "elm_priv.h" 12#include "elm_priv.h"
13#include "elm_widget_entry.h" 13#include "elm_widget_entry.h"
14 14
15#include "elm_entry_internal_part.eo.h"
16#include "elm_part_helper.h"
17
15#define MY_CLASS ELM_ENTRY_CLASS 18#define MY_CLASS ELM_ENTRY_CLASS
16 19
17#define MY_CLASS_NAME "Elm_Entry" 20#define MY_CLASS_NAME "Elm_Entry"
@@ -3048,11 +3051,11 @@ _elm_entry_elm_layout_signal_callback_del(Eo *obj, Elm_Entry_Data *sd, const cha
3048 return data; 3051 return data;
3049} 3052}
3050 3053
3051EOLIAN static Eina_Bool 3054static Eina_Bool
3052_elm_entry_efl_container_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 3055_elm_entry_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
3053{ 3056{
3054 Eina_Bool int_ret = EINA_FALSE; 3057 Eina_Bool int_ret = EINA_FALSE;
3055 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 3058 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
3056 if (!int_ret) return EINA_FALSE; 3059 if (!int_ret) return EINA_FALSE;
3057 3060
3058 /* too bad entry does not follow the pattern 3061 /* too bad entry does not follow the pattern
@@ -3066,11 +3069,11 @@ _elm_entry_efl_container_content_set(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, c
3066 return EINA_TRUE; 3069 return EINA_TRUE;
3067} 3070}
3068 3071
3069EOLIAN static Evas_Object* 3072static Evas_Object*
3070_elm_entry_efl_container_content_unset(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part) 3073_elm_entry_content_unset(Eo *obj, Elm_Entry_Data *_pd EINA_UNUSED, const char *part)
3071{ 3074{
3072 Evas_Object *ret = NULL; 3075 Evas_Object *ret = NULL;
3073 ret = efl_content_unset(eo_super(obj, MY_CLASS), part); 3076 ret = efl_content_unset(efl_part(eo_super(obj, MY_CLASS), part));
3074 if (!ret) return NULL; 3077 if (!ret) return NULL;
3075 3078
3076 /* too bad entry does not follow the pattern 3079 /* too bad entry does not follow the pattern
@@ -5927,4 +5930,13 @@ _elm_entry_elm_interface_atspi_accessible_name_get(Eo *obj, Elm_Entry_Data *sd)
5927 return ret ? strdup(ret) : NULL; 5930 return ret ? strdup(ret) : NULL;
5928} 5931}
5929 5932
5933/* Efl.Part begin */
5934
5935ELM_PART_OVERRIDE(elm_entry, ELM_ENTRY, ELM_LAYOUT, Elm_Entry_Data, Elm_Part_Data)
5936ELM_PART_OVERRIDE_CONTENT_SET(elm_entry, ELM_ENTRY, ELM_LAYOUT, Elm_Entry_Data, Elm_Part_Data)
5937ELM_PART_OVERRIDE_CONTENT_UNSET(elm_entry, ELM_ENTRY, ELM_LAYOUT, Elm_Entry_Data, Elm_Part_Data)
5938#include "elm_entry_internal_part.eo.c"
5939
5940/* Efl.Part end */
5941
5930#include "elm_entry.eo.c" 5942#include "elm_entry.eo.c"
diff --git a/src/lib/elementary/elm_entry.eo b/src/lib/elementary/elm_entry.eo
index e8118227f8..196b58a1ef 100644
--- a/src/lib/elementary/elm_entry.eo
+++ b/src/lib/elementary/elm_entry.eo
@@ -950,8 +950,6 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
950 Elm.Widget.disable; 950 Elm.Widget.disable;
951 Elm.Widget.sub_object_del; 951 Elm.Widget.sub_object_del;
952 Elm.Widget.focus_next_manager_is; 952 Elm.Widget.focus_next_manager_is;
953 Efl.Container.content_unset;
954 Efl.Container.content.set;
955 Elm.Layout.theme_enable; 953 Elm.Layout.theme_enable;
956 Elm.Layout.sizing_eval; 954 Elm.Layout.sizing_eval;
957 Elm.Layout.text.get; 955 Elm.Layout.text.get;
@@ -990,6 +988,7 @@ class Elm.Entry (Elm.Layout, Elm.Interface_Scrollable, Evas.Clickable_Interface,
990 Elm.Interface.Atspi.Text.Editable.paste; 988 Elm.Interface.Atspi.Text.Editable.paste;
991 Efl.File.file.set; 989 Efl.File.file.set;
992 Efl.File.file.get; 990 Efl.File.file.get;
991 Efl.Part.part;
993 } 992 }
994 events { 993 events {
995 activated; 994 activated;
diff --git a/src/lib/elementary/elm_entry_internal_part.eo b/src/lib/elementary/elm_entry_internal_part.eo
new file mode 100644
index 0000000000..98f2e840a2
--- /dev/null
+++ b/src/lib/elementary/elm_entry_internal_part.eo
@@ -0,0 +1,8 @@
1class Elm.Entry.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content_unset;
7 }
8}
diff --git a/src/lib/elementary/elm_fileselector_entry.eo b/src/lib/elementary/elm_fileselector_entry.eo
index 401d2959c6..0b369df7bd 100644
--- a/src/lib/elementary/elm_fileselector_entry.eo
+++ b/src/lib/elementary/elm_fileselector_entry.eo
@@ -13,9 +13,6 @@ class Elm.Fileselector_Entry (Elm.Layout, Elm.Interface.Fileselector,
13 Elm.Widget.focus_next; 13 Elm.Widget.focus_next;
14 Elm.Widget.disable; 14 Elm.Widget.disable;
15 Elm.Widget.focus_direction_manager_is; 15 Elm.Widget.focus_direction_manager_is;
16 Efl.Container.content.get;
17 Efl.Container.content_unset;
18 Efl.Container.content.set;
19 Elm.Layout.text.set; 16 Elm.Layout.text.set;
20 Elm.Layout.text.get; 17 Elm.Layout.text.get;
21 Elm.Layout.sizing_eval; 18 Elm.Layout.sizing_eval;
@@ -24,6 +21,7 @@ class Elm.Fileselector_Entry (Elm.Layout, Elm.Interface.Fileselector,
24 Elm.Interface.Fileselector.is_save; 21 Elm.Interface.Fileselector.is_save;
25 Elm.Interface.Fileselector.path; 22 Elm.Interface.Fileselector.path;
26 Elm.Interface.Fileselector.expandable; 23 Elm.Interface.Fileselector.expandable;
24 Efl.Part.part;
27 } 25 }
28 events { 26 events {
29 changed; 27 changed;
diff --git a/src/lib/elementary/elm_fileselector_entry_internal_part.eo b/src/lib/elementary/elm_fileselector_entry_internal_part.eo
new file mode 100644
index 0000000000..0d545ce3c9
--- /dev/null
+++ b/src/lib/elementary/elm_fileselector_entry_internal_part.eo
@@ -0,0 +1,9 @@
1class Elm.Fileselector.Entry.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content.get;
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/elm_flip.c b/src/lib/elementary/elm_flip.c
index ac1e11ff69..e9b61a1b8d 100644
--- a/src/lib/elementary/elm_flip.c
+++ b/src/lib/elementary/elm_flip.c
@@ -9,6 +9,9 @@
9#include "elm_widget_flip.h" 9#include "elm_widget_flip.h"
10#include "elm_widget_container.h" 10#include "elm_widget_container.h"
11 11
12#include "elm_flip_internal_part.eo.h"
13#include "elm_part_helper.h"
14
12#define MY_CLASS ELM_FLIP_CLASS 15#define MY_CLASS ELM_FLIP_CLASS
13 16
14#define MY_CLASS_NAME "Elm_Flip" 17#define MY_CLASS_NAME "Elm_Flip"
@@ -1770,8 +1773,8 @@ _flip_content_unset(Evas_Object *obj,
1770 return content; 1773 return content;
1771} 1774}
1772 1775
1773EOLIAN static Eina_Bool 1776static Eina_Bool
1774_elm_flip_efl_container_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 1777_elm_flip_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
1775{ 1778{
1776 if (!part || !strcmp(part, "front")) 1779 if (!part || !strcmp(part, "front"))
1777 return _flip_content_set(obj, content, EINA_TRUE); 1780 return _flip_content_set(obj, content, EINA_TRUE);
@@ -1780,8 +1783,8 @@ _elm_flip_efl_container_content_set(Eo *obj, Elm_Flip_Data *_pd EINA_UNUSED, con
1780 return EINA_FALSE; 1783 return EINA_FALSE;
1781} 1784}
1782 1785
1783EOLIAN static Evas_Object* 1786static Evas_Object*
1784_elm_flip_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, const char *part) 1787_elm_flip_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, const char *part)
1785{ 1788{
1786 if (!part || !strcmp(part, "front")) 1789 if (!part || !strcmp(part, "front"))
1787 return sd->front.content; 1790 return sd->front.content;
@@ -1790,8 +1793,8 @@ _elm_flip_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Flip_Data *sd, cons
1790 return NULL; 1793 return NULL;
1791} 1794}
1792 1795
1793EOLIAN static Evas_Object* 1796static Evas_Object*
1794_elm_flip_efl_container_content_unset(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED, const char *part) 1797_elm_flip_content_unset(Eo *obj EINA_UNUSED, Elm_Flip_Data *_pd EINA_UNUSED, const char *part)
1795{ 1798{
1796 if (!part || !strcmp(part, "front")) 1799 if (!part || !strcmp(part, "front"))
1797 return _flip_content_unset(obj, EINA_TRUE); 1800 return _flip_content_unset(obj, EINA_TRUE);
@@ -2066,4 +2069,14 @@ _elm_flip_class_constructor(Eo_Class *klass)
2066 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 2069 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
2067} 2070}
2068 2071
2072/* Efl.Part begin */
2073
2074ELM_PART_IMPLEMENT(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
2075ELM_PART_IMPLEMENT_CONTENT_SET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
2076ELM_PART_IMPLEMENT_CONTENT_GET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
2077ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_flip, ELM_FLIP, Elm_Flip_Data, Elm_Part_Data)
2078#include "elm_flip_internal_part.eo.c"
2079
2080/* Efl.Part end */
2081
2069#include "elm_flip.eo.c" 2082#include "elm_flip.eo.c"
diff --git a/src/lib/elementary/elm_flip.eo b/src/lib/elementary/elm_flip.eo
index 335f10e40d..9edc6de806 100644
--- a/src/lib/elementary/elm_flip.eo
+++ b/src/lib/elementary/elm_flip.eo
@@ -33,7 +33,7 @@ enum Elm.Flip.Direction
33 right [[Allows interaction with the right portion of the widget]] 33 right [[Allows interaction with the right portion of the widget]]
34} 34}
35 35
36class Elm.Flip (Elm.Widget, Efl.Container) 36class Elm.Flip (Elm.Widget, Efl.Part)
37{ 37{
38 legacy_prefix: elm_flip; 38 legacy_prefix: elm_flip;
39 eo_prefix: elm_obj_flip; 39 eo_prefix: elm_obj_flip;
@@ -240,9 +240,7 @@ class Elm.Flip (Elm.Widget, Efl.Container)
240 Elm.Widget.focus_next_manager_is; 240 Elm.Widget.focus_next_manager_is;
241 Elm.Widget.focus_next; 241 Elm.Widget.focus_next;
242 Elm.Widget.sub_object_del; 242 Elm.Widget.sub_object_del;
243 Efl.Container.content.get; 243 Efl.Part.part;
244 Efl.Container.content.set;
245 Efl.Container.content_unset;
246 } 244 }
247 events { 245 events {
248 animate,begin; 246 animate,begin;
diff --git a/src/lib/elementary/elm_flip_internal_part.eo b/src/lib/elementary/elm_flip_internal_part.eo
new file mode 100644
index 0000000000..08792295e9
--- /dev/null
+++ b/src/lib/elementary/elm_flip_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Flip.Internal.Part (Eo.Base, Efl.Container)
2{
3 data: Elm_Part_Data;
4 implements {
5 Eo.Base.destructor;
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_hover.c b/src/lib/elementary/elm_hover.c
index 4cff56c5d7..d83efb055d 100644
--- a/src/lib/elementary/elm_hover.c
+++ b/src/lib/elementary/elm_hover.c
@@ -12,6 +12,9 @@
12#include "elm_priv.h" 12#include "elm_priv.h"
13#include "elm_widget_hover.h" 13#include "elm_widget_hover.h"
14 14
15#include "elm_hover_internal_part.eo.h"
16#include "elm_part_helper.h"
17
15#define MY_CLASS ELM_HOVER_CLASS 18#define MY_CLASS ELM_HOVER_CLASS
16 19
17#define MY_CLASS_NAME "Elm_Hover" 20#define MY_CLASS_NAME "Elm_Hover"
@@ -396,8 +399,8 @@ _elm_hover_subs_del(Elm_Hover_Data *sd)
396 sd->smt_sub = NULL; 399 sd->smt_sub = NULL;
397} 400}
398 401
399EOLIAN static Eina_Bool 402static Eina_Bool
400_elm_hover_efl_container_content_set(Eo *obj, Elm_Hover_Data *sd, const char *swallow, Evas_Object *content) 403_elm_hover_content_set(Eo *obj, Elm_Hover_Data *sd, const char *swallow, Evas_Object *content)
401{ 404{
402 Eina_Bool int_ret; 405 Eina_Bool int_ret;
403 406
@@ -435,7 +438,7 @@ _elm_hover_efl_container_content_set(Eo *obj, Elm_Hover_Data *sd, const char *sw
435 } 438 }
436 } 439 }
437 440
438 int_ret = efl_content_set(eo_super(obj, MY_CLASS), swallow, content); 441 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), swallow), content);
439 if (!int_ret) return EINA_FALSE; 442 if (!int_ret) return EINA_FALSE;
440 443
441 if (strstr(swallow, "elm.swallow.slot.")) 444 if (strstr(swallow, "elm.swallow.slot."))
@@ -455,36 +458,26 @@ end:
455 return EINA_TRUE; 458 return EINA_TRUE;
456} 459}
457 460
458EOLIAN static Evas_Object* 461static Evas_Object*
459_elm_hover_efl_container_content_get(Eo *obj, Elm_Hover_Data *sd, const char *swallow) 462_elm_hover_content_get(Eo *obj, Elm_Hover_Data *sd, const char *swallow)
460{ 463{
461 Evas_Object *ret; 464 if (!swallow) return NULL;
462 ret = NULL;
463
464 if (!swallow) return ret;
465 465
466 if (!strcmp(swallow, "smart")) 466 if (!strcmp(swallow, "smart"))
467 ret = efl_content_get(eo_super(obj, MY_CLASS), sd->smt_sub->swallow); 467 return efl_content_get(efl_part(eo_super(obj, MY_CLASS), sd->smt_sub->swallow));
468 else 468 else
469 ret = efl_content_get(eo_super(obj, MY_CLASS), swallow); 469 return efl_content_get(efl_part(eo_super(obj, MY_CLASS), swallow));
470
471 return ret;
472} 470}
473 471
474EOLIAN static Evas_Object* 472static Evas_Object*
475_elm_hover_efl_container_content_unset(Eo *obj, Elm_Hover_Data *sd, const char *swallow) 473_elm_hover_content_unset(Eo *obj, Elm_Hover_Data *sd, const char *swallow)
476{ 474{
477 Evas_Object *ret = NULL;
478
479 if (!swallow) return NULL; 475 if (!swallow) return NULL;
480 476
481 if (!strcmp(swallow, "smart")) 477 if (!strcmp(swallow, "smart"))
482 ret = efl_content_unset 478 return efl_content_unset(efl_part(eo_super(obj, MY_CLASS), sd->smt_sub->swallow));
483 (eo_super(obj, MY_CLASS), sd->smt_sub->swallow);
484 else 479 else
485 ret = efl_content_unset 480 return efl_content_unset(efl_part(eo_super(obj, MY_CLASS), swallow));
486 (eo_super(obj, MY_CLASS), swallow);
487 return ret;
488} 481}
489 482
490static void 483static void
@@ -850,4 +843,14 @@ _elm_hover_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED
850 return &atspi_actions[0]; 843 return &atspi_actions[0];
851} 844}
852 845
846/* Efl.Part begin */
847
848ELM_PART_OVERRIDE(elm_hover, ELM_HOVER, ELM_LAYOUT, Elm_Hover_Data, Elm_Part_Data)
849ELM_PART_OVERRIDE_CONTENT_SET(elm_hover, ELM_HOVER, ELM_LAYOUT, Elm_Hover_Data, Elm_Part_Data)
850ELM_PART_OVERRIDE_CONTENT_GET(elm_hover, ELM_HOVER, ELM_LAYOUT, Elm_Hover_Data, Elm_Part_Data)
851ELM_PART_OVERRIDE_CONTENT_UNSET(elm_hover, ELM_HOVER, ELM_LAYOUT, Elm_Hover_Data, Elm_Part_Data)
852#include "elm_hover_internal_part.eo.c"
853
854/* Efl.Part end */
855
853#include "elm_hover.eo.c" 856#include "elm_hover.eo.c"
diff --git a/src/lib/elementary/elm_hover.eo b/src/lib/elementary/elm_hover.eo
index 8739d5eebf..0b74521fda 100644
--- a/src/lib/elementary/elm_hover.eo
+++ b/src/lib/elementary/elm_hover.eo
@@ -72,12 +72,10 @@ class Elm.Hover (Elm.Layout, Evas.Clickable_Interface, Elm.Interface.Atspi_Widge
72 Elm.Widget.focus_direction_manager_is; 72 Elm.Widget.focus_direction_manager_is;
73 Elm.Widget.focus_next_manager_is; 73 Elm.Widget.focus_next_manager_is;
74 Elm.Widget.sub_object_del; 74 Elm.Widget.sub_object_del;
75 Efl.Container.content.get;
76 Efl.Container.content.set;
77 Efl.Container.content_unset;
78 Elm.Layout.sizing_eval; 75 Elm.Layout.sizing_eval;
79 Elm.Layout.content_aliases.get; 76 Elm.Layout.content_aliases.get;
80 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 77 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
78 Efl.Part.part;
81 } 79 }
82 events { 80 events {
83 smart,changed; 81 smart,changed;
diff --git a/src/lib/elementary/elm_hover_internal_part.eo b/src/lib/elementary/elm_hover_internal_part.eo
new file mode 100644
index 0000000000..80df3ae486
--- /dev/null
+++ b/src/lib/elementary/elm_hover_internal_part.eo
@@ -0,0 +1,9 @@
1class Elm.Hover.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content.get;
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/elm_inwin.c b/src/lib/elementary/elm_inwin.c
index d601cef941..9ec6ba388a 100644
--- a/src/lib/elementary/elm_inwin.c
+++ b/src/lib/elementary/elm_inwin.c
@@ -137,29 +137,24 @@ _elm_inwin_activate(Eo *obj, void *_pd EINA_UNUSED)
137} 137}
138 138
139EAPI void 139EAPI void
140elm_win_inwin_content_set(Evas_Object *obj, 140elm_win_inwin_content_set(Evas_Object *obj, Evas_Object *content)
141 Evas_Object *content)
142{ 141{
143 ELM_INWIN_CHECK(obj); 142 ELM_INWIN_CHECK(obj);
144 efl_content_set(obj, NULL, content); 143 efl_content_set(obj, content);
145} 144}
146 145
147EAPI Evas_Object * 146EAPI Evas_Object *
148elm_win_inwin_content_get(const Evas_Object *obj) 147elm_win_inwin_content_get(const Evas_Object *obj)
149{ 148{
150 ELM_INWIN_CHECK(obj) NULL; 149 ELM_INWIN_CHECK(obj) NULL;
151 Evas_Object *ret = NULL; 150 return efl_content_get(obj);
152 ret = efl_content_get((Eo *)obj, NULL);
153 return ret;
154} 151}
155 152
156EAPI Evas_Object * 153EAPI Evas_Object *
157elm_win_inwin_content_unset(Evas_Object *obj) 154elm_win_inwin_content_unset(Evas_Object *obj)
158{ 155{
159 ELM_INWIN_CHECK(obj) NULL; 156 ELM_INWIN_CHECK(obj) NULL;
160 Evas_Object *ret = NULL; 157 return efl_content_unset(obj);
161 ret = efl_content_unset(obj, NULL);
162 return ret;
163} 158}
164 159
165static void 160static void
diff --git a/src/lib/elementary/elm_inwin.eo b/src/lib/elementary/elm_inwin.eo
index facb9dc8ef..552d0d46fc 100644
--- a/src/lib/elementary/elm_inwin.eo
+++ b/src/lib/elementary/elm_inwin.eo
@@ -28,5 +28,4 @@ class Elm.Inwin (Elm.Layout)
28 Elm.Layout.content_aliases.get; 28 Elm.Layout.content_aliases.get;
29 Elm.Layout.sizing_eval; 29 Elm.Layout.sizing_eval;
30 } 30 }
31
32} 31}
diff --git a/src/lib/elementary/elm_layout.c b/src/lib/elementary/elm_layout.c
index c6694cf9e5..2d5a8384bb 100644
--- a/src/lib/elementary/elm_layout.c
+++ b/src/lib/elementary/elm_layout.c
@@ -10,6 +10,9 @@
10#include "elm_priv.h" 10#include "elm_priv.h"
11#include "elm_widget_layout.h" 11#include "elm_widget_layout.h"
12 12
13#include "elm_layout_internal_part.eo.h"
14#include "elm_part_helper.h"
15
13#define MY_CLASS ELM_LAYOUT_CLASS 16#define MY_CLASS ELM_LAYOUT_CLASS
14 17
15#define MY_CLASS_NAME "Elm_Layout" 18#define MY_CLASS_NAME "Elm_Layout"
@@ -975,13 +978,12 @@ elm_layout_content_set(Evas_Object *obj,
975 Evas_Object *content) 978 Evas_Object *content)
976{ 979{
977 ELM_LAYOUT_CHECK(obj) EINA_FALSE; 980 ELM_LAYOUT_CHECK(obj) EINA_FALSE;
978 Eina_Bool ret = EINA_FALSE; 981
979 ret = efl_content_set(obj, swallow, content); 982 return efl_content_set(efl_part(obj, swallow), content);
980 return ret;
981} 983}
982 984
983EOLIAN static Eina_Bool 985static Eina_Bool
984_elm_layout_efl_container_content_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *content) 986_elm_layout_content_set(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *content)
985{ 987{
986 Elm_Layout_Sub_Object_Data *sub_d; 988 Elm_Layout_Sub_Object_Data *sub_d;
987 const Eina_List *l; 989 const Eina_List *l;
@@ -1053,14 +1055,12 @@ elm_layout_content_get(const Evas_Object *obj,
1053 const char *swallow) 1055 const char *swallow)
1054{ 1056{
1055 ELM_LAYOUT_CHECK(obj) NULL; 1057 ELM_LAYOUT_CHECK(obj) NULL;
1056 Evas_Object *ret = NULL;
1057 1058
1058 ret = efl_content_get((Eo *) obj, swallow); 1059 return efl_content_get(efl_part(obj, swallow));
1059 return ret;
1060} 1060}
1061 1061
1062EOLIAN static Evas_Object* 1062static Evas_Object*
1063_elm_layout_efl_container_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) 1063_elm_layout_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part)
1064{ 1064{
1065 const Eina_List *l; 1065 const Eina_List *l;
1066 Elm_Layout_Sub_Object_Data *sub_d; 1066 Elm_Layout_Sub_Object_Data *sub_d;
@@ -1074,6 +1074,7 @@ _elm_layout_efl_container_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const
1074 { 1074 {
1075 if (sub_d->type == SWALLOW) 1075 if (sub_d->type == SWALLOW)
1076 return sub_d->obj; 1076 return sub_d->obj;
1077 /* FIXME: Implement as efl_part */
1077 if ((sub_d->type == TABLE_PACK) || _sub_box_is(sub_d)) 1078 if ((sub_d->type == TABLE_PACK) || _sub_box_is(sub_d))
1078 return _elm_layout_pack_proxy_get(obj, sub_d->obj, sub_d->part); 1079 return _elm_layout_pack_proxy_get(obj, sub_d->obj, sub_d->part);
1079 } 1080 }
@@ -1084,7 +1085,7 @@ _elm_layout_efl_container_content_get(Eo *obj, Elm_Layout_Smart_Data *sd, const
1084 if (!_elm_layout_part_aliasing_eval(obj, sd, &part, EINA_FALSE)) 1085 if (!_elm_layout_part_aliasing_eval(obj, sd, &part, EINA_FALSE))
1085 return NULL; 1086 return NULL;
1086 1087
1087 return efl_content_get(wd->resize_obj, part); 1088 return efl_content_get(efl_part(wd->resize_obj, part));
1088} 1089}
1089 1090
1090EAPI Evas_Object * 1091EAPI Evas_Object *
@@ -1093,12 +1094,12 @@ elm_layout_content_unset(Evas_Object *obj,
1093{ 1094{
1094 ELM_LAYOUT_CHECK(obj) NULL; 1095 ELM_LAYOUT_CHECK(obj) NULL;
1095 Evas_Object *ret = NULL; 1096 Evas_Object *ret = NULL;
1096 ret = efl_content_unset(obj, swallow); 1097 ret = efl_content_unset(efl_part(obj, swallow));
1097 return ret; 1098 return ret;
1098} 1099}
1099 1100
1100EOLIAN static Evas_Object* 1101static Evas_Object*
1101_elm_layout_efl_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part) 1102_elm_layout_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part)
1102{ 1103{
1103 Elm_Layout_Sub_Object_Data *sub_d; 1104 Elm_Layout_Sub_Object_Data *sub_d;
1104 const Eina_List *l; 1105 const Eina_List *l;
@@ -1136,6 +1137,24 @@ _elm_layout_efl_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd, cons
1136} 1137}
1137 1138
1138EOLIAN static Eina_Bool 1139EOLIAN static Eina_Bool
1140_elm_layout_efl_container_content_set(Eo *obj, Elm_Layout_Smart_Data *sd, Evas_Object *content)
1141{
1142 return _elm_layout_content_set(obj, sd, NULL, content);
1143}
1144
1145EOLIAN static Evas_Object*
1146_elm_layout_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Layout_Smart_Data *sd)
1147{
1148 return _elm_layout_content_get(obj, sd, NULL);
1149}
1150
1151EOLIAN static Evas_Object*
1152_elm_layout_efl_container_content_unset(Eo *obj, Elm_Layout_Smart_Data *sd)
1153{
1154 return _elm_layout_content_unset(obj, sd, NULL);
1155}
1156
1157EOLIAN static Eina_Bool
1139_elm_layout_efl_container_content_remove(Eo *obj, Elm_Layout_Smart_Data *sd EINA_UNUSED, 1158_elm_layout_efl_container_content_remove(Eo *obj, Elm_Layout_Smart_Data *sd EINA_UNUSED,
1140 Efl_Gfx *content) 1159 Efl_Gfx *content)
1141{ 1160{
@@ -1899,6 +1918,8 @@ EOLIAN static void _elm_layout_class_constructor(Eo_Class *klass)
1899 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 1918 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
1900} 1919}
1901 1920
1921
1922
1902/* Legacy APIs */ 1923/* Legacy APIs */
1903 1924
1904EAPI Eina_Bool 1925EAPI Eina_Bool
@@ -1916,7 +1937,7 @@ elm_layout_file_get(Eo *obj, const char **file, const char **group)
1916EAPI Eina_Bool 1937EAPI Eina_Bool
1917elm_layout_box_append(Elm_Layout *obj, const char *part, Evas_Object *child) 1938elm_layout_box_append(Elm_Layout *obj, const char *part, Evas_Object *child)
1918{ 1939{
1919 Eo *box = efl_content_get(obj, part); 1940 Eo *box = efl_content_get(efl_part(obj, part));
1920 if (!box) return EINA_FALSE; 1941 if (!box) return EINA_FALSE;
1921 efl_pack(box, child); 1942 efl_pack(box, child);
1922 return EINA_TRUE; 1943 return EINA_TRUE;
@@ -1925,7 +1946,7 @@ elm_layout_box_append(Elm_Layout *obj, const char *part, Evas_Object *child)
1925EAPI Eina_Bool 1946EAPI Eina_Bool
1926elm_layout_box_prepend(Elm_Layout *obj, const char *part, Evas_Object *child) 1947elm_layout_box_prepend(Elm_Layout *obj, const char *part, Evas_Object *child)
1927{ 1948{
1928 Eo *box = efl_content_get(obj, part); 1949 Eo *box = efl_content_get(efl_part(obj, part));
1929 if (!box) return EINA_FALSE; 1950 if (!box) return EINA_FALSE;
1930 efl_pack_begin(box, child); 1951 efl_pack_begin(box, child);
1931 return EINA_TRUE; 1952 return EINA_TRUE;
@@ -1934,13 +1955,13 @@ elm_layout_box_prepend(Elm_Layout *obj, const char *part, Evas_Object *child)
1934EAPI Eina_Bool 1955EAPI Eina_Bool
1935elm_layout_box_insert_before(Elm_Layout *obj, const char *part, Evas_Object *child, const Evas_Object *reference) 1956elm_layout_box_insert_before(Elm_Layout *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
1936{ 1957{
1937 return efl_pack_before(efl_content_get(obj, part), child, reference); 1958 return efl_pack_before(efl_content_get(efl_part(obj, part)), child, reference);
1938} 1959}
1939 1960
1940EAPI Eina_Bool 1961EAPI Eina_Bool
1941elm_layout_box_insert_at(Elm_Layout *obj, const char *part, Evas_Object *child, unsigned int pos) 1962elm_layout_box_insert_at(Elm_Layout *obj, const char *part, Evas_Object *child, unsigned int pos)
1942{ 1963{
1943 Eo *box = efl_content_get(obj, part); 1964 Eo *box = efl_content_get(efl_part(obj, part));
1944 if (!box) return EINA_FALSE; 1965 if (!box) return EINA_FALSE;
1945 efl_pack_at(box, child, pos); 1966 efl_pack_at(box, child, pos);
1946 return EINA_TRUE; 1967 return EINA_TRUE;
@@ -1949,7 +1970,7 @@ elm_layout_box_insert_at(Elm_Layout *obj, const char *part, Evas_Object *child,
1949EAPI Evas_Object * 1970EAPI Evas_Object *
1950elm_layout_box_remove(Elm_Layout *obj, const char *part, Evas_Object *child) 1971elm_layout_box_remove(Elm_Layout *obj, const char *part, Evas_Object *child)
1951{ 1972{
1952 Eo *box = efl_content_get(obj, part); 1973 Eo *box = efl_content_get(efl_part(obj, part));
1953 if (!box) return NULL; 1974 if (!box) return NULL;
1954 if (!efl_pack_unpack(box, child)) 1975 if (!efl_pack_unpack(box, child))
1955 return NULL; 1976 return NULL;
@@ -1959,7 +1980,7 @@ elm_layout_box_remove(Elm_Layout *obj, const char *part, Evas_Object *child)
1959EAPI Eina_Bool 1980EAPI Eina_Bool
1960elm_layout_box_remove_all(Elm_Layout *obj, const char *part, Eina_Bool clear) 1981elm_layout_box_remove_all(Elm_Layout *obj, const char *part, Eina_Bool clear)
1961{ 1982{
1962 Eo *box = efl_content_get(obj, part); 1983 Eo *box = efl_content_get(efl_part(obj, part));
1963 if (!box) return EINA_FALSE; 1984 if (!box) return EINA_FALSE;
1964 if (clear) 1985 if (clear)
1965 efl_pack_clear(box); 1986 efl_pack_clear(box);
@@ -1971,7 +1992,7 @@ elm_layout_box_remove_all(Elm_Layout *obj, const char *part, Eina_Bool clear)
1971EAPI Eina_Bool 1992EAPI Eina_Bool
1972elm_layout_table_pack(Elm_Layout *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan) 1993elm_layout_table_pack(Elm_Layout *obj, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
1973{ 1994{
1974 Eo *table = efl_content_get(obj, part); 1995 Eo *table = efl_content_get(efl_part(obj, part));
1975 if (!table) return EINA_FALSE; 1996 if (!table) return EINA_FALSE;
1976 efl_pack_grid(table, child, col, row, colspan, rowspan); 1997 efl_pack_grid(table, child, col, row, colspan, rowspan);
1977 return EINA_TRUE; 1998 return EINA_TRUE;
@@ -1980,7 +2001,7 @@ elm_layout_table_pack(Elm_Layout *obj, const char *part, Evas_Object *child, uns
1980EAPI Evas_Object * 2001EAPI Evas_Object *
1981elm_layout_table_unpack(Elm_Layout *obj, const char *part, Evas_Object *child) 2002elm_layout_table_unpack(Elm_Layout *obj, const char *part, Evas_Object *child)
1982{ 2003{
1983 Eo *table = efl_content_get(obj, part); 2004 Eo *table = efl_content_get(efl_part(obj, part));
1984 if (!table) return NULL; 2005 if (!table) return NULL;
1985 if (efl_pack_unpack(table, child)) 2006 if (efl_pack_unpack(table, child))
1986 return child; 2007 return child;
@@ -1990,7 +2011,7 @@ elm_layout_table_unpack(Elm_Layout *obj, const char *part, Evas_Object *child)
1990EAPI Eina_Bool 2011EAPI Eina_Bool
1991elm_layout_table_clear(Elm_Layout *obj, const char *part, Eina_Bool clear) 2012elm_layout_table_clear(Elm_Layout *obj, const char *part, Eina_Bool clear)
1992{ 2013{
1993 Eo *table = efl_content_get(obj, part); 2014 Eo *table = efl_content_get(efl_part(obj, part));
1994 if (!table) return EINA_FALSE; 2015 if (!table) return EINA_FALSE;
1995 if (clear) 2016 if (clear)
1996 efl_pack_clear(table); 2017 efl_pack_clear(table);
@@ -1999,4 +2020,14 @@ elm_layout_table_clear(Elm_Layout *obj, const char *part, Eina_Bool clear)
1999 return EINA_TRUE; 2020 return EINA_TRUE;
2000} 2021}
2001 2022
2023/* Efl.Part implementation */
2024
2025ELM_PART_IMPLEMENT(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
2026ELM_PART_IMPLEMENT_CONTENT_SET(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
2027ELM_PART_IMPLEMENT_CONTENT_GET(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
2028ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_layout, ELM_LAYOUT, Elm_Layout_Smart_Data, Elm_Part_Data)
2029#include "elm_layout_internal_part.eo.c"
2030
2031/* Efl.Part end */
2032
2002#include "elm_layout.eo.c" 2033#include "elm_layout.eo.c"
diff --git a/src/lib/elementary/elm_layout.eo b/src/lib/elementary/elm_layout.eo
index 92134e7d3b..d245c65f34 100644
--- a/src/lib/elementary/elm_layout.eo
+++ b/src/lib/elementary/elm_layout.eo
@@ -17,7 +17,7 @@ struct Elm.Layout_Part_Alias_Description
17 real_part: const(char)*; [[Target part name for the alias set on Elm.Layout_Part_Proxies_Description::real_part. An example of usage would be "default" on that field, with "elm.content.swallow" on this one]] 17 real_part: const(char)*; [[Target part name for the alias set on Elm.Layout_Part_Proxies_Description::real_part. An example of usage would be "default" on that field, with "elm.content.swallow" on this one]]
18} 18}
19 19
20class Elm.Layout (Elm.Widget, Efl.Container, Efl.File) 20class Elm.Layout (Elm.Widget, Efl.Part, Efl.Container, Efl.File)
21{ 21{
22 legacy_prefix: elm_layout; 22 legacy_prefix: elm_layout;
23 eo_prefix: elm_obj_layout; 23 eo_prefix: elm_obj_layout;
@@ -343,13 +343,14 @@ class Elm.Layout (Elm.Widget, Efl.Container, Efl.File)
343 Elm.Widget.disable; 343 Elm.Widget.disable;
344 Elm.Widget.sub_object_del; 344 Elm.Widget.sub_object_del;
345 Elm.Widget.on_focus; 345 Elm.Widget.on_focus;
346 Efl.Container.content.get;
347 Efl.Container.content.set;
348 Efl.Container.content_unset;
349 Efl.Container.content_part_name.get; 346 Efl.Container.content_part_name.get;
350 Efl.Container.content_count; 347 Efl.Container.content_count;
351 Efl.Container.content_remove; 348 Efl.Container.content_remove;
352 Efl.Container.content_iterate; 349 Efl.Container.content_iterate;
350 Efl.Container.content.set;
351 Efl.Container.content.get;
352 Efl.Container.content_unset;
353 Efl.Part.part;
353 } 354 }
354 events { 355 events {
355 theme,changed; 356 theme,changed;
diff --git a/src/lib/elementary/elm_layout_internal_part.eo b/src/lib/elementary/elm_layout_internal_part.eo
new file mode 100644
index 0000000000..79800be1c8
--- /dev/null
+++ b/src/lib/elementary/elm_layout_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Layout.Internal.Part (Eo.Base, Efl.Container)
2{
3 data: Elm_Part_Data;
4 implements {
5 Eo.Base.destructor;
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_layout_pack.c b/src/lib/elementary/elm_layout_pack.c
index b8efa896f6..e8ad6d7c5b 100644
--- a/src/lib/elementary/elm_layout_pack.c
+++ b/src/lib/elementary/elm_layout_pack.c
@@ -16,6 +16,8 @@
16#include "../evas/canvas/evas_box.eo.h" 16#include "../evas/canvas/evas_box.eo.h"
17#include "../evas/canvas/evas_table.eo.h" 17#include "../evas/canvas/evas_table.eo.h"
18 18
19#warning TODO: Implement proper lifecycle of proxy objects (single call)
20
19/* layout internals for box & table */ 21/* layout internals for box & table */
20Eina_Bool _elm_layout_box_append(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *child); 22Eina_Bool _elm_layout_box_append(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *child);
21Eina_Bool _elm_layout_box_prepend(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *child); 23Eina_Bool _elm_layout_box_prepend(Eo *obj, Elm_Layout_Smart_Data *sd, const char *part, Evas_Object *child);
@@ -269,7 +271,7 @@ _efl_ui_layout_internal_box_efl_pack_linear_pack_direction_get(Eo *obj EINA_UNUS
269{ 271{
270 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_ORIENT_NONE); 272 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_ORIENT_NONE);
271 273
272 return efl_pack_direction_get(efl_content_get(wd->resize_obj, pd->part)); 274 return efl_pack_direction_get(efl_content_get(efl_part(wd->resize_obj, pd->part)));
273} 275}
274 276
275EOLIAN static void 277EOLIAN static void
diff --git a/src/lib/elementary/elm_mapbuf.c b/src/lib/elementary/elm_mapbuf.c
index 22c33e114a..070dfc6cfa 100644
--- a/src/lib/elementary/elm_mapbuf.c
+++ b/src/lib/elementary/elm_mapbuf.c
@@ -11,6 +11,9 @@
11#include "elm_widget_container.h" 11#include "elm_widget_container.h"
12#include "elm_mapbuf.eo.h" 12#include "elm_mapbuf.eo.h"
13 13
14#include "elm_mapbuf_internal_part.eo.h"
15#include "elm_part_helper.h"
16
14#define MY_CLASS ELM_MAPBUF_CLASS 17#define MY_CLASS ELM_MAPBUF_CLASS
15 18
16#define MY_CLASS_NAME "Elm_Mapbuf" 19#define MY_CLASS_NAME "Elm_Mapbuf"
@@ -54,8 +57,8 @@ _changed_size_hints_cb(void *data,
54} 57}
55 58
56static void 59static void
57_elm_mapbuf_content_unset(Elm_Mapbuf_Data *sd, Evas_Object *obj, 60_elm_mapbuf_content_unset_internal(Elm_Mapbuf_Data *sd, Evas_Object *obj,
58 Evas_Object *content) 61 Evas_Object *content)
59{ 62{
60 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); 63 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
61 64
@@ -79,7 +82,7 @@ _elm_mapbuf_elm_widget_sub_object_del(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Object
79 if (!int_ret) return EINA_FALSE; 82 if (!int_ret) return EINA_FALSE;
80 83
81 if (sobj == sd->content) 84 if (sobj == sd->content)
82 _elm_mapbuf_content_unset(sd, (Evas_Object *)obj, sobj); 85 _elm_mapbuf_content_unset_internal(sd, (Evas_Object *)obj, sobj);
83 return EINA_TRUE; 86 return EINA_TRUE;
84} 87}
85 88
@@ -190,8 +193,8 @@ _elm_mapbuf_evas_object_smart_hide(Eo *obj, Elm_Mapbuf_Data *sd)
190 _configure(obj); 193 _configure(obj);
191} 194}
192 195
193EOLIAN static Eina_Bool 196static Eina_Bool
194_elm_mapbuf_efl_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char *part, Evas_Object *content) 197_elm_mapbuf_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char *part, Evas_Object *content)
195{ 198{
196 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE); 199 ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
197 200
@@ -222,15 +225,15 @@ _elm_mapbuf_efl_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, const char *
222 return EINA_TRUE; 225 return EINA_TRUE;
223} 226}
224 227
225EOLIAN static Evas_Object* 228static Evas_Object*
226_elm_mapbuf_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Mapbuf_Data *sd, const char *part) 229_elm_mapbuf_content_get(Eo *obj EINA_UNUSED, Elm_Mapbuf_Data *sd, const char *part)
227{ 230{
228 if (part && strcmp(part, "default")) return NULL; 231 if (part && strcmp(part, "default")) return NULL;
229 return sd->content; 232 return sd->content;
230} 233}
231 234
232EOLIAN static Evas_Object* 235static Evas_Object*
233_elm_mapbuf_efl_container_content_unset(Eo *obj, Elm_Mapbuf_Data *sd, const char *part) 236_elm_mapbuf_content_unset(Eo *obj, Elm_Mapbuf_Data *sd, const char *part)
234{ 237{
235 Evas_Object *content; 238 Evas_Object *content;
236 if (part && strcmp(part, "default")) return NULL; 239 if (part && strcmp(part, "default")) return NULL;
@@ -238,10 +241,28 @@ _elm_mapbuf_efl_container_content_unset(Eo *obj, Elm_Mapbuf_Data *sd, const char
238 241
239 content = sd->content; 242 content = sd->content;
240 elm_widget_sub_object_del(obj, content); 243 elm_widget_sub_object_del(obj, content);
241 _elm_mapbuf_content_unset(sd, obj, content); 244 _elm_mapbuf_content_unset_internal(sd, obj, content);
242 return content; 245 return content;
243} 246}
244 247
248EOLIAN static Eina_Bool
249_elm_mapbuf_efl_container_content_set(Eo *obj, Elm_Mapbuf_Data *sd, Evas_Object *content)
250{
251 return _elm_mapbuf_content_set(obj, sd, NULL, content);
252}
253
254EOLIAN static Evas_Object*
255_elm_mapbuf_efl_container_content_get(Eo *obj, Elm_Mapbuf_Data *sd)
256{
257 return _elm_mapbuf_content_get(obj, sd, NULL);
258}
259
260EOLIAN static Evas_Object*
261_elm_mapbuf_efl_container_content_unset(Eo *obj, Elm_Mapbuf_Data *sd)
262{
263 return _elm_mapbuf_content_unset(obj, sd, NULL);
264}
265
245EOLIAN static void 266EOLIAN static void
246_elm_mapbuf_evas_object_smart_del(Eo *obj, Elm_Mapbuf_Data *priv) 267_elm_mapbuf_evas_object_smart_del(Eo *obj, Elm_Mapbuf_Data *priv)
247{ 268{
@@ -418,4 +439,14 @@ _elm_mapbuf_class_constructor(Eo_Class *klass)
418 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 439 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
419} 440}
420 441
442/* Efl.Part begin */
443
444ELM_PART_IMPLEMENT(elm_mapbuf, ELM_MAPBUF, Elm_Mapbuf_Data, Elm_Part_Data)
445ELM_PART_IMPLEMENT_CONTENT_SET(elm_mapbuf, ELM_MAPBUF, Elm_Mapbuf_Data, Elm_Part_Data)
446ELM_PART_IMPLEMENT_CONTENT_GET(elm_mapbuf, ELM_MAPBUF, Elm_Mapbuf_Data, Elm_Part_Data)
447ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_mapbuf, ELM_MAPBUF, Elm_Mapbuf_Data, Elm_Part_Data)
448#include "elm_mapbuf_internal_part.eo.c"
449
450/* Efl.Part end */
451
421#include "elm_mapbuf.eo.c" 452#include "elm_mapbuf.eo.c"
diff --git a/src/lib/elementary/elm_mapbuf.eo b/src/lib/elementary/elm_mapbuf.eo
index 569a31542f..e5c4d95025 100644
--- a/src/lib/elementary/elm_mapbuf.eo
+++ b/src/lib/elementary/elm_mapbuf.eo
@@ -1,4 +1,4 @@
1class Elm.Mapbuf (Elm.Widget, Efl.Container) 1class Elm.Mapbuf (Elm.Widget, Efl.Container, Efl.Part)
2{ 2{
3 legacy_prefix: elm_mapbuf; 3 legacy_prefix: elm_mapbuf;
4 eo_prefix: elm_private_mapbuf; 4 eo_prefix: elm_private_mapbuf;
@@ -140,6 +140,7 @@ class Elm.Mapbuf (Elm.Widget, Efl.Container)
140 Efl.Container.content.get; 140 Efl.Container.content.get;
141 Efl.Container.content.set; 141 Efl.Container.content.set;
142 Efl.Container.content_unset; 142 Efl.Container.content_unset;
143 Efl.Part.part;
143 } 144 }
144 145
145} 146}
diff --git a/src/lib/elementary/elm_mapbuf_internal_part.eo b/src/lib/elementary/elm_mapbuf_internal_part.eo
new file mode 100644
index 0000000000..f7c15d5600
--- /dev/null
+++ b/src/lib/elementary/elm_mapbuf_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Mapbuf.Internal.Part (Eo.Base, Efl.Container)
2{
3 data: Elm_Part_Data;
4 implements {
5 Eo.Base.destructor;
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_naviframe.eo b/src/lib/elementary/elm_naviframe.eo
index f23e0522ca..fc6f9cd46f 100644
--- a/src/lib/elementary/elm_naviframe.eo
+++ b/src/lib/elementary/elm_naviframe.eo
@@ -153,14 +153,12 @@ class Elm.Naviframe (Elm.Layout, Elm.Interface.Atspi_Widget_Action)
153 Elm.Widget.translate; 153 Elm.Widget.translate;
154 Elm.Widget.theme_apply; 154 Elm.Widget.theme_apply;
155 Elm.Widget.event; 155 Elm.Widget.event;
156 Efl.Container.content.get;
157 Efl.Container.content.set;
158 Efl.Container.content_unset;
159 Elm.Layout.text.set; 156 Elm.Layout.text.set;
160 Elm.Layout.text.get; 157 Elm.Layout.text.get;
161 Elm.Layout.signal_emit; 158 Elm.Layout.signal_emit;
162 Elm.Layout.sizing_eval; 159 Elm.Layout.sizing_eval;
163 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 160 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
161 Efl.Part.part;
164 } 162 }
165 events { 163 events {
166 transition,finished; 164 transition,finished;
diff --git a/src/lib/elementary/elm_naviframe_internal_part.eo b/src/lib/elementary/elm_naviframe_internal_part.eo
new file mode 100644
index 0000000000..d943ce62d2
--- /dev/null
+++ b/src/lib/elementary/elm_naviframe_internal_part.eo
@@ -0,0 +1,9 @@
1class Elm.Naviframe.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content.get;
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/elm_notify.c b/src/lib/elementary/elm_notify.c
index 5314210124..28d877e314 100644
--- a/src/lib/elementary/elm_notify.c
+++ b/src/lib/elementary/elm_notify.c
@@ -11,6 +11,9 @@
11#include "elm_widget_notify.h" 11#include "elm_widget_notify.h"
12#include "elm_widget_container.h" 12#include "elm_widget_container.h"
13 13
14#include "elm_notify_internal_part.eo.h"
15#include "elm_part_helper.h"
16
14#define MY_CLASS ELM_NOTIFY_CLASS 17#define MY_CLASS ELM_NOTIFY_CLASS
15 18
16#define MY_CLASS_NAME "Elm_Notify" 19#define MY_CLASS_NAME "Elm_Notify"
@@ -370,8 +373,8 @@ _elm_notify_elm_widget_focus_direction(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd,
370 return elm_widget_focus_direction_get(cur, base, degree, direction, direction_item, weight); 373 return elm_widget_focus_direction_get(cur, base, degree, direction, direction_item, weight);
371} 374}
372 375
373EOLIAN static Eina_Bool 376static Eina_Bool
374_elm_notify_efl_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char *part, Evas_Object *content) 377_elm_notify_content_set(Eo *obj, Elm_Notify_Data *sd, const char *part, Evas_Object *content)
375{ 378{
376 if (part && strcmp(part, "default")) return EINA_FALSE; 379 if (part && strcmp(part, "default")) return EINA_FALSE;
377 if (sd->content == content) return EINA_TRUE; 380 if (sd->content == content) return EINA_TRUE;
@@ -393,16 +396,16 @@ _elm_notify_efl_container_content_set(Eo *obj, Elm_Notify_Data *sd, const char *
393 return EINA_TRUE; 396 return EINA_TRUE;
394} 397}
395 398
396EOLIAN static Evas_Object* 399static Evas_Object*
397_elm_notify_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, const char *part) 400_elm_notify_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd, const char *part)
398{ 401{
399 if (part && strcmp(part, "default")) return NULL; 402 if (part && strcmp(part, "default")) return NULL;
400 403
401 return sd->content; 404 return sd->content;
402} 405}
403 406
404EOLIAN static Evas_Object* 407static Evas_Object*
405_elm_notify_efl_container_content_unset(Eo *obj, Elm_Notify_Data *sd, const char *part) 408_elm_notify_content_unset(Eo *obj, Elm_Notify_Data *sd, const char *part)
406{ 409{
407 Evas_Object *content; 410 Evas_Object *content;
408 411
@@ -416,6 +419,24 @@ _elm_notify_efl_container_content_unset(Eo *obj, Elm_Notify_Data *sd, const char
416 return content; 419 return content;
417} 420}
418 421
422EOLIAN static Eina_Bool
423_elm_notify_efl_container_content_set(Eo *obj, Elm_Notify_Data *sd, Evas_Object *content)
424{
425 return _elm_notify_content_set(obj, sd, NULL, content);
426}
427
428EOLIAN static Evas_Object*
429_elm_notify_efl_container_content_get(Eo *obj EINA_UNUSED, Elm_Notify_Data *sd)
430{
431 return _elm_notify_content_get(obj, sd, NULL);
432}
433
434EOLIAN static Evas_Object*
435_elm_notify_efl_container_content_unset(Eo *obj, Elm_Notify_Data *sd)
436{
437 return _elm_notify_content_unset(obj, sd, NULL);
438}
439
419static void 440static void
420_hide_finished_cb(void *data, 441_hide_finished_cb(void *data,
421 Evas_Object *obj EINA_UNUSED, 442 Evas_Object *obj EINA_UNUSED,
@@ -693,4 +714,14 @@ _elm_notify_class_constructor(Eo_Class *klass)
693 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 714 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
694} 715}
695 716
717/* Efl.Part begin */
718
719ELM_PART_IMPLEMENT(elm_notify, ELM_NOTIFY, Elm_Notify_Data, Elm_Part_Data)
720ELM_PART_IMPLEMENT_CONTENT_SET(elm_notify, ELM_NOTIFY, Elm_Notify_Data, Elm_Part_Data)
721ELM_PART_IMPLEMENT_CONTENT_GET(elm_notify, ELM_NOTIFY, Elm_Notify_Data, Elm_Part_Data)
722ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_notify, ELM_NOTIFY, Elm_Notify_Data, Elm_Part_Data)
723#include "elm_notify_internal_part.eo.c"
724
725/* Efl.Part end */
726
696#include "elm_notify.eo.c" 727#include "elm_notify.eo.c"
diff --git a/src/lib/elementary/elm_notify.eo b/src/lib/elementary/elm_notify.eo
index b1a3e6c04e..981e2178c4 100644
--- a/src/lib/elementary/elm_notify.eo
+++ b/src/lib/elementary/elm_notify.eo
@@ -1,4 +1,4 @@
1class Elm.Notify (Elm.Widget, Efl.Container) 1class Elm.Notify (Elm.Widget, Efl.Container, Efl.Part)
2{ 2{
3 legacy_prefix: elm_notify; 3 legacy_prefix: elm_notify;
4 eo_prefix: elm_obj_notify; 4 eo_prefix: elm_obj_notify;
@@ -97,6 +97,7 @@ class Elm.Notify (Elm.Widget, Efl.Container)
97 Efl.Container.content.get; 97 Efl.Container.content.get;
98 Efl.Container.content.set; 98 Efl.Container.content.set;
99 Efl.Container.content_unset; 99 Efl.Container.content_unset;
100 Efl.Part.part;
100 } 101 }
101 events { 102 events {
102 block,clicked; 103 block,clicked;
diff --git a/src/lib/elementary/elm_notify_internal_part.eo b/src/lib/elementary/elm_notify_internal_part.eo
new file mode 100644
index 0000000000..686902c740
--- /dev/null
+++ b/src/lib/elementary/elm_notify_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Notify.Internal.Part (Eo.Base, Efl.Container)
2{
3 data: Elm_Part_Data;
4 implements {
5 Eo.Base.destructor;
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 3b4dbf1fe0..30197b4c90 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -12,6 +12,9 @@
12 12
13#include "els_box.h" 13#include "els_box.h"
14 14
15#include "elm_panel_internal_part.eo.h"
16#include "elm_part_helper.h"
17
15#define MY_CLASS ELM_PANEL_CLASS 18#define MY_CLASS ELM_PANEL_CLASS
16 19
17#define MY_CLASS_NAME "Elm_Panel" 20#define MY_CLASS_NAME "Elm_Panel"
@@ -245,9 +248,8 @@ _elm_panel_elm_widget_theme_apply(Eo *obj, Elm_Panel_Data *sd)
245 elm_coords_finger_size_adjust(1, &minw, 1, &minh); 248 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
246 evas_object_size_hint_min_set(sd->event, minw, minh); 249 evas_object_size_hint_min_set(sd->event, minw, minh);
247 250
248 if (edje_object_part_exists 251 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.event"))
249 (wd->resize_obj, "elm.swallow.event")) 252 efl_content_set(efl_part(eo_super(obj, MY_CLASS), "elm.swallow.event"), sd->event);
250 efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", sd->event);
251 } 253 }
252 254
253 elm_layout_sizing_eval(obj); 255 elm_layout_sizing_eval(obj);
@@ -909,8 +911,8 @@ _elm_panel_elm_widget_event(Eo *obj, Elm_Panel_Data *_pd EINA_UNUSED, Evas_Objec
909 return EINA_TRUE; 911 return EINA_TRUE;
910} 912}
911 913
912EOLIAN static Eina_Bool 914static Eina_Bool
913_elm_panel_efl_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *part, Evas_Object *content) 915_elm_panel_content_set(Eo *obj, Elm_Panel_Data *sd, const char *part, Evas_Object *content)
914{ 916{
915 if (part) 917 if (part)
916 { 918 {
@@ -923,7 +925,7 @@ _elm_panel_efl_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa
923 if (strcmp(part, "default")) 925 if (strcmp(part, "default"))
924 { 926 {
925 Eina_Bool int_ret = EINA_TRUE; 927 Eina_Bool int_ret = EINA_TRUE;
926 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 928 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
927 return int_ret; 929 return int_ret;
928 } 930 }
929 } 931 }
@@ -945,8 +947,8 @@ _elm_panel_efl_container_content_set(Eo *obj, Elm_Panel_Data *sd, const char *pa
945 return EINA_TRUE; 947 return EINA_TRUE;
946} 948}
947 949
948EOLIAN static Evas_Object* 950static Evas_Object*
949_elm_panel_efl_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *part) 951_elm_panel_content_get(Eo *obj, Elm_Panel_Data *sd, const char *part)
950{ 952{
951 if (part) 953 if (part)
952 { 954 {
@@ -959,7 +961,7 @@ _elm_panel_efl_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *pa
959 if (strcmp(part, "default")) 961 if (strcmp(part, "default"))
960 { 962 {
961 Evas_Object *ret = NULL; 963 Evas_Object *ret = NULL;
962 ret = efl_content_get(eo_super(obj, MY_CLASS), part); 964 ret = efl_content_get(efl_part(eo_super(obj, MY_CLASS), part));
963 return ret; 965 return ret;
964 } 966 }
965 } 967 }
@@ -967,8 +969,8 @@ _elm_panel_efl_container_content_get(Eo *obj, Elm_Panel_Data *sd, const char *pa
967 return sd->content; 969 return sd->content;
968} 970}
969 971
970EOLIAN static Evas_Object* 972static Evas_Object*
971_elm_panel_efl_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *part) 973_elm_panel_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *part)
972{ 974{
973 Evas_Object *ret = NULL; 975 Evas_Object *ret = NULL;
974 976
@@ -982,7 +984,7 @@ _elm_panel_efl_container_content_unset(Eo *obj, Elm_Panel_Data *sd, const char *
982 } 984 }
983 if (strcmp(part, "default")) 985 if (strcmp(part, "default"))
984 { 986 {
985 ret = efl_content_unset(eo_super(obj, MY_CLASS), part); 987 ret = efl_content_unset(efl_part(eo_super(obj, MY_CLASS), part));
986 return ret; 988 return ret;
987 } 989 }
988 } 990 }
@@ -1039,7 +1041,7 @@ _elm_panel_evas_object_smart_add(Eo *obj, Elm_Panel_Data *priv)
1039 1041
1040 elm_coords_finger_size_adjust(1, &minw, 1, &minh); 1042 elm_coords_finger_size_adjust(1, &minw, 1, &minh);
1041 evas_object_size_hint_min_set(priv->event, minw, minh); 1043 evas_object_size_hint_min_set(priv->event, minw, minh);
1042 efl_content_set(eo_super(obj, MY_CLASS), "elm.swallow.event", priv->event); 1044 efl_content_set(efl_part(eo_super(obj, MY_CLASS), "elm.swallow.event"), priv->event);
1043 } 1045 }
1044 } 1046 }
1045 1047
@@ -1524,4 +1526,14 @@ _elm_panel_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNUSED
1524 return &atspi_actions[0]; 1526 return &atspi_actions[0];
1525} 1527}
1526 1528
1529/* Efl.Part begin */
1530
1531ELM_PART_IMPLEMENT(elm_panel, ELM_PANEL, Elm_Panel_Data, Elm_Part_Data)
1532ELM_PART_IMPLEMENT_CONTENT_SET(elm_panel, ELM_PANEL, Elm_Panel_Data, Elm_Part_Data)
1533ELM_PART_IMPLEMENT_CONTENT_GET(elm_panel, ELM_PANEL, Elm_Panel_Data, Elm_Part_Data)
1534ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_panel, ELM_PANEL, Elm_Panel_Data, Elm_Part_Data)
1535#include "elm_panel_internal_part.eo.c"
1536
1537/* Efl.Part end */
1538
1527#include "elm_panel.eo.c" 1539#include "elm_panel.eo.c"
diff --git a/src/lib/elementary/elm_panel.eo b/src/lib/elementary/elm_panel.eo
index d4f5524257..27f118b0be 100644
--- a/src/lib/elementary/elm_panel.eo
+++ b/src/lib/elementary/elm_panel.eo
@@ -80,10 +80,8 @@ class Elm.Panel (Elm.Layout, Elm.Interface_Scrollable,
80 Elm.Widget.access; 80 Elm.Widget.access;
81 Elm.Widget.event; 81 Elm.Widget.event;
82 Elm.Widget.on_focus_region; 82 Elm.Widget.on_focus_region;
83 Efl.Container.content.get;
84 Efl.Container.content_unset;
85 Efl.Container.content.set;
86 Elm.Layout.sizing_eval; 83 Elm.Layout.sizing_eval;
87 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 84 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
85 Efl.Part.part;
88 } 86 }
89} 87}
diff --git a/src/lib/elementary/elm_panel_internal_part.eo b/src/lib/elementary/elm_panel_internal_part.eo
new file mode 100644
index 0000000000..1736399c61
--- /dev/null
+++ b/src/lib/elementary/elm_panel_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Panel.Internal.Part (Eo.Base, Efl.Container)
2{
3 data: Elm_Part_Data;
4 implements {
5 Eo.Base.destructor;
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_part_helper.h b/src/lib/elementary/elm_part_helper.h
new file mode 100644
index 0000000000..d1593d9a7e
--- /dev/null
+++ b/src/lib/elementary/elm_part_helper.h
@@ -0,0 +1,120 @@
1#ifndef _ELM_PART_HELPER_H
2#define _ELM_PART_HELPER_H
3
4#include "elm_layout_internal_part.eo.h"
5
6#define ELM_PART_REF(obj, pd) do { if (!(pd->temp++)) eo_ref(obj); } while(0)
7#define ELM_PART_UNREF(obj, pd) do { if (pd->temp) { if (!(--pd->temp)) eo_unref(obj); } } while(0)
8#define ELM_PART_RETURN_VAL(a) do { typeof(a) _ret = a; ELM_PART_UNREF(obj, pd); return _ret; } while(0)
9#define ELM_PART_RETURN_VOID do { ELM_PART_UNREF(obj, pd); return; } while(0)
10#define ELM_PART_CALL(a) ({ ELM_PART_REF(obj, pd); a; })
11
12typedef struct _Elm_Part_Data Elm_Part_Data;
13struct _Elm_Part_Data
14{
15 Eo *obj;
16 void *sd;
17 char *part;
18 unsigned char temp;
19};
20
21// Note: this generic implementation can be improved to support part object
22// caching or something...
23
24// Main part proxy implementation
25#define ELM_PART_IMPLEMENT(type, TYPE, typedata, partdata) \
26\
27static EOLIAN void \
28_ ## type ## _internal_part_eo_base_destructor(Eo *obj, partdata *pd) \
29{ \
30 free(pd->part); \
31 eo_data_xunref(pd->obj, pd->sd, obj); \
32 eo_destructor(eo_super(obj, TYPE ## _INTERNAL_PART_CLASS)); \
33} \
34\
35static EOLIAN Eo_Base * \
36_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
37{ \
38 partdata *pd; \
39 Eo *proxy; \
40\
41 proxy = eo_add(TYPE ## _INTERNAL_PART_CLASS, (Eo *) obj); \
42 pd = eo_data_scope_get(proxy, TYPE ## _INTERNAL_PART_CLASS); \
43 if (pd) \
44 { \
45 pd->obj = (Eo *) obj; \
46 pd->sd = eo_data_xref(pd->obj, TYPE ## _CLASS, proxy); \
47 pd->part = part ? strdup(part) : NULL; \
48 pd->temp = 1; \
49 } \
50\
51 return proxy; \
52}
53
54#define ELM_PART_IMPLEMENT_CONTENT_SET(type, TYPE, typedata, partdata) \
55static EOLIAN Eina_Bool \
56_ ## type ## _internal_part_efl_container_content_set(Eo *obj, partdata *pd, Efl_Gfx *content) \
57{ \
58 ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, pd->sd, pd->part, content)); \
59}
60
61#define ELM_PART_IMPLEMENT_CONTENT_GET(type, TYPE, typedata, partdata) \
62static EOLIAN Efl_Gfx * \
63_ ## type ## _internal_part_efl_container_content_get(Eo *obj, partdata *pd) \
64{ \
65 ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, pd->sd, pd->part)); \
66}
67
68#define ELM_PART_IMPLEMENT_CONTENT_UNSET(type, TYPE, typedata, partdata) \
69static EOLIAN Efl_Gfx * \
70_ ## type ## _internal_part_efl_container_content_unset(Eo *obj, partdata *pd) \
71{ \
72 ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, pd->sd, pd->part)); \
73}
74
75// For widgets that inherit from something with parts (eg. from Elm.Layout)
76#define ELM_PART_OVERRIDE(type, TYPE, SUPER, typedata, partdata) \
77static EOLIAN Eo_Base * \
78_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
79{ \
80 partdata *pd; \
81 Eo *proxy; \
82\
83 proxy = eo_add(TYPE ## _INTERNAL_PART_CLASS, (Eo *) obj); \
84 pd = eo_data_scope_get(proxy, SUPER ## _INTERNAL_PART_CLASS); \
85 if (pd) \
86 { \
87 pd->obj = (Eo *) obj; \
88 pd->sd = eo_data_xref(pd->obj, SUPER ## _CLASS, proxy); \
89 pd->part = part ? strdup(part) : NULL; \
90 pd->temp = 1; \
91 } \
92\
93 return proxy; \
94}
95
96#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, SUPER, typedata, partdata) \
97static EOLIAN Eina_Bool \
98_ ## type ## _internal_part_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content) \
99{ \
100 partdata *pd = eo_data_scope_get(obj, SUPER ## _INTERNAL_PART_CLASS); \
101 ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, pd->sd, pd->part, content)); \
102}
103
104#define ELM_PART_OVERRIDE_CONTENT_GET(type, TYPE, SUPER, typedata, partdata) \
105static EOLIAN Efl_Gfx * \
106_ ## type ## _internal_part_efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED) \
107{ \
108 partdata *pd = eo_data_scope_get(obj, SUPER ## _INTERNAL_PART_CLASS); \
109 ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, pd->sd, pd->part)); \
110}
111
112#define ELM_PART_OVERRIDE_CONTENT_UNSET(type, TYPE, SUPER, typedata, partdata) \
113static EOLIAN Efl_Gfx * \
114_ ## type ## _internal_part_efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED) \
115{ \
116 partdata *pd = eo_data_scope_get(obj, SUPER ## _INTERNAL_PART_CLASS); \
117 ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, pd->sd, pd->part)); \
118}
119
120#endif
diff --git a/src/lib/elementary/elm_player.eo b/src/lib/elementary/elm_player.eo
index e218b0923a..c8381abfab 100644
--- a/src/lib/elementary/elm_player.eo
+++ b/src/lib/elementary/elm_player.eo
@@ -10,9 +10,9 @@ class Elm.Player (Elm.Layout, Elm.Interface.Atspi_Widget_Action)
10 Evas.Object.Smart.del; 10 Evas.Object.Smart.del;
11 Elm.Widget.theme_apply; 11 Elm.Widget.theme_apply;
12 Elm.Widget.event; 12 Elm.Widget.event;
13 Efl.Container.content.set;
14 Elm.Layout.sizing_eval; 13 Elm.Layout.sizing_eval;
15 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 14 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
15 Efl.Part.part;
16 } 16 }
17 events { 17 events {
18 forward,clicked; 18 forward,clicked;
diff --git a/src/lib/elementary/elm_player_internal_part.eo b/src/lib/elementary/elm_player_internal_part.eo
new file mode 100644
index 0000000000..86dceaa057
--- /dev/null
+++ b/src/lib/elementary/elm_player_internal_part.eo
@@ -0,0 +1,7 @@
1class Elm.Player.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 }
7}
diff --git a/src/lib/elementary/elm_popup.eo b/src/lib/elementary/elm_popup.eo
index 58c7f5a0e6..535724853a 100644
--- a/src/lib/elementary/elm_popup.eo
+++ b/src/lib/elementary/elm_popup.eo
@@ -179,15 +179,13 @@ class Elm.Popup (Elm.Layout, Elm.Interface.Atspi_Widget_Action)
179 Elm.Widget.translate; 179 Elm.Widget.translate;
180 Elm.Widget.sub_object_del; 180 Elm.Widget.sub_object_del;
181 Elm.Widget.event; 181 Elm.Widget.event;
182 Efl.Container.content.get;
183 Efl.Container.content.set;
184 Efl.Container.content_unset;
185 Elm.Layout.text.set; 182 Elm.Layout.text.set;
186 Elm.Layout.text.get; 183 Elm.Layout.text.get;
187 Elm.Layout.sizing_eval; 184 Elm.Layout.sizing_eval;
188 Elm.Layout.signal_emit; 185 Elm.Layout.signal_emit;
189 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 186 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
190 Elm.Interface.Atspi_Accessible.state_set.get; 187 Elm.Interface.Atspi_Accessible.state_set.get;
188 Efl.Part.part;
191 } 189 }
192 events { 190 events {
193 block,clicked; 191 block,clicked;
diff --git a/src/lib/elementary/elm_popup_internal_part.eo b/src/lib/elementary/elm_popup_internal_part.eo
new file mode 100644
index 0000000000..3343746bec
--- /dev/null
+++ b/src/lib/elementary/elm_popup_internal_part.eo
@@ -0,0 +1,9 @@
1class Elm.Popup.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 Efl.Container.content.get;
7 Efl.Container.content_unset;
8 }
9}
diff --git a/src/lib/elementary/elm_progressbar.c b/src/lib/elementary/elm_progressbar.c
index 3e2256bc1d..42e9668dc7 100644
--- a/src/lib/elementary/elm_progressbar.c
+++ b/src/lib/elementary/elm_progressbar.c
@@ -11,6 +11,9 @@
11#include "elm_widget_progressbar.h" 11#include "elm_widget_progressbar.h"
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13 13
14#include "elm_progressbar_internal_part.eo.h"
15#include "elm_part_helper.h"
16
14#define MY_CLASS ELM_PROGRESSBAR_CLASS 17#define MY_CLASS ELM_PROGRESSBAR_CLASS
15 18
16#define MY_CLASS_NAME "Elm_Progressbar" 19#define MY_CLASS_NAME "Elm_Progressbar"
@@ -174,11 +177,11 @@ _elm_progressbar_elm_widget_sub_object_del(Eo *obj, Elm_Progressbar_Data *_pd EI
174/* FIXME: replicated from elm_layout just because progressbar's icon 177/* FIXME: replicated from elm_layout just because progressbar's icon
175 * spot is elm.swallow.content, not elm.swallow.icon. Fix that 178 * spot is elm.swallow.content, not elm.swallow.icon. Fix that
176 * whenever we can changed the theme API */ 179 * whenever we can changed the theme API */
177EOLIAN static Eina_Bool 180static Eina_Bool
178_elm_progressbar_efl_container_content_set(Eo *obj, Elm_Progressbar_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content) 181_elm_progressbar_content_set(Eo *obj, Elm_Progressbar_Data *_pd EINA_UNUSED, const char *part, Evas_Object *content)
179{ 182{
180 Eina_Bool int_ret = EINA_FALSE; 183 Eina_Bool int_ret = EINA_FALSE;
181 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content); 184 int_ret = efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
182 if (!int_ret) return EINA_FALSE; 185 if (!int_ret) return EINA_FALSE;
183 186
184 _icon_signal_emit(obj); 187 _icon_signal_emit(obj);
@@ -649,4 +652,12 @@ _elm_progressbar_class_constructor(Eo_Class *klass)
649 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass); 652 evas_smart_legacy_type_register(MY_CLASS_NAME_LEGACY, klass);
650} 653}
651 654
655/* Efl.Part begin */
656
657ELM_PART_OVERRIDE(elm_progressbar, ELM_PROGRESSBAR, ELM_LAYOUT, Elm_Progressbar_Data, Elm_Part_Data)
658ELM_PART_OVERRIDE_CONTENT_SET(elm_progressbar, ELM_PROGRESSBAR, ELM_LAYOUT, Elm_Progressbar_Data, Elm_Part_Data)
659#include "elm_progressbar_internal_part.eo.c"
660
661/* Efl.Part end */
662
652#include "elm_progressbar.eo.c" 663#include "elm_progressbar.eo.c"
diff --git a/src/lib/elementary/elm_progressbar.eo b/src/lib/elementary/elm_progressbar.eo
index 754a86b959..13cc072e79 100644
--- a/src/lib/elementary/elm_progressbar.eo
+++ b/src/lib/elementary/elm_progressbar.eo
@@ -63,7 +63,6 @@ class Elm.Progressbar (Elm.Layout, Efl.Ui.Progress,
63 Elm.Widget.focus_next_manager_is; 63 Elm.Widget.focus_next_manager_is;
64 Elm.Widget.focus_direction_manager_is; 64 Elm.Widget.focus_direction_manager_is;
65 Elm.Widget.sub_object_del; 65 Elm.Widget.sub_object_del;
66 Efl.Container.content.set;
67 Elm.Layout.text_aliases.get; 66 Elm.Layout.text_aliases.get;
68 Elm.Layout.content_aliases.get; 67 Elm.Layout.content_aliases.get;
69 Elm.Layout.sizing_eval; 68 Elm.Layout.sizing_eval;
@@ -71,6 +70,7 @@ class Elm.Progressbar (Elm.Layout, Efl.Ui.Progress,
71 Efl.Ui.Progress.progress_value; 70 Efl.Ui.Progress.progress_value;
72 Efl.Ui.Progress.unit_format; 71 Efl.Ui.Progress.unit_format;
73 Efl.Orientation.orientation; 72 Efl.Orientation.orientation;
73 Efl.Part.part;
74 } 74 }
75 events { 75 events {
76 changed; 76 changed;
diff --git a/src/lib/elementary/elm_progressbar_internal_part.eo b/src/lib/elementary/elm_progressbar_internal_part.eo
new file mode 100644
index 0000000000..75113f1b47
--- /dev/null
+++ b/src/lib/elementary/elm_progressbar_internal_part.eo
@@ -0,0 +1,7 @@
1class Elm.Progressbar.Internal.Part (Elm.Layout.Internal.Part)
2{
3 data: null;
4 implements {
5 Efl.Container.content.set;
6 }
7}
diff --git a/src/lib/elementary/elm_scroller.c b/src/lib/elementary/elm_scroller.c
index b3a8ada4dd..27f710dd6e 100644
--- a/src/lib/elementary/elm_scroller.c
+++ b/src/lib/elementary/elm_scroller.c
@@ -12,6 +12,9 @@
12#include "elm_widget_layout.h" 12#include "elm_widget_layout.h"
13#include "elm_widget_scroller.h" 13#include "elm_widget_scroller.h"
14 14
15#include "elm_scroller_internal_part.eo.h"
16#include "elm_part_helper.h"
17
15#define MY_CLASS ELM_SCROLLER_CLASS 18#define MY_CLASS ELM_SCROLLER_CLASS
16 19
17#define MY_CLASS_NAME "Elm_Scroller" 20#define MY_CLASS_NAME "Elm_Scroller"
@@ -757,14 +760,12 @@ _loop_content_set(Evas_Object *obj, Elm_Scroller_Data *sd, Evas_Object *content)
757 } 760 }
758} 761}
759 762
760EOLIAN static Eina_Bool 763static Eina_Bool
761_elm_scroller_efl_container_content_set(Eo *obj, Elm_Scroller_Data *sd, const char *part, Evas_Object *content) 764_elm_scroller_content_set(Eo *obj, Elm_Scroller_Data *sd, const char *part, Evas_Object *content)
762{ 765{
763 if (part && strcmp(part, "default")) 766 if (part && strcmp(part, "default"))
764 { 767 {
765 Eina_Bool int_ret = EINA_FALSE; 768 return efl_content_set(efl_part(eo_super(obj, MY_CLASS), part), content);
766 int_ret = efl_content_set(eo_super(obj, MY_CLASS), part, content);
767 return int_ret;
768 } 769 }
769 770
770 if (sd->content == content) return EINA_TRUE; 771 if (sd->content == content) return EINA_TRUE;
@@ -802,27 +803,24 @@ _elm_scroller_efl_container_content_set(Eo *obj, Elm_Scroller_Data *sd, const ch
802 return EINA_TRUE; 803 return EINA_TRUE;
803} 804}
804 805
805EOLIAN static Evas_Object* 806static Evas_Object*
806_elm_scroller_efl_container_content_get(Eo *obj, Elm_Scroller_Data *sd, const char *part) 807_elm_scroller_content_get(Eo *obj, Elm_Scroller_Data *sd, const char *part)
807{ 808{
808 if (part && strcmp(part, "default")) 809 if (part && strcmp(part, "default"))
809 { 810 {
810 Evas_Object *ret = NULL; 811 return efl_content_get(efl_part(eo_super(obj, MY_CLASS), part));
811 ret = efl_content_get(eo_super(obj, MY_CLASS), part);
812 return ret;
813 } 812 }
814 813
815 return sd->content; 814 return sd->content;
816} 815}
817 816
818EOLIAN static Evas_Object* 817static Evas_Object*
819_elm_scroller_efl_container_content_unset(Eo *obj, Elm_Scroller_Data *sd, const char *part) 818_elm_scroller_content_unset(Eo *obj, Elm_Scroller_Data *sd, const char *part)
820{ 819{
821 Evas_Object *ret = NULL; 820 Evas_Object *ret = NULL;
822 if (part && strcmp(part, "default")) 821 if (part && strcmp(part, "default"))
823 { 822 {
824 ret = efl_content_unset(eo_super(obj, MY_CLASS), part); 823 return efl_content_unset(efl_part(eo_super(obj, MY_CLASS), part));
825 return ret;
826 } 824 }
827 825
828 if (!sd->content) return NULL; 826 if (!sd->content) return NULL;
@@ -1414,4 +1412,23 @@ _elm_scroller_elm_interface_atspi_widget_action_elm_actions_get(Eo *obj EINA_UNU
1414 return &atspi_actions[0]; 1412 return &atspi_actions[0];
1415} 1413}
1416 1414
1415/* Efl.Part begin */
1416
1417/* FIXME: Should be OVERRIDE, but... it doesn't work (buggy scrollers in
1418 * elm_test). Why? No idea! */
1419#if 0
1420ELM_PART_OVERRIDE(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, Elm_Scroller_Data, Elm_Part_Data)
1421ELM_PART_OVERRIDE_CONTENT_SET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, Elm_Scroller_Data, Elm_Part_Data)
1422ELM_PART_OVERRIDE_CONTENT_GET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, Elm_Scroller_Data, Elm_Part_Data)
1423ELM_PART_OVERRIDE_CONTENT_UNSET(elm_scroller, ELM_SCROLLER, ELM_LAYOUT, Elm_Scroller_Data, Elm_Part_Data)
1424#else
1425ELM_PART_IMPLEMENT(elm_scroller, ELM_SCROLLER, Elm_Scroller_Data, Elm_Part_Data)
1426ELM_PART_IMPLEMENT_CONTENT_SET(elm_scroller, ELM_SCROLLER, Elm_Scroller_Data, Elm_Part_Data)
1427ELM_PART_IMPLEMENT_CONTENT_GET(elm_scroller, ELM_SCROLLER, Elm_Scroller_Data, Elm_Part_Data)
1428ELM_PART_IMPLEMENT_CONTENT_UNSET(elm_scroller, ELM_SCROLLER, Elm_Scroller_Data, Elm_Part_Data)
1429#endif
1430#include "elm_scroller_internal_part.eo.c"
1431
1432/* Efl.Part end */
1433
1417#include "elm_scroller.eo.c" 1434#include "elm_scroller.eo.c"
diff --git a/src/lib/elementary/elm_scroller.eo b/src/lib/elementary/elm_scroller.eo
index 5afed725e4..2a93d6ca75 100644
--- a/src/lib/elementary/elm_scroller.eo
+++ b/src/lib/elementary/elm_scroller.eo
@@ -72,14 +72,12 @@ class Elm.Scroller (Elm.Layout, Elm.Interface_Scrollable,
72 Elm.Widget.focus_direction; 72 Elm.Widget.focus_direction;
73 Elm.Widget.sub_object_del; 73 Elm.Widget.sub_object_del;
74 Elm.Widget.event; 74 Elm.Widget.event;
75 Efl.Container.content.get;
76 Efl.Container.content.set;
77 Efl.Container.content_unset;
78 Elm.Layout.sizing_eval; 75 Elm.Layout.sizing_eval;
79 Elm.Interface_Scrollable.page_size.set; 76 Elm.Interface_Scrollable.page_size.set;
80 Elm.Interface_Scrollable.policy.set; 77 Elm.Interface_Scrollable.policy.set;
81 Elm.Interface_Scrollable.single_direction; 78 Elm.Interface_Scrollable.single_direction;
82 Elm.Interface.Atspi_Widget_Action.elm_actions.get; 79 Elm.Interface.Atspi_Widget_Action.elm_actions.get;
80 Efl.Part.part;
83 } 81 }
84 events { 82 events {
85 scroll,page,changed; 83 scroll,page,changed;
diff --git a/src/lib/elementary/elm_scroller_internal_part.eo b/src/lib/elementary/elm_scroller_internal_part.eo
new file mode 100644
index 0000000000..52604360d4
--- /dev/null
+++ b/src/lib/elementary/elm_scroller_internal_part.eo
@@ -0,0 +1,10 @@
1class Elm.Scroller.Internal.Part (Eo.Base, Efl.Container) // FIXME: (Elm.Layout.Internal.Part)
2{
3 data: Elm_Part_Data; // FIXME: null;
4 implements {
5 Eo.Base.destructor; // FIXME: remove
6 Efl.Container.content.set;
7 Efl.Container.content.get;
8 Efl.Container.content_unset;
9 }
10}
diff --git a/src/lib/elementary/elm_toolbar.c b/src/lib/elementary/elm_toolbar.c
index 05b08898e2..b179cb71b8 100644
--- a/src/lib/elementary/elm_toolbar.c
+++ b/src/lib/elementary/elm_toolbar.c
@@ -1713,7 +1713,7 @@ _elm_toolbar_item_elm_widget_item_part_content_set(Eo *eo_item EINA_UNUSED, Elm_
1713 1713
1714 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) 1714 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
1715 { 1715 {
1716 efl_content_set(VIEW(item), part, content); 1716 efl_content_set(efl_part(VIEW(item), part), content);
1717 return; 1717 return;
1718 } 1718 }
1719 if (item->object == content) return; 1719 if (item->object == content) return;
@@ -1732,13 +1732,9 @@ EOLIAN static Evas_Object *
1732_elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Toolbar_Item_Data *it, 1732_elm_toolbar_item_elm_widget_item_part_content_get(Eo *eo_it EINA_UNUSED, Elm_Toolbar_Item_Data *it,
1733 const char *part) 1733 const char *part)
1734{ 1734{
1735 Evas_Object *content;
1736
1737 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) 1735 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
1738 { 1736 {
1739 content = efl_content_get(VIEW(it), part); 1737 return efl_content_get(efl_part(VIEW(it), part));
1740 if (content) return content;
1741 else return NULL;
1742 } 1738 }
1743 return it->object; 1739 return it->object;
1744} 1740}
@@ -1755,8 +1751,7 @@ _elm_toolbar_item_elm_widget_item_part_content_unset(Eo *eo_item EINA_UNUSED, El
1755 1751
1756 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object")) 1752 if (part && strcmp(part, "object") && strcmp(part, "elm.swallow.object"))
1757 { 1753 {
1758 o = efl_content_unset(VIEW(item), part); 1754 return efl_content_unset(efl_part(VIEW(item), part));
1759 return o;
1760 } 1755 }
1761 1756
1762 elm_layout_content_unset(VIEW(item), "elm.swallow.object"); 1757 elm_layout_content_unset(VIEW(item), "elm.swallow.object");
diff --git a/src/lib/elementary/elm_widget.c b/src/lib/elementary/elm_widget.c
index e9fc81cf98..73f59745fb 100644
--- a/src/lib/elementary/elm_widget.c
+++ b/src/lib/elementary/elm_widget.c
@@ -3657,7 +3657,7 @@ elm_widget_content_part_set(Evas_Object *obj,
3657 Evas_Object *content) 3657 Evas_Object *content)
3658{ 3658{
3659 ELM_WIDGET_CHECK(obj); 3659 ELM_WIDGET_CHECK(obj);
3660 efl_content_set(obj, part, content); 3660 efl_content_set(efl_part(obj, part), content);
3661} 3661}
3662 3662
3663EAPI Evas_Object * 3663EAPI Evas_Object *
@@ -3665,9 +3665,7 @@ elm_widget_content_part_get(const Evas_Object *obj,
3665 const char *part) 3665 const char *part)
3666{ 3666{
3667 ELM_WIDGET_CHECK(obj) NULL; 3667 ELM_WIDGET_CHECK(obj) NULL;
3668 Evas_Object *ret = NULL; 3668 return efl_content_get(efl_part(obj, part));
3669 ret = efl_content_get((Eo *) obj, part);
3670 return ret;
3671} 3669}
3672 3670
3673EAPI Evas_Object * 3671EAPI Evas_Object *
@@ -3675,9 +3673,7 @@ elm_widget_content_part_unset(Evas_Object *obj,
3675 const char *part) 3673 const char *part)
3676{ 3674{
3677 ELM_WIDGET_CHECK(obj) NULL; 3675 ELM_WIDGET_CHECK(obj) NULL;
3678 Evas_Object *ret = NULL; 3676 return efl_content_unset(efl_part(obj, part));
3679 ret = efl_content_unset(obj, part);
3680 return ret;
3681} 3677}
3682 3678
3683EOLIAN static void 3679EOLIAN static void
diff --git a/src/tests/edje/edje_test_edje.c b/src/tests/edje/edje_test_edje.c
index 97d395461a..2b2b47a594 100644
--- a/src/tests/edje/edje_test_edje.c
+++ b/src/tests/edje/edje_test_edje.c
@@ -393,17 +393,17 @@ START_TEST(edje_test_swallows_eoapi)
393 393
394 394
395 o1 = eo_add(EDJE_OBJECT_CLASS, ly); 395 o1 = eo_add(EDJE_OBJECT_CLASS, ly);
396 fail_if(!efl_content_set(ly, "swallow", o1)); 396 fail_if(!efl_content_set(efl_part(ly, "swallow"), o1));
397 ck_assert_ptr_eq(eo_parent_get(o1), ly); 397 ck_assert_ptr_eq(eo_parent_get(o1), ly);
398 398
399 efl_content_remove(ly, o1); 399 efl_content_remove(ly, o1);
400 ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1)); 400 ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
401 401
402 fail_if(!efl_content_set(ly, "swallow", o1)); 402 fail_if(!efl_content_set(efl_part(ly, "swallow"), o1));
403 ck_assert_ptr_eq(eo_parent_get(o1), ly); 403 ck_assert_ptr_eq(eo_parent_get(o1), ly);
404 404
405 o2 = eo_add(EDJE_OBJECT_CLASS, ly); 405 o2 = eo_add(EDJE_OBJECT_CLASS, ly);
406 fail_if(!efl_content_set(ly, "swallow", o2)); 406 fail_if(!efl_content_set(efl_part(ly, "swallow"), o2));
407 ck_assert_ptr_eq(eo_parent_get(o2), ly); 407 ck_assert_ptr_eq(eo_parent_get(o2), ly);
408 /* o1 is deleted at this point. */ 408 /* o1 is deleted at this point. */
409 ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1)); 409 ck_assert_ptr_eq(eo_parent_get(o1), evas_common_evas_get(o1));
diff --git a/src/tests/elementary/elm_test_layout.c b/src/tests/elementary/elm_test_layout.c
index 6a9e4a3bb2..7c0ba94e33 100644
--- a/src/tests/elementary/elm_test_layout.c
+++ b/src/tests/elementary/elm_test_layout.c
@@ -38,17 +38,17 @@ START_TEST(elm_layout_swallows)
38 evas_object_show(ly); 38 evas_object_show(ly);
39 39
40 bt = eo_add(ELM_BUTTON_CLASS, ly); 40 bt = eo_add(ELM_BUTTON_CLASS, ly);
41 fail_if(!efl_content_set(ly, "element1", bt)); 41 fail_if(!efl_content_set(efl_part(ly, "element1"), bt));
42 ck_assert_ptr_eq(eo_parent_get(bt), ly); 42 ck_assert_ptr_eq(eo_parent_get(bt), ly);
43 43
44 bt = efl_content_unset(ly, "element1"); 44 bt = efl_content_unset(efl_part(ly, "element1"));
45 ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt)); 45 ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));
46 46
47 fail_if(!efl_content_set(ly, "element1", bt)); 47 fail_if(!efl_content_set(efl_part(ly, "element1"), bt));
48 ck_assert_ptr_eq(eo_parent_get(bt), ly); 48 ck_assert_ptr_eq(eo_parent_get(bt), ly);
49 49
50 bt2 = eo_add(ELM_BUTTON_CLASS, ly); 50 bt2 = eo_add(ELM_BUTTON_CLASS, ly);
51 fail_if(!efl_content_set(ly, "element1", bt2)); 51 fail_if(!efl_content_set(efl_part(ly, "element1"), bt2));
52 ck_assert_ptr_eq(eo_parent_get(bt2), ly); 52 ck_assert_ptr_eq(eo_parent_get(bt2), ly);
53 /* bt is deleted at this point. */ 53 /* bt is deleted at this point. */
54 ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt)); 54 ck_assert_ptr_eq(eo_parent_get(bt), evas_common_evas_get(bt));