2016-05-24 04:40:18 -07:00
|
|
|
#ifndef _ELM_PART_HELPER_H
|
|
|
|
#define _ELM_PART_HELPER_H
|
|
|
|
|
edje/elm: Rename _internal_ to _part_ (EO)
In Edje and Elementary, we have part objects, which are what is returned
by the interface efl_part(). Those objects can't be of an opaque type as
this doesn't work nicely with strongly typed languages such as C++ or
C#. In JS, Lua, C the types are weak and mostly runtime-based so it
doesn't matter much.
As a consequence, the documentation and the types need to look nice in
this EO API. Thus, we remove the abusive term "internal" and explicitly
call all those classes "part" something.
Eventually we want the types to be declared in the EO file so bindings
(C#, C++, ...) can generate the proper access methods, returning the
best possible types.
Note that right now a few of those part types are used in the legacy API
but don't actually need to be exposed externally.
This is kind of a mega commit that does all the renaming at once, but
it's really just a big sed operation. The power of good IDEs :)
Ref T5315
Ref T5306
2017-09-12 21:29:25 -07:00
|
|
|
#include "efl_ui_layout_part.eo.h"
|
2016-05-24 04:40:18 -07:00
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
//#define ELM_PART_HOOK do { ERR("%p:%s [%d]", pd->obj, pd->part, (int) pd->temp); } while(0)
|
2017-08-02 03:41:47 -07:00
|
|
|
#define ELM_PART_HOOK do {} while(0)
|
2016-05-25 22:06:52 -07:00
|
|
|
|
2016-08-15 06:44:41 -07:00
|
|
|
#define ELM_PART_REF(obj, pd) do { if (!(pd->temp++)) efl_ref(obj); } while(0)
|
2016-08-10 07:23:04 -07:00
|
|
|
#define ELM_PART_UNREF(obj, pd) do { if (pd->temp) { if (!(--pd->temp)) efl_del(obj); } } while(0)
|
2016-05-25 22:06:52 -07:00
|
|
|
#define ELM_PART_RETURN_VAL(a) do { ELM_PART_HOOK; typeof(a) _ret = a; ELM_PART_UNREF(obj, pd); return _ret; } while(0)
|
|
|
|
#define ELM_PART_RETURN_VOID do { ELM_PART_HOOK; ELM_PART_UNREF(obj, pd); return; } while(0)
|
2016-05-24 04:40:18 -07:00
|
|
|
#define ELM_PART_CALL(a) ({ ELM_PART_REF(obj, pd); a; })
|
|
|
|
|
|
|
|
typedef struct _Elm_Part_Data Elm_Part_Data;
|
|
|
|
struct _Elm_Part_Data
|
|
|
|
{
|
|
|
|
Eo *obj;
|
|
|
|
void *sd;
|
|
|
|
char *part;
|
|
|
|
unsigned char temp;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Note: this generic implementation can be improved to support part object
|
|
|
|
// caching or something...
|
|
|
|
|
2016-05-25 22:06:52 -07:00
|
|
|
#define ELM_PART_IMPLEMENT_DESTRUCTOR(type, TYPE, typedata, partdata) \
|
2016-05-24 04:40:18 -07:00
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_object_destructor(Eo *obj, partdata *pd) \
|
2016-05-24 04:40:18 -07:00
|
|
|
{ \
|
2016-05-25 22:06:52 -07:00
|
|
|
ELM_PART_HOOK; \
|
2016-05-24 04:40:18 -07:00
|
|
|
free(pd->part); \
|
2016-08-15 06:44:41 -07:00
|
|
|
efl_data_xunref(pd->obj, pd->sd, 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_destructor(efl_super(obj, TYPE ## _PART_CLASS)); \
|
2016-05-24 04:40:18 -07:00
|
|
|
} \
|
2016-05-25 22:06:52 -07:00
|
|
|
|
|
|
|
// Main part proxy implementation
|
|
|
|
#define ELM_PART_IMPLEMENT(type, TYPE, typedata, partdata) \
|
|
|
|
ELM_PART_IMPLEMENT_DESTRUCTOR(type, TYPE, typedata, partdata) \
|
2016-08-10 07:23:04 -07:00
|
|
|
static EOLIAN Efl_Object * \
|
2016-05-24 04:40:18 -07:00
|
|
|
_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
|
|
|
|
{ \
|
|
|
|
partdata *pd; \
|
|
|
|
Eo *proxy; \
|
|
|
|
\
|
2017-07-05 04:12:14 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
|
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
|
|
|
proxy = efl_add(TYPE ## _PART_CLASS, (Eo *) obj); \
|
|
|
|
pd = efl_data_scope_get(proxy, TYPE ## _PART_CLASS); \
|
2016-05-24 04:40:18 -07:00
|
|
|
if (pd) \
|
|
|
|
{ \
|
|
|
|
pd->obj = (Eo *) obj; \
|
2016-08-15 06:44:41 -07:00
|
|
|
pd->sd = efl_data_xref(pd->obj, TYPE ## _CLASS, proxy); \
|
2017-07-05 04:12:14 -07:00
|
|
|
pd->part = strdup(part); \
|
2016-05-24 04:40:18 -07:00
|
|
|
pd->temp = 1; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
return proxy; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_IMPLEMENT_CONTENT_SET(type, TYPE, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_set(Eo *obj, partdata *pd, Efl_Gfx *content) \
|
2016-05-24 04:40:18 -07:00
|
|
|
{ \
|
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, pd->sd, pd->part, content)); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_IMPLEMENT_CONTENT_GET(type, TYPE, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_get(Eo *obj, partdata *pd) \
|
2016-05-24 04:40:18 -07:00
|
|
|
{ \
|
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, pd->sd, pd->part)); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_IMPLEMENT_CONTENT_UNSET(type, TYPE, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_unset(Eo *obj, partdata *pd) \
|
2016-05-24 04:40:18 -07:00
|
|
|
{ \
|
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, pd->sd, pd->part)); \
|
|
|
|
}
|
|
|
|
|
2017-06-04 07:25:36 -07:00
|
|
|
#define ELM_PART_IMPLEMENT_TEXT_SET(type, TYPE, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_text_text_set(Eo *obj EINA_UNUSED, partdata *pd, const char *text) \
|
2017-06-04 07:25:36 -07:00
|
|
|
{ \
|
|
|
|
_ ## type ## _text_set(pd->obj, pd->sd, pd->part, text); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_IMPLEMENT_TEXT_GET(type, TYPE, typedata, partdata) \
|
|
|
|
static EOLIAN const char * \
|
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
|
|
|
_ ## type ## _part_efl_text_text_get(Eo *obj, partdata *pd) \
|
2017-06-04 07:25:36 -07:00
|
|
|
{ \
|
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _text_get(pd->obj, pd->sd, pd->part)); \
|
|
|
|
}
|
|
|
|
|
2017-06-29 04:02:59 -07:00
|
|
|
#define ELM_PART_CONTENT_DEFAULT_SET(type, part) \
|
|
|
|
static const char * _ ## type ## _default_content_part_get(const Eo *obj EINA_UNUSED, void *sd EINA_UNUSED) { return part; }
|
|
|
|
|
|
|
|
#define ELM_PART_CONTENT_DEFAULT_OPS(type) \
|
|
|
|
EFL_OBJECT_OP_FUNC(elm_widget_default_content_part_get, _ ## type ## _default_content_part_get)
|
2017-06-04 07:25:36 -07:00
|
|
|
|
2017-07-04 02:54:44 -07:00
|
|
|
#define ELM_PART_TEXT_DEFAULT_GET(type, part) \
|
|
|
|
static const char * _ ## type ## _default_text_part_get(const Eo *obj EINA_UNUSED, void *sd EINA_UNUSED) { return part; }
|
|
|
|
|
|
|
|
#define ELM_PART_TEXT_DEFAULT_OPS(type) \
|
|
|
|
EFL_OBJECT_OP_FUNC(elm_widget_default_text_part_get, _ ## type ## _default_text_part_get)
|
|
|
|
|
2017-08-07 19:48:31 -07:00
|
|
|
// For widgets that inherit from something with parts (eg. from Efl.Ui.Layout)
|
2016-05-24 04:40:18 -07:00
|
|
|
#define ELM_PART_OVERRIDE(type, TYPE, SUPER, typedata, partdata) \
|
2016-08-10 07:23:04 -07:00
|
|
|
static EOLIAN Efl_Object * \
|
2016-05-24 04:40:18 -07:00
|
|
|
_ ## type ## _efl_part_part(const Eo *obj, typedata *priv EINA_UNUSED, const char *part) \
|
|
|
|
{ \
|
|
|
|
partdata *pd; \
|
|
|
|
Eo *proxy; \
|
|
|
|
\
|
2017-07-05 04:12:14 -07:00
|
|
|
EINA_SAFETY_ON_NULL_RETURN_VAL(part, NULL); \
|
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
|
|
|
proxy = efl_add(TYPE ## _PART_CLASS, (Eo *) obj); \
|
|
|
|
pd = efl_data_scope_get(proxy, SUPER ## _PART_CLASS); \
|
2016-05-24 04:40:18 -07:00
|
|
|
if (pd) \
|
|
|
|
{ \
|
|
|
|
pd->obj = (Eo *) obj; \
|
2016-08-15 06:44:41 -07:00
|
|
|
pd->sd = efl_data_xref(pd->obj, SUPER ## _CLASS, proxy); \
|
2017-07-05 04:12:14 -07:00
|
|
|
pd->part = strdup(part); \
|
2016-05-24 04:40:18 -07:00
|
|
|
pd->temp = 1; \
|
|
|
|
} \
|
|
|
|
\
|
|
|
|
return proxy; \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_OVERRIDE_CONTENT_SET(type, TYPE, SUPER, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_set(Eo *obj, void *_pd EINA_UNUSED, Efl_Gfx *content) \
|
2016-05-24 04:40:18 -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
|
|
|
partdata *pd = efl_data_scope_get(obj, SUPER ## _PART_CLASS); \
|
2016-08-15 06:44:41 -07:00
|
|
|
typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
|
2016-05-29 20:28:18 -07:00
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_set(pd->obj, sd, pd->part, content)); \
|
2016-05-24 04:40:18 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_OVERRIDE_CONTENT_GET(type, TYPE, SUPER, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_get(Eo *obj, void *_pd EINA_UNUSED) \
|
2016-05-24 04:40:18 -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
|
|
|
partdata *pd = efl_data_scope_get(obj, SUPER ## _PART_CLASS); \
|
2016-08-15 06:44:41 -07:00
|
|
|
typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
|
2016-05-29 20:28:18 -07:00
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_get(pd->obj, sd, pd->part)); \
|
2016-05-24 04:40:18 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_OVERRIDE_CONTENT_UNSET(type, TYPE, SUPER, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_container_content_unset(Eo *obj, void *_pd EINA_UNUSED) \
|
2016-05-24 04:40:18 -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
|
|
|
partdata *pd = efl_data_scope_get(obj, SUPER ## _PART_CLASS); \
|
2016-08-15 06:44:41 -07:00
|
|
|
typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
|
2016-05-29 20:28:18 -07:00
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _content_unset(pd->obj, sd, pd->part)); \
|
2016-05-24 04:40:18 -07:00
|
|
|
}
|
|
|
|
|
2017-06-04 07:25:36 -07:00
|
|
|
#define ELM_PART_OVERRIDE_TEXT_SET(type, TYPE, SUPER, typedata, partdata) \
|
|
|
|
static EOLIAN 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
|
|
|
_ ## type ## _part_efl_text_text_set(Eo *obj, void *_pd EINA_UNUSED, const char *text) \
|
2017-06-04 07:25:36 -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
|
|
|
partdata *pd = efl_data_scope_get(obj, SUPER ## _PART_CLASS); \
|
2017-06-04 07:25:36 -07:00
|
|
|
typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
|
|
|
|
ELM_PART_CALL(_ ## type ## _text_set(pd->obj, sd, pd->part, text)); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define ELM_PART_OVERRIDE_TEXT_GET(type, TYPE, SUPER, typedata, partdata) \
|
|
|
|
static EOLIAN const char *\
|
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
|
|
|
_ ## type ## _part_efl_text_text_get(Eo *obj, void *_pd EINA_UNUSED) \
|
2017-06-04 07:25:36 -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
|
|
|
partdata *pd = efl_data_scope_get(obj, SUPER ## _PART_CLASS); \
|
2017-06-04 07:25:36 -07:00
|
|
|
typedata *sd = efl_data_scope_get(pd->obj, TYPE ## _CLASS); \
|
|
|
|
ELM_PART_RETURN_VAL(_ ## type ## _text_get(pd->obj, sd, pd->part)); \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define EFL_TEXT_PART_DEFAULT_IMPLEMENT(type, Type) \
|
2017-01-04 03:17:21 -08:00
|
|
|
EOLIAN static void \
|
|
|
|
_ ## type ## _efl_text_text_set(Eo *obj, Type *pd EINA_UNUSED, const char *text) \
|
|
|
|
{ \
|
2017-06-04 07:25:36 -07:00
|
|
|
efl_text_set(efl_part(efl_super(obj, MY_CLASS), "elm.text"), text); \
|
2017-01-04 03:17:21 -08:00
|
|
|
} \
|
|
|
|
EOLIAN static const char * \
|
2017-06-04 07:25:36 -07:00
|
|
|
_ ## type ## _efl_text_text_get(Eo *obj, Type *pd EINA_UNUSED) \
|
2017-01-04 03:17:21 -08:00
|
|
|
{ \
|
2017-06-04 07:25:36 -07:00
|
|
|
return efl_text_get(efl_part(efl_super(obj, MY_CLASS), "elm.text")); \
|
2017-01-04 03:17:21 -08:00
|
|
|
}
|
|
|
|
|
2016-05-24 04:40:18 -07:00
|
|
|
#endif
|