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
|
2018-05-03 16:34:17 -07:00
|
|
|
#define EFL_PART_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
|
|
|
|
2019-03-05 08:15:40 -08:00
|
|
|
#include "../evas/canvas/evas_box_eo.h"
|
|
|
|
#include "../evas/canvas/evas_table_eo.h"
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
/* layout internals for box & table */
|
2018-11-16 01:45:05 -08: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;
|
|
|
|
|
|
|
|
struct _Layout_Part_Data
|
|
|
|
{
|
2018-11-16 01:45:05 -08:00
|
|
|
Efl_Ui_Layout *obj; // no ref
|
|
|
|
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
|
|
|
};
|
|
|
|
|
|
|
|
Eo *
|
2018-11-16 01:45:05 -08: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;
|
2019-02-27 10:17:16 -08:00
|
|
|
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_BASE_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 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;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
it = evas_object_box_iterator_new(pack);
|
2018-02-14 18:14:52 -08:00
|
|
|
return efl_canvas_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
|
|
|
{
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2017-10-23 22:43:43 -07:00
|
|
|
return 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-10-23 22:43:43 -07:00
|
|
|
return _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-10-23 22:43:43 -07:00
|
|
|
return _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
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _efl_ui_layout_box_remove(pd->obj, pd->sd, pd->part, subobj) != NULL;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_pack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _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
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_linear_pack_begin(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _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
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_linear_pack_end(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _efl_ui_layout_box_append(pd->obj, pd->sd, pd->part, subobj);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_linear_pack_before(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _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
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_linear_pack_after(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj, const Efl_Gfx_Entity *existing)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2018-04-05 01:47:26 -07:00
|
|
|
const Efl_Gfx_Entity *other;
|
2016-04-25 05:36:56 -07:00
|
|
|
int index;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
index = efl_pack_index_get(pack, existing);
|
2017-10-23 22:43:43 -07:00
|
|
|
if (index < 0) return 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-10-23 22:43:43 -07:00
|
|
|
return _efl_ui_layout_box_insert_before(pd->obj, pd->sd, pd->part, subobj, other);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2017-10-23 22:43:43 -07:00
|
|
|
return efl_pack_end(obj, subobj);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_box_efl_pack_linear_pack_at(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd, Efl_Gfx_Entity *subobj, int index)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _efl_ui_layout_box_insert_at(pd->obj, pd->sd, pd->part, subobj, index);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
EOLIAN static Efl_Gfx_Entity *
|
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;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
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);
|
2017-10-23 22:43:43 -07:00
|
|
|
if (!opt) return NULL;
|
|
|
|
return opt->obj;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
EOLIAN static Efl_Gfx_Entity *
|
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
|
|
|
{
|
2018-04-05 01:47:26 -07:00
|
|
|
Efl_Gfx_Entity *subobj;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2016-07-27 00:31:52 -07:00
|
|
|
subobj = efl_pack_content_get(pack, index);
|
2017-10-23 22:43:43 -07:00
|
|
|
if (!subobj) return NULL;
|
2016-04-25 05:36:56 -07:00
|
|
|
if (efl_pack_unpack(obj, subobj))
|
2017-10-23 22:43:43 -07:00
|
|
|
return subobj;
|
2016-04-25 05:36:56 -07:00
|
|
|
|
|
|
|
ERR("failed to remove %p from %p (item %d)", subobj, pd->obj, index);
|
2017-10-23 22:43:43 -07:00
|
|
|
return NULL;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
2018-04-05 01:47:26 -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_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2017-10-23 22:43:43 -07:00
|
|
|
return efl_pack_index_get(pack, subobj);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2019-05-24 09:30:31 -07:00
|
|
|
EOLIAN static Efl_Ui_Layout_Orientation
|
|
|
|
_efl_ui_layout_part_box_efl_ui_layout_orientable_orientation_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Box_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2019-05-24 09:30:31 -07:00
|
|
|
ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EFL_UI_LAYOUT_ORIENTATION_DEFAULT);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2019-05-24 09:30:31 -07:00
|
|
|
return efl_ui_layout_orientation_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;
|
2019-02-27 10:17:16 -08:00
|
|
|
pd->sd = efl_data_xref(pd->obj, EFL_UI_LAYOUT_BASE_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;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
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
|
|
|
|
2018-02-14 18:14:52 -08:00
|
|
|
return efl_canvas_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
|
|
|
{
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2017-10-23 22:43:43 -07:00
|
|
|
return 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-10-23 22:43:43 -07:00
|
|
|
return _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-10-23 22:43:43 -07:00
|
|
|
return _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
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_unpack(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity *subobj)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
if (!subobj) return EINA_FALSE;
|
|
|
|
return _efl_ui_layout_table_unpack(pd->obj, pd->sd, pd->part, subobj) == subobj;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2016-04-25 23:21:21 -07:00
|
|
|
EOLIAN static Eina_Bool
|
2018-04-05 01:47:26 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_pack_table(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity *subobj, int col, int row, int colspan, int rowspan)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2017-10-23 22:43:43 -07:00
|
|
|
return _efl_ui_layout_table_pack(pd->obj, pd->sd, pd->part, subobj, col, row, colspan, rowspan);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2018-04-05 01:47:26 -07:00
|
|
|
EOLIAN static Efl_Gfx_Entity *
|
2017-12-18 21:13:58 -08:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_content_get(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int col, int row)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2017-10-23 22:43:43 -07:00
|
|
|
return evas_object_table_child_get(pack, col, row);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Iterator *
|
2017-12-18 21:13:58 -08:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_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
|
|
|
{
|
2017-12-18 21:13:58 -08:00
|
|
|
// contents at col,row - see also Efl.Ui.Table or edje_containers.c
|
2016-04-25 05:36:56 -07:00
|
|
|
// 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;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-02-14 18:14:52 -08:00
|
|
|
return efl_canvas_iterator_create(pd->obj, eina_list_iterator_new(l), l);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
2019-08-27 03:46:03 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_cell_column_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity * subobj, int *col, int *colspan)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2019-08-27 03:46:03 -07:00
|
|
|
unsigned short c, cs;
|
2016-04-25 05:36:56 -07:00
|
|
|
Eina_Bool ret;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-04-25 05:36:56 -07:00
|
|
|
|
2019-08-27 03:46:03 -07:00
|
|
|
ret = evas_object_table_pack_get(pack, subobj, &c, NULL, &cs, NULL);
|
2016-04-25 05:36:56 -07:00
|
|
|
if (col) *col = c;
|
|
|
|
if (colspan) *colspan = cs;
|
2019-08-27 03:46:03 -07:00
|
|
|
|
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static void
|
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_cell_column_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity * subobj, int col, int colspan)
|
|
|
|
{
|
|
|
|
unsigned short r, rs;
|
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
edje_object_thaw(pd->obj);
|
|
|
|
|
|
|
|
evas_object_table_pack_get(pack, subobj, NULL, &r, NULL, &rs);
|
|
|
|
evas_object_table_pack(pack, subobj, col, r, colspan, rs);
|
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_cell_row_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity * subobj, int *row, int *rowspan)
|
|
|
|
{
|
|
|
|
unsigned short r, rs;
|
|
|
|
Eina_Bool ret;
|
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
edje_object_thaw(pd->obj);
|
|
|
|
|
|
|
|
ret = evas_object_table_pack_get(pack, subobj, NULL, &r, NULL, &rs);
|
|
|
|
if (row) *row = r;
|
2016-04-25 05:36:56 -07:00
|
|
|
if (rowspan) *rowspan = rs;
|
|
|
|
|
2017-10-23 22:43:43 -07:00
|
|
|
return ret;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
2019-08-27 03:46:03 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_cell_row_set(Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, Efl_Gfx_Entity * subobj, int row, int rowspan)
|
|
|
|
{
|
|
|
|
unsigned short c, cs;
|
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
|
|
|
edje_object_thaw(pd->obj);
|
|
|
|
|
|
|
|
evas_object_table_pack_get(pack, subobj, &c, NULL, &cs, NULL);
|
|
|
|
evas_object_table_pack(pack, subobj, c, row, cs, rowspan);
|
|
|
|
}
|
|
|
|
|
2016-04-25 05:36:56 -07:00
|
|
|
EOLIAN static void
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_size_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd, int *cols, int *rows)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
evas_object_table_col_row_size_get(pack, cols, rows);
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_columns_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
int cols, rows;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
evas_object_table_col_row_size_get(pack, &cols, &rows);
|
2017-10-23 22:43:43 -07:00
|
|
|
return cols;
|
2016-04-25 05:36:56 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
EOLIAN static int
|
2018-04-17 11:09:44 -07:00
|
|
|
_efl_ui_layout_part_table_efl_pack_table_table_rows_get(const Eo *obj EINA_UNUSED, Efl_Ui_Layout_Table_Data *pd)
|
2016-04-25 05:36:56 -07:00
|
|
|
{
|
|
|
|
int cols, rows;
|
2018-06-25 08:30:32 -07:00
|
|
|
|
|
|
|
edje_object_freeze(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
Eo *pack = (Eo *) edje_object_part_object_get(pd->obj, pd->part);
|
2018-06-25 08:30:32 -07:00
|
|
|
edje_object_thaw(pd->obj);
|
2016-07-27 00:31:52 -07:00
|
|
|
evas_object_table_col_row_size_get(pack, &cols, &rows);
|
2017-10-23 22:43:43 -07:00
|
|
|
return 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"
|