Merging 'devs/q66/eolian_types'

This gets in new type syntax in eo files as well as brand new
API for handling types and updated generators.
This commit is contained in:
Daniel Kolesa 2014-06-30 17:41:30 +01:00
commit f48d57b7f0
41 changed files with 1118 additions and 654 deletions

View File

@ -89,23 +89,24 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
char descname[0xFF];
char *tmpstr = malloc(0x1FF);
Eina_Bool var_as_ret = EINA_FALSE;
Eolian_Type rettypet = NULL;
const char *rettype = NULL;
Eina_Bool ret_const = EINA_FALSE;
Eolian_Function_Scope scope = eolian_function_scope_get(func);
_class_func_env_create(class, eolian_function_name_get(func), ftype, &func_env);
char *fsuffix = "";
rettype = eolian_function_return_type_get(func, ftype);
rettypet = eolian_function_return_type_get(func, ftype);
if (ftype == EOLIAN_PROP_GET)
{
fsuffix = "_get";
if (!rettype)
if (!rettypet)
{
l = eolian_parameters_list_get(func);
if (eina_list_count(l) == 1)
{
data = eina_list_data_get(l);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettype, NULL, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettypet, NULL, NULL);
var_as_ret = EINA_TRUE;
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
}
@ -151,27 +152,35 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
EINA_LIST_FOREACH(eolian_property_keys_list_get(func), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
const char *pdesc = NULL;
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, &pdesc);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptypet, &pname, &pdesc);
ptype = eolian_type_c_type_get(ptypet);
eina_strbuf_append_printf(str_pardesc, tmpl_eo_pardesc, "in", pname, pdesc?pdesc:"No description supplied.");
if (eina_strbuf_length_get(str_par)) eina_strbuf_append(str_par, ", ");
eina_strbuf_append_printf(str_par, "%s %s", ptype, pname);
eina_stringshare_del(ptype);
}
if (!var_as_ret)
{
EINA_LIST_FOREACH(eolian_parameters_list_get(func), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
const char *pdesc;
Eina_Bool add_star = EINA_FALSE;
Eolian_Parameter_Dir pdir;
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc);
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptypet, &pname, &pdesc);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
if (ftype == EOLIAN_PROP_GET) {
add_star = EINA_TRUE;
@ -190,9 +199,12 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
is_const?"const ":"",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_stringshare_del(ptype);
}
}
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
tmpstr[0] = '\0';
sprintf(tmpstr, "%s%s%s",
ret_const ? "const " : "",
@ -207,6 +219,8 @@ eo_fundef_generate(const Eolian_Class class, Eolian_Function func, Eolian_Functi
eina_strbuf_replace_all(str_func, "@#ret_desc", eina_strbuf_string_get(str_retdesc));
eina_strbuf_replace_all(str_func, "@#list_typecheck", eina_strbuf_string_get(str_typecheck));
if (rettype) eina_stringshare_del(rettype);
free(tmpstr);
eina_strbuf_free(str_par);
eina_strbuf_free(str_retdesc);
@ -317,6 +331,7 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
_eolian_class_func_vars func_env;
const char *suffix = "";
Eina_Bool var_as_ret = EINA_FALSE;
Eolian_Type rettypet = NULL;
const char *rettype = NULL;
const char *retname = NULL;
Eina_Bool ret_const = EINA_FALSE;
@ -330,19 +345,19 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
Eina_Strbuf *params = eina_strbuf_new(); /* only variables names */
Eina_Strbuf *full_params = eina_strbuf_new(); /* variables types + names */
rettype = eolian_function_return_type_get(funcid, ftype);
rettypet = eolian_function_return_type_get(funcid, ftype);
retname = "ret";
if (ftype == EOLIAN_PROP_GET)
{
suffix = "_get";
add_star = EINA_TRUE;
if (!rettype)
if (!rettypet)
{
const Eina_List *l = eolian_parameters_list_get(funcid);
if (eina_list_count(l) == 1)
{
void* data = eina_list_data_get(l);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettype, &retname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettypet, &retname, NULL);
var_as_ret = EINA_TRUE;
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
}
@ -358,24 +373,33 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
EINA_LIST_FOREACH(eolian_property_keys_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
if (eina_strbuf_length_get(params)) eina_strbuf_append(params, ", ");
eina_strbuf_append_printf(params, "%s", pname);
eina_strbuf_append_printf(full_params, ", %s%s %s",
is_const?"const ":"",
ptype, pname);
eina_stringshare_del(ptype);
}
if (!var_as_ret)
{
EINA_LIST_FOREACH(eolian_parameters_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
Eolian_Parameter_Dir pdir;
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool is_const = eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET);
Eina_Bool had_star = !!strchr(ptype, '*');
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM);
@ -384,9 +408,12 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
eina_strbuf_append_printf(full_params, ", %s%s%s%s%s",
is_const?"const ":"",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_stringshare_del(ptype);
}
}
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
if (need_implementation)
{
Eina_Strbuf *ret_param = eina_strbuf_new();
@ -451,6 +478,8 @@ eo_bind_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_F
}
eina_strbuf_append(buf, eina_strbuf_string_get(fbody));
if (rettype) eina_stringshare_del(rettype);
eina_strbuf_free(va_args);
eina_strbuf_free(full_params);
eina_strbuf_free(params);

View File

@ -16,9 +16,11 @@ _params_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Bool var_
eina_strbuf_reset(short_params);
EINA_LIST_FOREACH(eolian_property_keys_list_get(foo), itr, param)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
eolian_parameter_information_get(param, NULL, &ptype, &pname, NULL);
eolian_parameter_information_get(param, NULL, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool had_star = !!strchr(ptype, '*');
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
if (eina_strbuf_length_get(params))
@ -31,16 +33,19 @@ _params_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Bool var_
had_star?"":" ",
pname);
eina_strbuf_append_printf(short_params, "%s", pname);
eina_stringshare_del(ptype);
}
if (!var_as_ret)
{
Eina_Bool add_star = (ftype == EOLIAN_PROP_GET);
EINA_LIST_FOREACH(eolian_parameters_list_get(foo), itr, param)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
Eolian_Parameter_Dir pdir;
eolian_parameter_information_get(param, &pdir, &ptype, &pname, NULL);
eolian_parameter_information_get(param, &pdir, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool is_const = eolian_parameter_const_attribute_get(param, ftype == EOLIAN_PROP_GET);
Eina_Bool had_star = !!strchr(ptype, '*');
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM);
@ -53,6 +58,7 @@ _params_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Bool var_
is_const?"const ":"",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_strbuf_append_printf(short_params, "%s", pname);
eina_stringshare_del(ptype);
}
}
return EINA_TRUE;
@ -136,14 +142,14 @@ _prototype_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Strbuf
if (_function_exists(func_name, buffer)) goto end;
printf("Generation of function %s\n", func_name);
const char *rettype = eolian_function_return_type_get(foo, ftype);
if (ftype == EOLIAN_PROP_GET && !rettype)
Eolian_Type rettypet = eolian_function_return_type_get(foo, ftype);
if (ftype == EOLIAN_PROP_GET && !rettypet)
{
const Eina_List *l = eolian_parameters_list_get(foo);
if (eina_list_count(l) == 1)
{
Eolian_Function_Parameter param = eina_list_data_get(l);
eolian_parameter_information_get(param, NULL, &rettype, NULL, NULL);
eolian_parameter_information_get(param, NULL, &rettypet, NULL, NULL);
var_as_ret = EINA_TRUE;
ret_const = eolian_parameter_const_attribute_get(param, EINA_TRUE);
}
@ -164,6 +170,9 @@ _prototype_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Strbuf
eina_strbuf_string_get(short_params));
}
const char *rettype = NULL;
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
eina_strbuf_append_printf(buffer,
"EOLIAN static %s%s\n%s(%sEo *obj, %s *pd%s%s)\n{\n%s\n}\n\n",
ret_const?"const ":"", !rettype?"void":rettype,
@ -175,6 +184,8 @@ _prototype_generate(Eolian_Function foo, Eolian_Function_Type ftype, Eina_Strbuf
eina_strbuf_string_get(super_invok)
);
if (rettype) eina_stringshare_del(rettype);
end:
eina_strbuf_free(short_params);
eina_strbuf_free(params);

View File

@ -47,6 +47,7 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
_eolian_class_func_vars func_env;
const char *funcname = eolian_function_name_get(funcid);
const char *suffix = "";
Eolian_Type rettypet = NULL;
const char *rettype = NULL;
Eina_Bool var_as_ret = EINA_FALSE;
Eina_Bool add_star = EINA_FALSE;
@ -62,18 +63,18 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
Eina_Strbuf *descparam = eina_strbuf_new();
_class_func_env_create(class, funcname, ftype, &func_env);
rettype = eolian_function_return_type_get(funcid, ftype);
rettypet = eolian_function_return_type_get(funcid, ftype);
if (ftype == EOLIAN_PROP_GET)
{
suffix = "_get";
add_star = EINA_TRUE;
if (!rettype)
if (!rettypet)
{
l = eolian_parameters_list_get(funcid);
if (eina_list_count(l) == 1)
{
data = eina_list_data_get(l);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettype, NULL, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettypet, NULL, NULL);
var_as_ret = EINA_TRUE;
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
}
@ -105,14 +106,17 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
EINA_LIST_FOREACH(eolian_property_keys_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *pdesc;
const char *ptype;
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, &pdesc);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptypet, &pname, &pdesc);
ptype = eolian_type_c_type_get(ptypet);
leg_param_idx++;
eina_strbuf_append_printf(fparam, ", %s%s %s",
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const":"",
ptype, pname);
eina_stringshare_del(ptype);
eina_strbuf_append_printf(descparam, " * @param[in] %s %s\n", pname, pdesc?pdesc:"No description supplied.");
if (eolian_parameter_is_nonull((Eolian_Function_Parameter)data))
{
@ -129,12 +133,14 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
{
EINA_LIST_FOREACH(eolian_parameters_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *pdesc;
const char *ptype;
Eolian_Parameter_Dir pdir;
const char *str_dir[] = {"in", "out", "inout"};
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, &pdesc);
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptypet, &pname, &pdesc);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool had_star = !!strchr(ptype, '*');
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM);
if (ftype == EOLIAN_PROP_GET) pdir = EOLIAN_OUT_PARAM;
@ -143,6 +149,7 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
eina_strbuf_append_printf(fparam, ", %s%s%s%s%s",
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_stringshare_del(ptype);
const char *dir_str = str_dir[(int)pdir];
eina_strbuf_append_printf(descparam, " * @param[%s] %s %s\n", dir_str, pname, pdesc?pdesc:"No description supplied.");
if (eolian_parameter_is_nonull((Eolian_Function_Parameter)data))
@ -159,6 +166,8 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
}
if (flags) eina_strbuf_append_printf(flags, ")");
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
eina_strbuf_replace_all(fbody, "@#params", eina_strbuf_string_get(fparam));
eina_strbuf_replace_all(fbody, "@#list_desc_param", eina_strbuf_string_get(descparam));
eina_strbuf_reset(fparam);
@ -179,6 +188,8 @@ _eapi_decl_func_generate(Eolian_Class class, Eolian_Function funcid, Eolian_Func
eina_strbuf_replace_all(fbody, "@#flags", (eolian_function_return_is_warn_unused(funcid, ftype)) ? " EINA_WARN_UNUSED_RESULT" : "");
eina_strbuf_append(buf, eina_strbuf_string_get(fbody));
if (rettype) eina_stringshare_del(rettype);
end:
eina_strbuf_free(flags);
eina_strbuf_free(fbody);
@ -192,6 +203,7 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
_eolian_class_func_vars func_env;
char tmpstr[0xFF];
Eina_Bool var_as_ret = EINA_FALSE;
Eolian_Type rettypet = NULL;
const char *rettype = NULL;
const char *retname = NULL;
Eina_Bool ret_const = EINA_FALSE;
@ -203,19 +215,20 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
Eina_Strbuf *eoparam = eina_strbuf_new();
_class_func_env_create(class, eolian_function_name_get(funcid), ftype, &func_env);
rettype = eolian_function_return_type_get(funcid, ftype);
rettypet = eolian_function_return_type_get(funcid, ftype);
if (rettypet) rettype = eolian_type_c_type_get(rettypet);
if (rettype && !strcmp(rettype, "void")) ret_is_void = EINA_TRUE;
retname = "ret";
if (ftype == EOLIAN_PROP_GET)
{
add_star = EINA_TRUE;
if (!rettype)
if (!rettypet)
{
const Eina_List *l = eolian_parameters_list_get(funcid);
if (eina_list_count(l) == 1)
{
void* data = eina_list_data_get(l);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettype, &retname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &rettypet, &retname, NULL);
var_as_ret = EINA_TRUE;
ret_const = eolian_parameter_const_attribute_get(data, EINA_TRUE);
}
@ -224,6 +237,8 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
if (func_env.legacy_func[0] == '\0') goto end;
if (!rettype && rettypet) rettype = eolian_type_c_type_get(rettypet);
if (rettype && (!ret_is_void))
eina_strbuf_append(fbody, tmpl_eapi_body);
else
@ -239,12 +254,15 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
EINA_LIST_FOREACH(eolian_property_keys_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptype, &pname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, NULL, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
eina_strbuf_append_printf(fparam, ", %s%s %s",
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
ptype, pname);
eina_stringshare_del(ptype);
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
eina_strbuf_append_printf(eoparam, "%s", pname);
}
@ -252,15 +270,18 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
{
EINA_LIST_FOREACH(eolian_parameters_list_get(funcid), l, data)
{
Eolian_Type ptypet;
const char *pname;
const char *ptype;
Eolian_Parameter_Dir pdir;
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptype, &pname, NULL);
eolian_parameter_information_get((Eolian_Function_Parameter)data, &pdir, &ptypet, &pname, NULL);
ptype = eolian_type_c_type_get(ptypet);
Eina_Bool had_star = !!strchr(ptype, '*');
if (ftype == EOLIAN_UNRESOLVED || ftype == EOLIAN_METHOD) add_star = (pdir == EOLIAN_OUT_PARAM);
eina_strbuf_append_printf(fparam, ", %s%s%s%s%s",
eolian_parameter_const_attribute_get(data, ftype == EOLIAN_PROP_GET)?"const ":"",
ptype, had_star?"":" ", add_star?"*":"", pname);
eina_stringshare_del(ptype);
if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
eina_strbuf_append_printf(eoparam, "%s", pname);
}
@ -292,6 +313,8 @@ _eapi_func_generate(const Eolian_Class class, Eolian_Function funcid, Eolian_Fun
eina_strbuf_append(buf, eina_strbuf_string_get(fbody));
if (rettype) eina_stringshare_del(rettype);
end:
eina_strbuf_free(fbody);
eina_strbuf_free(fparam);

View File

@ -60,8 +60,12 @@ static std::string
_comment_return(Eolian_Function function,
Eolian_Function_Type rettype)
{
Eolian_Type rettypet = eolian_function_return_type_get(function, rettype);
const char *rettypes = NULL;
if (rettypet) rettypes = eolian_type_c_type_get(rettypet);
std::string doc = "";
std::string ret = safe_str(eolian_function_return_type_get(function, rettype));
std::string ret = safe_str(rettypes);
if (rettypes) eina_stringshare_del(rettypes);
std::string comment = safe_str(eolian_function_return_comment_get(function, rettype));
if (ret != "void" && ret != "" && comment != "")
{

View File

@ -27,13 +27,16 @@ static std::string
_resolve_param_type(Eolian_Function_Parameter id, bool is_get)
{
Eolian_Parameter_Dir dir;
const char *type;
Eolian_Type typet;
const char *type = NULL;
bool is_const;
std::string res;
eolian_parameter_information_get(id, &dir, &type, NULL, NULL);
eolian_parameter_information_get(id, &dir, &typet, NULL, NULL);
if (typet) type = eolian_type_c_type_get(typet);
is_const = eolian_parameter_const_attribute_get(id, is_get);
res = safe_str(type);
eina_stringshare_del(type);
assert(res != "");
if (is_const) res = std::string("const ") + res;
if (dir == EOLIAN_OUT_PARAM || dir == EOLIAN_INOUT_PARAM) res += "*";
@ -91,8 +94,11 @@ _get_properties(const Eolian_Class klass)
getter.type = efl::eolian::eo_function::regular_;
getter.name = name + "_get";
getter.impl = _dedup_func_name(property, (prefix != "" ? prefix : cxx_classname)) + "_get";
std::string ret = safe_str
(eolian_function_return_type_get(property, EOLIAN_PROP_GET));
Eolian_Type tp = eolian_function_return_type_get(property, EOLIAN_PROP_GET);
const char *tps = NULL;
if (tp) tps = eolian_type_c_type_get(tp);
std::string ret = safe_str(tps);
if (tps) eina_stringshare_del(tps);
if (ret == "") ret = "void";
// if the getter has a single parameter and void return
@ -137,8 +143,11 @@ _get_properties(const Eolian_Class klass)
setter.name = name + "_set";
setter.impl = _dedup_func_name(property, (prefix != "" ? prefix : cxx_classname)) + "_set";
setter.params = params;
setter.ret = safe_str(eolian_function_return_type_get
(property, EOLIAN_PROP_SET));
Eolian_Type tp = eolian_function_return_type_get(property, EOLIAN_PROP_SET);
const char *tps = NULL;
if (tp) tps = eolian_type_c_type_get(tp);
setter.ret = safe_str(tps);
if (tps) eina_stringshare_del(tps);
if (setter.ret == "") setter.ret = "void";
setter.comment = detail::eolian_property_setter_comment(property);
container.push_back(setter);
@ -250,8 +259,11 @@ convert_eolian_functions(efl::eolian::eo_class& cls, const Eolian_Class klass)
function.type = efl::eolian::eo_function::regular_;
function.name = safe_str(eolian_function_name_get(eolian_function));
function.impl = _dedup_func_name(eolian_function, (prefix != "" ? prefix : cls.name));
function.ret = safe_str(eolian_function_return_type_get
(eolian_function, EOLIAN_METHOD));
Eolian_Type tp = eolian_function_return_type_get(eolian_function, EOLIAN_METHOD);
const char *tps = NULL;
if (tp) tps = eolian_type_c_type_get(tp);
function.ret = safe_str(tps);
if (tps) eina_stringshare_del(tps);
if(function.ret == "") function.ret = "void";
function.params = _get_params(eolian_parameters_list_get(eolian_function));
function.comment = detail::eolian_function_comment(eolian_function);

View File

@ -7,14 +7,14 @@ class Ecore_Animator (Eo_Base)
params {
@in double runtime;
@in Ecore_Timeline_Cb func;
@in const void *data;
@in const(void)* data;
}
}
constructor {
/*@ Contructor. */
params {
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -6,14 +6,14 @@ class Ecore_Idle_Enterer (Eo_Base)
/*@ Contructor. Will insert the handler at the beginning of the list. */
params {
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
after_constructor {
/*@ Contructor. Will insert the handler at the end of the list. */
params {
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -6,7 +6,7 @@ class Ecore_Idle_Exiter (Eo_Base)
/*@ Contructor. */
params {
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -6,7 +6,7 @@ class Ecore_Idler (Eo_Base)
/*@ Contructor. */
params {
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -6,7 +6,7 @@ class Ecore_Job (Eo_Base)
/*@ Contructor. */
params {
@in Ecore_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -8,7 +8,7 @@ class Ecore_Poller (Eo_Base)
@in Ecore_Poller_Type type;
@in int interval;
@in Ecore_Task_Cb func;
@in const void *data;
@in const(void)* data;
}
}
}

View File

@ -14,7 +14,7 @@ class Ecore_Timer (Eo_Base)
params {
@in double in; /*@ The time, in seconds, from now when to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const void *data; /*@ A pointer to pass to the callback function as its data pointer */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
constructor {
@ -22,7 +22,7 @@ class Ecore_Timer (Eo_Base)
params {
@in double in; /*@ The time, in seconds, from when the main loop woke up, to go off */
@in Ecore_Task_Cb func; /*@ The callback function to call when the timer goes off */
@in const void *data; /*@ A pointer to pass to the callback function as its data pointer */
@in const(void)* data; /*@ A pointer to pass to the callback function as its data pointer */
}
}
}

View File

@ -18,7 +18,7 @@ class Ecore_Audio (Eo_Base)
@since 1.8 */
}
values {
const char *name;
const(char)* name;
}
}
paused {
@ -73,7 +73,7 @@ class Ecore_Audio (Eo_Base)
@since 1.8 */
}
values {
const char *source; /*The source to set to (i.e. file, URL, device)*/
const(char)* source; /*The source to set to (i.e. file, URL, device)*/
}
}
format {

View File

@ -180,8 +180,8 @@ class Edje (Evas_Smart_Clipped)
interested in: they'll be ignored by the function. */
}
values {
const char *file; /*@ The path to the EDJ file to load @p from */
const char *group; /*@ The name of the group, in @p file, which implements an
const(char)* file; /*@ The path to the EDJ file to load @p from */
const(char)* group; /*@ The name of the group, in @p file, which implements an
Edje object */
}
}
@ -251,8 +251,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
}
values {
const Eina_File *file; /*@ The Eina_File pointing to the EDJ file to load @p from */
const char *group; /*@ The name of the group, in @p file, which implements an
const(Eina_File)* file; /*@ The Eina_File pointing to the EDJ file to load @p from */
const(char)* group; /*@ The name of the group, in @p file, which implements an
Edje object */
}
}
@ -275,7 +275,7 @@ class Edje (Evas_Smart_Clipped)
@see evas_textblock_cursor_paragraph_first */
}
values {
const char *part; /*@ The part name */
const(char)* part; /*@ The part name */
Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -286,7 +286,7 @@ class Edje (Evas_Smart_Clipped)
@see evas_textblock_cursor_line_char_last */
}
values {
const char *part; /*@ The part name */
const(char)* part; /*@ The part name */
Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -301,8 +301,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
}
values {
const char *text_class; /*@ The text class name */
const char *font; /*@ Font name */
const(char)* text_class; /*@ The text class name */
const(char)* font; /*@ Font name */
Evas_Font_Size size; /*@ Font Size */
}
}
@ -317,7 +317,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
}
values {
const char *part; /*@ The part containing the object. */
const(char)* part; /*@ The part containing the object. */
Edje_Cursor cur; /*@ The cursor to adjust. */
Evas_Coord x; /*@ X Coordinate. */
Evas_Coord y; /*@ Y Coordinate. */
@ -330,7 +330,7 @@ class Edje (Evas_Smart_Clipped)
@see evas_textblock_cursor_paragraph_last */
}
values {
const char *part; /*@ The part name */
const(char)* part; /*@ The part name */
Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -349,8 +349,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
}
values {
const char *part; /*@ The part name */
const char *text; /*@ The text string */
const(char)* part; /*@ The part name */
const(char)* text; /*@ The text string */
}
}
item_provider {
@ -373,7 +373,7 @@ class Edje (Evas_Smart_Clipped)
@see evas_textblock_cursor_line_char_first */
}
values {
const char *part; /*@ The part name */
const(char)* part; /*@ The part name */
Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -523,7 +523,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool clear; /*@ If set, will delete subobjs on remove */
}
}
@ -537,8 +537,8 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_External_Param_Type;
params {
@in const char *part; /*@ The part name */
@out const char param; /*@ the parameter name to use. */
@in const(char)* part; /*@ The part name */
@out const(char) param; /*@ the parameter name to use. */
}
}
part_text_select_allow_set {
@ -552,7 +552,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool allow; /*@ EINA_TRUE to enable, EINA_FALSE otherwise */
}
}
@ -565,9 +565,9 @@ class Edje (Evas_Smart_Clipped)
"" for other states */
const;
return const char *;
return const(char)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out double val_ret;
}
}
@ -587,7 +587,7 @@ class Edje (Evas_Smart_Clipped)
return void *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Markup_Filter_Cb func; /*@ The function callback to remove */
@in void *data; /*@ The data passed to the callback function */
}
@ -606,7 +606,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dx; /*@ The x step amount */
@in double dy; /*@ The y step amount */
}
@ -623,7 +623,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part */
@in const(char)* part; /*@ The part */
@out double dx; /*@ The x step increment pointer */
@out double dy; /*@ The y step increment pointer */
}
@ -641,7 +641,7 @@ class Edje (Evas_Smart_Clipped)
const;
return void *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_select_begin {
@ -650,7 +650,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_style_user_peek {
@ -664,9 +664,9 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
const;
return const char *;
return const(char)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
signal_callback_del {
@ -687,8 +687,8 @@ class Edje (Evas_Smart_Clipped)
legacy null;
return void *;
params {
@in const char *emission; /*@ The emission string. */
@in const char *source; /*@ The source string. */
@in const(char)* emission; /*@ The emission string. */
@in const(char)* source; /*@ The source string. */
@in Edje_Signal_Cb func; /*@ The callback function. */
@in void *data; /*@ The callback function. */
}
@ -700,7 +700,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The edje cursor to advance */
}
}
@ -713,8 +713,8 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const char *style; /*@ The style to set (textblock conventions). */
@in const(char)* part; /*@ The part name */
@in const(char)* style; /*@ The style to set (textblock conventions). */
}
}
part_text_append {
@ -727,8 +727,8 @@ class Edje (Evas_Smart_Clipped)
@since 1.1 */
params {
@in const char *part; /*@ The part name */
@in const char *text; /*@ The text string */
@in const(char)* part; /*@ The part name */
@in const(char)* text; /*@ The text string */
}
}
part_geometry_get {
@ -749,7 +749,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The Edje part's name */
@in const(char)* part; /*@ The Edje part's name */
@out Evas_Coord x; /*@ A pointer to a variable where to store the part's x
coordinate */
@out Evas_Coord y; /*@ A pointer to a variable where to store the part's y
@ -770,7 +770,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_item_geometry_get {
@ -785,8 +785,8 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const char *item; /*@ The item name */
@in const(char)* part; /*@ The part name */
@in const(char)* item; /*@ The item name */
@out Evas_Coord cx; /*@ Item x return (relative to entry part) */
@out Evas_Coord cy; /*@ Item y return (relative to entry part) */
@out Evas_Coord cw; /*@ Item width return */
@ -803,7 +803,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child_obj; /*@ The object to pack in */
}
}
@ -813,7 +813,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
text_insert_filter_callback_del_full {
@ -831,7 +831,7 @@ class Edje (Evas_Smart_Clipped)
return void *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Text_Filter_Cb func; /*@ The function callback to remove */
@in void *data; /*@ The data passed to the callback function */
}
@ -843,7 +843,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_input_panel_imdata_set {
@ -857,8 +857,8 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const void *data; /*@ The specific data to be set to the input panel. */
@in const(char)* part; /*@ The part name */
@in const(void)* data; /*@ The specific data to be set to the input panel. */
@in int len; /*@ the length of data, in bytes, to send to the input panel */
}
}
@ -870,7 +870,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in void *data; /*@ The specific data to be got from the input panel */
@in int *len; /*@ The length of data */
}
@ -883,8 +883,8 @@ class Edje (Evas_Smart_Clipped)
cursor position. */
params {
@in const char *part; /*@ The part name */
@in const char *text; /*@ The text string */
@in const(char)* part; /*@ The part name */
@in const(char)* text; /*@ The text string */
}
}
part_box_remove_at {
@ -901,8 +901,8 @@ class Edje (Evas_Smart_Clipped)
return Evas_Object *;
params {
@in const char *part; /*@ The part name */
@in unsigned int pos; /*@ The position index of the object (starts counting from 0) */
@in const(char)* part; /*@ The part name */
@in uint pos; /*@ The position index of the object (starts counting from 0) */
}
}
part_text_cursor_copy {
@ -910,7 +910,7 @@ class Edje (Evas_Smart_Clipped)
@brief Copy the cursor to another cursor. */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor src; /*@ the cursor to copy from */
@in Edje_Cursor dst; /*@ the cursor to copy to */
}
@ -965,7 +965,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dx; /*@ The x value */
@in double dy; /*@ The y value */
}
@ -984,7 +984,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out double dx; /*@ The X value pointer */
@out double dy; /*@ The Y value pointer */
}
@ -1004,7 +1004,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.1.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The cursor to move */
@in int pos; /*@ the position of the cursor */
}
@ -1019,7 +1019,7 @@ class Edje (Evas_Smart_Clipped)
const;
return int;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The cursor to get the position */
}
}
@ -1048,7 +1048,7 @@ class Edje (Evas_Smart_Clipped)
const;
return char *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The cursor to use */
}
}
@ -1064,7 +1064,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.1 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Input_Panel_Layout layout; /*@ layout type */
}
}
@ -1080,7 +1080,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_Input_Panel_Layout;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_table_pack {
@ -1093,12 +1093,12 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child_obj; /*@ The object to pack in */
@in unsigned short col; /*@ The column to place it in */
@in unsigned short row; /*@ The row to place it in */
@in unsigned short colspan; /*@ Columns the child will take */
@in unsigned short rowspan; /*@ Rows the child will take */
@in ushort col; /*@ The column to place it in */
@in ushort row; /*@ The row to place it in */
@in ushort colspan; /*@ Columns the child will take */
@in ushort rowspan; /*@ Rows the child will take */
}
}
part_text_input_panel_language_set {
@ -1110,7 +1110,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Input_Panel_Lang lang; /*@ the language to be set to the input panel. */
}
}
@ -1126,7 +1126,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_Input_Panel_Lang;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_table_col_row_size_get {
@ -1140,7 +1140,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out int cols; /*@ Pointer where to store number of columns (can be NULL) */
@out int rows; /*@ Pointer where to store number of rows (can be NULL) */
}
@ -1166,7 +1166,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Evas_Object *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_external_content_get {
@ -1179,8 +1179,8 @@ class Edje (Evas_Smart_Clipped)
const;
return Evas_Object *;
params {
@in const char *part; /*@ The name of the part holding the EXTERNAL */
@out const char content; /*@ A string identifying which content from the EXTERNAL to get */
@in const(char)* part; /*@ The name of the part holding the EXTERNAL */
@out const(char) content; /*@ A string identifying which content from the EXTERNAL to get */
}
}
preload {
@ -1211,7 +1211,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.1.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool enabled; /*@ If true, the input panel is appeared when entry is clicked or has a focus */
}
}
@ -1226,7 +1226,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_select_extend {
@ -1235,7 +1235,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_box_insert_at {
@ -1254,9 +1254,9 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child; /*@ The object to insert */
@in unsigned int pos; /*@ The position where to insert child */
@in uint pos; /*@ The position where to insert child */
}
}
part_text_anchor_geometry_get {
@ -1270,10 +1270,10 @@ class Edje (Evas_Smart_Clipped)
rectangles. */
const;
return const Eina_List *;
return const(Eina_List)*;
params {
@in const char *part; /*@ The part name */
@in const char *anchor; /*@ The anchor name */
@in const(char)* part; /*@ The part name */
@in const(char)* anchor; /*@ The anchor name */
}
}
part_text_cursor_down {
@ -1282,7 +1282,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -1300,7 +1300,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dx; /*@ The x page step increment */
@in double dy; /*@ The y page step increment */
}
@ -1316,7 +1316,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out double dx; /*@ The dx page increment pointer */
@out double dy; /*@ The dy page increment pointer */
}
@ -1336,7 +1336,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child; /*@ The object to prepend */
}
}
@ -1366,8 +1366,8 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_signal_callback_add() for more on Edje signals. */
params {
@in const char *emission; /*@ The signal's "emission" string */
@in const char *source; /*@ The signal's "source" string */
@in const(char)* emission; /*@ The signal's "emission" string */
@in const(char)* source; /*@ The signal's "source" string */
}
}
part_text_input_panel_layout_variation_set {
@ -1382,7 +1382,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.8 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in int variation; /*@ layout variation type */
}
}
@ -1398,7 +1398,7 @@ class Edje (Evas_Smart_Clipped)
const;
return int;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
message_send {
@ -1433,7 +1433,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_object_get {
@ -1455,9 +1455,9 @@ class Edje (Evas_Smart_Clipped)
example), though. */
const;
return const Evas_Object *;
return const(Evas_Object)*;
params {
@in const char *part; /*@ The Edje part's name */
@in const(char)* part; /*@ The Edje part's name */
}
}
part_drag_size_set {
@ -1473,7 +1473,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dw; /*@ The drag width */
@in double dh; /*@ The drag height */
}
@ -1489,7 +1489,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out double dw; /*@ The drag width pointer */
@out double dh; /*@ The drag height pointer */
}
@ -1508,7 +1508,7 @@ class Edje (Evas_Smart_Clipped)
return void *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Text_Filter_Cb func; /*@ The function callback to remove */
}
}
@ -1528,7 +1528,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_Drag_Dir;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_unescaped_set {
@ -1542,8 +1542,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const char *text_to_escape; /*@ The text string */
@in const(char)* part; /*@ The part name */
@in const(char)* text_to_escape; /*@ The text string */
}
}
part_text_unescaped_get {
@ -1563,7 +1563,7 @@ class Edje (Evas_Smart_Clipped)
const;
return char *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
signal_callback_add {
@ -1621,8 +1621,8 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_signal_callback_del_full() */
params {
@in const char *emission; /*@ The signal's "emission" string */
@in const char *source; /*@ The signal's "source" string */
@in const(char)* emission; /*@ The signal's "emission" string */
@in const(char)* source; /*@ The signal's "source" string */
@in Edje_Signal_Cb func; /*@ The callback function to be executed when the signal is
emitted. */
@in void *data; /*@ A pointer to data to pass in to @p func. */
@ -1636,7 +1636,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_input_panel_return_key_disabled_set {
@ -1646,7 +1646,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool disabled; /*@ The state */
}
}
@ -1660,7 +1660,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_autocapital_type_set {
@ -1670,7 +1670,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.1.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Text_Autocapital_Type autocapital_type; /*@ The type of autocapitalization */
}
}
@ -1684,7 +1684,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_Text_Autocapital_Type;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_unswallow {
@ -1708,7 +1708,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool prediction; /*@ If true, the prediction feature is allowed. */
}
}
@ -1722,7 +1722,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
data_get {
@ -1761,9 +1761,9 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_file_set() */
const;
return const char *;
return const(char)*;
params {
@in const char *key; /*@ The data field's key string */
@in const(char)* key; /*@ The data field's key string */
}
}
text_markup_filter_callback_add {
@ -1795,7 +1795,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Markup_Filter_Cb func; /*@ The callback function that will act as markup filter */
@in void *data; /*@ User provided data to pass to the filter function */
}
@ -1822,7 +1822,7 @@ class Edje (Evas_Smart_Clipped)
return Evas_Object *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child; /*@ The object to remove */
}
}
@ -1850,7 +1850,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Evas_Object *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_imf_context_reset {
@ -1863,7 +1863,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_input_panel_return_key_type_set {
@ -1875,7 +1875,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.2.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Input_Panel_Return_Key_Type return_key_type; /*@ The type of "return" key on the input panel */
}
}
@ -1891,7 +1891,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Edje_Input_Panel_Return_Key_Type;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_table_child_get {
@ -1903,9 +1903,9 @@ class Edje (Evas_Smart_Clipped)
const;
return Evas_Object *;
params {
@in const char *part; /*@ The part name */
@in unsigned int col; /*@ The column of the child to get */
@in unsigned int row; /*@ The row of the child to get */
@in const(char)* part; /*@ The part name */
@in uint col; /*@ The column of the child to get */
@in uint row; /*@ The row of the child to get */
}
}
part_box_insert_before {
@ -1924,9 +1924,9 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child; /*@ The object to insert */
@in const Evas_Object *reference; /*@ The object to be used as reference */
@in const(Evas_Object)* reference; /*@ The object to be used as reference */
}
}
part_external_param_set {
@ -1953,8 +1953,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const Edje_External_Param *param; /*@ the parameter details, including its name, type and
@in const(char)* part; /*@ The part name */
@in const(Edje_External_Param)* param; /*@ the parameter details, including its name, type and
actual value. This pointer should be valid, and the
parameter must exist in
#Edje_External_Type.parameters_info, with the exact type,
@ -1984,7 +1984,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out Edje_External_Param param; /*@ the parameter details. It is used as both input and
output variable. This pointer should be valid, and the
parameter must exist in
@ -2023,7 +2023,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Evas_Object *child; /*@ The object to append */
}
}
@ -2071,7 +2071,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool clear; /*@ Delete objects on removal */
}
}
@ -2090,7 +2090,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dx; /*@ The x step */
@in double dy; /*@ The y step */
}
@ -2103,8 +2103,8 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const char *text; /*@ The text string */
@in const(char)* part; /*@ The part name */
@in const(char)* text; /*@ The text string */
}
}
part_text_get {
@ -2118,9 +2118,9 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_part_text_set(). */
const;
return const char *;
return const(char)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_input_panel_show_on_demand_set {
@ -2131,7 +2131,7 @@ class Edje (Evas_Smart_Clipped)
@since 1.9.0 */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Eina_Bool ondemand; /*@ If true, the input panel will be shown in case of only Mouse up event. (Focus event will be ignored.) */
}
}
@ -2145,7 +2145,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_selection_get {
@ -2160,9 +2160,9 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_part_text_select_none() */
const;
return const char *;
return const(char)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_text_cursor_is_format_get {
@ -2175,7 +2175,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The cursor to adjust. */
}
}
@ -2200,7 +2200,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *color_class;
@in const(char)* color_class;
@in int r; /*@ Object Red value */
@in int g; /*@ Object Green value */
@in int b; /*@ Object Blue value */
@ -2236,7 +2236,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *color_class;
@in const(char)* color_class;
@out int r; /*@ Object Red value */
@out int g; /*@ Object Green value */
@out int b; /*@ Object Blue value */
@ -2264,7 +2264,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in double dx; /*@ The x step */
@in double dy; /*@ The y step */
}
@ -2275,7 +2275,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -2286,7 +2286,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@out Evas_Coord x; /*@ Cursor X position */
@out Evas_Coord y; /*@ Cursor Y position */
@out Evas_Coord w; /*@ Cursor width */
@ -2302,9 +2302,9 @@ class Edje (Evas_Smart_Clipped)
This function returns a list of char anchor names. */
const;
return const Eina_List *;
return const(Eina_List)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
text_insert_filter_callback_add {
@ -2340,7 +2340,7 @@ class Edje (Evas_Smart_Clipped)
@see edje_object_text_markup_filter_callback_add */
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Text_Filter_Cb func; /*@ The callback function that will act as filter */
@in void *data; /*@ User provided data to pass to the filter function */
}
@ -2356,7 +2356,7 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_exists {
@ -2376,7 +2376,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part's name to check for existence in @p obj's
@in const(char)* part; /*@ The part's name to check for existence in @p obj's
group */
}
}
@ -2395,7 +2395,7 @@ class Edje (Evas_Smart_Clipped)
return void *;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Markup_Filter_Cb func; /*@ The function callback to remove */
}
}
@ -2408,7 +2408,7 @@ class Edje (Evas_Smart_Clipped)
const;
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ The cursor to adjust. */
}
}
@ -2423,8 +2423,8 @@ class Edje (Evas_Smart_Clipped)
const;
params {
@in const char *part; /*@ The part name */
@in const char *text; /*@ The text string */
@in const(char)* part; /*@ The part name */
@in const(char)* text; /*@ The text string */
}
}
part_text_cursor_prev {
@ -2434,7 +2434,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
@in Edje_Cursor cur; /*@ the edje cursor to work on */
}
}
@ -2447,9 +2447,9 @@ class Edje (Evas_Smart_Clipped)
This function returns a list of char item names. */
const;
return const Eina_List *;
return const(Eina_List)*;
params {
@in const char *part; /*@ The part name */
@in const(char)* part; /*@ The part name */
}
}
part_swallow {
@ -2487,7 +2487,7 @@ class Edje (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in const char *part; /*@ The swallow part's name */
@in const(char)* part; /*@ The swallow part's name */
@in Evas_Object *obj_swallow; /*@ The object to occupy that part */
}
}

