forked from enlightenment/efl
eolian-cxx: Add binbuf and event keywords handling
n Summary: Add support in Eolian-Cxx for binbuf and event keywords and tests. It will generate the C type while the manual binding in C++ for the types do not exist. Reviewers: q66, lauromoura Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9412
This commit is contained in:
parent
d19e435ff9
commit
f230dc9dbc
|
@ -140,6 +140,30 @@ struct visitor_generate
|
|||
r.base_qualifier.qualifier ^= qualifier_info::is_ref;
|
||||
return replace_base_type(r, " ::efl::eina::strbuf");
|
||||
}}
|
||||
, {"event", nullptr, nullptr, nullptr, [&]
|
||||
{
|
||||
regular_type_def r = regular;
|
||||
r.base_qualifier.qualifier ^= qualifier_info::is_ref;
|
||||
if (r.base_qualifier.qualifier & qualifier_info::is_const)
|
||||
{
|
||||
r.base_qualifier.qualifier ^= qualifier_info::is_const;
|
||||
return replace_base_type(r, " Efl_Event*");
|
||||
}
|
||||
else
|
||||
return replace_base_type(r, " Efl_Event const*");
|
||||
}}
|
||||
, {"binbuf", nullptr, nullptr, nullptr, [&]
|
||||
{
|
||||
regular_type_def r = regular;
|
||||
r.base_qualifier.qualifier ^= qualifier_info::is_ref;
|
||||
if (r.base_qualifier.qualifier & qualifier_info::is_const)
|
||||
{
|
||||
r.base_qualifier.qualifier ^= qualifier_info::is_const;
|
||||
return replace_base_type(r, " Eina_Binbuf*");
|
||||
}
|
||||
else
|
||||
return replace_base_type(r, " Eina_Binbuf const*");
|
||||
}}
|
||||
/* FIXME: handle any_value_ptr */
|
||||
, {"any_value", true, nullptr, nullptr, [&]
|
||||
{
|
||||
|
|
|
@ -138,5 +138,20 @@ static void _generic_protected_beta_method1(Eo *obj EINA_UNUSED, Generic_Data* p
|
|||
static void _generic_beta_method1(Eo *obj EINA_UNUSED, Generic_Data* pd EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
void _generic_event_param(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, Efl_Event *value EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
void _generic_const_event_param(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, const Efl_Event *value EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
void _generic_binbuf_param(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, Eina_Binbuf *value EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
void _generic_const_binbuf_param(Eo *obj EINA_UNUSED, Generic_Data *pd EINA_UNUSED, const Eina_Binbuf *value EINA_UNUSED)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
#include "generic.eo.c"
|
||||
#include "generic_interface.eo.c"
|
||||
|
|
|
@ -94,6 +94,26 @@ class Generic extends Efl.Object implements Generic_Interface
|
|||
}
|
||||
protected_beta_method1 @protected @beta {
|
||||
}
|
||||
event_param {
|
||||
params {
|
||||
value: event;
|
||||
}
|
||||
}
|
||||
const_event_param {
|
||||
params {
|
||||
value: const(event);
|
||||
}
|
||||
}
|
||||
binbuf_param {
|
||||
params {
|
||||
value: binbuf;
|
||||
}
|
||||
}
|
||||
const_binbuf_param {
|
||||
params {
|
||||
value: const(binbuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
constructors {
|
||||
.required_ctor_a;
|
||||
|
|
Loading…
Reference in New Issue