summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-05-26 10:52:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-05-29 10:49:17 +0900
commit42403cd3df85101daedf69f4d782d21855bd50e0 (patch)
tree3b71be53612ecf17648e6d32dd801edce672d880
parent7c3e732f8c567cbc0905711b5f10aa465a5b6170 (diff)
downloadefl-42403cd3df85101daedf69f4d782d21855bd50e0.tar.gz
edje: Refactor a bit internal parts for edje objects (EO)
1. Make internal part "real_part_set" an internal function (EO) 2. Use a common class rather than an interface: - Cost: 1 extra call to efl_data_scope_get() as we don't have the data inside the EO function call implementation. - Gain: Ability to implement common code, such as part_geometry_get
-rw-r--r--src/lib/edje/edje_part.c7
-rw-r--r--src/lib/edje/edje_part_box.c57
-rw-r--r--src/lib/edje/edje_part_helper.h30
-rw-r--r--src/lib/edje/edje_part_swallow.c18
-rw-r--r--src/lib/edje/edje_part_table.c48
-rw-r--r--src/lib/edje/efl_canvas_layout_internal.eo18
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_box.eo5
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_swallow.eo5
-rw-r--r--src/lib/edje/efl_canvas_layout_internal_table.eo5
9 files changed, 117 insertions, 76 deletions
diff --git a/src/lib/edje/edje_part.c b/src/lib/edje/edje_part.c
index 12da019aa7..ab8b532f67 100644
--- a/src/lib/edje/edje_part.c
+++ b/src/lib/edje/edje_part.c
@@ -13,4 +13,11 @@ _edje_internal_proxy_shutdown(void)
_swallow_shutdown();
}
+/* Internal EO API */
+
+EOAPI EFL_VOID_FUNC_BODYV(_efl_canvas_layout_internal_real_part_set, EFL_FUNC_CALL(ed, rp, part), void *ed, void *rp, const char *part)
+
+#define EFL_CANVAS_LAYOUT_INTERNAL_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, NULL)
+
#include "efl_canvas_layout_internal.eo.c"
diff --git a/src/lib/edje/edje_part_box.c b/src/lib/edje/edje_part_box.c
index c05a1a74f8..701971d144 100644
--- a/src/lib/edje/edje_part_box.c
+++ b/src/lib/edje/edje_part_box.c
@@ -1,13 +1,11 @@
#include "edje_private.h"
#include "edje_part_helper.h"
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_BOX_PROTECTED
#include "efl_canvas_layout_internal_box.eo.h"
#define MY_CLASS EFL_CANVAS_LAYOUT_INTERNAL_BOX_CLASS
#include "../evas/canvas/evas_box.eo.h"
-PROXY_IMPLEMENTATION(box, BOX, Edje_Box_Data)
+PROXY_IMPLEMENTATION(box, BOX)
#undef PROXY_IMPLEMENTATION
typedef struct _Part_Item_Iterator Part_Item_Iterator;
@@ -15,58 +13,67 @@ typedef struct _Part_Item_Iterator Part_Item_Iterator;
/* Legacy features */
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_pack_clear(Eo *obj, Edje_Box_Data *pd)
+_efl_canvas_layout_internal_box_efl_pack_pack_clear(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_remove_all(pd->ed, pd->part, EINA_TRUE));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_unpack_all(Eo *obj, Edje_Box_Data *pd)
+_efl_canvas_layout_internal_box_efl_pack_unpack_all(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_remove_all(pd->ed, pd->part, EINA_FALSE));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_unpack(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_box_efl_pack_unpack(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj)
{
Evas_Object *removed;
+ PROXY_DATA_GET(obj, pd);
removed = _edje_part_box_remove(pd->ed, pd->part, subobj);
RETURN_VAL((removed == subobj));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_pack(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_box_efl_pack_pack(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_append(pd->ed, pd->part, subobj));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_begin(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_prepend(pd->ed, pd->part, subobj));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_end(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_end(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_append(pd->ed, pd->part, subobj));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_before(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_before(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, const Efl_Gfx *existing)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_insert_before(pd->ed, pd->part, subobj, existing));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_after(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_after(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, const Efl_Gfx *existing)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_box_insert_after(pd->ed, pd->part, subobj, existing));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_at(Eo *obj, Edje_Box_Data *pd, Efl_Gfx *subobj, int index)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_at(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, int index)
{
+ PROXY_DATA_GET(obj, pd);
int cnt = PROXY_CALL(efl_content_count(obj));
if ((index < 0) && ((-index) <= (cnt + 1)))
index = cnt + index + 1;
@@ -77,8 +84,9 @@ _efl_canvas_layout_internal_box_efl_pack_linear_pack_at(Eo *obj, Edje_Box_Data *
}
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_unpack_at(Eo *obj, Edje_Box_Data *pd, int index)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_unpack_at(Eo *obj, void *_pd EINA_UNUSED, int index)
{
+ PROXY_DATA_GET(obj, pd);
if (index < 0) index += PROXY_CALL(efl_content_count(obj));
RETURN_VAL(_edje_part_box_remove_at(pd->ed, pd->part, index));
}
@@ -86,26 +94,29 @@ _efl_canvas_layout_internal_box_efl_pack_linear_pack_unpack_at(Eo *obj, Edje_Box
/* New APIs with Eo */
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_content_get(Eo *obj, Edje_Box_Data *pd, int index)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_content_get(Eo *obj, void *_pd EINA_UNUSED, int index)
{
+ PROXY_DATA_GET(obj, pd);
if (index < 0) index += PROXY_CALL(efl_content_count(obj));
RETURN_VAL(_edje_part_box_content_at(pd->ed, pd->part, index));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_box_efl_container_content_remove(Eo *obj, Edje_Box_Data *pd EINA_UNUSED, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_box_efl_container_content_remove(Eo *obj, void *_pd EINA_UNUSED EINA_UNUSED, Efl_Gfx *subobj)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(PROXY_CALL(efl_pack_unpack(obj, subobj)));
}
EOLIAN static int
-_efl_canvas_layout_internal_box_efl_pack_linear_pack_index_get(Eo *obj, Edje_Box_Data *pd, const Efl_Gfx * subobj)
+_efl_canvas_layout_internal_box_efl_pack_linear_pack_index_get(Eo *obj, void *_pd EINA_UNUSED, const Efl_Gfx * subobj)
{
Evas_Object_Box_Option *opt;
Evas_Object_Box_Data *priv;
Eina_List *l;
int k = 0;
+ PROXY_DATA_GET(obj, pd);
priv = efl_data_scope_get(pd->rp->object, EVAS_BOX_CLASS);
if (!priv) RETURN_VAL(-1);
EINA_LIST_FOREACH(priv->children, l, opt)
@@ -166,10 +177,11 @@ _part_item_iterator_create(Eo *obj, Eina_Iterator *real_iterator)
}
EOLIAN static Eina_Iterator *
-_efl_canvas_layout_internal_box_efl_container_content_iterate(Eo *obj, Edje_Box_Data *pd)
+_efl_canvas_layout_internal_box_efl_container_content_iterate(Eo *obj, void *_pd EINA_UNUSED)
{
Eina_Iterator *it;
+ PROXY_DATA_GET(obj, pd);
if (!pd->rp->typedata.container) RETURN_VAL(NULL);
it = evas_object_box_iterator_new(pd->rp->object);
@@ -177,14 +189,16 @@ _efl_canvas_layout_internal_box_efl_container_content_iterate(Eo *obj, Edje_Box_
}
EOLIAN static int
-_efl_canvas_layout_internal_box_efl_container_content_count(Eo *obj, Edje_Box_Data *pd)
+_efl_canvas_layout_internal_box_efl_container_content_count(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(evas_obj_box_count(pd->rp->object));
}
EOLIAN static Efl_Orient
-_efl_canvas_layout_internal_box_efl_orientation_orientation_get(Eo *obj, Edje_Box_Data *pd)
+_efl_canvas_layout_internal_box_efl_orientation_orientation_get(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
const Edje_Part_Description_Box *desc =
(Edje_Part_Description_Box *) pd->rp->chosen_description;
@@ -200,4 +214,9 @@ _efl_canvas_layout_internal_box_efl_orientation_orientation_get(Eo *obj, Edje_Bo
RETURN_VAL(EFL_ORIENT_NONE);
}
+/* Internal EO API */
+
+#define EFL_CANVAS_LAYOUT_INTERNAL_BOX_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_box_efl_canvas_layout_internal_real_part_set)
+
#include "efl_canvas_layout_internal_box.eo.c"
diff --git a/src/lib/edje/edje_part_helper.h b/src/lib/edje/edje_part_helper.h
index c3f5f2bf5a..385dcec12d 100644
--- a/src/lib/edje/edje_part_helper.h
+++ b/src/lib/edje/edje_part_helper.h
@@ -1,8 +1,11 @@
#include "edje_private.h"
-#define EFL_CANVAS_LAYOUT_INTERNAL_PROTECTED
#include "efl_canvas_layout_internal.eo.h"
-struct _Edje_Part_Data
+EOAPI void _efl_canvas_layout_internal_real_part_set(Eo *obj, void *ed, void *rp, const char *part);
+
+typedef struct _Efl_Canvas_Layout_Internal_Data Efl_Canvas_Layout_Internal_Data;
+
+struct _Efl_Canvas_Layout_Internal_Data
{
Edje *ed;
Edje_Real_Part *rp;
@@ -10,8 +13,6 @@ struct _Edje_Part_Data
unsigned char temp;
};
-typedef struct _Edje_Part_Data Edje_Part_Data;
-
struct _Part_Item_Iterator
{
Eina_Iterator iterator;
@@ -40,9 +41,10 @@ struct _Part_Item_Iterator
void \
_ ## type ## _shutdown(void); \
-#define PROXY_IMPLEMENTATION(type, TYPE, datatype) \
-typedef struct _Edje_Part_Data datatype; \
-\
+#define PROXY_DATA_GET(obj, pd) \
+ Efl_Canvas_Layout_Internal_Data *pd = efl_data_scope_get(obj, EFL_CANVAS_LAYOUT_INTERNAL_CLASS)
+
+#define PROXY_IMPLEMENTATION(type, TYPE) \
static Eo * _ ## type ## _proxy = NULL; \
\
static void \
@@ -72,10 +74,10 @@ _ ## type ## _shutdown(void) \
Eo * \
_edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Edje_Real_Part *rp) \
{ \
- Edje_Part_Data *pd; \
+ Efl_Canvas_Layout_Internal_Data *pd; \
Eo *proxy; \
\
- pd = efl_data_scope_get(_ ## type ## _proxy, MY_CLASS); \
+ pd = efl_data_scope_get(_ ## type ## _proxy, EFL_CANVAS_LAYOUT_INTERNAL_CLASS); \
if (!pd) \
{ \
if (_ ## type ## _proxy) \
@@ -84,7 +86,7 @@ _edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Ed
_ ## type ## _proxy = NULL; \
} \
return efl_add(MY_CLASS, ed->obj, \
- _edje_real_part_set(efl_added, ed, rp, rp->part->name)); \
+ _efl_canvas_layout_internal_real_part_set(efl_added, ed, rp, rp->part->name)); \
} \
\
if (EINA_UNLIKELY(pd->temp)) \
@@ -97,13 +99,14 @@ _edje_ ## type ## _internal_proxy_get(Edje_Object *obj EINA_UNUSED, Edje *ed, Ed
} \
proxy = _ ## type ## _proxy; \
_ ## type ## _proxy = NULL; \
- _edje_real_part_set(proxy, ed, rp, rp->part->name); \
+ _efl_canvas_layout_internal_real_part_set(proxy, ed, rp, rp->part->name); \
return proxy; \
} \
\
EOLIAN static void \
-_efl_canvas_layout_internal_ ## type ## _efl_canvas_layout_internal_real_part_set(Eo *obj, datatype *pd, void *ed, void *rp, const char *part) \
+_efl_canvas_layout_internal_ ## type ## _efl_canvas_layout_internal_real_part_set(Eo *obj, void *_pd EINA_UNUSED, void *ed, void *rp, const char *part) \
{ \
+ PROXY_DATA_GET(obj, pd); \
pd->ed = ed; \
pd->rp = rp; \
pd->part = part; \
@@ -113,8 +116,9 @@ _efl_canvas_layout_internal_ ## type ## _efl_canvas_layout_internal_real_part_se
} \
\
EOLIAN static Efl_Object * \
-_efl_canvas_layout_internal_ ## type ## _efl_object_finalize(Eo *obj, datatype *pd) \
+_efl_canvas_layout_internal_ ## type ## _efl_object_finalize(Eo *obj, void *_pd EINA_UNUSED) \
{ \
+ PROXY_DATA_GET(obj, pd); \
EINA_SAFETY_ON_FALSE_RETURN_VAL(pd->rp && pd->ed && pd->part, NULL); \
return efl_finalize(efl_super(obj, MY_CLASS)); \
}
diff --git a/src/lib/edje/edje_part_swallow.c b/src/lib/edje/edje_part_swallow.c
index f29a4982da..7eab4bc31e 100644
--- a/src/lib/edje/edje_part_swallow.c
+++ b/src/lib/edje/edje_part_swallow.c
@@ -1,33 +1,39 @@
#include "edje_private.h"
#include "edje_part_helper.h"
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_PROTECTED
#include "efl_canvas_layout_internal_swallow.eo.h"
#define MY_CLASS EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_CLASS
-PROXY_IMPLEMENTATION(swallow, SWALLOW, Edje_Swallow_Data)
+PROXY_IMPLEMENTATION(swallow, SWALLOW)
#undef PROXY_IMPLEMENTATION
/* Swallow parts */
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_internal_swallow_efl_container_content_get(Eo *obj, Edje_Swallow_Data *pd)
+_efl_canvas_layout_internal_swallow_efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_efl_container_content_get(pd->ed, pd->part));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_swallow_efl_container_content_set(Eo *obj, Edje_Swallow_Data *pd, Efl_Gfx *content)
+_efl_canvas_layout_internal_swallow_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_efl_container_content_set(pd->ed, pd->part, content));
}
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_internal_swallow_efl_container_content_unset(Eo *obj, Edje_Swallow_Data *pd)
+_efl_canvas_layout_internal_swallow_efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
Efl_Gfx *content = _edje_efl_container_content_get(pd->ed, pd->part);
if (!content) RETURN_VAL(NULL);
PROXY_CALL(efl_content_remove(obj, content));
RETURN_VAL(content);
}
+/* Internal EO APIs */
+
+#define EFL_CANVAS_LAYOUT_INTERNAL_SWALLOW_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_swallow_efl_canvas_layout_internal_real_part_set),
+
#include "efl_canvas_layout_internal_swallow.eo.c"
diff --git a/src/lib/edje/edje_part_table.c b/src/lib/edje/edje_part_table.c
index adb60bb1b9..2abd03fdec 100644
--- a/src/lib/edje/edje_part_table.c
+++ b/src/lib/edje/edje_part_table.c
@@ -1,13 +1,11 @@
#include "edje_private.h"
#include "edje_part_helper.h"
-
-#define EFL_CANVAS_LAYOUT_INTERNAL_TABLE_PROTECTED
#include "efl_canvas_layout_internal_table.eo.h"
#define MY_CLASS EFL_CANVAS_LAYOUT_INTERNAL_TABLE_CLASS
#include "../evas/canvas/evas_table.eo.h"
-PROXY_IMPLEMENTATION(table, TABLE, Edje_Table_Data)
+PROXY_IMPLEMENTATION(table, TABLE)
#undef PROXY_IMPLEMENTATION
typedef struct _Part_Item_Iterator Part_Item_Iterator;
@@ -61,10 +59,11 @@ _part_item_iterator_create(Eo *obj, Eina_Iterator *real_iterator)
}
EOLIAN static Eina_Iterator *
-_efl_canvas_layout_internal_table_efl_container_content_iterate(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_container_content_iterate(Eo *obj, void *_pd EINA_UNUSED)
{
Eina_Iterator *it;
+ PROXY_DATA_GET(obj, pd);
if (!pd->rp->typedata.container) RETURN_VAL(NULL);
it = evas_object_table_iterator_new(pd->rp->object);
@@ -72,65 +71,75 @@ _efl_canvas_layout_internal_table_efl_container_content_iterate(Eo *obj, Edje_Ta
}
EOLIAN static int
-_efl_canvas_layout_internal_table_efl_container_content_count(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_container_content_count(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(evas_obj_table_count(pd->rp->object));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_container_content_remove(Eo *obj, Edje_Table_Data *pd EINA_UNUSED, Efl_Gfx *content)
+_efl_canvas_layout_internal_table_efl_container_content_remove(Eo *obj, void *_pd EINA_UNUSED EINA_UNUSED, Efl_Gfx *content)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(PROXY_CALL(efl_pack_unpack(obj, content)));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_pack_pack_clear(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_pack_pack_clear(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_table_clear(pd->ed, pd->part, EINA_TRUE));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_pack_unpack_all(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_pack_unpack_all(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_table_clear(pd->ed, pd->part, EINA_FALSE));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Edje_Table_Data *pd, Efl_Gfx *subobj)
+_efl_canvas_layout_internal_table_efl_pack_unpack(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, Efl_Gfx *subobj)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_table_unpack(pd->ed, pd->part, subobj));
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj, Edje_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
+_efl_canvas_layout_internal_table_efl_pack_grid_pack_grid(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_table_pack(pd->ed, pd->part, subobj, col, row, colspan, rowspan));
}
EOLIAN static Efl_Gfx *
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_content_get(Eo *obj, Edje_Table_Data *pd, int col, int row)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_content_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row)
{
+ PROXY_DATA_GET(obj, pd);
RETURN_VAL(_edje_part_table_child_get(pd->ed, pd->part, col, row));
}
EOLIAN static void
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_size_get(Eo *obj, Edje_Table_Data *pd, int *cols, int *rows)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_size_get(Eo *obj, void *_pd EINA_UNUSED, int *cols, int *rows)
{
+ PROXY_DATA_GET(obj, pd);
_edje_part_table_col_row_size_get(pd->ed, pd->part, cols, rows);
RETURN_VOID;
}
EOLIAN static int
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_columns_get(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_columns_get(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
int cols = 0, rows = 0;
_edje_part_table_col_row_size_get(pd->ed, pd->part, &cols, &rows);
RETURN_VAL(cols);
}
EOLIAN static int
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_rows_get(Eo *obj, Edje_Table_Data *pd)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_rows_get(Eo *obj, void *_pd EINA_UNUSED)
{
+ PROXY_DATA_GET(obj, pd);
int cols = 0, rows = 0;
_edje_part_table_col_row_size_get(pd->ed, pd->part, &cols, &rows);
RETURN_VAL(rows);
@@ -167,7 +176,7 @@ _table_item_iterator_free(Part_Item_Iterator *it)
}
EOLIAN static Eina_Iterator *
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj, Edje_Table_Data *pd, int col, int row, Eina_Bool below)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row, Eina_Bool below)
{
Evas_Object *sobj;
Eina_Iterator *it;
@@ -177,6 +186,7 @@ _efl_canvas_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj, Edje_
/* FIXME: terrible performance because there is no proper evas table api */
+ PROXY_DATA_GET(obj, pd);
it = evas_object_table_iterator_new(pd->rp->object);
EINA_ITERATOR_FOREACH(it, sobj)
{
@@ -209,11 +219,12 @@ _efl_canvas_layout_internal_table_efl_pack_grid_grid_contents_get(Eo *obj, Edje_
}
EOLIAN static Eina_Bool
-_efl_canvas_layout_internal_table_efl_pack_grid_grid_position_get(Eo *obj, Edje_Table_Data *pd, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
+_efl_canvas_layout_internal_table_efl_pack_grid_grid_position_get(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
{
unsigned short c, r, cs, rs;
Eina_Bool ret;
+ PROXY_DATA_GET(obj, pd);
ret = evas_object_table_pack_get(pd->rp->object, subobj, &c, &r, &cs, &rs);
if (col) *col = c;
if (row) *row = r;
@@ -341,4 +352,9 @@ edje_object_part_table_clear(Edje_Object *obj, const char *part, Eina_Bool clear
return efl_pack_unpack_all(table);
}
+/* Internal EO APIs */
+
+#define EFL_CANVAS_LAYOUT_INTERNAL_TABLE_EXTRA_OPS \
+ EFL_OBJECT_OP_FUNC(_efl_canvas_layout_internal_real_part_set, _efl_canvas_layout_internal_table_efl_canvas_layout_internal_real_part_set),
+
#include "efl_canvas_layout_internal_table.eo.c"
diff --git a/src/lib/edje/efl_canvas_layout_internal.eo b/src/lib/edje/efl_canvas_layout_internal.eo
index 13b8968b12..67e09278a0 100644
--- a/src/lib/edje/efl_canvas_layout_internal.eo
+++ b/src/lib/edje/efl_canvas_layout_internal.eo
@@ -1,16 +1,8 @@
-interface Efl.Canvas.Layout_Internal ()
+class Efl.Canvas.Layout_Internal (Efl.Object, Efl.Gfx)
{
- [[Internal APIs used by Edje part objects.]]
- eo_prefix: _edje;
- methods {
- @property real_part @protected {
- [[Real part property]]
- set {}
- values {
- ed: void_ptr; [[Edje object]]
- rp: void_ptr; [[Real part object]]
- part: string; [[Real part name]]
- }
- }
+ [[Common class for part proxy objects for $Efl.Canvas.Layout.]]
+ implements {
+ //Efl.Gfx.Size.geometry { get; }
+ //Efl.Gfx.Size.size { get; }
}
}
diff --git a/src/lib/edje/efl_canvas_layout_internal_box.eo b/src/lib/edje/efl_canvas_layout_internal_box.eo
index 79526ec229..1db1f5522a 100644
--- a/src/lib/edje/efl_canvas_layout_internal_box.eo
+++ b/src/lib/edje/efl_canvas_layout_internal_box.eo
@@ -1,4 +1,4 @@
-class Efl.Canvas.Layout_Internal.Box (Efl.Object, Efl.Canvas.Layout_Internal, Efl.Pack.Linear,
+class Efl.Canvas.Layout_Internal.Box (Efl.Canvas.Layout_Internal, Efl.Pack.Linear,
Efl.Orientation)
{
[[Represents a Box created as part of a layout.
@@ -6,10 +6,9 @@ class Efl.Canvas.Layout_Internal.Box (Efl.Object, Efl.Canvas.Layout_Internal, Ef
Its lifetime is limited to one function call only, unless an extra
reference is explicitely held.
]]
- data: Edje_Box_Data;
+ data: null;
implements {
Efl.Object.finalize;
- Efl.Canvas.Layout_Internal.real_part { set; }
Efl.Container.content_iterate;
Efl.Container.content_count;
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
index 7695ead971..d3e19b3e26 100644
--- a/src/lib/edje/efl_canvas_layout_internal_swallow.eo
+++ b/src/lib/edje/efl_canvas_layout_internal_swallow.eo
@@ -1,14 +1,13 @@
-class Efl.Canvas.Layout_Internal.Swallow (Efl.Object, Efl.Canvas.Layout_Internal, Efl.Container)
+class Efl.Canvas.Layout_Internal.Swallow (Efl.Canvas.Layout_Internal, Efl.Container)
{
[[Represents a SWALLOW part of an Edje object.
Its lifetime is limited to one function call only, unless an extra
reference is explicitely held.
]]
- data: Edje_Swallow_Data;
+ data: null;
implements {
Efl.Object.finalize;
- Efl.Canvas.Layout_Internal.real_part { set; }
Efl.Container.content { get; set; }
Efl.Container.content_unset;
}
diff --git a/src/lib/edje/efl_canvas_layout_internal_table.eo b/src/lib/edje/efl_canvas_layout_internal_table.eo
index fef2a25334..53258c0298 100644
--- a/src/lib/edje/efl_canvas_layout_internal_table.eo
+++ b/src/lib/edje/efl_canvas_layout_internal_table.eo
@@ -1,14 +1,13 @@
-class Efl.Canvas.Layout_Internal.Table (Efl.Object, Efl.Canvas.Layout_Internal, Efl.Pack.Grid)
+class Efl.Canvas.Layout_Internal.Table (Efl.Canvas.Layout_Internal, Efl.Pack.Grid)
{
[[Represents a Table created as part of a layout.
Can not be deleted, this is only a representation of an internal object
of an EFL layout.
]]
- data: Edje_Table_Data;
+ data: null;
implements {
Efl.Object.finalize;
- Efl.Canvas.Layout_Internal.real_part { set; }
Efl.Container.content_iterate;
Efl.Container.content_count;
Efl.Container.content_remove;