View File

@ -45,7 +45,7 @@ Return event freeze count. */
event_callback_forwarder_del {
/*@ Remove an event callback forwarder for an event and an object. */
params {
@in const Eo_Event_Description* desc; /*@ The description of the event to listen to */
@in const(Eo_Event_Description)* desc; /*@ The description of the event to listen to */
@in Eo* new_obj; /*@ The object to emit events from */
}
}
@ -64,8 +64,8 @@ Prevents event callbacks from being called for the object. */
event_callback_array_del {
/*@ Del a callback array with a specific data associated to it for an event. */
params {
@in const Eo_Callback_Array_Item* array; /*@ an #Eo_Callback_Array_Item of events to listen to */
@in const void* user_data; /*@ The data to compare */
@in const(Eo_Callback_Array_Item)* array; /*@ an #Eo_Callback_Array_Item of events to listen to */
@in const(void)* user_data; /*@ The data to compare */
}
}
wref_del {
@ -85,24 +85,24 @@ Should not be used with #eo_do. Only use it with #eo_do_super. */
key_data_set {
/*@ Set generic data to object. */
params {
@in const char* key; /*@ the key associated with the data */
@in const void* data; /*@ the data to set */
@in const(char)* key; /*@ the key associated with the data */
@in const(void)* data; /*@ the data to set */
@in eo_key_data_free_func free_func; /*@ the func to free data with (NULL means */
}
}
key_data_get {
/*@ Get generic data from object. */
params {
@in const char* key; /*@ the key associated with the data */
@in const(char)* key; /*@ the key associated with the data */
}
return void *; /* the data for the key */
}
event_callback_del {
/*@ Del a callback with a specific data associated to it for an event. */
params {
@in const Eo_Event_Description* desc; /*@ The description of the event to listen to */
@in const(Eo_Event_Description)* desc; /*@ The description of the event to listen to */
@in Eo_Event_Cb func; /*@ the callback to delete */
@in const void* user_data; /*@ The data to compare */
@in const(void)* user_data; /*@ The data to compare */
}
}
event_global_thaw {
@ -112,16 +112,16 @@ Lets event callbacks be called for the object. */
key_data_del {
/*@ Del generic data from object. */
params {
@in const char* key; /*@ the key associated with the data */
@in const(char)* key; /*@ the key associated with the data */
}
}
event_callback_array_priority_add {
/*@ Add a callback array for an event with a specific priority.
callbacks of the same priority are called in reverse order of creation. */
params {
@in const Eo_Callback_Array_Item* array; /*@ an #Eo_Callback_Array_Item of events to listen to */
@in const(Eo_Callback_Array_Item)* array; /*@ an #Eo_Callback_Array_Item of events to listen to */
@in Eo_Callback_Priority priority; /*@ The priority of the callback */
@in const void* data; /*@ additional data to pass to the callback */
@in const(void)* data; /*@ additional data to pass to the callback */
}
}
wref_add {
@ -140,14 +140,14 @@ This function registers the object handle pointed by wref to obj so when obj is
event_callback_forwarder_add {
/*@ Add an event callback forwarder for an event and an object. */
params {
@in const Eo_Event_Description* desc; /*@ The description of the event to listen to */
@in const(Eo_Event_Description)* desc; /*@ The description of the event to listen to */
@in Eo* new_obj; /*@ The object to emit events from */
}
}
event_callback_call {
/*@ Call the callbacks for an event of an object. */
params {
@in const Eo_Event_Description *desc; /*@ The description of the event to call */
@in const(Eo_Event_Description)* desc; /*@ The description of the event to call */
@in void *event_info; /*@ Extra event info to pass to the callbacks */
}
return Eina_Bool; /* @c EINA_TRUE if one of the callbacks aborted the call, @c EINA_FALSE otherwise */
@ -156,10 +156,10 @@ This function registers the object handle pointed by wref to obj so when obj is
/*@ Add a callback for an event with a specific priority.
callbacks of the same priority are called in reverse order of creation. */
params {
@in const Eo_Event_Description* desc; /*@ The description of the event to listen to */
@in const(Eo_Event_Description)* desc; /*@ The description of the event to listen to */
@in Eo_Callback_Priority priority; /*@ The priority of the callback */
@in Eo_Event_Cb cb; /*@ the callback to call */
@in const void* data; /*@ additional data to pass to the callback */
@in const(void)* data; /*@ additional data to pass to the callback */
}
}
children_iterator_new {

View File

@ -54,7 +54,7 @@ typedef struct _Function_Id* Eolian_Function;
*
* @ingroup Eolian
*/
typedef Eina_Inlist* Eolian_Type;
typedef struct _Parameter_Type* Eolian_Type;
/* Class function parameter information
*
@ -113,6 +113,14 @@ typedef enum
EOLIAN_SCOPE_PROTECTED
} Eolian_Function_Scope;
typedef enum
{
EOLIAN_TYPE_UNKNOWN_TYPE,
EOLIAN_TYPE_REGULAR,
EOLIAN_TYPE_POINTER,
EOLIAN_TYPE_FUNCTION
} Eolian_Type_Type;
/*
* @brief Parse a given .eo file and fill the database.
*
@ -490,23 +498,7 @@ EAPI const Eina_List *eolian_parameters_list_get(Eolian_Function function_id);
*
* @ingroup Eolian
*/
EAPI void eolian_parameter_information_get(const Eolian_Function_Parameter param_desc, Eolian_Parameter_Dir *param_dir, const char **type, const char **name, const char **description);
/*
* @brief Get information on given type.
*
* An Eolian type is an inlist of basic C types. For example:
* Eina_List * <Eo *> contains two basic types.
* The first Eolian type of the list stores Eina_List *, the next one Eo *.
*
* @param[in] etype Eolian type
* @param[out] type C type
* @param[out] own indicates if the ownership has to pass to the caller/callee.
* @return the next type of the list.
*
* @ingroup Eolian
*/
EAPI Eolian_Type eolian_type_information_get(Eolian_Type etype, const char **type, Eina_Bool *own);
EAPI void eolian_parameter_information_get(const Eolian_Function_Parameter param_desc, Eolian_Parameter_Dir *param_dir, Eolian_Type *type, const char **name, const char **description);
/*
* @brief Get type of a parameter
@ -516,17 +508,7 @@ EAPI Eolian_Type eolian_type_information_get(Eolian_Type etype, const char **typ
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_parameter_type_get(const Eolian_Function_Parameter param);
/*
* @brief Get a list of all the types of a parameter
*
* @param[in] param_desc parameter handle
* @return the types of the parameter
*
* @ingroup Eolian
*/
EAPI Eolian_Type eolian_parameter_types_list_get(const Eolian_Function_Parameter param);
EAPI Eolian_Type eolian_parameter_type_get(const Eolian_Function_Parameter param);
/*
* @brief Get name of a parameter
@ -574,19 +556,7 @@ EAPI Eina_Bool eolian_parameter_is_nonull(Eolian_Function_Parameter param_desc);
*
* @ingroup Eolian
*/
EAPI const char *eolian_function_return_type_get(Eolian_Function function_id, Eolian_Function_Type ftype);
/*
* @brief Get a list of all the types of a function return
*
* @param[in] foo_id Function Id
* @param[in] ftype Function Type
* @return the types of the function return
*
* @ingroup Eolian
*/
EAPI Eolian_Type
eolian_function_return_types_list_get(Eolian_Function foo_id, Eolian_Function_Type ftype);
EAPI Eolian_Type eolian_function_return_type_get(Eolian_Function function_id, Eolian_Function_Type ftype);
/*
* @brief Get the return default value of a function.
@ -729,8 +699,129 @@ EAPI Eina_Bool eolian_class_dtor_enable_get(const Eolian_Class klass);
*
* @ingroup Eolian
*/
EAPI Eolian_Type
eolian_type_find_by_alias(const char *alias);
EAPI Eolian_Type eolian_type_find_by_alias(const char *alias);
/*
* @brief Get the type of a type (regular, function, pointer)
*
* @param[in] tp the type.
* @return EOLIAN_TYPE_UNKNOWN_TYPE when @c tp is NULL, otherwise
* EOLIAN_TYPE_REGULAR, EOLIAN_TYPE_POINTER or EOLIAN_TYPE_FUNCTION.
*
* @ingroup Eolian
*/
EAPI Eolian_Type_Type eolian_type_type_get(Eolian_Type tp);
/*
* @brief Get an iterator to all arguments of a function type.
*
* @param[in] tp the type.
* @return the iterator when @c tp is an EOLIAN_TYPE_FUNCTION, NULL otherwise.
*
* @ingroup Eolian
*/
EAPI Eina_Iterator *eolian_type_arguments_list_get(Eolian_Type tp);
/*
* @brief Get an iterator to all subtypes of a type.
*
* @param[in] tp the type.
* @return the iterator when @c tp is an EOLIAN_TYPE_REGULAR or
* EOLIAN_TYPE_POINTER and has subtypes, NULL otherwise.
*
* @ingroup Eolian
*/
EAPI Eina_Iterator *eolian_type_subtypes_list_get(Eolian_Type tp);
/*
* @brief Get the return type of a function type.
*
* @param[in] tp the type.
* @return the return type when @c tp is an EOLIAN_TYPE_FUNCTION, NULL otherwise.
*
* @ingroup Eolian
*/
EAPI Eolian_Type eolian_type_return_type_get(Eolian_Type tp);
/*
* @brief Get the base type of a function type.
*
* @param[in] tp the type.
* @return the base type when @c tp is an EOLIAN_TYPE_POINTER, NULL otherwise.
*
* @ingroup Eolian
*/
EAPI Eolian_Type eolian_type_base_type_get(Eolian_Type tp);
/*
* @brief Get whether the given type is @own.
*
* @param[in] tp the type.
* @return EINA_TRUE when @c tp is a non-function type and not NULL,
* EINA_FALSE otherwise.
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_type_is_own(Eolian_Type tp);
/*
* @brief Get whether the given type is const.
*
* @param[in] tp the type.
* @return EINA_TRUE when @c tp is a non-function type and not NULL,
* EINA_FALSE otherwise.
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_type_is_const(Eolian_Type tp);
/*
* @brief Get the full C type name of the given type with a name.
*
* @param[in] tp the type.
* @param[in] name the name.
* @return The C type name assuming @c tp is not NULL.
*
* Providing the name is useful for function types, as in C a function
* pointer type alone is not valid syntax. For non-function types, the
* name is simply appended to the type (with a space). C type names do
* not include subtypes as C doesn't support them.
*
* Keep in mind that if @c name is NULL, the name won't be included.
*
* @see eolian_type_c_type_get
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_type_c_type_named_get(Eolian_Type tp, const char *name);
/*
* @brief Get the full C type name of the given type without a name.
*
* @param[in] tp the type.
* @return The C type name assuming @c tp is not NULL.
*
* This behaves exactly like eolian_type_c_type_named_get when name is NULL.
* Keep in mind that this is not useful for function types as a function
* pointer type in C cannot be used without a name.
*
* @see eolian_type_c_type_named_get
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_type_c_type_get(Eolian_Type tp);
/*
* @brief Get the type name of the given type. You have to manually delete
* the stringshare.
*
* @param[in] tp the type.
* @return the name assuming @c tp is an EOLIAN_TYPE_REGULAR, NULL otherwise.
* The name may include a "struct" keyword.
*
* @ingroup Eolian
*/
EAPI Eina_Stringshare *eolian_type_name_get(Eolian_Type tp);
#endif

View File

@ -2,12 +2,25 @@
#include <stdlib.h>
#include "eo_definitions.h"
#include "eolian_database.h"
static void
eo_definitions_type_free(Eo_Type_Def *tp)
{
Eo_Type_Def *stp;
if (tp->name) eina_stringshare_del(tp->name);
/* for function types, this will map to arguments and ret_type */
if (tp->subtypes)
EINA_LIST_FREE(tp->subtypes, stp)
eo_definitions_type_free(stp);
if (tp->base_type)
eo_definitions_type_free(tp->base_type);
free(tp);
}
static void
eo_definitions_ret_free(Eo_Ret_Def *ret)
{
if (ret->type) database_type_del(ret->type);
if (ret->type) eo_definitions_type_free(ret->type);
if (ret->comment) eina_stringshare_del(ret->comment);
if (ret->dflt_ret_val) eina_stringshare_del(ret->dflt_ret_val);
free(ret);
@ -16,7 +29,7 @@ eo_definitions_ret_free(Eo_Ret_Def *ret)
static void
eo_definitions_param_free(Eo_Param_Def *param)
{
if (param->type) database_type_del(param->type);
if (param->type) eo_definitions_type_free(param->type);
if (param->name) eina_stringshare_del(param->name);
if (param->comment) eina_stringshare_del(param->comment);
free(param);
@ -114,13 +127,13 @@ eo_definitions_impl_def_free(Eo_Implement_Def *impl)
}
void
eo_definitions_type_def_free(Eo_Type_Def *type)
eo_definitions_typedef_def_free(Eo_Typedef_Def *type)
{
if (type->alias)
eina_stringshare_del(type->alias);
if (type->type)
database_type_del(type->type);
eo_definitions_type_free(type->type);
free(type);
}
@ -188,8 +201,11 @@ eo_definitions_temps_free(Eo_Lexer_Temps *tmp)
if (tmp->ret_def)
eo_definitions_ret_free(tmp->ret_def);
if (tmp->typedef_def)
eo_definitions_typedef_def_free(tmp->typedef_def);
if (tmp->type_def)
eo_definitions_type_def_free(tmp->type_def);
eo_definitions_type_free(tmp->type_def);
if (tmp->prop)
eo_definitions_property_def_free(tmp->prop);
@ -214,7 +230,4 @@ eo_definitions_temps_free(Eo_Lexer_Temps *tmp)
if (tmp->impl)
eo_definitions_impl_def_free(tmp->impl);
if (tmp->type)
database_type_del(tmp->type);
}

View File

@ -6,9 +6,29 @@
/* RET */
typedef struct _eo_type_def Eo_Type_Def;
struct _eo_type_def
{
const char *name;
Eolian_Type_Type type;
union {
struct {
Eina_List *subtypes;
Eo_Type_Def *base_type;
};
struct {
Eina_List *arguments;
Eo_Type_Def *ret_type;
};
};
Eina_Bool is_const :1;
Eina_Bool is_own :1;
Eina_Bool is_struct :1;
};
typedef struct _eo_ret_def
{
Eolian_Type type;
Eo_Type_Def *type;
const char *comment;
const char *dflt_ret_val;
Eina_Bool warn_unused:1;
@ -27,7 +47,7 @@ typedef enum _param_way
typedef struct _eo_param_def
{
Param_Way way;
Eolian_Type type;
Eo_Type_Def *type;
const char *name;
const char *comment;
Eina_Bool nonull:1;
@ -124,11 +144,11 @@ typedef struct _eo_class_def
/* TYPE */
typedef struct _eo_type_def
typedef struct _eo_typedef_def
{
const char *alias;
Eolian_Type type;
} Eo_Type_Def;
Eo_Type_Def *type;
} Eo_Typedef_Def;
/* TEMPS */
@ -139,6 +159,7 @@ typedef struct _Eo_Lexer_Temps
const char *legacy_def;
Eo_Class_Def *kls;
Eo_Ret_Def *ret_def;
Eo_Typedef_Def *typedef_def;
Eo_Type_Def *type_def;
Eo_Property_Def *prop;
Eo_Method_Def *meth;
@ -148,11 +169,10 @@ typedef struct _Eo_Lexer_Temps
Eina_List *str_items;
Eo_Event_Def *event;
Eo_Implement_Def *impl;
Eolian_Type type;
} Eo_Lexer_Temps;
void eo_definitions_class_def_free(Eo_Class_Def *kls);
void eo_definitions_type_def_free(Eo_Type_Def *type);
void eo_definitions_typedef_def_free(Eo_Typedef_Def *type);
void eo_definitions_temps_free(Eo_Lexer_Temps *tmp);
#endif /* __EO_DEFINITIONS_H__ */

View File

@ -26,6 +26,20 @@ static const char * const tokens[] =
KEYWORDS
};
static const char * const ctypes[] =
{
"char", "unsigned char", "signed char", "short", "unsigned short",
"int", "unsigned int", "long", "unsigned long", "long long",
"unsigned long long",
"int8_t", "uint8_t", "int16_t", "uint16_t", "int32_t", "uint32_t",
"int64_t", "uint64_t", "int128_t", "uint128_t",
"float", "double", "long double",
"void"
};
#undef KW
#undef KWAT
@ -168,6 +182,13 @@ lex(Eo_Lexer *ls, const char **value, int *kwid, const char *chars)
next_char(ls);
continue;
}
case '-':
{
next_char(ls);
if (ls->current != '>') return '-';
next_char(ls);
return TOK_ARROW;
}
case '\0':
return TOK_EOF;
default:
@ -290,7 +311,7 @@ eo_lexer_free(Eo_Lexer *ls)
eo_definitions_class_def_free(nd->def_class);
break;
case NODE_TYPEDEF:
eo_definitions_type_def_free(nd->def_type);
eo_definitions_typedef_def_free(nd->def_typedef);
break;
default:
break;
@ -408,6 +429,19 @@ eo_lexer_keyword_str_get(int kw)
return tokens[kw + 2];
}
Eina_Bool
eo_lexer_is_type_keyword(int kw)
{
return (kw >= KW_char && kw <= KW_ullong);
}
const char *
eo_lexer_get_c_type(int kw)
{
if (!eo_lexer_is_type_keyword(kw)) return NULL;
return ctypes[kw - KW_char];
}
static int _init_counter = 0;
int

View File

@ -11,16 +11,28 @@
enum Tokens
{
TOK_COMMENT = START_CUSTOM, TOK_EOF, TOK_VALUE
TOK_ARROW = START_CUSTOM, TOK_COMMENT, TOK_EOF, TOK_VALUE
};
#define KEYWORDS KW(class), KW(const), KW(private), KW(protected), \
KW(return), KW(signed), KW(struct), KW(unsigned), KW(virtual), \
\
KW(abstract), KW(constructor), KW(constructors), KW(data), \
KW(destructor), KW(eo_prefix), KW(events), KW(get), KW(implements), \
KW(interface), KW(keys), KW(legacy), KW(legacy_prefix), KW(methods), \
KW(mixin), KW(params), KW(properties), KW(set), KW(type), KW(values), \
KWAT(in), KWAT(inout), KWAT(nonull), KWAT(out), KWAT(own), KWAT(warn_unused)
KW(destructor), KW(eo_prefix), KW(events), KW(func), KW(get), \
KW(implements), KW(interface), KW(keys), KW(legacy), KW(legacy_prefix), \
KW(methods), KW(mixin), KW(params), KW(properties), KW(set), KW(type), \
KW(values), KWAT(in), KWAT(inout), KWAT(nonull), KWAT(out), KWAT(own), \
KWAT(warn_unused), \
\
KW(char), KW(uchar), KW(schar), KW(short), KW(ushort), KW(int), KW(uint), \
KW(long), KW(ulong), KW(llong), KW(ullong), \
\
KW(int8), KW(uint8), KW(int16), KW(uint16), KW(int32), KW(uint32), \
KW(int64), KW(uint64), KW(int128), KW(uint128), \
\
KW(float), KW(double), KW(ldouble), \
\
KW(void)
#define KW(x) KW_##x
#define KWAT(x) KW_at_##x
@ -28,8 +40,7 @@ enum Tokens
enum Keywords
{
KW_UNKNOWN = 0,
KEYWORDS,
NUM_KEYWORDS
KEYWORDS
};
#undef KW
@ -52,9 +63,9 @@ typedef struct _Eo_Node
{
unsigned char type;
union {
void *def;
Eo_Class_Def *def_class;
Eo_Type_Def *def_type;
void *def;
Eo_Class_Def *def_class;
Eo_Typedef_Def *def_typedef;
};
} Eo_Node;
@ -88,6 +99,8 @@ void eo_lexer_lex_error (Eo_Lexer *ls, const char *msg, int token);
void eo_lexer_syntax_error (Eo_Lexer *ls, const char *msg);
void eo_lexer_token_to_str (int token, char *buf);
const char *eo_lexer_keyword_str_get(int kw);
Eina_Bool eo_lexer_is_type_keyword(int kw);
const char *eo_lexer_get_c_type (int kw);
extern int _eo_lexer_log_dom;
#ifdef CRITICAL

View File

@ -147,89 +147,85 @@ parse_name_list(Eo_Lexer *ls)
return ls->tmp.str_items;
}
static Eina_Inlist *
parse_type(Eo_Lexer *ls, Eina_Inlist *types, Eina_Strbuf *sbuf)
static Eo_Type_Def *
parse_type(Eo_Lexer *ls)
{
Eina_Bool has_struct = EINA_FALSE, need_space = EINA_FALSE;
Eina_Bool is_own = EINA_FALSE;
Eina_Strbuf *buf = sbuf ? sbuf : push_strbuf(ls);
#define CHECK_KW(kwname, cond) \
if ((cond) && (ls->t.kw == KW_##kwname)) \
{ \
if (need_space) eina_strbuf_append_char(buf, ' '); \
eina_strbuf_append(buf, #kwname); \
eo_lexer_get(ls); \
need_space = EINA_TRUE; \
}
if (ls->t.kw == KW_at_own)
Eina_Bool has_struct = EINA_FALSE;
Eo_Type_Def *def;
const char *ctype;
switch (ls->t.kw)
{
if (sbuf) eina_strbuf_append(buf, "@own ");
is_own = EINA_TRUE;
case KW_const:
{
int line;
eo_lexer_get(ls);
line = ls->line_number;
check_next(ls, '(');
def = parse_type(ls);
def->is_const = EINA_TRUE;
check_match(ls, ')', '(', line);
goto parse_ptr;
}
case KW_at_own:
{
int line;
eo_lexer_get(ls);
line = ls->line_number;
check_next(ls, '(');
def = parse_type(ls);
def->is_own = EINA_TRUE;
check_match(ls, ')', '(', line);
goto parse_ptr;
}
case KW_struct:
eo_lexer_get(ls);
has_struct = EINA_TRUE;
break;
default:
break;
}
def = calloc(1, sizeof(Eo_Type_Def));
ls->tmp.type_def = def;
def->type = EOLIAN_TYPE_REGULAR;
def->is_struct = has_struct;
def->is_const = EINA_FALSE;
check(ls, TOK_VALUE);
ctype = eo_lexer_get_c_type(ls->t.kw);
def->name = eina_stringshare_add(ctype ? ctype : ls->t.value);
eo_lexer_get(ls);
parse_ptr:
while (ls->t.token == '*')
{
Eo_Type_Def *pdef = calloc(1, sizeof(Eo_Type_Def));
ls->tmp.type_def = pdef;
pdef->base_type = def;
pdef->type = EOLIAN_TYPE_POINTER;
def = pdef;
eo_lexer_get(ls);
}
CHECK_KW(const, EINA_TRUE)
CHECK_KW(unsigned, EINA_TRUE)
else CHECK_KW(signed, EINA_TRUE)
else CHECK_KW(struct, EINA_TRUE)
CHECK_KW(const, !has_struct)
check(ls, TOK_VALUE);
if (need_space) eina_strbuf_append_char(buf, ' ');
eina_strbuf_append(buf, ls->t.value);
eo_lexer_get(ls);
need_space = EINA_TRUE;
CHECK_KW(const, EINA_TRUE)
if (ls->t.token == '*')
{
eina_strbuf_append_char(buf, ' ');
while (ls->t.token == '*')
{
eina_strbuf_append_char(buf, '*');
eo_lexer_get(ls);
CHECK_KW(const, EINA_TRUE)
}
}
#undef CHECK_KW
if (!sbuf)
{
types = database_type_append(types, eina_strbuf_string_get(buf), is_own);
ls->tmp.type = types;
pop_strbuf(ls);
}
if (ls->t.token == '<')
{
int line = ls->line_number;
if (sbuf) eina_strbuf_append(buf, " <");
eo_lexer_get(ls);
types = parse_type(ls, types, sbuf);
def->subtypes = eina_list_append(def->subtypes, parse_type(ls));
while (test_next(ls, ','))
def->subtypes = eina_list_append(def->subtypes, parse_type(ls));
check_match(ls, '>', '<', line);
if (sbuf) eina_strbuf_append_char(buf, '>');
}
return types;
return def;
}
static void
parse_typedef(Eo_Lexer *ls)
{
ls->tmp.type_def = calloc(1, sizeof(Eo_Type_Def));
ls->tmp.typedef_def = calloc(1, sizeof(Eo_Typedef_Def));
eo_lexer_get(ls);
check(ls, TOK_VALUE);
ls->tmp.type_def->alias = eina_stringshare_add(ls->t.value);
ls->tmp.typedef_def->alias = eina_stringshare_add(ls->t.value);
eo_lexer_get(ls);
test_next(ls, ':');
ls->tmp.type_def->type = parse_type(ls, NULL, NULL);
ls->tmp.type = NULL;
ls->tmp.typedef_def->type = parse_type(ls);
ls->tmp.type_def = NULL;
check_next(ls, ';');
}
@ -239,8 +235,8 @@ parse_return(Eo_Lexer *ls)
Eo_Ret_Def *ret = calloc(1, sizeof(Eo_Ret_Def));
ls->tmp.ret_def = ret;
eo_lexer_get(ls);
ret->type = parse_type(ls, NULL, NULL);
ls->tmp.type = NULL;
ret->type = parse_type(ls);
ls->tmp.type_def = NULL;
if (ls->t.token == '(')
{
int line = ls->line_number;
@ -287,8 +283,8 @@ parse_param(Eo_Lexer *ls, Eina_Bool allow_inout)
else
par->way = PARAM_IN;
}
par->type = parse_type(ls, NULL, NULL);
ls->tmp.type = NULL;
par->type = parse_type(ls);
ls->tmp.type_def = NULL;
check(ls, TOK_VALUE);
par->name = eina_stringshare_add(ls->t.value);
eo_lexer_get(ls);
@ -882,8 +878,8 @@ parse_unit(Eo_Lexer *ls, Eina_Bool eot)
case KW_type:
{
parse_typedef(ls);
append_node(ls, NODE_TYPEDEF, ls->tmp.type_def);
ls->tmp.type_def = NULL;
append_node(ls, NODE_TYPEDEF, ls->tmp.typedef_def);
ls->tmp.typedef_def = NULL;
break;
}
def:
@ -907,21 +903,53 @@ parse_chunk(Eo_Lexer *ls, Eina_Bool eot)
static char *_accessor_type_str[ACCESSOR_TYPE_LAST] = { "setter", "getter" };
static char * _param_way_str[ PARAM_WAY_LAST] = { "IN", "OUT", "INOUT" };
static void
_print_type(FILE *f, Eolian_Type tp)
typedef struct
{
const char *type;
Eina_Bool own;
Eolian_Type ntp = eolian_type_information_get(tp, &type, &own);
if (own)
fputs("@own ", f);
fputs(type, f);
if (ntp)
Eina_List *subtypes;
Eina_Stringshare *name;
Eina_Bool is_own :1;
} _Parameter_Type;
static void
_print_type(FILE *f, Eo_Type_Def *tp)
{
Eina_List *l;
Eo_Type_Def *stp;
if (tp->is_own)
fputs("@own(", f);
if (tp->is_const)
fputs("const(", f);
if (tp->is_struct)
fputs("struct ", f);
if (tp->type == EOLIAN_TYPE_REGULAR)
fputs(tp->name, f);
else if (tp->type == EOLIAN_TYPE_POINTER)
{
fputc('<', f);
_print_type(f, ntp);
fputc('>', f);
_print_type(f, tp->base_type);
fputc('*', f);
}
else if (tp->type == EOLIAN_TYPE_FUNCTION)
{
Eina_Bool first = EINA_TRUE;
fputs("fn", f);
if (tp->ret_type)
{
fputs(" -> ", f);
_print_type(f, tp->ret_type);
}
fputs(" (", f);
EINA_LIST_FOREACH(tp->arguments, l, stp)
{
if (!first) fputs(", ", f);
first = EINA_FALSE;
_print_type(f, stp);
}
fputc(')', f);
}
if (tp->is_own)
fputc(')', f);
if (tp->is_const)
fputc(')', f);
}
static void
@ -1014,7 +1042,7 @@ _dump_class(Eo_Class_Def *kls)
}
static void
_dump_type(Eo_Type_Def *type)
_dump_type(Eo_Typedef_Def *type)
{
printf("Typedef: %s ", type->alias);
_print_type(stdout, type->type);
@ -1035,7 +1063,7 @@ eo_parser_dump(Eo_Lexer *ls)
_dump_class(nd->def_class);
break;
case NODE_TYPEDEF:
_dump_type(nd->def_type);
_dump_type(nd->def_typedef);
break;
default:
break;
@ -1096,7 +1124,7 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
database_function_data_set(foo_id, EOLIAN_LEGACY, meth->legacy);
EINA_LIST_FOREACH(meth->params, m, param)
{
database_method_parameter_add(foo_id, (Eolian_Parameter_Dir)param->way, param->type, param->name, param->comment);
database_method_parameter_add(foo_id, (Eolian_Parameter_Dir)param->way, (Eolian_Type)param->type, param->name, param->comment);
param->type = NULL;
}
}
@ -1108,14 +1136,14 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
EINA_LIST_FOREACH(prop->keys, m, param)
{
Eolian_Function_Parameter p = database_property_key_add(
foo_id, param->type, param->name, param->comment);
foo_id, (Eolian_Type)param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
param->type = NULL;
}
EINA_LIST_FOREACH(prop->values, m, param)
{
Eolian_Function_Parameter p = database_property_value_add(
foo_id, param->type, param->name, param->comment);
foo_id, (Eolian_Type)param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
param->type = NULL;
}
@ -1126,7 +1154,7 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
accessor->type == SETTER?EOLIAN_PROP_SET:EOLIAN_PROP_GET;
if (accessor->ret && accessor->ret->type)
{
database_function_return_type_set(foo_id, ftype, accessor->ret->type);
database_function_return_type_set(foo_id, ftype, (Eolian_Type)accessor->ret->type);
database_function_return_comment_set(foo_id,
ftype, accessor->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
@ -1178,7 +1206,7 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
database_class_function_add(class, foo_id);
if (meth->ret)
{
database_function_return_type_set(foo_id, EOLIAN_METHOD, meth->ret->type);
database_function_return_type_set(foo_id, EOLIAN_METHOD, (Eolian_Type)meth->ret->type);
database_function_return_comment_set(foo_id, EOLIAN_METHOD, meth->ret->comment);
database_function_return_flag_set_as_warn_unused(foo_id,
EOLIAN_METHOD, meth->ret->warn_unused);
@ -1192,7 +1220,7 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
EINA_LIST_FOREACH(meth->params, m, param)
{
Eolian_Function_Parameter p = database_method_parameter_add(foo_id,
(Eolian_Parameter_Dir)param->way, param->type, param->name, param->comment);
(Eolian_Parameter_Dir)param->way, (Eolian_Type)param->type, param->name, param->comment);
database_parameter_nonull_set(p, param->nonull);
param->type = NULL;
}
@ -1253,9 +1281,9 @@ _db_fill_class(Eo_Class_Def *kls, const char *filename)
}
static Eina_Bool
_db_fill_type(Eo_Type_Def *type_def)
_db_fill_type(Eo_Typedef_Def *type_def)
{
database_type_add(type_def->alias, type_def->type);
database_type_add(type_def->alias, (Eolian_Type)type_def->type);
type_def->type = NULL;
return EINA_TRUE;
}
@ -1308,7 +1336,7 @@ nodeloop:
goto error;
break;
case NODE_TYPEDEF:
if (!_db_fill_type(nd->def_type))
if (!_db_fill_type(nd->def_typedef))
goto error;
break;
default:

View File

@ -75,11 +75,24 @@ typedef struct
Eina_Bool nonull :1; /* True if this argument cannot be NULL */
} _Parameter_Desc;
/* maps directly to Eo_Type_Def */
typedef struct
{
EINA_INLIST;
Eina_Stringshare *name;
Eina_Bool is_own :1; /* True if the ownership of this argument passes to the caller/callee */
const char *name;
Eolian_Type_Type type;
union {
struct {
Eina_List *subtypes;
Eolian_Type base_type;
};
struct {
Eina_List *arguments;
Eolian_Type ret_type;
};
};
Eina_Bool is_const :1;
Eina_Bool is_own :1;
Eina_Bool is_struct :1;
} _Parameter_Type;
typedef struct
@ -107,13 +120,17 @@ _param_del(_Parameter_Desc *pdesc)
void
database_type_del(Eolian_Type type)
{
while (type)
{
_Parameter_Type *ptype = (_Parameter_Type *) type;
eina_stringshare_del(ptype->name);
type = eina_inlist_remove(type, EINA_INLIST_GET(ptype));
free(ptype);
}
_Parameter_Type *typep = (_Parameter_Type*)type;
Eolian_Type stype;
if (!type) return;
if (typep->name) eina_stringshare_del(typep->name);
/* for function types, this will map to arguments and ret_type */
if (typep->subtypes)
EINA_LIST_FREE(typep->subtypes, stype)
database_type_del(stype);
if (typep->base_type)
database_type_del(typep->base_type);
free(typep);
}
static void
@ -819,13 +836,11 @@ eolian_function_parameter_get(const Eolian_Function foo_id, const char *param_na
return NULL;
}
EAPI Eina_Stringshare *
EAPI Eolian_Type
eolian_parameter_type_get(const Eolian_Function_Parameter param)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(param, NULL);
_Parameter_Type *type = (_Parameter_Type *)((_Parameter_Desc *)param)->type;
eina_stringshare_ref(type->name);
return type->name;
return ((_Parameter_Desc*)param)->type;
}
EAPI Eina_Stringshare *
@ -860,13 +875,12 @@ eolian_parameters_list_get(Eolian_Function foo_id)
/* Get parameter information */
EAPI void
eolian_parameter_information_get(const Eolian_Function_Parameter param_desc, Eolian_Parameter_Dir *param_dir, const char **type, const char **name, const char **description)
eolian_parameter_information_get(const Eolian_Function_Parameter param_desc, Eolian_Parameter_Dir *param_dir, Eolian_Type *type, const char **name, const char **description)
{
_Parameter_Desc *param = (_Parameter_Desc *)param_desc;
EINA_SAFETY_ON_NULL_RETURN(param);
_Parameter_Type *ptype = (_Parameter_Type *)((_Parameter_Desc *)param)->type;
if (param_dir) *param_dir = param->param_dir;
if (type) *type = ptype->name;
if (type) *type = param->type;
if (name) *name = param->name;
if (description) *description = param->description;
}
@ -882,35 +896,6 @@ database_parameter_const_attribute_set(Eolian_Function_Parameter param_desc, Ein
param->is_const_on_set = is_const;
}
EAPI Eolian_Type
eolian_parameter_types_list_get(const Eolian_Function_Parameter param_desc)
{
_Parameter_Desc *param = (_Parameter_Desc *)param_desc;
EINA_SAFETY_ON_NULL_RETURN_VAL(param, NULL);
return param->type;
}
EAPI Eolian_Type
eolian_type_information_get(Eolian_Type list, const char **name, Eina_Bool *own)
{
_Parameter_Type *type = (_Parameter_Type *)list;
if (name) *name = type->name;
if (own) *own = type->is_own;
return list->next;
}
Eolian_Type
database_type_append(Eolian_Type types, const char *name, Eina_Bool own)
{
_Parameter_Type *type = calloc(1, sizeof(*type));
type->name = eina_stringshare_add(name);
type->is_own = own;
if (types)
return eina_inlist_append(types, EINA_INLIST_GET(type));
else
return EINA_INLIST_GET(type);
}
void
database_parameter_type_set(Eolian_Function_Parameter param_desc, Eolian_Type types)
{
@ -957,17 +942,8 @@ void database_function_return_type_set(Eolian_Function foo_id, Eolian_Function_T
}
}
EAPI const char *
eolian_function_return_type_get(Eolian_Function foo_id, Eolian_Function_Type ftype)
{
Eolian_Type types = eolian_function_return_types_list_get(foo_id, ftype);
_Parameter_Type *type = (_Parameter_Type *)types;
if (type) return type->name;
else return NULL;
}
EAPI Eolian_Type
eolian_function_return_types_list_get(Eolian_Function foo_id, Eolian_Function_Type ftype)
eolian_function_return_type_get(Eolian_Function foo_id, Eolian_Function_Type ftype)
{
_Function_Id *fid = (_Function_Id *)foo_id;
switch (ftype)
@ -1158,6 +1134,149 @@ eolian_class_dtor_enable_get(const Eolian_Class class)
return cl->class_dtor_enable;
}
EAPI Eolian_Type_Type
eolian_type_type_get(Eolian_Type tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EOLIAN_TYPE_UNKNOWN_TYPE);
return ((_Parameter_Type*)tp)->type;
}
EAPI Eina_Iterator *
eolian_type_arguments_list_get(Eolian_Type tp)
{
_Parameter_Type *tpp = (_Parameter_Type*)tp;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(eolian_type_type_get(tp) == EOLIAN_TYPE_FUNCTION, NULL);
if (!tpp->arguments) return NULL;
return eina_list_iterator_new(tpp->arguments);
}
EAPI Eina_Iterator *
eolian_type_subtypes_list_get(Eolian_Type tp)
{
_Parameter_Type *tpp = (_Parameter_Type*)tp;
Eolian_Type_Type tpt;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
tpt = tpp->type;
EINA_SAFETY_ON_FALSE_RETURN_VAL(tpt == EOLIAN_TYPE_REGULAR || tpt == EOLIAN_TYPE_POINTER, NULL);
if (!tpp->subtypes) return NULL;
return eina_list_iterator_new(tpp->subtypes);
}
EAPI Eolian_Type
eolian_type_return_type_get(Eolian_Type tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
EINA_SAFETY_ON_FALSE_RETURN_VAL(eolian_type_type_get(tp) == EOLIAN_TYPE_FUNCTION, NULL);
return ((_Parameter_Type*)tp)->ret_type;
}
EAPI Eolian_Type
eolian_type_base_type_get(Eolian_Type tp)
{
Eolian_Type_Type tpt;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
tpt = eolian_type_type_get(tp);
EINA_SAFETY_ON_FALSE_RETURN_VAL(tpt == EOLIAN_TYPE_REGULAR || tpt == EOLIAN_TYPE_POINTER, NULL);
return ((_Parameter_Type*)tp)->base_type;
}
EAPI Eina_Bool
eolian_type_is_own(Eolian_Type tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);
return ((_Parameter_Type*)tp)->is_own;
}
EAPI Eina_Bool
eolian_type_is_const(Eolian_Type tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, EINA_FALSE);
return ((_Parameter_Type*)tp)->is_const;
}
static void _type_to_str(Eolian_Type tp, Eina_Strbuf *buf, const char *name);
static void
_ftype_to_str(Eolian_Type tp, Eina_Strbuf *buf, const char *name)
{
_Parameter_Type *tpp = (_Parameter_Type*)tp;
Eina_List *l;
Eolian_Type stp;
Eina_Bool first = EINA_TRUE;
if (tpp->ret_type)
_type_to_str(tpp->ret_type, buf, NULL);
else
eina_strbuf_append(buf, "void");
eina_strbuf_append(buf, " (*");
if (name) eina_strbuf_append(buf, name);
eina_strbuf_append(buf, ")(");
EINA_LIST_FOREACH(tpp->arguments, l, stp)
{
if (!first) eina_strbuf_append(buf, ", ");
first = EINA_FALSE;
_type_to_str(stp, buf, NULL);
}
}
static void
_type_to_str(Eolian_Type tp, Eina_Strbuf *buf, const char *name)
{
_Parameter_Type *tpp = (_Parameter_Type*)tp;
if (tpp->type == EOLIAN_TYPE_FUNCTION)
{
_ftype_to_str(tp, buf, name);
return;
}
if (tpp->type == EOLIAN_TYPE_REGULAR && tpp->is_const)
eina_strbuf_append(buf, "const ");
if (tpp->is_struct)
eina_strbuf_append(buf, "struct ");
if (tpp->type == EOLIAN_TYPE_REGULAR)
eina_strbuf_append(buf, tpp->name);
else
{
_Parameter_Type *btpp = (_Parameter_Type*)tpp->base_type;
_type_to_str(tpp->base_type, buf, NULL);
if (btpp->type != EOLIAN_TYPE_POINTER || btpp->is_const)
eina_strbuf_append_char(buf, ' ');
eina_strbuf_append_char(buf, '*');
if (tpp->is_const) eina_strbuf_append(buf, " const");
}
if (name)
{
eina_strbuf_append_char(buf, ' ');
eina_strbuf_append(buf, name);
}
}
EAPI Eina_Stringshare *
eolian_type_c_type_named_get(Eolian_Type tp, const char *name)
{
Eina_Stringshare *ret;
Eina_Strbuf *buf;
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
buf = eina_strbuf_new();
_type_to_str(tp, buf, name);
ret = eina_stringshare_add(eina_strbuf_string_get(buf));
eina_strbuf_free(buf);
return ret;
}
EAPI Eina_Stringshare *
eolian_type_c_type_get(Eolian_Type tp)
{
return eolian_type_c_type_named_get(tp, NULL);
}
EAPI Eina_Stringshare *
eolian_type_name_get(Eolian_Type tp)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(tp, NULL);
eina_stringshare_ref(((_Parameter_Type*)tp)->name);
return ((_Parameter_Type*)tp)->name;
}
static void
_implements_print(Eolian_Implement impl, int nb_spaces)
{
@ -1192,6 +1311,49 @@ _event_print(Eolian_Event ev, int nb_spaces)
printf("%*s <%s> <%s> <%s>\n", nb_spaces + 5, "", name, type, comment);
}
static void
_type_print(Eolian_Type tp, Eina_Strbuf *buf)
{
_Parameter_Type *tpp = (_Parameter_Type*)tp;
Eina_List *l;
Eolian_Type stp;
if (tpp->is_own)
eina_strbuf_append(buf, "@own(");
if (tpp->is_const)
eina_strbuf_append(buf, "const(");
if (tpp->is_struct)
eina_strbuf_append(buf, "struct ");
if (tpp->type == EOLIAN_TYPE_REGULAR)
eina_strbuf_append(buf, tpp->name);
else if (tpp->type == EOLIAN_TYPE_POINTER)
{
_type_print(tpp->base_type, buf);
eina_strbuf_append_char(buf, '*');
}
else if (tpp->type == EOLIAN_TYPE_FUNCTION)
{
Eina_Bool first = EINA_TRUE;
eina_strbuf_append(buf, "fn");
if (tpp->ret_type)
{
eina_strbuf_append(buf, " -> ");
_type_print(tpp->ret_type, buf);
}
eina_strbuf_append(buf, " (");
EINA_LIST_FOREACH(tpp->arguments, l, stp)
{
if (!first) eina_strbuf_append(buf, ", ");
first = EINA_FALSE;
_type_print(stp, buf);
}
eina_strbuf_append_char(buf, ')');
}
if (tpp->is_own)
eina_strbuf_append_char(buf, ')');
if (tpp->is_const)
eina_strbuf_append_char(buf, ')');
}
static Eina_Bool _function_print(const _Function_Id *fid, int nb_spaces)
{
Eolian_Function foo_id = (Eolian_Function) fid;
@ -1282,16 +1444,7 @@ static Eina_Bool _function_print(const _Function_Id *fid, int nb_spaces)
break;
}
Eina_Strbuf *type_buf = eina_strbuf_new();
Eolian_Type type = param->type;
while (type)
{
const char *type_str = NULL;
Eina_Bool is_own = EINA_FALSE;
type = eolian_type_information_get(type, &type_str, &is_own);
eina_strbuf_append_printf(type_buf, "%s%s%s",
eina_strbuf_length_get(type_buf)?"/":"",
type_str, is_own?"@own":"");
}
_type_print(param->type, type_buf);
printf("%*s%s <%s> <%s> <%s>\n", nb_spaces + 5, "",
param_dir, param->name,
eina_strbuf_string_get(type_buf),

View File

@ -89,8 +89,6 @@ Eolian_Function_Parameter database_property_value_add(Eolian_Function foo_id, Eo
/* Add a parameter to a method */
Eolian_Function_Parameter database_method_parameter_add(Eolian_Function foo_id, Eolian_Parameter_Dir param_dir, Eolian_Type type, const char *name, const char *description);
Eolian_Type database_type_append(Eolian_Type types, const char *name, Eina_Bool own);
void database_type_del(Eolian_Type type);
void database_parameter_const_attribute_set(Eolian_Function_Parameter param_desc, Eina_Bool is_get, Eina_Bool is_const);

View File

@ -343,7 +343,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@return An .Evas_Lock handle to query Evas' keys subsystem with
evas_key_lock_is_set(), or @c NULL on error. */
return const Evas_Lock * @warn_unused;
return const(Evas_Lock)* @warn_unused;
}
}
pointer_canvas_xy {
@ -523,7 +523,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@return An .Evas_Modifier handle to query Evas' keys subsystem
with evas_key_modifier_is_set(), or @c NULL on error. */
return const Evas_Modifier * @warn_unused;
return const(Evas_Modifier)* @warn_unused;
}
}
pointer_button_down_mask {
@ -597,8 +597,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
params {
@in int direction; /*@ The wheel mouse direction. */
@in int z; /*@ How much mouse wheel was scrolled up or down. */
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
key_lock_on {
@ -615,7 +615,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_lock_off */
params {
@in const char *keyname @nonull; /*@ The name of the lock to enable. */
@in const(char)* keyname @nonull; /*@ The name of the lock to enable. */
}
}
event_feed_key_down {
@ -627,12 +627,12 @@ class Evas (Eo_Base, Evas_Common_Interface)
callback function. */
params {
@in const char *keyname; /*@ Name of the key */
@in const char *key; /*@ The key pressed. */
@in const char *string; /*@ A String */
@in const char *compose; /*@ The compose string */
@in unsigned int timestamp; /*@ Timestamp of the mouse up event */
@in const void *data; /*@ Data for canvas. */
@in const(char)* keyname; /*@ Name of the key */
@in const(char)* key; /*@ The key pressed. */
@in const(char)* string; /*@ A String */
@in const(char)* compose; /*@ The compose string */
@in uint timestamp; /*@ Timestamp of the mouse up event */
@in const(void)* data; /*@ Data for canvas. */
}
}
key_modifier_mask_get {
@ -659,7 +659,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
const;
return Evas_Modifier_Mask @warn_unused;
params {
@in const char *keyname @nonull; /*@ The name of the modifier key to create the mask for. */
@in const(char)* keyname @nonull; /*@ The name of the modifier key to create the mask for. */
}
}
key_modifier_add {
@ -689,7 +689,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
"Control", "Alt", "Meta", "Hyper", "Super". */
params {
@in const char *keyname @nonull; /*@ The name of the modifier key to add to the list of
@in const(char)* keyname @nonull; /*@ The name of the modifier key to add to the list of
Evas modifiers. */
}
}
@ -704,7 +704,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_modifier_is_set */
params {
@in const char *keyname @nonull; /*@ The name of the modifier to disable. */
@in const(char)* keyname @nonull; /*@ The name of the modifier to disable. */
}
}
event_feed_hold {
@ -715,8 +715,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
params {
@in int hold; /*@ The hold. */
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
event_feed_mouse_move {
@ -730,8 +730,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
params {
@in int x; /*@ The horizontal position of the mouse pointer. */
@in int y; /*@ The vertical position of the mouse pointer. */
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
event_feed_key_up {
@ -743,12 +743,12 @@ class Evas (Eo_Base, Evas_Common_Interface)
callback function. */
params {
@in const char *keyname; /*@ Name of the key */
@in const char *key; /*@ The key released. */
@in const char *string; /*@ string */
@in const char *compose; /*@ compose */
@in unsigned int timestamp; /*@ Timestamp of the mouse up event */
@in const void *data; /*@ Data for canvas. */
@in const(char)* keyname; /*@ Name of the key */
@in const(char)* key; /*@ The key released. */
@in const(char)* string; /*@ string */
@in const(char)* compose; /*@ compose */
@in uint timestamp; /*@ Timestamp of the mouse up event */
@in const(void)* data; /*@ Data for canvas. */
}
}
event_feed_mouse_out {
@ -760,8 +760,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
by the callback function. */
params {
@in unsigned int timestamp; /*@ Timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ Timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
event_input_multi_move {
@ -777,8 +777,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double ang;
@in double fx;
@in double fy;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
objects_at_xy_get {
@ -823,8 +823,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double fx;
@in double fy;
@in Evas_Button_Flags flags;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
event_feed_multi_down {
@ -841,8 +841,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double fx;
@in double fy;
@in Evas_Button_Flags flags;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
render_async {
@ -891,8 +891,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
the window/surface. */
@in int y; /*@ The vertical position of the mouse pointer relative to the 0,0 of
the window/surface. */
@in unsigned int timestamp; /*@ The timestamp of the mouse move event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse move event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
norender {
@ -931,7 +931,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_touch_point_list_nth_id_get()
@see evas_touch_point_list_nth_state_get() */
return unsigned int;
return uint;
}
event_input_multi_down {
/*@ No description supplied by the EAPI. */
@ -947,8 +947,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double fx;
@in double fy;
@in Evas_Button_Flags flags;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
nochange_pop {
@ -975,7 +975,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_lock_on */
params {
@in const char *keyname @nonull; /*@ The name of the lock to disable. */
@in const(char)* keyname @nonull; /*@ The name of the lock to disable. */
}
}
nochange_push {
@ -1051,7 +1051,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_modifier_is_set */
params {
@in const char *keyname @nonull; /*@ The name of the modifier to enable. */
@in const(char)* keyname @nonull; /*@ The name of the modifier to enable. */
}
}
event_feed_mouse_up {
@ -1065,8 +1065,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
params {
@in int b; /*@ The button number. */
@in Evas_Button_Flags flags; /*@ evas button flags. */
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
event_feed_mouse_down {
@ -1080,8 +1080,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
params {
@in int b; /*@ The button number. */
@in Evas_Button_Flags flags; /*@ The evas button flags. */
@in unsigned int timestamp; /*@ The timestamp of the mouse down event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse down event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
event_refeed_event {
@ -1143,7 +1143,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
const;
return Evas_Object * @warn_unused;
params {
@in const char *name; /*@ The given name. */
@in const(char)* name; /*@ The given name. */
}
}
font_path_append {
@ -1152,7 +1152,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@ingroup Evas_Font_Path_Group */
params {
@in const char *path @nonull; /*@ The new font path. */
@in const(char)* path @nonull; /*@ The new font path. */
}
}
touch_point_list_nth_id_get {
@ -1183,7 +1183,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
return int;
params {
@in unsigned int n; /*@ The number of the touched point (0 being the first). */
@in uint n; /*@ The number of the touched point (0 being the first). */
}
}
font_path_clear {
@ -1227,7 +1227,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_touch_point_list_nth_state_get() */
params {
@in unsigned int n; /*@ The number of the touched point (0 being the first). */
@in uint n; /*@ The number of the touched point (0 being the first). */
@out Evas_Coord x; /*@ The pointer to a Evas_Coord to be filled in. */
@out Evas_Coord y; /*@ The pointer to a Evas_Coord to be filled in. */
}
@ -1243,7 +1243,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_lock_off */
params {
@in const char *keyname @nonull; /*@ The name of the key to remove from the locks list. */
@in const(char)* keyname @nonull; /*@ The name of the key to remove from the locks list. */
}
}
damage_rectangle_add {
@ -1274,7 +1274,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@ingroup Evas_Font_Path_Group */
const;
return const Eina_List * @warn_unused;
return const(Eina_List)* @warn_unused;
}
image_cache_reload {
/*@
@ -1323,8 +1323,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double ang;
@in double fx;
@in double fy;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
render_updates {
@ -1404,7 +1404,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@see evas_key_modifier_is_set */
params {
@in const char *keyname @nonull; /*@ The name of the key to remove from the modifiers list. */
@in const(char)* keyname @nonull; /*@ The name of the key to remove from the modifiers list. */
}
}
touch_point_list_nth_state_get {
@ -1437,7 +1437,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
return Evas_Touch_Point_State;
params {
@in unsigned int n; /*@ The number of the touched point (0 being the first). */
@in uint n; /*@ The number of the touched point (0 being the first). */
}
}
focus_in {
@ -1528,8 +1528,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
by the callback function. */
params {
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
object_top_in_rectangle_get {
@ -1586,8 +1586,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
@in double fx;
@in double fy;
@in Evas_Button_Flags flags;
@in unsigned int timestamp;
@in const void *data;
@in uint timestamp;
@in const(void)* data;
}
}
font_path_prepend {
@ -1596,7 +1596,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
@ingroup Evas_Font_Path_Group */
params {
@in const char *path @nonull; /*@ The new font path. */
@in const(char)* path @nonull; /*@ The new font path. */
}
}
obscured_clear {
@ -1630,8 +1630,8 @@ class Evas (Eo_Base, Evas_Common_Interface)
mouse cancel event happens. */
params {
@in unsigned int timestamp; /*@ The timestamp of the mouse up event. */
@in const void *data; /*@ The data for canvas. */
@in uint timestamp; /*@ The timestamp of the mouse up event. */
@in const(void)* data; /*@ The data for canvas. */
}
}
coord_screen_x_to_world {
@ -1689,7 +1689,7 @@ class Evas (Eo_Base, Evas_Common_Interface)
"Num_Lock", "Scroll_Lock". */
params {
@in const char *keyname @nonull; /*@ The name of the key to add to the locks list. */
@in const(char)* keyname @nonull; /*@ The name of the key to add to the locks list. */
}
}
render_idle_flush {
@ -1741,13 +1741,13 @@ class Evas (Eo_Base, Evas_Common_Interface)
@since 1.10 */
params {
@in const char *keyname; /*@ Name of the key */
@in const char *key; /*@ The key pressed. */
@in const char *string; /*@ A String */
@in const char *compose; /*@ The compose string */
@in unsigned int timestamp; /*@ Timestamp of the mouse up event */
@in const void *data; /*@ Data for canvas. */
@in unsigned int keycode; /*@ Key scan code numeric value for canvas. */
@in const(char)* keyname; /*@ Name of the key */
@in const(char)* key; /*@ The key pressed. */
@in const(char)* string; /*@ A String */
@in const(char)* compose; /*@ The compose string */
@in uint timestamp; /*@ Timestamp of the mouse up event */
@in const(void)* data; /*@ Data for canvas. */
@in uint keycode; /*@ Key scan code numeric value for canvas. */
}
}
event_feed_key_up_with_keycode {
@ -1761,13 +1761,13 @@ class Evas (Eo_Base, Evas_Common_Interface)
@since 1.10 */
params {
@in const char *keyname; /*@ Name of the key */
@in const char *key; /*@ The key released. */
@in const char *string; /*@ string */
@in const char *compose; /*@ compose */
@in unsigned int timestamp; /*@ Timestamp of the mouse up event */
@in const void *data; /*@ Data for canvas. */
@in unsigned int keycode; /*@ Key scan code numeric value for canvas. */
@in const(char)* keyname; /*@ Name of the key */
@in const(char)* key; /*@ The key released. */
@in const(char)* string; /*@ string */
@in const(char)* compose; /*@ compose */
@in uint timestamp; /*@ Timestamp of the mouse up event */
@in const(void)* data; /*@ Data for canvas. */
@in uint keycode; /*@ Key scan code numeric value for canvas. */
}
}
}

View File

@ -19,7 +19,7 @@ class Evas_3D_Camera (Evas_3D_Object, Evas_Common_Interface)
@ingroup Evas_3D_Camera
*/
params {
@in const Evas_Real *matrix; /*@ Projection Matrix */
@in const(Evas_Real)* matrix; /*@ Projection Matrix */
}
}

View File

@ -15,8 +15,8 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
*/
params {
@in Evas_3D_Mesh_File_Type type; /*@ The type of the mesh file. */
@in const char *file; /*@ Path to the mesh file. */
@in const char *key; /*@ Key in the mesh file. */
@in const(char)* file; /*@ Path to the mesh file. */
@in const(char)* key; /*@ Key in the mesh file. */
}
}
@ -31,8 +31,8 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
*/
params {
@in Evas_3D_Mesh_File_Type type; /*@ The type of the mesh file. */
@in const char *file; /*@ Path to the mesh file. */
@in const char *key; /*@ Key in the mesh file. */
@in const(char)* file; /*@ Path to the mesh file. */
@in const(char)* key; /*@ Key in the mesh file. */
}
}
@ -57,7 +57,7 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
@in int frame; /*@ The number of the key frame. */
@in Evas_3D_Vertex_Attrib attrib; /*@ Vertex attribute ID. */
@in int stride; /*@ Stride to go to the next vertex (in bytes). */
@in const void *data; /*@ Pointer to the vertex data buffer. */
@in const(void)* data; /*@ Pointer to the vertex data buffer. */
}
}
@ -79,7 +79,7 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
@in int frame; /*@ The number of the key frame. */
@in Evas_3D_Vertex_Attrib attrib; /*@ Vertex attribute ID. */
@in int stride; /*@ Stride to go to the next vertex (in bytes). */
@in const void *data; /*@ Pointer to the vertex data buffer. */
@in const(void)* data; /*@ Pointer to the vertex data buffer. */
}
}
@ -160,7 +160,7 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
params {
@in Evas_3D_Index_Format format; /*@ Vertex index data format. */
@in int count; /*@ Vertex index count. */
@in const void *indices; /*@ Pointer to the index data. */
@in const(void)* indices; /*@ Pointer to the index data. */
}
}
@ -180,7 +180,7 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
params {
@in Evas_3D_Index_Format format; /*@ Vertex index data format. */
@in int count; /*@ Vertex index count. */
@in const void *indices; /*@ Pointer to the index data. */
@in const(void)* indices; /*@ Pointer to the index data. */
}
}
@ -295,7 +295,7 @@ class Evas_3D_Mesh (Evas_3D_Object, Evas_Common_Interface)
@ingroup Evas_3D_Mesh
*/
params {
@in unsigned int count; /*@ Vertex count.*/
@in uint count; /*@ Vertex count.*/
}
}

