2016-04-25 05:36:56 -07:00
|
|
|
#ifdef HAVE_CONFIG_H
|
|
|
|
# include "elementary_config.h"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ELM_LAYOUT_PROTECTED
|
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
|
|
|
#define EFL_UI_LAYOUT_PART_BOX_PROTECTED
|
|
|
|
#define EFL_UI_LAYOUT_PART_TABLE_PROTECTED
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
#include <Elementary.h>
|
|
|
|
|
|
|
|
#include "elm_priv.h"
|
|
|
|
#include "elm_widget_layout.h"
|
2016-05-25 22:06:52 -07:00
|
|
|
#include "elm_part_helper.h"
|
2016-04-25 05:36:56 -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_ui_layout_part_box.eo.h"
|
|
|
|
#include "efl_ui_layout_part_table.eo.h"
|
2016-04-25 05:36:56 -07:00
|
|
|
#include "../evas/canvas/evas_box.eo.h"
|
|
|
|
#include "../evas/canvas/evas_table.eo.h"
|
|
|
|
|
|
|
|
/* layout internals for box & table */
|
2017-08-07 21:28:50 -07:00
|
|
|
Eina_Bool _efl_ui_layout_box_append(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child);
|
|
|
|
Eina_Bool _efl_ui_layout_box_prepend(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child);
|
|
|
|
Eina_Bool _efl_ui_layout_box_insert_before(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child, const Evas_Object *reference);
|
|
|
|
Eina_Bool _efl_ui_layout_box_insert_at(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child, unsigned int pos);
|
|
|
|
Evas_Object *_efl_ui_layout_box_remove(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child);
|
|
|
|
Eina_Bool _efl_ui_layout_box_remove_all(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Eina_Bool clear);
|
|
|
|
Eina_Bool _efl_ui_layout_table_pack(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child, unsigned short col, unsigned short row, unsigned short colspan, unsigned short rowspan);
|
|
|
|
Evas_Object *_efl_ui_layout_table_unpack(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Evas_Object *child);
|
|
|
|
Eina_Bool _efl_ui_layout_table_clear(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, Eina_Bool clear);
|
2016-04-25 05:36:56 -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
|
|
|
#define BOX_CLASS EFL_UI_LAYOUT_PART_BOX_CLASS
|
|
|
|
#define TABLE_CLASS EFL_UI_LAYOUT_PART_TABLE_CLASS
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
typedef struct _Layout_Part_Data Efl_Ui_Layout_Box_Data;
|
|
|
|
typedef struct _Layout_Part_Data Efl_Ui_Layout_Table_Data;
|
|
|
|
typedef struct _Part_Item_Iterator Part_Item_Iterator;
|
|
|
|
|
|
|
|
struct _Layout_Part_Data
|
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
Efl_Ui_Layout *obj; // no ref
|
2017-08-07 21:28:50 -07:00
|
|
|
Efl_Ui_Layout_Data *sd; // data xref
|
2016-04-25 05:36:56 -07:00
|
|
|
Eina_Stringshare *part;
|
2016-05-25 22:06:52 -07:00
|
|
|
unsigned char temp;
|
2016-04-25 05:36:56 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Part_Item_Iterator
|
|
|
|
{
|
|
|
|
Eina_Iterator iterator;
|
|
|
|
Eina_List *list;
|
|
|
|
Eina_Iterator *real_iterator;
|
|
|
|
Eo *object;
|
|
|
|
};
|
|
|
|
|
|
|
|
Eo *
|
2017-08-07 19:48:31 -07:00
|
|
|
_efl_ui_layout_pack_proxy_get(Efl_Ui_Layout *obj, Edje_Part_Type type, const char *part)
|
2016-07-27 00:31:52 -07:00
|
|
|
{
|
|
|
|
if (type == EDJE_PART_TYPE_BOX)
|
2016-08-15 06:44:41 -07:00
|
|
|
return efl_add(BOX_CLASS, obj,
|
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_ui_layout_part_box_real_part_set(efl_added, obj, part));
|
2016-07-27 00:31:52 -07:00
|
|
|
else if (type == EDJE_PART_TYPE_TABLE)
|
2016-08-15 06:44:41 -07:00
|
|
|
return efl_add(TABLE_CLASS, obj,
|
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_ui_layout_part_table_real_part_set(efl_added, obj, part));
|
2016-04-25 05:36:56 -07:00
|
|
|
else
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
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_ui_layout_part_box_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_HOOK;
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_data_xunref(pd->obj, pd->sd, obj);
|
2016-05-25 22:06:52 -07:00
|
|
|
eina_stringshare_del(pd->part);
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_destructor(efl_super(obj, BOX_CLASS));
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
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_ui_layout_part_box_real_part_set(Eo *obj, Efl_Ui_Layout_Box_Data *pd, Eo *layout, const char *part)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
pd->obj = layout;
|
2017-08-07 19:48:31 -07:00
|
|
|
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_CLASS, obj);
|
2016-05-25 22:06:52 -07:00
|
|
|
eina_stringshare_replace(&pd->part, part);
|
|
|
|
pd->temp = 1;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/* this iterator is the same as efl_ui_box */
|
|
|
|
static Eina_Bool
|
|
|
|
_part_item_iterator_next(Part_Item_Iterator *it, void **data)
|
|
|
|
{
|
2016-05-10 04:25:44 -07:00
|
|
|
Efl_Gfx *sub;
|
2016-04-25 05:36:56 -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 *
|
|
|
|
_part_item_iterator_get_container(Part_Item_Iterator *it)
|
|
|
|
{
|
|
|
|
return it->object;
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
|
|
|
_part_item_iterator_free(Part_Item_Iterator *it)
|
|
|
|
{
|
|
|
|
eina_iterator_free(it->real_iterator);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_wref_del(it->object, &it->object);
|
2016-04-25 05:36:56 -07:00
|
|
|
eina_list_free(it->list);
|
|
|
|
free(it);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Eina_Iterator *
|
|
|
|
_part_item_iterator_create(Eo *obj, Eina_Iterator *real_iterator, Eina_List *list)
|
|
|
|
{
|
|
|
|
Part_Item_Iterator *it;
|
|
|
|
|
|
|
|
it = calloc(1, sizeof(*it));
|
|
|
|
if (!it) return NULL;
|
|
|
|
|
|
|
|
EINA_MAGIC_SET(&it->iterator, EINA_MAGIC_ITERATOR);
|
|
|
|
|
|
|
|
it->list = list;
|
|
|
|
it->real_iterator = real_iterator;
|
|
|
|
it->iterator.version = EINA_ITERATOR_VERSION;
|
|
|
|
it->iterator.next = FUNC_ITERATOR_NEXT(_part_item_iterator_next);
|
|
|
|
it->iterator.get_container = FUNC_ITERATOR_GET_CONTAINER(_part_item_iterator_get_container);
|
|
|
|
it->iterator.free = FUNC_ITERATOR_FREE(_part_item_iterator_free);
|
2016-08-10 07:23:04 -07:00
|
|
|
efl_wref_add(obj, &it->object);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
return &it->iterator;
|
|
|
|
}
|
|
|
|
|
|
|
|
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_ui_layout_part_box_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
Eina_Iterator *it;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
it = evas_object_box_iterator_new(pack);
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(_part_item_iterator_create(obj, it, NULL));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
ELM_PART_RETURN_VAL(evas_obj_box_count(pack));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_TRUE));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove_all(pd->obj, pd->sd, pd->part, EINA_FALSE));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL);
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *content)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
// alias for efl_pack_unpack
|
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
|
|
|
return _efl_ui_layout_part_box_efl_pack_unpack(obj, pd, content);
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_prepend(pd->obj, pd->sd, pd->part, subobj));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, existing));
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, const Efl_Gfx *existing)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-10 04:25:44 -07:00
|
|
|
const Efl_Gfx *other;
|
2016-04-25 05:36:56 -07:00
|
|
|
int index;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
index = efl_pack_index_get(pack, existing);
|
2016-05-25 22:06:52 -07:00
|
|
|
if (index < 0) ELM_PART_RETURN_VAL(EINA_FALSE);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
other = efl_pack_content_get(pack, index + 1);
|
2016-04-25 05:36:56 -07:00
|
|
|
if (other)
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other));
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_CALL(efl_pack_end(obj, subobj));
|
|
|
|
ELM_PART_RETURN_VAL(EINA_TRUE);
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx *subobj, int index)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index));
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-05-10 04:25:44 -07:00
|
|
|
EOLIAN static Efl_Gfx *
|
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_ui_layout_part_box_efl_pack_linear_pack_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, int index)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
Evas_Object_Box_Option *opt;
|
|
|
|
Evas_Object_Box_Data *priv;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
priv = efl_data_scope_get(pack, EVAS_BOX_CLASS);
|
2016-04-25 05:36:56 -07:00
|
|
|
opt = eina_list_nth(priv->children, index);
|
2016-05-25 22:06:52 -07:00
|
|
|
if (!opt) ELM_PART_RETURN_VAL(NULL);
|
|
|
|
ELM_PART_RETURN_VAL(opt->obj);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-05-10 04:25:44 -07:00
|
|
|
EOLIAN static Efl_Gfx *
|
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_ui_layout_part_box_efl_pack_linear_pack_unpack_at(Eo *obj, Efl_Ui_Layout_Box_Data *pd, int index)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-10 04:25:44 -07:00
|
|
|
Efl_Gfx *subobj;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
subobj = efl_pack_content_get(pack, index);
|
2016-05-25 22:06:52 -07:00
|
|
|
if (!subobj) ELM_PART_RETURN_VAL(NULL);
|
2016-04-25 05:36:56 -07:00
|
|
|
if (efl_pack_unpack(obj, subobj))
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(subobj);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
ERR("failed to remove %p from %p (item %d)", subobj, pd->obj, index);
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(NULL);
|
2016-04-25 05:36:56 -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_ui_layout_part_box_efl_pack_linear_pack_index_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, const Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
ELM_PART_RETURN_VAL(efl_pack_index_get(pack, subobj));
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2017-09-19 02:51:58 -07:00
|
|
|
EOLIAN static Efl_Ui_Dir
|
|
|
|
_efl_ui_layout_part_box_efl_ui_direction_direction_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-09-19 02:51:58 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_DIR_DEFAULT);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2017-09-19 02:51:58 -07:00
|
|
|
ELM_PART_RETURN_VAL(efl_ui_direction_get(efl_part(wd->resize_obj, pd->part)));
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
|
|
|
|
/* Table proxy implementation */
|
|
|
|
|
2016-04-25 05:36:56 -07:00
|
|
|
EOLIAN static void
|
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_ui_layout_part_table_real_part_set(Eo *obj, Efl_Ui_Layout_Table_Data *pd, Eo *layout, const char *part)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
pd->obj = layout;
|
2017-08-07 19:48:31 -07:00
|
|
|
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_CLASS, obj);
|
2016-05-25 22:06:52 -07:00
|
|
|
eina_stringshare_replace(&pd->part, part);
|
|
|
|
pd->temp = 1;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
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_ui_layout_part_table_efl_object_destructor(Eo *obj, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_HOOK;
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_data_xunref(pd->obj, pd->sd, obj);
|
2016-04-25 05:36:56 -07:00
|
|
|
eina_stringshare_del(pd->part);
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_destructor(efl_super(obj, TABLE_CLASS));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_container_content_iterate(Eo *obj, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
Eina_Iterator *it;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
it = evas_object_table_iterator_new(pack);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(_part_item_iterator_create(obj, it, NULL));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_container_content_count(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
ELM_PART_RETURN_VAL(evas_obj_table_count(pack));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_pack_clear(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_TRUE));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_unpack_all(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_table_clear(pd->obj, pd->sd, pd->part, EINA_FALSE));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
if (!subobj) ELM_PART_RETURN_VAL(EINA_FALSE);
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj);
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_container_content_remove(Eo *obj, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *content)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-05-25 22:06:52 -07:00
|
|
|
// alias for efl_pack_unpack
|
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
|
|
|
return _efl_ui_layout_part_table_efl_pack_unpack(obj, pd, content);
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_grid_pack_grid(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx *subobj, int col, int row, int colspan, int rowspan)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-08-07 19:48:31 -07:00
|
|
|
ELM_PART_RETURN_VAL(_efl_ui_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan));
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-05-10 04:25:44 -07:00
|
|
|
EOLIAN static Efl_Gfx *
|
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_ui_layout_part_table_efl_pack_grid_grid_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
ELM_PART_RETURN_VAL(evas_object_table_child_get(pack, col, row));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_grid_grid_contents_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row, Eina_Bool below)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
// contents at col,row - see also Efl.Ui.Grid or edje_containers.c
|
|
|
|
// not reusing edje's iterator because the container would be wrong
|
|
|
|
|
|
|
|
Eina_List *list, *l = NULL;
|
|
|
|
Evas_Object *sobj;
|
|
|
|
unsigned short c, r, cs, rs;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
list = evas_object_table_children_get(pack);
|
2016-04-25 05:36:56 -07:00
|
|
|
EINA_LIST_FREE(list, sobj)
|
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
evas_object_table_pack_get(pack, sobj, &c, &r, &cs, &rs);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(_part_item_iterator_create(pd->obj, eina_list_iterator_new(l), l));
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_grid_grid_position_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx * subobj, int *col, int *row, int *colspan, int *rowspan)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
unsigned short c, r, cs, rs;
|
|
|
|
Eina_Bool ret;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
ret = evas_object_table_pack_get(pack, subobj, &c, &r, &cs, &rs);
|
2016-04-25 05:36:56 -07:00
|
|
|
if (col) *col = c;
|
|
|
|
if (row) *row = r;
|
|
|
|
if (colspan) *colspan = cs;
|
|
|
|
if (rowspan) *rowspan = rs;
|
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(ret);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
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_ui_layout_part_table_efl_pack_grid_grid_size_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
evas_object_table_col_row_size_get(pack, cols, rows);
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_grid_grid_columns_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
int cols, rows;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
evas_object_table_col_row_size_get(pack, &cols, &rows);
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(cols);
|
2016-04-25 05:36:56 -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_ui_layout_part_table_efl_pack_grid_grid_rows_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
int cols, rows;
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
evas_object_table_col_row_size_get(pack, &cols, &rows);
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_RETURN_VAL(rows);
|
2016-04-25 05:36:56 -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_ui_layout_part_box.eo.c"
|
|
|
|
#include "efl_ui_layout_part_table.eo.c"
|