2016-04-21 22:58:49 -07:00
|
|
|
#include "edje_private.h"
|
2016-11-03 08:45:42 -07:00
|
|
|
#include "edje_part_helper.h"
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "efl_canvas_layout_part_table.eo.h"
|
|
|
|
#define MY_CLASS EFL_CANVAS_LAYOUT_PART_TABLE_CLASS
|
2016-04-22 01:31:55 -07:00
|
|
|
|
2019-03-05 08:15:40 -08:00
|
|
|
#include "../evas/canvas/evas_table_eo.h"
|
2016-04-21 22:58:49 -07:00
|
|
|
|
2017-06-21 17:05:41 -07:00
|
|
|
PROXY_IMPLEMENTATION(table, MY_CLASS, EINA_FALSE)
|
2016-05-24 04:40:18 -07:00
|
|
|
#undef PROXY_IMPLEMENTATION
|
2016-04-21 22:58:49 -07:00
|
|
|
|
2016-11-03 08:45:42 -07:00
|
|
|
typedef struct _Part_Item_Iterator Part_Item_Iterator;
|
2016-04-21 22:58:49 -07:00
|
|
|
|
2016-04-22 01:31:55 -07:00
|
|
|
EOLIAN static Eina_Iterator *
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_container_content_iterate(Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
|
|
|
Eina_Iterator *it;
|
|
|
|
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
if (!pd->rp->typedata.container) return NULL;
|
2016-04-22 01:31:55 -07:00
|
|
|
it = evas_object_table_iterator_new(pd->rp->object);
|
|
|
|
|
2018-02-14 18:14:52 -08:00
|
|
|
return efl_canvas_iterator_create(pd->rp->object, it, NULL);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_container_content_count(Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return evas_obj_table_count(pd->rp->object);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_pack_clear(Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return _edje_part_table_clear(pd->ed, pd->part, EINA_TRUE);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_unpack_all(Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return _edje_part_table_clear(pd->ed, pd->part, EINA_FALSE);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, void *_pd EINA_UNUSED, Efl_Gfx_Entity *subobj)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return _edje_part_table_unpack(pd->ed, pd->part, subobj);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_pack_table(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx_Entity *subobj, int col, int row, int colspan, int rowspan)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return _edje_part_table_pack(pd->ed, pd->part, subobj, col, row, colspan, rowspan);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
EOLIAN static Efl_Gfx_Entity *
|
2017-12-18 21:13:58 -08:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_content_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2017-10-13 02:16:41 -07:00
|
|
|
return _edje_part_table_child_get(pd->ed, pd->part, col, row);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_size_get(const Eo *obj, void *_pd EINA_UNUSED, int *cols, int *rows)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2016-04-22 01:31:55 -07:00
|
|
|
_edje_part_table_col_row_size_get(pd->ed, pd->part, cols, rows);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_columns_get(const Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2016-04-22 01:31:55 -07:00
|
|
|
int cols = 0, rows = 0;
|
|
|
|
_edje_part_table_col_row_size_get(pd->ed, pd->part, &cols, &rows);
|
2017-10-13 02:16:41 -07:00
|
|
|
return cols;
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_rows_get(const Eo *obj, void *_pd EINA_UNUSED)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2016-04-22 01:31:55 -07:00
|
|
|
int cols = 0, rows = 0;
|
|
|
|
_edje_part_table_col_row_size_get(pd->ed, pd->part, &cols, &rows);
|
2017-10-13 02:16:41 -07:00
|
|
|
return rows;
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* New table apis with eo */
|
|
|
|
|
|
|
|
static Eina_Bool
|
|
|
|
_table_item_iterator_next(Part_Item_Iterator *it, void **data)
|
|
|
|
{
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl_Gfx_Entity *sub;
|
2016-04-22 01:31:55 -07:00
|
|
|
|
|
|
|
if (!it->object) return EINA_FALSE;
|
|
|
|
if (!eina_iterator_next(it->real_iterator, (void **) &sub))
|
|
|
|
return EINA_FALSE;
|
|
|
|
|
|
|
|
if (data) *data = sub;
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eo *
|
|
|
|
_table_item_iterator_get_container(Part_Item_Iterator *it)
|
|
|
|
{
|
|
|
|
return it->object;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_table_item_iterator_free(Part_Item_Iterator *it)
|
|
|
|
{
|
|
|
|
eina_iterator_free(it->real_iterator);
|
|
|
|
eina_list_free(it->list);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_wref_del(it->object, &it->object);
|
2016-04-22 01:31:55 -07:00
|
|
|
free(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Iterator *
|
2017-12-18 21:13:58 -08:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_contents_get(Eo *obj, void *_pd EINA_UNUSED, int col, int row, Eina_Bool below)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
|
|
|
Evas_Object *sobj;
|
|
|
|
Eina_Iterator *it;
|
|
|
|
Part_Item_Iterator *pit;
|
|
|
|
Eina_List *list = NULL;
|
|
|
|
unsigned short c, r, cs, rs;
|
|
|
|
|
|
|
|
/* FIXME: terrible performance because there is no proper evas table api */
|
|
|
|
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2016-04-22 01:31:55 -07:00
|
|
|
it = evas_object_table_iterator_new(pd->rp->object);
|
|
|
|
EINA_ITERATOR_FOREACH(it, sobj)
|
|
|
|
{
|
|
|
|
evas_object_table_pack_get(pd->rp->object, sobj, &c, &r, &cs, &rs);
|
|
|
|
if (((int) c == col) && ((int) r == row))
|
|
|
|
list = eina_list_append(list, sobj);
|
|
|
|
else if (below)
|
|
|
|
{
|
|
|
|
if (((int) c <= col) && ((int) (c + cs) >= col) &&
|
|
|
|
((int) r <= row) && ((int) (r + rs) >= row))
|
|
|
|
list = eina_list_append(list, sobj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
eina_iterator_free(it);
|
|
|
|
|
|
|
|
pit = calloc(1, sizeof(*pit));
|
2017-10-13 02:16:41 -07:00
|
|
|
if (!pit) return NULL;
|
2016-04-22 01:31:55 -07:00
|
|
|
|
|
|
|
EINA_MAGIC_SET(&pit->iterator, EINA_MAGIC_ITERATOR);
|
|
|
|
|
|
|
|
pit->list = list;
|
|
|
|
pit->real_iterator = eina_list_iterator_new(pit->list);
|
|
|
|
pit->iterator.version = EINA_ITERATOR_VERSION;
|
|
|
|
pit->iterator.next = FUNC_ITERATOR_NEXT(_table_item_iterator_next);
|
|
|
|
pit->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_table_item_iterator_get_container);
|
|
|
|
pit->iterator.free = FUNC_ITERATOR_FREE(_table_item_iterator_free);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_wref_add(obj, &pit->object);
|
2016-04-22 01:31:55 -07:00
|
|
|
|
2017-10-13 02:16:41 -07:00
|
|
|
return &pit->iterator;
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2019-08-27 03:46:03 -07:00
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_cell_column_get(const Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx_Entity * subobj, int *col, int *colspan)
|
2016-04-22 01:31:55 -07:00
|
|
|
{
|
2019-08-27 03:46:03 -07:00
|
|
|
unsigned short c, cs;
|
2016-04-22 01:31:55 -07:00
|
|
|
Eina_Bool ret;
|
|
|
|
|
2017-05-25 18:52:57 -07:00
|
|
|
PROXY_DATA_GET(obj, pd);
|
2019-08-27 03:46:03 -07:00
|
|
|
ret = evas_object_table_pack_get(pd->rp->object, subobj, &c, NULL, &cs, NULL);
|
2016-04-22 01:31:55 -07:00
|
|
|
if (col) *col = c;
|
|
|
|
if (colspan) *colspan = cs;
|
2019-08-27 03:46:03 -07:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_cell_column_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx_Entity * subobj, int col, int colspan)
|
|
|
|
{
|
|
|
|
unsigned short r, rs;
|
|
|
|
|
|
|
|
PROXY_DATA_GET(obj, pd);
|
|
|
|
evas_object_table_pack_get(pd->rp->object, subobj, NULL, &r, NULL, &rs);
|
|
|
|
evas_object_table_pack(pd->rp->object, subobj, col, r, colspan, rs);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_cell_row_get(const Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx_Entity * subobj, int *row, int *rowspan)
|
|
|
|
{
|
|
|
|
unsigned short r, rs;
|
|
|
|
Eina_Bool ret;
|
|
|
|
|
|
|
|
PROXY_DATA_GET(obj, pd);
|
|
|
|
ret = evas_object_table_pack_get(pd->rp->object, subobj, NULL, &r, NULL, &rs);
|
|
|
|
if (row) *row = r;
|
2016-04-22 01:31:55 -07:00
|
|
|
if (rowspan) *rowspan = rs;
|
|
|
|
|
2017-10-13 02:16:41 -07:00
|
|
|
return ret;
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
2019-08-27 03:46:03 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_efl_canvas_layout_part_table_efl_pack_table_table_cell_row_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx_Entity * subobj, int row, int rowspan)
|
|
|
|
{
|
|
|
|
unsigned short c, cs;
|
|
|
|
|
|
|
|
PROXY_DATA_GET(obj, pd);
|
|
|
|
evas_object_table_pack_get(pd->rp->object, subobj, &c, NULL, &cs, NULL);
|
|
|
|
evas_object_table_pack(pd->rp->object, subobj, c, row, cs, rowspan);
|
|
|
|
}
|
|
|
|
|
2016-04-21 22:58:49 -07:00
|
|
|
/* Legacy API implementation */
|
|
|
|
|
2016-04-22 01:31:55 -07:00
|
|
|
#ifdef DEGUG
|
2016-04-21 22:58:49 -07:00
|
|
|
#define PART_BOX_GET(obj, part, ...) ({ \
|
2016-05-18 11:20:09 -07:00
|
|
|
Eo *__box = efl_part(obj, part); \
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
if (!__box || !efl_isa(__box, EFL_CANVAS_LAYOUT_PART_BOX_CLASS)) \
|
2016-04-21 22:58:49 -07:00
|
|
|
{ \
|
|
|
|
ERR("No such box part '%s' in layout %p", part, obj); \
|
|
|
|
return __VA_ARGS__; \
|
|
|
|
} \
|
|
|
|
__box; })
|
2016-04-22 01:31:55 -07:00
|
|
|
#else
|
|
|
|
#define PART_BOX_GET(obj, part, ...) ({ \
|
2016-05-18 11:20:09 -07:00
|
|
|
Eo *__box = efl_part(obj, part); \
|
2016-04-22 01:31:55 -07:00
|
|
|
if (!__box) return __VA_ARGS__; \
|
|
|
|
__box; })
|
|
|
|
#endif
|
2016-04-21 22:58:49 -07:00
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_append(Edje_Object *obj, const char *part, Evas_Object *child)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_end(box, child);
|
2016-04-21 22:58:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_prepend(Edje_Object *obj, const char *part, Evas_Object *child)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
2016-07-25 19:09:43 -07:00
|
|
|
return efl_pack_begin(box, child);
|
2016-04-21 22:58:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_insert_before(Edje_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
|
|
|
return efl_pack_before(box, child, reference);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_insert_after(Edje_Object *obj, const char *part, Evas_Object *child, const Evas_Object *reference)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
|
|
|
return efl_pack_after(box, child, reference);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_insert_at(Edje_Object *obj, const char *part, Evas_Object *child, unsigned int pos)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_at(box, child, pos);
|
2016-04-21 22:58:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
edje_object_part_box_remove_at(Edje_Object *obj, const char *part, unsigned int pos)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, NULL);
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_unpack_at(box, pos);
|
2016-04-21 22:58:49 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
edje_object_part_box_remove(Edje_Object *obj, const char *part, Evas_Object *child)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, NULL);
|
|
|
|
if (efl_pack_unpack(box, child))
|
|
|
|
return child;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_box_remove_all(Edje_Object *obj, const char *part, Eina_Bool clear)
|
|
|
|
{
|
|
|
|
Eo *box = PART_BOX_GET(obj, part, EINA_FALSE);
|
|
|
|
if (clear)
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_clear(box);
|
2016-04-21 22:58:49 -07:00
|
|
|
else
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_unpack_all(box);
|
2016-04-21 22:58:49 -07:00
|
|
|
}
|
|
|
|
|
2016-04-22 01:31:55 -07:00
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_table_pack(Edje_Object *obj, const char *part, Evas_Object *child_obj, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan)
|
|
|
|
{
|
|
|
|
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
|
2017-12-18 21:13:58 -08:00
|
|
|
return efl_pack_table(table, child_obj, col, row, colspan, rowspan);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_table_col_row_size_get(const Edje_Object *obj, const char *part, int *cols, int *rows)
|
|
|
|
{
|
|
|
|
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
|
2017-12-18 21:13:58 -08:00
|
|
|
efl_pack_table_size_get(table, cols, rows);
|
2016-04-22 01:31:55 -07:00
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Evas_Object *
|
|
|
|
edje_object_part_table_child_get(const Edje_Object *obj, const char *part, unsigned int col, unsigned int row)
|
|
|
|
{
|
|
|
|
Eo *table = PART_TABLE_GET(obj, part, NULL);
|
2017-12-18 21:13:58 -08:00
|
|
|
return efl_pack_table_content_get(table, col, row);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_table_unpack(Edje_Object *obj, const char *part, Evas_Object *child_obj)
|
|
|
|
{
|
|
|
|
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
|
|
|
|
return efl_pack_unpack(table, child_obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI Eina_Bool
|
|
|
|
edje_object_part_table_clear(Edje_Object *obj, const char *part, Eina_Bool clear)
|
|
|
|
{
|
|
|
|
Eo *table = PART_TABLE_GET(obj, part, EINA_FALSE);
|
|
|
|
if (clear)
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_clear(table);
|
2016-04-22 01:31:55 -07:00
|
|
|
else
|
2016-04-25 23:21:21 -07:00
|
|
|
return efl_pack_unpack_all(table);
|
2016-04-22 01:31:55 -07:00
|
|
|
}
|
|
|
|
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "efl_canvas_layout_part_table.eo.c"
|