View File

@ -79,7 +79,7 @@ class Evas_3D_Node (Evas_3D_Object, Evas_Common_Interface)
@ingroup Evas_3D_Node
*/
const;
return const Eina_List * ;
return const(Eina_List)*;
}
position_set {
@ -327,7 +327,7 @@ class Evas_3D_Node (Evas_3D_Object, Evas_Common_Interface)
@ingroup Evas_3D_Node
*/
const;
return const Eina_List *;
return const(Eina_List)*;
}
bounding_box_get{

View File

@ -47,7 +47,7 @@ class Evas_3D_Texture (Evas_3D_Object, Evas_Common_Interface)
@in Evas_3D_Pixel_Format pixel_format; /*@ Pixel format of the data. */
@in int w; /*@ Width of the data. */
@in int h; /*@ Height of the data. */
@in const void *data; /*@ Pointer to the data. */
@in const(void)* data; /*@ Pointer to the data. */
}
}
@ -62,8 +62,8 @@ class Evas_3D_Texture (Evas_3D_Object, Evas_Common_Interface)
return void ;
params {
@in const char *file; /*@ Path to the image file. */
@in const char *key; /*@ Key in the image file. */
@in const(char)* file; /*@ Path to the image file. */
@in const(char)* key; /*@ Key in the image file. */
}
}

View File

@ -78,7 +78,7 @@ class Evas_Box (Evas_Smart_Clipped)
}
values {
Evas_Object_Box_Layout cb @nonull; /*@ The new layout function to set on @p o. */
const void *data; /*@ Data pointer to be passed to @p cb. */
const(void)* data; /*@ Data pointer to be passed to @p cb. */
Eina_Free_Cb free_data; /*@ Function to free @p data, if need be. */
}
}
@ -247,7 +247,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */
@in const Evas_Object *reference @nonull; /*@ The child object to place this new one after */
@in const(Evas_Object)* reference @nonull; /*@ The child object to place this new one after */
}
}
remove_all {
@ -332,7 +332,7 @@ class Evas_Box (Evas_Smart_Clipped)
const;
return int @warn_unused;
params {
@in const char *name @nonull; /*@ The name string of the option being searched, for
@in const(char)* name @nonull; /*@ The name string of the option being searched, for
its ID */
}
}
@ -406,7 +406,7 @@ class Evas_Box (Evas_Smart_Clipped)
legacy null;
return Evas_Object *;
params {
@in unsigned int pos;
@in uint pos;
}
}
remove_at {
@ -429,7 +429,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in unsigned int pos; /*@ The numeric position (starting from @c 0) of the child
@in uint pos; /*@ The numeric position (starting from @c 0) of the child
object to be removed */
}
}
@ -462,7 +462,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child;
@in unsigned int pos;
@in uint pos;
}
}
insert_before {
@ -487,7 +487,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */
@in const Evas_Object *reference @nonull; /*@ The child object to place this new one before */
@in const(Evas_Object)* reference @nonull; /*@ The child object to place this new one before */
}
}
option_property_name_get {
@ -505,7 +505,7 @@ class Evas_Box (Evas_Smart_Clipped)
box, which is originally set to @c NULL. */
const;
return const char * @warn_unused;
return const(char)* @warn_unused;
params {
@in int property; /*@ The numerical identifier of the option being searched,
for its name */
@ -517,7 +517,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child;
@in const Evas_Object *reference;
@in const(Evas_Object)* reference;
}
}
layout_homogeneous_horizontal {
@ -586,7 +586,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child;
@in const Evas_Object *reference;
@in const(Evas_Object)* reference;
}
}
insert_at {
@ -611,7 +611,7 @@ class Evas_Box (Evas_Smart_Clipped)
return Evas_Object_Box_Option *;
params {
@in Evas_Object *child @nonull; /*@ A child Evas object to be made a member of @p o */
@in unsigned int pos; /*@ The numeric position (starting from @c 0) to place the
@in uint pos; /*@ The numeric position (starting from @c 0) to place the
new child object at */
}
}

View File

@ -398,7 +398,7 @@ class Evas_Image (Evas_Object)
/*@ Get the video surface capabilities to a given image of the canvas */
}
values {
unsigned int caps; /*@ in */
uint caps; /*@ in */
}
}
load_orientation {
@ -474,8 +474,8 @@ class Evas_Image (Evas_Object)
interested in: they'll be ignored by the function. */
}
values {
const char *file; /*@ The image file path. */
const char *key; /*@ The image key in @p file (if its an Eet one), or @c
const(char)* file; /*@ The image file path. */
const(char)* key; /*@ The image key in @p file (if its an Eet one), or @c
NULL, otherwise. */
}
}
@ -788,8 +788,8 @@ class Evas_Image (Evas_Object)
@since 1.10 */
}
values {
const Eina_File *f; /*@ The mmaped file */
const char *key; /*@ The image key in @p file (if its an Eet one), or @c
const(Eina_File)* f; /*@ The mmaped file */
const(char)* key; /*@ The image key in @p file (if its an Eet one), or @c
NULL, otherwise. */
}
}
@ -1042,7 +1042,7 @@ class Evas_Image (Evas_Object)
legacy null;
}
values {
const char* program; /*@ The program code, as defined
const(char)* program; /*@ The program code, as defined
by the @ref evasfiltersref "Evas filters script language".
Pass NULL to remove the former program and switch back
to the standard text effect
@ -1063,7 +1063,7 @@ class Evas_Image (Evas_Object)
legacy null;
}
values {
const char* name; /*@ Object name as used in the program code */
const(char)* name; /*@ Object name as used in the program code */
Eo* eobj; /*@ Eo object to use through proxy rendering */
}
}
@ -1142,11 +1142,11 @@ class Evas_Image (Evas_Object)
const;
return Eina_Bool;
params {
@in const char *file @nonull; /*@ The filename to be used to save the image (extension
@in const(char)* file @nonull; /*@ The filename to be used to save the image (extension
obligatory). */
@in const char *key; /*@ The image key in the file (if an Eet one), or @c NULL,
@in const(char)* key; /*@ The image key in the file (if an Eet one), or @c NULL,
otherwise. */
@in const char *flags; /*@ String containing the flags to be used (@c NULL for
@in const(char)* flags; /*@ String containing the flags to be used (@c NULL for
none). */
}
}

View File

@ -121,7 +121,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
See the full @ref Example_Evas_Object_Manipulation "example". */
}
values {
const char *type; /*@ in */
const(char)* type; /*@ in */
}
}
size_hint_min {
@ -312,7 +312,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
@see evas_object_map_set() */
}
values {
const Evas_Map *map; /*@ new map to use */
const(Evas_Map)* map; /*@ new map to use */
}
}
size_hint_aspect {
@ -664,7 +664,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
See the full @ref Example_Evas_Events "example". */
}
values {
const char *name; /*@ The given name. */
const(char)* name; /*@ The given name. */
}
}
scale {
@ -1180,7 +1180,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
evas_object_show(obj_tmp);
}
@endcode */
return const Eina_List * @warn_unused;
return const(Eina_List)* @warn_unused;
}
}
smart_parent {
@ -1288,7 +1288,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
return Eina_Bool @warn_unused;
params {
@in const char *keyname @nonull; /*@ the key to request events for. */
@in const(char)* keyname @nonull; /*@ the key to request events for. */
@in Evas_Modifier_Mask modifiers; /*@ a mask of modifiers that must be present to
trigger the event. */
@in Evas_Modifier_Mask not_modifiers; /*@ a mask of modifiers that must @b not be present
@ -1393,7 +1393,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
const;
return Eina_Bool @warn_unused;
params {
@in const char *type @nonull; /*@ The @b name (type) of the smart class to check for */
@in const(char)* type @nonull; /*@ The @b name (type) of the smart class to check for */
}
}
name_child_find {
@ -1416,7 +1416,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
const;
return Evas_Object * @warn_unused;
params {
@in const char *name; /*@ The given name. */
@in const(char)* name; /*@ The given name. */
@in int recurse; /*@ Set to the number of child levels to recurse (0 == don't recurse, 1 == only look at the children of @p obj or their immediate children, but no further etc.). */
}
}
@ -1440,7 +1440,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
@see evas_focus_get */
params {
@in const char *keyname @nonull; /*@ the key the grab is set for. */
@in const(char)* keyname @nonull; /*@ the key the grab is set for. */
@in Evas_Modifier_Mask modifiers; /*@ a mask of modifiers that must be present to
trigger the event. */
@in Evas_Modifier_Mask not_modifiers; /*@ a mask of modifiers that must not not be
@ -1506,7 +1506,7 @@ abstract Evas_Object (Eo_Base, Evas_Common_Interface)
const;
return Eina_Bool @warn_unused;
params {
@in const char *type @nonull; /*@ The type (name string) to check for. Must be the name */
@in const(char)* type @nonull; /*@ The type (name string) to check for. Must be the name */
}
}
}

View File

@ -159,7 +159,7 @@ class Evas_Object_Smart (Evas_Object, Evas_Signal_Interface)
return Eina_Bool;
params {
@in const Evas_Smart_Cb_Description *descriptions; /*@ @c NULL terminated array with
@in const(Evas_Smart_Cb_Description)* descriptions; /*@ @c NULL terminated array with
#Evas_Smart_Cb_Description descriptions. Array elements won't be
modified at run time, but references to them and their contents
will be made, so this array should be kept alive during the whole
@ -190,15 +190,15 @@ class Evas_Object_Smart (Evas_Object, Evas_Signal_Interface)
const;
params {
@out const Evas_Smart_Cb_Description **class_descriptions; /*@ Where to store class callbacks
@out const(Evas_Smart_Cb_Description)** class_descriptions; /*@ Where to store class callbacks
descriptions array, if any is known. If no descriptions are
known, @c NULL is returned */
@out unsigned int class_count; /*@ Returns how many class callbacks descriptions
@out uint class_count; /*@ Returns how many class callbacks descriptions
are known. */
@out const Evas_Smart_Cb_Description **instance_descriptions; /*@ Where to store instance callbacks
@out const(Evas_Smart_Cb_Description)** instance_descriptions; /*@ Where to store instance callbacks
descriptions array, if any is known. If no descriptions are
known, @c NULL is returned. */
@out unsigned int instance_count; /*@ Returns how many instance callbacks
@out uint instance_count; /*@ Returns how many instance callbacks
descriptions are known. */
}
}
@ -228,14 +228,14 @@ class Evas_Object_Smart (Evas_Object, Evas_Signal_Interface)
const;
params {
@in const char *name @nonull; /*@ name of desired callback, must @b not be @c NULL. The
@in const(char)* name @nonull; /*@ name of desired callback, must @b not be @c NULL. The
search have a special case for @a name being the same
pointer as registered with Evas_Smart_Cb_Description, one
can use it to avoid excessive use of strcmp(). */
@out const Evas_Smart_Cb_Description *class_description; /*@ pointer to return class description or
@out const(Evas_Smart_Cb_Description)* class_description; /*@ pointer to return class description or
@c NULL if not found. If parameter is @c NULL, no search will
be done on class descriptions. */
@out const Evas_Smart_Cb_Description *instance_description; /*@ pointer to return instance description */
@out const(Evas_Smart_Cb_Description)* instance_description; /*@ pointer to return instance description */
}
}
hide {

View File

@ -141,8 +141,8 @@ class Evas_Table (Evas_Smart_Clipped)
@note This does not take into account col/row spanning*/
}
keys {
unsigned short col;
unsigned short row;
ushort col;
ushort row;
}
values {
Evas_Object *child;
@ -195,10 +195,10 @@ class Evas_Table (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in Evas_Object *child; /*@ The child object to add. */
@out unsigned short col; /*@ pointer to store relative-horizontal position to place child. */
@out unsigned short row; /*@ pointer to store relative-vertical position to place child. */
@out unsigned short colspan; /*@ pointer to store how many relative-horizontal position to use for this child. */
@out unsigned short rowspan; /*@ pointer to store how many relative-vertical position to use for this child. */
@out ushort col; /*@ pointer to store relative-horizontal position to place child. */
@out ushort row; /*@ pointer to store relative-vertical position to place child. */
@out ushort colspan; /*@ pointer to store how many relative-horizontal position to use for this child. */
@out ushort rowspan; /*@ pointer to store how many relative-vertical position to use for this child. */
}
}
pack {
@ -216,10 +216,10 @@ class Evas_Table (Evas_Smart_Clipped)
return Eina_Bool;
params {
@in Evas_Object *child @nonull; /*@ The child object to add. */
@in unsigned short col; /*@ relative-horizontal position to place child. */
@in unsigned short row; /*@ relative-vertical position to place child. */
@in unsigned short colspan; /*@ how many relative-horizontal position to use for this child. */
@in unsigned short rowspan; /*@ how many relative-vertical position to use for this child. */
@in ushort col; /*@ relative-horizontal position to place child. */
@in ushort row; /*@ relative-vertical position to place child. */
@in ushort colspan; /*@ how many relative-horizontal position to use for this child. */
@in ushort rowspan; /*@ how many relative-vertical position to use for this child. */
}
}
unpack {

View File

@ -24,7 +24,7 @@ class Evas_Text (Evas_Object)
@see evas_object_text_font_get() for more details */
}
values {
const char* font_source; /*@ The font file's path. */
const(char)* font_source; /*@ The font file's path. */
}
}
shadow_color {
@ -113,7 +113,7 @@ class Evas_Text (Evas_Object)
@since 1.1 */
}
values {
const char* delim; /*@ A null terminated string of delimiters, e.g ",|". */
const(char)* delim; /*@ A null terminated string of delimiters, e.g ",|". */
}
}
outline_color {
@ -165,7 +165,7 @@ class Evas_Text (Evas_Object)
@see evas_object_text_text_set() */
}
values {
const char* text; /*@ Text string to display on it. */
const(char)* text; /*@ Text string to display on it. */
}
}
glow2_color {
@ -222,7 +222,7 @@ class Evas_Text (Evas_Object)
@see evas_object_text_font_set() */
}
values {
const char* font; /*@ The font family name or filename. */
const(char)* font; /*@ The font family name or filename. */
Evas_Font_Size size; /*@ The font size, in points. */
}
}
@ -312,7 +312,7 @@ class Evas_Text (Evas_Object)
legacy null;
}
values {
const char* program; /*@ The program code, as defined
const(char)* program; /*@ The program code, as defined
by the @ref evasfiltersref "Evas filters script language".
Pass NULL to remove the former program and switch back
to the standard text effect */
@ -332,7 +332,7 @@ class Evas_Text (Evas_Object)
legacy null;
}
values {
const char* name; /*@ Object name as used in the program code */
const(char)* name; /*@ Object name as used in the program code */
Eo* eobj; /*@ Eo object to use through proxy rendering */
}
}

View File

@ -19,7 +19,7 @@ class Evas_Textblock (Evas_Object)
@return the markup text of the object. */
}
values {
const char *text; /*@ the markup text to use. */
const(char)* text; /*@ the markup text to use. */
}
}
valign {
@ -69,7 +69,7 @@ class Evas_Textblock (Evas_Object)
@since 1.1 */
}
values {
const char* delim; /*@ A null terminated string of delimiters, e.g ",|". */
const(char)* delim; /*@ A null terminated string of delimiters, e.g ",|". */
}
}
replace_char {
@ -78,7 +78,7 @@ class Evas_Textblock (Evas_Object)
@brief Set the "replacement character" to use for the given textblock object. */
}
values {
const char *ch; /*@ The charset name. */
const(char)* ch; /*@ The charset name. */
}
}
legacy_newline {
@ -113,7 +113,7 @@ class Evas_Textblock (Evas_Object)
@return the style of the object. */
}
values {
const Evas_Textblock_Style *ts; /*@ the style to set. */
const(Evas_Textblock_Style)* ts; /*@ the style to set. */
}
}
node_format_first {
@ -122,7 +122,7 @@ class Evas_Textblock (Evas_Object)
legacy evas_textblock_node_format_first_get;
}
values {
const Evas_Object_Textblock_Node_Format *format;
const(Evas_Object_Textblock_Node_Format)* format;
}
}
size_formatted {
@ -156,7 +156,7 @@ class Evas_Textblock (Evas_Object)
legacy evas_textblock_node_format_last_get;
}
values {
const Evas_Object_Textblock_Node_Format *format;
const(Evas_Object_Textblock_Node_Format)* format;
}
}
cursor {
@ -227,7 +227,7 @@ class Evas_Textblock (Evas_Object)
@return Replacement character or @c NULL. */
return const char *;
return const(char)*;
}
style_user_pop {
/*@
@ -254,9 +254,9 @@ class Evas_Textblock (Evas_Object)
/*@ No description supplied by the EAPI. */
const;
legacy evas_textblock_node_format_list_get;
return const Eina_List *;
return const(Eina_List)*;
params {
@in const char *anchor;
@in const(char)* anchor;
}
}
style_user_peek {
@ -268,7 +268,7 @@ class Evas_Textblock (Evas_Object)
@since 1.2 */
const;
return const Evas_Textblock_Style *;
return const(Evas_Textblock_Style)*;
}
node_format_remove_pair {
/*@ Remove a format node and its match. */

View File

@ -37,7 +37,7 @@ class Evas_Textgrid (Evas_Object)
@since 1.7 */
}
values {
const char *font_source; /*@ The font file's path. */
const(char)* font_source; /*@ The font file's path. */
}
}
supported_font_styles {
@ -90,7 +90,7 @@ class Evas_Textgrid (Evas_Object)
@since 1.7 */
}
values {
const char *font_name; /*@ The font (family) name. */
const(char)* font_name; /*@ The font (family) name. */
Evas_Font_Size font_size; /*@ The font size, in points. */
}
}
@ -195,7 +195,7 @@ class Evas_Textgrid (Evas_Object)
params {
@in int y; /*@ The row index of the grid. */
@in const Evas_Textgrid_Cell *row; /*@ The string as a sequence of #Evas_Textgrid_Cell. */
@in const(Evas_Textgrid_Cell)* row; /*@ The string as a sequence of #Evas_Textgrid_Cell. */
}
}
cellrow_get {

View File

@ -2,21 +2,21 @@ class Complex_Type {
properties {
a {
set {
return @own Eina_List * <Eina_Array*< @own Eo * *>>;
return @own(Eina_List*)<Eina_Array*<@own(Eo**)>>;
}
get {
}
values {
@own Eina_List *<int> value;
@own(Eina_List*)<int> value;
}
}
}
methods {
foo {
params {
@own char *buf;
@own(char*) buf;
}
return @own Eina_List *<Eina_Stringshare *>; /*@ comment for method return */
return @own(Eina_List*)<Eina_Stringshare *>; /*@ comment for method return */
}
}
}

View File

@ -18,10 +18,10 @@ class Object (Base) {
get {
}
keys {
const char *part;
const(char)* part;
}
values {
@own Eina_List *<int> value;
@own(Eina_List*)<int> value;
}
}
b {
@ -31,7 +31,7 @@ class Object (Base) {
/* set as virtual pure - no implementation expected */
}
values {
@own Eina_List *<int> value;
@own(Eina_List*)<int> value;
}
}
}
@ -49,7 +49,7 @@ class Object (Base) {
/*@ comment foo */
params {
@in int a;
@in const char *b;
@in const(char)* b;
}
const;
}

View File

@ -7,7 +7,7 @@ class Object (Base) {
/* set as virtual pure - no implementation expected */
}
values {
@own Eina_List *<int> value;
@own(Eina_List*)<int> value;
}
}
}

View File

@ -1,5 +1,5 @@
type Evas_Coord: int; /* Simple type definition */
type List_Objects: @own Eina_List * < Eo *>; /* A little more complex */
type List_Objects: @own(Eina_List*)< Eo *>; /* A little more complex */
class Dummy {
methods {
@ -7,7 +7,7 @@ class Dummy {
params {
int idx;
}
return @own char *; /*@ comment for method return */
return @own(char*); /*@ comment for method return */
}
}
}

View File

@ -217,9 +217,9 @@ END_TEST
START_TEST(eolian_typedef)
{
Eolian_Type types_list = NULL;
Eolian_Type type = NULL;
const char *type_name = NULL;
Eina_Bool own = EINA_FALSE;
Eina_Iterator *iter = NULL;
Eolian_Class class;
eolian_init();
@ -231,19 +231,27 @@ START_TEST(eolian_typedef)
fail_if(!eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD));
/* Basic type */
fail_if(!(types_list = eolian_type_find_by_alias("Evas_Coord")));
fail_if(eolian_type_information_get(types_list, &type_name, &own));
fail_if(!(type = eolian_type_find_by_alias("Evas_Coord")));
fail_if(!(type_name = eolian_type_name_get(type)));
fail_if(eolian_type_is_own(type));
fail_if(eolian_type_is_const(type));
fail_if(eolian_type_base_type_get(type));
fail_if(strcmp(type_name, "int"));
fail_if(own != EINA_FALSE);
eina_stringshare_del(type_name);
/* Complex type */
fail_if(!(types_list = eolian_type_find_by_alias("List_Objects")));
fail_if(!(types_list = eolian_type_information_get(types_list, &type_name, &own)));
fail_if(!(type = eolian_type_find_by_alias("List_Objects")));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_List *"));
fail_if(own != EINA_TRUE);
fail_if(eolian_type_information_get(types_list, &type_name, &own));
eina_stringshare_del(type_name);
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
fail_if(!eina_iterator_next(iter, (void**)&type));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(strcmp(type_name, "Eo *"));
fail_if(own != EINA_FALSE);
fail_if(eolian_type_is_own(type));
eina_stringshare_del(type_name);
eina_iterator_free(iter);
eolian_shutdown();
}
@ -254,9 +262,9 @@ START_TEST(eolian_complex_type)
Eolian_Function fid = NULL;
Eolian_Function_Parameter param = NULL;
const Eina_List *params_list = NULL;
Eolian_Type types_list = NULL;
Eolian_Type type = NULL;
const char *type_name = NULL;
Eina_Bool own = EINA_FALSE;
Eina_Iterator *iter = NULL;
Eolian_Class class;
eolian_init();
@ -266,47 +274,67 @@ START_TEST(eolian_complex_type)
/* Properties return type */
fail_if(!(fid = eolian_class_function_find_by_name(class, "a", EOLIAN_PROPERTY)));
fail_if(!(types_list = eolian_function_return_types_list_get(fid, EOLIAN_PROP_SET)));
fail_if(!(types_list = eolian_type_information_get(types_list, &type_name, &own)));
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_PROP_SET)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_List *"));
fail_if(own != EINA_TRUE);
fail_if(!(types_list = eolian_type_information_get(types_list, &type_name, &own)));
eina_stringshare_del(type_name);
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
fail_if(!eina_iterator_next(iter, (void**)&type));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_Array *"));
fail_if(own != EINA_FALSE);
fail_if(eolian_type_information_get(types_list, &type_name, &own));
eina_stringshare_del(type_name);
eina_iterator_free(iter);
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
fail_if(!eina_iterator_next(iter, (void**)&type));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eo **"));
fail_if(own != EINA_TRUE);
eina_stringshare_del(type_name);
eina_iterator_free(iter);
/* Properties parameter type */
fail_if(!(params_list = eolian_parameters_list_get(fid)));
fail_if(eina_list_count(params_list) != 1);
fail_if(!(param = eina_list_nth(params_list, 0)));
fail_if(strcmp(eolian_parameter_name_get(param), "value"));
fail_if(!(types_list = eolian_parameter_types_list_get(param)));
fail_if(!(types_list = eolian_type_information_get(types_list, &type_name, &own)));
fail_if(!(type = eolian_parameter_type_get(param)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_List *"));
fail_if(own != EINA_TRUE);
fail_if(eolian_type_information_get(types_list, &type_name, &own));
eina_stringshare_del(type_name);
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
fail_if(!eina_iterator_next(iter, (void**)&type));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_own(type));
fail_if(strcmp(type_name, "int"));
fail_if(own != EINA_FALSE);
eina_stringshare_del(type_name);
eina_iterator_free(iter);
/* Methods return type */
fail_if(!(fid = eolian_class_function_find_by_name(class, "foo", EOLIAN_METHOD)));
fail_if(!(types_list = eolian_function_return_types_list_get(fid, EOLIAN_METHOD)));
fail_if(!(types_list = eolian_type_information_get(types_list, &type_name, &own)));
fail_if(!(type = eolian_function_return_type_get(fid, EOLIAN_METHOD)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_List *"));
fail_if(own != EINA_TRUE);
fail_if(eolian_type_information_get(types_list, &type_name, &own));
eina_stringshare_del(type_name);
fail_if(!(iter = eolian_type_subtypes_list_get(type)));
fail_if(!eina_iterator_next(iter, (void**)&type));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(eolian_type_is_own(type));
fail_if(strcmp(type_name, "Eina_Stringshare *"));
fail_if(own != EINA_FALSE);
eina_stringshare_del(type_name);
eina_iterator_free(iter);
/* Methods parameter type */
fail_if(!(params_list = eolian_parameters_list_get(fid)));
fail_if(eina_list_count(params_list) != 1);
fail_if(!(param = eina_list_nth(params_list, 0)));
fail_if(strcmp(eolian_parameter_name_get(param), "buf"));
fail_if(!(types_list = eolian_parameter_types_list_get(param)));
fail_if(eolian_type_information_get(types_list, &type_name, &own));
fail_if(!(type = eolian_parameter_type_get(param)));
fail_if(!(type_name = eolian_type_c_type_get(type)));
fail_if(!eolian_type_is_own(type));
fail_if(strcmp(type_name, "char *"));
fail_if(own != EINA_TRUE);
eina_stringshare_del(type_name);
eolian_shutdown();
}
@ -345,11 +373,13 @@ END_TEST
START_TEST(eolian_simple_parsing)
{
Eolian_Function fid = NULL;
Eolian_Type ptypep = NULL;
const char *string = NULL, *ptype = NULL, *pname = NULL;
Eolian_Parameter_Dir dir = EOLIAN_IN_PARAM;
const Eina_List *list = NULL;
Eolian_Function_Parameter param = NULL;
Eolian_Class class;
Eolian_Type tp;
eolian_init();
/* Parsing */
@ -377,9 +407,9 @@ START_TEST(eolian_simple_parsing)
string = eolian_function_description_get(fid, EOLIAN_COMMENT_GET);
fail_if(string);
/* Set return */
string = eolian_function_return_type_get(fid, EOLIAN_PROP_SET);
fail_if(!string);
fail_if(strcmp(string, "Eina_Bool"));
tp = eolian_function_return_type_get(fid, EOLIAN_PROP_SET);
fail_if(!tp);
fail_if(strcmp(eolian_type_name_get(tp), "Eina_Bool"));
string = eolian_function_return_dflt_value_get(fid, EOLIAN_PROP_SET);
fail_if(!string);
fail_if(strcmp(string, "EINA_TRUE"));
@ -387,8 +417,8 @@ START_TEST(eolian_simple_parsing)
fail_if(!string);
fail_if(strcmp(string, "comment for property set return"));
/* Get return */
string = eolian_function_return_type_get(fid, EOLIAN_PROP_GET);
fail_if(string);
tp = eolian_function_return_type_get(fid, EOLIAN_PROP_GET);
fail_if(tp);
string = eolian_function_return_comment_get(fid, EOLIAN_PROP_GET);
fail_if(string);
@ -397,8 +427,8 @@ START_TEST(eolian_simple_parsing)
fail_if(!(list = eolian_property_values_list_get(fid)));
fail_if(eina_list_count(list) != 1);
fail_if(!(param = eina_list_data_get(list)));
eolian_parameter_information_get(param, NULL, &ptype, &pname, &string);
fail_if(strcmp(ptype, "int"));
eolian_parameter_information_get(param, NULL, &ptypep, &pname, &string);
fail_if(strcmp(eolian_type_name_get(ptypep), "int"));
fail_if(strcmp(pname, "value"));
fail_if(strcmp(string, "Value description"));
@ -408,9 +438,12 @@ START_TEST(eolian_simple_parsing)
fail_if(!string);
fail_if(strcmp(string, "comment foo"));
/* Function return */
string = eolian_function_return_type_get(fid, EOLIAN_METHOD);
tp = eolian_function_return_type_get(fid, EOLIAN_METHOD);
fail_if(!tp);
string = eolian_type_c_type_get(tp);
fail_if(!string);
fail_if(strcmp(string, "char *"));
eina_stringshare_del(string);
string = eolian_function_return_dflt_value_get(fid, EOLIAN_METHOD);
fail_if(!string);
fail_if(strcmp(string, "NULL"));
@ -422,21 +455,23 @@ START_TEST(eolian_simple_parsing)
fail_if(!(list = eolian_parameters_list_get(fid)));
fail_if(eina_list_count(list) != 3);
fail_if(!(param = eina_list_nth(list, 0)));
eolian_parameter_information_get(param, &dir, &ptype, &pname, &string);
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
fail_if(dir != EOLIAN_IN_PARAM);
fail_if(strcmp(ptype, "int"));
fail_if(strcmp(eolian_type_name_get(ptypep), "int"));
fail_if(strcmp(pname, "a"));
fail_if(!string || strcmp(string, "a"));
fail_if(!(param = eina_list_nth(list, 1)));
eolian_parameter_information_get(param, &dir, &ptype, &pname, &string);
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
fail_if(dir != EOLIAN_INOUT_PARAM);
ptype = eolian_type_c_type_get(ptypep);
fail_if(strcmp(ptype, "char *"));
eina_stringshare_del(ptype);
fail_if(strcmp(pname, "b"));
fail_if(string);
fail_if(!(param = eina_list_nth(list, 2)));
eolian_parameter_information_get(param, &dir, &ptype, &pname, &string);
eolian_parameter_information_get(param, &dir, &ptypep, &pname, &string);
fail_if(dir != EOLIAN_OUT_PARAM);
fail_if(strcmp(ptype, "double"));
fail_if(strcmp(eolian_type_name_get(ptypep), "double"));
fail_if(strcmp(pname, "c"));
fail_if(string);