Eo: Partial implementation to remove eo_do

This commit is contained in:
Felipe Magno de Almeida 2015-11-01 21:57:43 -02:00
parent b9a6a8e738
commit fa88a2337f
215 changed files with 3397 additions and 2767 deletions

View File

@ -108,7 +108,7 @@ main(int argc, char **argv)
evas_object_color_set(o, 255, 255, 255, 255);
evas_object_show(o);
eo_do(o, efl_gfx_filter_program_set(filter, wpd.file));
eo_do(o, efl_gfx_filter_program_set(o, filter, wpd.file));
ecore_evas_manual_render(wpd.ee);
evas_object_geometry_get(o, NULL, NULL, &w, &h);

View File

@ -15,7 +15,7 @@ _other_call(Eo *obj EINA_UNUSED, void *class_data EINA_UNUSED, Eo *other, int ti
{
if (times > 0)
{
eo_do(other, simple_other_call(obj, times-1));
simple_other_call(other, obj, times-1);
}
}

View File

@ -17,11 +17,12 @@ static void
bench_eo_callbacks_add(int request)
{
int i;
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
Eo *obj;
eo_add(obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
eo_do(obj, eo_event_callback_priority_add(SIMPLE_FOO, (short) i, _cb, NULL));
eo_event_callback_priority_add(obj, SIMPLE_FOO, (short) i, _cb, NULL);
}
eo_unref(obj);
@ -50,14 +51,15 @@ bench_eo_callbacks_call(int request)
const int len = EINA_C_ARRAY_LENGTH(distribution);
int i, j;
Eo *obj[len] = { 0 };
Eo *obj[len];
for (i = 0 ; i < len ; i++)
{
obj[i] = eo_add(SIMPLE_CLASS, NULL);
///obj[i];
eo_add(obj[i], SIMPLE_CLASS, NULL);
for (j = 0 ; j < i ; j++)
{
eo_do(obj[i], eo_event_callback_priority_add(SIMPLE_FOO, (short) j, _cb, NULL));
eo_event_callback_priority_add(obj[i], SIMPLE_FOO, (short) j, _cb, NULL);
}
}
@ -66,7 +68,7 @@ bench_eo_callbacks_call(int request)
for (j = 0 ; j < (int) (distribution[i] * request) ; j++)
{
/* Miss finding the callbacks on purpose, so we measure worst case scenario. */
eo_do(obj[i], eo_event_callback_call(SIMPLE_BAR, NULL));
eo_event_callback_call(obj[i], SIMPLE_BAR, NULL);
}
}

View File

@ -12,7 +12,7 @@ bench_eo_add_linear(int request)
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
objs[i] = eo_add(SIMPLE_CLASS, NULL);
eo_add(objs[i], SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
eo_unref(objs[i]);
@ -25,13 +25,13 @@ bench_eo_add_jump_by_2(int request)
int i;
Eo **objs = calloc(request, sizeof(Eo *));
for (i = 0 ; i < request ; i++)
objs[i] = eo_add(SIMPLE_CLASS, NULL);
eo_add(objs[i], SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i += 2)
eo_unref(objs[i]);
for (i = 0 ; i < request ; i += 2)
objs[i] = eo_add(SIMPLE_CLASS, NULL);
eo_add(objs[i], SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
eo_unref(objs[i]);

View File

@ -10,10 +10,11 @@ static void
bench_eo_do_simple(int request)
{
int i;
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
Eo *obj;
eo_add(obj, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
eo_do(obj, simple_a_set(i));
simple_a_set(obj, i);
}
eo_unref(obj);
@ -23,12 +24,14 @@ static void
bench_eo_do_two_objs(int request)
{
int i;
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
Eo *obj;
eo_add(obj, SIMPLE_CLASS, NULL);
Eo *obj2;
eo_add(obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
eo_do(obj, simple_a_set(i));
eo_do(obj2, simple_a_set(i));
simple_a_set(obj, i);
simple_a_set(obj2, i);
}
eo_unref(obj);
@ -39,11 +42,13 @@ static void
bench_eo_do_two_objs_growing_stack(int request)
{
int i;
Eo *obj = eo_add(SIMPLE_CLASS, NULL);
Eo *obj2 = eo_add(SIMPLE_CLASS, NULL);
Eo *obj;
eo_add(obj, SIMPLE_CLASS, NULL);
Eo *obj2;
eo_add(obj2, SIMPLE_CLASS, NULL);
for (i = 0 ; i < request ; i++)
{
eo_do(obj, simple_other_call(obj2, 20));
simple_other_call(obj, obj2, 20);
}
eo_unref(obj);
@ -55,7 +60,7 @@ static const Eo_Class *cur_klass;
static void
_a_set(Eo *obj, void *class_data EINA_UNUSED, int a)
{
eo_do_super(obj, cur_klass, simple_a_set(a));
eo_super_simple_a_set(cur_klass, obj, a);
}
static Eo_Op_Description op_desc[] = {
@ -78,10 +83,11 @@ bench_eo_do_super(int request)
cur_klass = eo_class_new(&class_desc, SIMPLE_CLASS, NULL);
int i;
Eo *obj = eo_add(cur_klass, NULL);
Eo *obj;
eo_add(obj, cur_klass, NULL);
for (i = 0 ; i < request ; i++)
{
eo_do(obj, simple_a_set(i));
simple_a_set(obj, i);
}
eo_unref(obj);

View File

@ -98,7 +98,23 @@ eo_fundef_generate(const Eolian_Class *class, const Eolian_Function *func, Eolia
eina_strbuf_append_char(str_func, '\n');
eina_strbuf_free(dbuf);
}
eina_strbuf_append_printf(str_func, "EOAPI @#rettype %s(@#full_params);\n", func_env.lower_eo_func);
Eina_Bool has_params = EINA_FALSE;
itr = eolian_property_keys_get(func, ftype);
has_params |= (eina_iterator_next(itr, &data));
eina_iterator_free(itr);
if (!has_params && !var_as_ret)
{
itr = is_prop ? eolian_property_values_get(func, ftype) : eolian_function_parameters_get(func);
has_params |= (eina_iterator_next(itr, &data));
eina_iterator_free(itr);
}
eina_strbuf_append_printf(str_func, "EOAPI @#rettype %s(Eo const* ___object%s@#full_params);\n", func_env.lower_eo_func
, has_params?", ":"");
eina_strbuf_append_printf(str_func, "EOAPI @#rettype eo_super_%s(Eo const* ___klass, Eo const* ___object%s@#full_params);\n", func_env.lower_eo_func
, has_params?", ":"");
if (scope == EOLIAN_SCOPE_PROTECTED)
eina_strbuf_append_printf(str_func, "#endif\n");
@ -518,13 +534,13 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
}
Eina_Bool ret_is_void = (!rettype || !strcmp(rettype, "void"));
_class_func_env_create(class, eolian_function_name_get(funcid), ftype, &func_env);
eina_strbuf_append_printf(eo_func_decl,
"EOAPI EO_%sFUNC_BODY%s(%s",
ret_is_void?"VOID_":"", has_params?"V":"",
func_env.lower_eo_func);
if (!ret_is_void)
/* eina_strbuf_append_printf(eo_func_decl, */
/* "EOAPI EO_%sFUNC_BODY%s(%s", */
/* ret_is_void?"VOID_":"", has_params?"V":"", */
/* func_env.lower_eo_func); */
const char *val_str = NULL;
if (!ret_is_void)
{
const char *val_str = NULL;
if (default_ret_val)
{
Eolian_Value val = eolian_expression_eval
@ -532,25 +548,109 @@ eo_bind_func_generate(const Eolian_Class *class, const Eolian_Function *funcid,
if (val.type)
val_str = eolian_expression_value_to_literal(&val);
}
eina_strbuf_append_printf(eo_func_decl, ", %s, %s",
rettype, val_str?val_str:"0");
if (val_str && eolian_expression_type_get(default_ret_val) == EOLIAN_EXPR_NAME)
{
Eina_Stringshare *string = eolian_expression_serialize(default_ret_val);
eina_strbuf_append_printf(eo_func_decl, " /* %s */", string);
eina_stringshare_del(string);
}
/* eina_strbuf_append_printf(eo_func_decl, ", %s, %s", */
/* rettype, val_str?val_str:"0"); */
/* if (val_str && eolian_expression_type_get(default_ret_val) == EOLIAN_EXPR_NAME) */
/* { */
/* Eina_Stringshare *string = eolian_expression_serialize(default_ret_val); */
/* eina_strbuf_append_printf(eo_func_decl, " /\* %s *\/", string); */
/* eina_stringshare_del(string); */
/* } */
}
if (has_params)
{
eina_strbuf_replace_all(full_params, " EINA_UNUSED", "");
eina_strbuf_append_printf(eo_func_decl, ", EO_FUNC_CALL(%s)%s",
eina_strbuf_string_get(params),
eina_strbuf_string_get(full_params));
}
eina_strbuf_append_printf(eo_func_decl, ");");
/* if (has_params) */
/* { */
/* eina_strbuf_replace_all(full_params, " EINA_UNUSED", ""); */
/* eina_strbuf_append_printf(eo_func_decl, ", EO_FUNC_CALL(%s)%s", */
/* eina_strbuf_string_get(params), */
/* eina_strbuf_string_get(full_params)); */
/* } */
/* eina_strbuf_append_printf(eo_func_decl, ");"); */
eina_strbuf_append_printf(eo_func_decl,
"EOAPI %s %s(Eo const* _object%s);\n", ret_is_void?"void":rettype, func_env.lower_eo_func,
eina_strbuf_string_get(full_params));
eina_strbuf_append_printf(eo_func_decl,
"static %s _eo_impl_%s(_Eo_Class const* ___klass, Eo const* ___oid, _Eo_Object const* ___object%s)\n{\n"
, ret_is_void?"void":rettype, func_env.lower_eo_func,
eina_strbuf_string_get(full_params));
eina_strbuf_append_printf(eo_func_decl,
" typedef %s (*_Eo_func)(Eo*, void *obj_data%s);\n"
" static Eo_Op ___op = EO_NOOP;\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" if (EINA_UNLIKELY(___op == EO_NOOP))\n"
" {\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" ___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(%s));\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" if (___op == EO_NOOP) return %s;\n"
" }\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" const op_type_funcs *___func = _dich_func_get(___klass, ___op);\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" fprintf(stderr, \"___func %%p\\n\", ___func); fflush(stderr);\n"
" //assert(!!___func);\n"
" fprintf(stderr, \"___func->func %%p\\n\", ___func->func);fflush(stderr);\n"
" fprintf(stderr, \"___func->src %%p\\n\", ___func->src);fflush(stderr);\n"
" _Eo_func ___func_ = (_Eo_func) ___func->func;\n"
" void* ___data = _eo_data_scope_get(___object, ___func->src);\n"
" %s%s\n"
" %s ___func_((Eo*)___oid, ___data%s%s);\n"
" %s\n}\n"
, ret_is_void?"void":rettype
/* , func_env.lower_eo_func */
, eina_strbuf_string_get(full_params)
, func_env.lower_eo_func
, ret_is_void?"":val_str?val_str:"0"
, ret_is_void?"":rettype
, ret_is_void?"":" _ret;"
/* , func_env.lower_eo_func */
/* , ret_is_void?"":val_str?val_str:"0" */
, ret_is_void?"":"_ret = "
, has_params?", ":""
, eina_strbuf_string_get(params)
, ret_is_void?"":"return _ret;"
);
eina_strbuf_append_printf(eo_func_decl,
"EOAPI %s %s(Eo const* ___object%s)\n{\n", ret_is_void?"void":rettype, func_env.lower_eo_func,
eina_strbuf_string_get(full_params));
eina_strbuf_append_printf(eo_func_decl,
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" _Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object);\n"
" if(___obj) {\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" return _eo_impl_%s(___obj->klass, ___object, ___obj%s%s);\n"
" }\n"
"}\n"
, func_env.lower_eo_func
, has_params?", ":""
, eina_strbuf_string_get(params)
);
eina_strbuf_append_printf(eo_func_decl,
"EOAPI %s eo_super_%s(Eo_Class const* ___klass, Eo const* ___object%s)\n{\n"
, ret_is_void?"void":rettype, func_env.lower_eo_func
, eina_strbuf_string_get(full_params));
eina_strbuf_append_printf(eo_func_decl,
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" _Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object);\n"
" if(___obj) {\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" _Eo_Class* ___kls = (_Eo_Class*)_eo_class_pointer_get((Eo_Id)___klass);\n"
" fprintf(stderr, \"%%s %%s:%%d\\n\", __func__, __FILE__, __LINE__); fflush(stderr);\n"
" if(___kls)\n"
" return _eo_impl_%s(___kls->parent, ___object, ___obj%s%s);\n"
" }\n"
"}\n"
, func_env.lower_eo_func
, has_params?", ":""
, eina_strbuf_string_get(params)
);
eina_strbuf_append_printf(fbody, "%s\n", eina_strbuf_string_get(eo_func_decl));
eina_strbuf_free(eo_func_decl);
/* eina_strbuf_free(eo_func_decl); */
}
if (need_implementation)

View File

@ -172,9 +172,9 @@ _prototype_generate(const Eolian_Function *foo, Eolian_Function_Type ftype, Eina
{
eina_strbuf_append_printf
(super_invok,
" eo_do_super(obj, %s_%s, %s_%s(%s));\n",
class_env.upper_eo_prefix, class_env.upper_classtype,
" eo_super_%s_%s(%s_%s, obj, %s);\n",
impl_env.lower_eo_prefix, eolian_function_name_get(foo),
class_env.upper_eo_prefix, class_env.upper_classtype,
eina_strbuf_string_get(short_params));
}
}

View File

@ -24,7 +24,7 @@ EAPI @#ret_type\n\
@#eapi_func(@#full_params)\n\
{\n\
@#ret_type ret;\n\
eo_do(@#eo_obj, ret = @#eo_func(@#eo_params));\n\
eo_do(@#eo_obj, ret = @#eo_func(@#eo_obj%s@#eo_params));\n\
return ret;\n\
}\n\
";
@ -34,7 +34,7 @@ tmpl_eapi_body_void[] ="\
EAPI void\n\
@#eapi_func(@#full_params)\n\
{\n\
eo_do(@#eo_obj, @#eo_func(@#eo_params));\n\
eo_do(@#eo_obj, @#eo_func(@#eo_obj%s@#eo_params));\n\
}\n\
";
@ -229,10 +229,23 @@ _eapi_func_generate(const Eolian_Class *class, const Eolian_Function *funcid, Eo
if (!rettype && rettypet) rettype = eolian_type_c_type_get(rettypet);
Eina_Bool has_params = EINA_FALSE;
itr = eolian_property_keys_get(funcid, ftype);
has_params |= (eina_iterator_next(itr, &data));
eina_iterator_free(itr);
if (!has_params && !var_as_ret)
{
itr = is_prop ? eolian_property_values_get(funcid, ftype) : eolian_function_parameters_get(funcid);
has_params |= (eina_iterator_next(itr, &data));
eina_iterator_free(itr);
}
if (rettype && (!ret_is_void))
eina_strbuf_append(fbody, tmpl_eapi_body);
eina_strbuf_append_printf(fbody, tmpl_eapi_body, has_params?", ":"");
else
eina_strbuf_append(fbody, tmpl_eapi_body_void);
eina_strbuf_append_printf(fbody, tmpl_eapi_body_void, has_params?", ":"");
if (!eolian_function_is_class(funcid))
{

View File

@ -78,7 +78,7 @@ struct inherit
inherit(efl::eo::parent_type _p, Args&& ... args)
{
_eo_cls = detail::create_class<D, E...> (eina::make_index_sequence<sizeof...(E)>());
_eo_raw = eo_add_ref(_eo_cls, _p._eo_raw, detail::inherit_constructor(this), ::efl::eolian::call_ctors(args...));
eo_add_ref(_eo_raw, _eo_cls, _p._eo_raw, detail::inherit_constructor(this), ::efl::eolian::call_ctors(args...));
::efl::eolian::register_ev_del_free_callback(_eo_raw, args...);
}

View File

@ -25,7 +25,7 @@ int read_cb(void *data EINA_UNUSED, Eo *eo_obj, void *buf, int len)
float *val = buf;
int i;
eo_do(eo_obj, ecore_audio_obj_volume_get(&volume));
eo_do(eo_obj, ecore_audio_obj_volume_get(eo_obj, &volume));
for(i=0; i<len/4; i++, phase1++)
{
@ -56,9 +56,9 @@ main(int argc, const char *argv[])
ecore_app_args_set(argc, argv);
out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
eo_add(out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
in = eo_add(ECORE_AUDIO_OBJ_IN_CLASS, NULL);
eo_add(in, ECORE_AUDIO_OBJ_IN_CLASS, NULL);
if (!in)
{
printf("error when creating ecore audio source.\n");

View File

@ -252,7 +252,7 @@ main(int argc, const char *argv[])
{
if (!strncmp(argv[i], "tone:", 5))
{
in = eo_add(ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
eo_add(in, ECORE_AUDIO_OBJ_IN_TONE_CLASS, NULL);
if (!in)
{
printf("error when creating ecore audio source.\n");
@ -276,7 +276,7 @@ main(int argc, const char *argv[])
}
else
{
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
eo_add(in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
if (!in)
{
printf("error when creating ecore audio source.\n");
@ -307,7 +307,7 @@ main(int argc, const char *argv[])
printf("Start: %s (%0.2fs)\n", name, length);
out = eo_add(ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
eo_add(out, ECORE_AUDIO_OBJ_OUT_PULSE_CLASS, NULL);
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
if (!ret)
printf("Could not attach input %s\n", name);

View File

@ -49,7 +49,7 @@ main(int argc, char *argv[])
ecore_audio_init();
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
eo_add(in, ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
eo_do(in, ecore_audio_obj_name_set(basename(argv[1])));
eo_do(in, ret = ecore_audio_obj_source_set(argv[1]));
if (!ret) {
@ -60,7 +60,7 @@ main(int argc, char *argv[])
eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _play_finished, NULL));
out = eo_add(ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
eo_add(out, ECORE_AUDIO_OBJ_OUT_SNDFILE_CLASS, NULL);
eo_do(out, ret = ecore_audio_obj_source_set(argv[2]));
if (!ret) {
printf("Could not set %s as output\n", argv[2]);

View File

@ -30,7 +30,7 @@ _pack_end(Eo *obj EINA_UNUSED, void *class_data, va_list *list)
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
Widget_Data *wd = class_data;

View File

@ -20,9 +20,10 @@ typedef struct
static void
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
Eo *bt = eo_add(ELW_BUTTON_CLASS, obj);
Eo *bt;
eo_add(bt, ELW_BUTTON_CLASS, obj);
eo_do(obj, eo_composite_attach(bt));
eo_do(bt, eo_event_callback_forwarder_add(EV_CLICKED, obj));
eo_do(bt, exevas_obj_visibility_set(EINA_TRUE));

View File

@ -28,7 +28,7 @@ _position_set(Eo *obj, void *class_data EINA_UNUSED, va_list *list)
x = va_arg(*list, Evas_Coord);
y = va_arg(*list, Evas_Coord);
printf("But set position %d,%d\n", x, y);
eo_do_super(obj, MY_CLASS, exevas_obj_position_set(x, y));
eo_super_exevas_obj_position_set(MY_CLASS x, y);
}
static void
@ -52,7 +52,7 @@ _btn_clicked(void *data, Evas_Object *evas_obj, void *event_info)
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
Widget_Data *wd = class_data;
@ -68,7 +68,7 @@ _constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
static void
_destructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS);
//Widget_Data *wd = class_data;
/* FIXME: Commented out because it's automatically done because our tree

View File

@ -29,7 +29,7 @@ my_win_del(void *data, Evas_Object *obj, void *event_info)
static void
_constructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
Widget_Data *wd = class_data;

View File

@ -82,7 +82,7 @@ _child_add(Eo *obj, void *class_data, va_list *list)
static void
_constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
/* Add type check. */
Eo *parent = eo_parent_get(obj);
@ -93,7 +93,7 @@ _constructor(Eo *obj, void *class_data EINA_UNUSED, va_list *list EINA_UNUSED)
static void
_destructor(Eo *obj, void *class_data, va_list *list EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS);
Widget_Data *wd = class_data;

View File

@ -33,10 +33,12 @@ main(int argc, char *argv[])
elm_init(argc, argv);
eo_init();
Eo *win = eo_add(ELW_WIN_CLASS, NULL);
Eo *win;
eo_add(win, ELW_WIN_CLASS, NULL);
eo_do(win, exevas_obj_size_set(winw, winh), exevas_obj_visibility_set(EINA_TRUE));
Eo *bt = eo_add(ELW_BUTTON_CLASS, win);
Eo *bt;
eo_add(bt, ELW_BUTTON_CLASS, win);
eo_do(bt, exevas_obj_position_set(25, 25),
exevas_obj_size_set(50, 50),
exevas_obj_color_set(255, 0, 0, 255),
@ -48,7 +50,8 @@ main(int argc, char *argv[])
eo_do(bt, exevas_obj_color_get(&r, &g, &b, &a));
printf("RGBa(%d, %d, %d, %d)\n", r, g, b, a);
Eo *bx = eo_add(ELW_BOXEDBUTTON_CLASS, win);
Eo *bx;
eo_add(bx, ELW_BOXEDBUTTON_CLASS, win);
eo_do(bx, exevas_obj_position_set(100, 100),
exevas_obj_size_set(70, 70),
exevas_obj_color_set(0, 0, 255, 255),

View File

@ -13,8 +13,10 @@ main(int argc, char *argv[])
(void) argv;
eo_init();
Eo *simpleobj = eo_add(SIMPLE_CLASS, NULL);
Eo *complexobj = eo_add(COMPLEX_CLASS, NULL);
Eo *simpleobj;
eo_add(simpleobj, SIMPLE_CLASS, NULL);
Eo *complexobj;
eo_add(complexobj, COMPLEX_CLASS, NULL);
printf("Simple: isa-simple:%d isa-complex:%d isa-mixin:%d isa-interface:%d\n",
eo_isa(simpleobj, SIMPLE_CLASS),

View File

@ -35,7 +35,7 @@ _colourable_eo_base_constructor(Eo *obj, Colourable_Data *self EINA_UNUSED)
= eina_log_domain_register("colourable", EINA_COLOR_BLUE);
}
DBG("_colourable_constructor(%p, %p)\n", obj, MY_CLASS);
return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
return eo_constructor(MY_CLASS, obj);
}
void

View File

@ -35,7 +35,7 @@ _colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int siz
}
self->size = size;
DBG("_colourablesquare_constructor(%d)\n", size);
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
}
static int

View File

@ -25,7 +25,7 @@ _colourablesquare_size_constructor(Eo *obj, ColourableSquare_Data *self, int siz
{
self->size = size;
EINA_CXX_DOM_LOG_DBG(domain) << __func__ << " [ size = " << size << " ]" << std::endl;
eo_do_super(obj, MY_CLASS, eo_constructor());
eo_super_eo_constructor(MY_CLASS);
}
int

View File

@ -142,17 +142,16 @@ main(void)
evas = ecore_evas_get(ecore_evas);
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -162,15 +161,14 @@ main(void)
evas_canvas3d_node_position_set(100.0, 50.0, 20.0),
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -180,15 +178,15 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(light_node));
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@ -209,19 +207,19 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
mesh_box_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_box_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
material_box = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(material_box, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(material_box, evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE));
cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
mesh_box = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(mesh_box, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(mesh_box,
evas_canvas3d_mesh_from_primitive_set(0, cube),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
@ -244,7 +242,7 @@ main(void)
evas_canvas3d_scene_camera_node_set(camera_node),
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -144,13 +144,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@ -165,14 +164,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -194,7 +192,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -206,7 +204,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
evas_canvas3d_material_shininess_set(100.0));
data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material1,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -218,26 +216,24 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 0.2),
evas_canvas3d_material_shininess_set(100.0));
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material1);
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
data->mesh_node1 =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
@ -256,14 +252,13 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.5, 1));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);

View File

@ -242,9 +242,9 @@ Eina_Bool
_init_sphere(void *this, const char *texture)
{
Test_object *sphere = (Test_object *)this;
sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
sphere->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(sphere->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(sphere->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
@ -255,7 +255,7 @@ _init_sphere(void *this, const char *texture)
eo_do(sphere->mesh, evas_canvas3d_mesh_color_pick_enable_set(EINA_TRUE));
sphere->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(sphere->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(sphere->texture,
evas_canvas3d_texture_file_set(texture, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@ -286,17 +286,16 @@ _init_scene(const char *texture)
Evas_Real tmp;
Test_object *m;
globalscene.scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(globalscene.scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
globalscene.root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(globalscene.root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
globalscene.camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(globalscene.camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(globalscene.camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 1000.0));
globalscene.camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(globalscene.camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(globalscene.camera_node,
evas_canvas3d_node_camera_set(globalscene.camera));
@ -306,15 +305,14 @@ _init_scene(const char *texture)
evas_canvas3d_node_position_set(0.0, 30.0, 800.0),
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, -1000.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
globalscene.light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(globalscene.light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(globalscene.light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
globalscene.light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(globalscene.light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(globalscene.light_node,
evas_canvas3d_node_light_set(globalscene.light),
@ -339,7 +337,7 @@ _init_scene(const char *texture)
m->material = spheretmp->material;
m->texture = spheretmp->texture;
}
m->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(m->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
m->speed = tmp;
m->sphere_animate = _animate_sphere;

View File

@ -148,11 +148,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 2.0, 50.0));
data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -165,14 +165,14 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS,evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS,evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
@ -188,7 +188,7 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -200,18 +200,18 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Setup primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
evas_canvas3d_mesh_frame_material_set(0, data->material));
data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node,
evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@ -220,8 +220,8 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
eo_do(scene,

View File

@ -134,13 +134,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -153,14 +152,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -173,7 +171,7 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -186,7 +184,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_vertex_count_set(24),
evas_canvas3d_mesh_frame_add(0),
@ -208,8 +206,7 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(0, data->material));
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@ -218,13 +215,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -258,7 +254,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -112,12 +112,11 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -131,14 +130,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -152,8 +150,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
data->material0 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->material1 = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material0, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material1, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material0,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -177,9 +175,9 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
data->texture0 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_normal = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture0, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_normal, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture0,
evas_canvas3d_texture_data_set(EVAS_COLORSPACE_ARGB8888, 4, 4, &pixels0[0]));
@ -196,12 +194,12 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, data->texture_normal));
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_frame_material_set(0, data->material0),
@ -209,8 +207,8 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_mesh_frame_material_set(20, data->material1),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh));
@ -219,13 +217,13 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -260,7 +258,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -116,18 +116,18 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -138,14 +138,14 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -156,9 +156,9 @@ main(void)
evas_canvas3d_node_member_add(light_node));
/* Add the meshes. */
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
mesh2 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(mesh2, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(mesh,
efl_file_set(input_model_path, NULL),
@ -188,7 +188,7 @@ main(void)
efl_file_set(output_model_path, NULL),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
@ -197,7 +197,7 @@ main(void)
evas_canvas3d_node_mesh_add(mesh),
evas_canvas3d_node_position_set(0.0, -40.0, 0.0));
mesh_node2 = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node2, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
evas_canvas3d_node_member_add(mesh_node2));
@ -212,7 +212,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -82,13 +82,13 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 2.0, 50.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@ -103,14 +103,14 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -133,7 +133,7 @@ _set_ball(Eo *mesh, Eo *sphere, Evas_Canvas3D_Material *material)
static void
_mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -145,23 +145,23 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
data->mesh1 = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh1, EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh, data->sphere, data->material);
_set_ball(data->mesh1, data->sphere, data->material);
data->animation_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->animation_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->animation_node, evas_canvas3d_node_member_add(data->mesh_node));
@ -169,8 +169,8 @@ _mesh_setup(Scene_Data *data)
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
evas_canvas3d_node_position_set(0.0, 0.0, 3.0));
data->mesh_node1 =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node1, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node1));
@ -184,14 +184,14 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(FOG_COLOR, 1));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -226,7 +226,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -296,8 +296,8 @@ _on_key_down(void *data, Evas *e EINA_UNUSED, Evas_Object *eo EINA_UNUSED, void
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -312,13 +312,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set( 0.2, 0.2, 0.2, 1.0);
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0);
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS,evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS,evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -331,7 +331,7 @@ _light_setup(Scene_Data *data)
static void
_mesh_setup(Scene_Data *data)
{
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -343,31 +343,30 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
data->sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(20));
data->mesh_aabb = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh_aabb, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh_aabb,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
evas_canvas3d_mesh_frame_material_set(0, data->material));
data->mesh_sphere = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh_sphere, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh_sphere,
evas_canvas3d_mesh_from_primitive_set(0, data->sphere),
evas_canvas3d_mesh_vertex_assembly_set(EVAS_CANVAS3D_VERTEX_ASSEMBLY_LINES),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_DIFFUSE),
evas_canvas3d_mesh_frame_material_set(0, data->material));
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas, evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh_aabb));
}
@ -375,9 +374,9 @@ _mesh_setup(Scene_Data *data)
static void
_mesh_setup_model(Scene_Data *data)
{
data->mesh_model = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
data->material_model = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture_model = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->mesh_model, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->material_model, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->texture_model, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture_model,
evas_canvas3d_texture_file_set(texture_path, NULL),
@ -405,16 +404,16 @@ _mesh_setup_model(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_light_setup(data);
_mesh_setup_model(data);
_camera_setup(data);
data->mesh_node_model = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node_model, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->mesh_node_model,
evas_canvas3d_node_position_set(obj_x, obj_y, obj_z),

View File

@ -91,19 +91,19 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_addE(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -114,15 +114,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 20.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -133,15 +133,15 @@ main(void)
evas_canvas3d_node_member_add(light_node));
/* Add the mesh. */
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@ -162,7 +162,7 @@ main(void)
1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node,
evas_canvas3d_node_member_add(mesh_node));
@ -176,7 +176,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -32,12 +32,12 @@
#define LOAD_AND_ADD_MESH(extention, number) \
snprintf(buffer, PATH_MAX, "%s%s", template_path, #extention); \
extention##_file = eina_file_open(buffer , 0); \
mesh_##extention = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
eo_add(mesh_##extention, EVAS_CANVAS3D_MESH_CLASS, evas); \
eo_do(mesh_##extention, \
efl_file_mmap_set(extention##_file, NULL), \
evas_canvas3d_mesh_frame_material_set(0, material), \
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG)); \
node_##extention = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
eo_add(node_##extention, EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
eo_do(root_node, evas_canvas3d_node_member_add(node_##extention)); \
eo_do(node_##extention, evas_canvas3d_node_mesh_add(mesh_##extention), \
@ -187,19 +187,19 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(10.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -210,15 +210,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -228,7 +228,7 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(light_node));
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -256,7 +256,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(20, 20, 200, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -44,13 +44,13 @@
#define NUMBER_OF_MESHES 8
#define ADD_OBJ_MESH(path, Y, Z, num, shade_mode, name_of_material) \
mesh[num] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas); \
eo_add(mesh[num], EVAS_CANVAS3D_MESH_CLASS, evas); \
snprintf(full_file_path, PATH_MAX, "%s%s", path, ".obj"); \
eo_do(mesh[num], \
efl_file_set(full_file_path, NULL), \
evas_canvas3d_mesh_frame_material_set(0, name_of_material), \
evas_canvas3d_mesh_shade_mode_set(shade_mode)); \
mesh_node[num] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
eo_add(mesh_node[num], EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
eo_do(root_node, \
evas_canvas3d_node_member_add(mesh_node[num])); \
@ -67,7 +67,7 @@
ADD_OBJ_MESH(buffer, Y + COPY_OFFSET, Z, num + 4, shade_mode, name_of_material)
#define ADD_TEXTURE(name, path) \
name = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
eo_add(name, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
eo_do(name, \
evas_canvas3d_texture_file_set(path, NULL), \
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST, \
@ -76,7 +76,7 @@
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
#define ADD_MATERIAL(name) \
name = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
eo_add(name, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
eo_do(name, \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE), \
@ -164,19 +164,19 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(20.0, 1.0, 1.0, 500.0));
camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -187,15 +187,15 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -233,7 +233,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle MESHES. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -105,12 +105,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -123,13 +123,13 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -143,10 +143,10 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
data->material_rocks = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material_rocks, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture_rocks = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_rocks_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_rocks, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_rocks_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture_rocks, evas_canvas3d_texture_file_set(rock_diffuse, NULL),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
@ -169,10 +169,10 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
data->material_wood = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material_wood, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture_wood = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
data->texture_four_n = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_wood, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_four_n, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture_wood, evas_canvas3d_texture_file_set(wood_diffuse, NULL),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
@ -196,12 +196,12 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_shininess_set(100.0));
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_from_primitive_set(100, data->cube),
@ -211,7 +211,7 @@ _mesh_setup(Scene_Data *data)
eo_do(data->mesh,
evas_canvas3d_mesh_frame_material_set(100, data->material_wood));
data->mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
eo_do(data->mesh_node, evas_canvas3d_node_mesh_add(data->mesh),
@ -221,12 +221,12 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -261,7 +261,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -133,19 +133,19 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 1.0, 100.0));
camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera),
@ -154,17 +154,17 @@ main(void)
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 1.0, 0.0));
eo_do(root_node, evas_canvas3d_node_member_add(camera_node));
sphere = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(sphere, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(sphere,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(mesh, evas_canvas3d_mesh_from_primitive_set(0, sphere));
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
texture_diffuse = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(texture_diffuse, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture_diffuse,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_LINEAR,
@ -184,7 +184,7 @@ main(void)
1.0),
evas_canvas3d_material_shininess_set(50.0));
mesh_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node, evas_canvas3d_node_member_add(mesh_node));
@ -199,7 +199,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add evas objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -123,18 +123,18 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a scene object .*/
scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
/* Add the root node for the scene. */
root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
/* Add the camera. */
camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(60.0, 1.0, 1.0, 500.0));
camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(camera_node,
evas_canvas3d_node_camera_set(camera));
@ -145,14 +145,14 @@ main(void)
evas_canvas3d_node_look_at_set(EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 0.0,
EVAS_CANVAS3D_SPACE_PARENT, 0.0, 0.0, 1.0));
/* Add the light. */
light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(light,
evas_canvas3d_light_ambient_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_directional_set(EINA_TRUE));
light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(light_node,
evas_canvas3d_node_light_set(light),
@ -162,8 +162,8 @@ main(void)
eo_do(root_node,
evas_canvas3d_node_member_add(light_node));
material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@ -191,7 +191,7 @@ main(void)
/* Add the meshes. */
for (i = 0; i < NUMBER_OF_MESHES; i++)
{
mesh[i] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(mesh[i], EVAS_CANVAS3D_MESH_CLASS, evas);
snprintf(buffer, PATH_MAX, "%s%s", input_template, file_name[i % 8]);
eo_do(mesh[i],
@ -210,7 +210,7 @@ main(void)
evas_canvas3d_mesh_shade_mode_set(draw_mode[(i % 16) / 8]));
}
mesh_node[i] = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(mesh_node[i], EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(root_node, evas_canvas3d_node_member_add(mesh_node[i]));
eo_do(mesh_node[i],
@ -225,7 +225,7 @@ main(void)
evas_canvas3d_scene_size_set(WIDTH, HEIGHT));
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(100, 100, 100, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -100,12 +100,12 @@ _animate_scene(void *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(30.0, 1.0, 2.0, 50.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
evas_canvas3d_node_camera_set(data->camera),
@ -119,14 +119,14 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_diffuse_set(1.0, 1.0, 1.0, 1.0),
evas_canvas3d_light_specular_set(1.0, 1.0, 1.0, 1.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -140,8 +140,8 @@ static void
_mesh_setup(Scene_Data *data)
{
/* Setup material. */
data->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
data->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture,
evas_canvas3d_texture_source_set(source),
@ -160,19 +160,19 @@ _mesh_setup(Scene_Data *data)
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, data->texture));
/* Set data of primitive */
data->cube = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
/* Setup mesh. */
data->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->cube),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_FLAT),
evas_canvas3d_mesh_frame_material_set(0, data->material));
data->mesh_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mesh_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mesh_node));
@ -182,13 +182,13 @@ _mesh_setup(Scene_Data *data)
static void
_scene_setup(Scene_Data *data)
{
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.0, 0.0, 0.0, 0.0));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -221,7 +221,7 @@ main(void)
evas = ecore_evas_get(ecore_evas);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -179,7 +179,7 @@ _on_canvas_resize(Ecore_Evas *ee)
static void
_body_material_set(Body_3D *body, float r, float g, float b)
{
body->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(body->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(body->material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -199,18 +199,18 @@ _body_material_set(Body_3D *body, float r, float g, float b)
static void
_sphere_setup(Body_3D *sphere)
{
sphere->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(sphere->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(sphere->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
sphere->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(sphere->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(sphere->mesh,
evas_canvas3d_mesh_from_primitive_set(0, sphere->primitive));
_body_material_set(sphere, 1, 0.0, 0.0);
sphere->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(sphere->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH),
evas_canvas3d_node_position_set(3.0, 3.0, 0.0));
eo_do(sphere->node, evas_canvas3d_node_mesh_add(sphere->mesh));
@ -219,19 +219,19 @@ _sphere_setup(Body_3D *sphere)
static void
_cone_setup(Body_3D *cone)
{
cone->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(cone->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(cone->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CONE),
evas_canvas3d_primitive_precision_set(50));
cone->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(cone->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(cone->mesh,
evas_canvas3d_mesh_from_primitive_set(0, cone->primitive));
_body_material_set(cone, 0.8, 0.5, 0.5);
cone->node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(cone->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(cone->node, evas_canvas3d_node_mesh_add(cone->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@ -241,19 +241,19 @@ _cone_setup(Body_3D *cone)
static void
_cylinder_setup(Body_3D *cylinder)
{
cylinder->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(cylinder->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(cylinder->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
evas_canvas3d_primitive_precision_set(50));
cylinder->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(cylinder->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(cylinder->mesh,
evas_canvas3d_mesh_from_primitive_set(0, cylinder->primitive));
_body_material_set(cylinder, 0.0, 0.0, 1.0);
cylinder->node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(cylinder->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(cylinder->node, evas_canvas3d_node_mesh_add(cylinder->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@ -264,7 +264,8 @@ static void
_fence_setup(Body_3D *fence)
{
Eo *texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
Eo *texture;
eo_add(texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
eo_do(texture,
evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid.png", NULL),
@ -272,7 +273,8 @@ _fence_setup(Body_3D *fence)
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
Eo *texture1 = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
Eo *texture1;
eo_add(texture1, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(texture1, evas_canvas3d_texture_atlas_enable_set(EINA_FALSE));
eo_do(texture1,
evas_canvas3d_texture_file_set(PACKAGE_EXAMPLES_DIR EVAS_IMAGE_FOLDER "/grid_n.png", NULL),
@ -280,7 +282,7 @@ _fence_setup(Body_3D *fence)
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
fence->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(fence->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(fence->material,
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, texture),
@ -295,14 +297,14 @@ _fence_setup(Body_3D *fence)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(100.0));
fence->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(fence->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(fence->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
evas_canvas3d_primitive_tex_scale_set(160.0, 12.0),
evas_canvas3d_primitive_precision_set(50));
fence->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(fence->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(fence->mesh,
evas_canvas3d_mesh_from_primitive_set(0, fence->primitive));
@ -311,8 +313,8 @@ _fence_setup(Body_3D *fence)
evas_canvas3d_mesh_alpha_func_set(EVAS_CANVAS3D_COMPARISON_GREATER, 0),
evas_canvas3d_mesh_alpha_test_enable_set(EINA_TRUE),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_NORMAL_MAP));
fence->node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(fence->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(fence->node, evas_canvas3d_node_mesh_add(fence->mesh),
evas_canvas3d_node_orientation_angle_axis_set(-90.0, 1.0, 0.0, 0.0),
@ -323,18 +325,18 @@ _fence_setup(Body_3D *fence)
static void
_square_setup(Body_3D *square)
{
square->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(square->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(square->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
square->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(square->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(square->mesh,
evas_canvas3d_mesh_from_primitive_set(0, square->primitive));
_body_material_set(square, 0.4, 0.4, 0.4);
square->node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(square->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(square->node, evas_canvas3d_node_mesh_add(square->mesh),
evas_canvas3d_node_position_set(0.0, -1.0, 0.0),
@ -345,17 +347,17 @@ _square_setup(Body_3D *square)
static void
_box_setup(Body_3D *box)
{
box->primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(box->primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(box->primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
box->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(box->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(box->mesh,
evas_canvas3d_mesh_from_primitive_set(0, box->primitive));
_body_material_set(box, 0, 1, 0);
box->node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(box->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(box->node, evas_canvas3d_node_mesh_add(box->mesh),
evas_canvas3d_node_position_set(3.0, 0.0, -3.0));
@ -364,14 +366,14 @@ _box_setup(Body_3D *box)
static void
_model_setup(Body_3D *model)
{
model->texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(model->texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(model->texture,
evas_canvas3d_texture_file_set(image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST),
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
model->material = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(model->material, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(model->material,
evas_canvas3d_material_texture_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, model->texture),
@ -382,14 +384,14 @@ _model_setup(Body_3D *model)
evas_canvas3d_material_shininess_set(100.0));
model->mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(model->mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(model->mesh,
efl_file_set(model_path, NULL),
evas_canvas3d_mesh_frame_material_set(0, model->material),
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG));
model->node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(model->node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(model->node, evas_canvas3d_node_mesh_add(model->mesh),
evas_canvas3d_node_scale_set(0.1, 0.1, 0.1),
@ -399,7 +401,7 @@ _model_setup(Body_3D *model)
static void
_billboard_setup(Scene_Data *data)
{
data->billboard.texture = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->billboard.texture, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->billboard.texture,
evas_canvas3d_texture_file_set(b_image_path, NULL),
evas_canvas3d_texture_filter_set(EVAS_CANVAS3D_TEXTURE_FILTER_NEAREST,
@ -407,11 +409,11 @@ _billboard_setup(Scene_Data *data)
evas_canvas3d_texture_wrap_set(EVAS_CANVAS3D_WRAP_MODE_REPEAT,
EVAS_CANVAS3D_WRAP_MODE_REPEAT));
data->billboard.primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->billboard.primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->billboard.primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SQUARE));
data->billboard.mesh = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->billboard.mesh, EVAS_CANVAS3D_MESH_CLASS, evas);
eo_do(data->billboard.mesh,
evas_canvas3d_mesh_from_primitive_set(0, data->billboard.primitive));
@ -429,7 +431,7 @@ _billboard_setup(Scene_Data *data)
evas_canvas3d_mesh_blending_func_set(EVAS_CANVAS3D_BLEND_FUNC_SRC_ALPHA,
EVAS_CANVAS3D_BLEND_FUNC_ONE_MINUS_SRC_ALPHA));
data->billboard.node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->billboard.node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->billboard.node,
evas_canvas3d_node_mesh_add(data->billboard.mesh),
@ -443,15 +445,15 @@ _billboard_setup(Scene_Data *data)
static void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
data->mediator = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->mediator, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(50.0, 1.0, 2.0, 100.0));
data->camera_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->camera_node,
@ -470,7 +472,7 @@ _camera_setup(Scene_Data *data)
static void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(AMBIENT_LIGHT, 1.0),
evas_canvas3d_light_diffuse_set(DIFFUSE_LIGHT, 1.0),
@ -478,8 +480,8 @@ _light_setup(Scene_Data *data)
evas_canvas3d_light_spot_cutoff_set(20),
evas_canvas3d_light_projection_perspective_set(40.0, 1.0, 2.0, 1000.0));
data->light_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,
evas_canvas3d_node_light_set(data->light),
@ -494,14 +496,14 @@ _scene_setup(Scene_Data *data)
{
data->init = EINA_FALSE;
data->scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(data->scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(data->scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT);
evas_canvas3d_scene_background_color_set(BG_COLOR, 1));
data->root_node =
eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
@ -676,7 +678,7 @@ main(void)
_scene_setup(&data);
/* Add a background rectangle objects. */
background = eo_add(EVAS_RECTANGLE_CLASS, evas);
eo_add(background, EVAS_RECTANGLE_CLASS, evas);
eo_do(background,
efl_gfx_color_set(0, 0, 0, 255),
efl_gfx_size_set(WIDTH, HEIGHT),

View File

@ -174,7 +174,7 @@ main(void)
/* Creating object with Eo.
* Object must be deleted explixitly at the end of program.*/
d.bg = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
eo_add(d.bg, EVAS_RECTANGLE_CLASS, d.canvas);
/* Eo-styled way to perform actions on an object*/
eo_do(d.bg, evas_obj_name_set("background rectangle"),
@ -187,7 +187,7 @@ main(void)
evas_object_event_callback_add(
d.bg, EVAS_CALLBACK_KEY_DOWN, _on_keydown, NULL);
d.img = eo_add(EVAS_IMAGE_CLASS, d.canvas);
eo_add(d.img, EVAS_IMAGE_CLASS, d.canvas);
/* As soon as 'canvas' object is a parent for 'image' object,
* 'canvas' keeps reference to 'image'.
@ -214,7 +214,7 @@ main(void)
}
/* border on the image's clipper, here just to emphasize its position */
d.clipper_border = eo_add(EVAS_IMAGE_CLASS, d.canvas);
eo_add(d.clipper_border, EVAS_IMAGE_CLASS, d.canvas);
eo_do(d.clipper_border, evas_obj_image_filled_set(EINA_TRUE),
efl_file_set(border_img_path, NULL),
err = evas_obj_image_load_error_get());
@ -235,7 +235,7 @@ main(void)
/* solid white clipper (note that it's the default color for a
* rectangle) - it won't change clippees' colors, then (multiplying
* by 255) */
d.clipper = eo_add(EVAS_RECTANGLE_CLASS, d.canvas);
eo_add(d.clipper, EVAS_RECTANGLE_CLASS, d.canvas);
eo_do(d.clipper,
efl_gfx_position_set( WIDTH / 4, HEIGHT / 4),

View File

@ -449,18 +449,22 @@ vector_set(int x, int y, int w, int h)
root = evas_object_vg_root_node_get(d.vg);
//eo_do(root, evas_vg_node_transformation_set(&matrix));
Efl_VG *bg = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *bg;
eo_add(bg, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("bg"));
_rect_add(bg, 0, 0 , vg_w, vg_h);
evas_vg_node_origin_set(bg, 0,0);
evas_vg_shape_stroke_width_set(bg, 1.0);
evas_vg_node_color_set(bg, 80, 80, 80, 80);
Efl_VG *shape = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *shape;
eo_add(shape, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("shape"));
Efl_VG *rgradient = eo_add(EFL_VG_GRADIENT_RADIAL_CLASS, NULL,
Efl_VG *rgradient;
eo_add(rgradient, EFL_VG_GRADIENT_RADIAL_CLASS, NULL,
efl_vg_name_set("rgradient"));
Efl_VG *lgradient = eo_add(EFL_VG_GRADIENT_LINEAR_CLASS, NULL,
Efl_VG *lgradient;
eo_add(lgradient, EFL_VG_GRADIENT_LINEAR_CLASS, NULL,
efl_vg_name_set("lgradient"));
_arcto(shape, 0, 0, 100, 100, 25, 330);
@ -502,7 +506,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(shape, 0, 0, 255, 255);
evas_vg_shape_stroke_color_set(shape, 0, 0, 255, 128);
Efl_VG *rect = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *rect;
eo_add(rect, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("rect"));
_rect_add(rect, 0, 0, 100, 100);
evas_vg_node_origin_set(rect, 100, 100);
@ -511,7 +516,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect, 255, 255, 255, 255);
Efl_VG *rect1 = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *rect1;
eo_add(rect1, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("rect1"));
_rect_add(rect1, 0, 0, 70, 70);
evas_vg_node_origin_set(rect1, 50, 70);
@ -520,7 +526,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(rect1, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(rect1, 0, 100, 80, 100);
Efl_VG *circle = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *circle;
eo_add(circle, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("circle"));
_arcto(circle, 0, 0, 250, 100, 30, 300);
evas_vg_shape_fill_set(circle, lgradient);
@ -529,7 +536,8 @@ vector_set(int x, int y, int w, int h)
evas_vg_node_color_set(circle, 50, 0, 0, 50);
// Foreground
Efl_VG *fg = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *fg;
eo_add(fg, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("fg"));
_rect_add(fg, 0, 0, vg_w, vg_h);
evas_vg_node_origin_set(fg, 0, 0);
@ -537,23 +545,25 @@ vector_set(int x, int y, int w, int h)
evas_vg_shape_stroke_join_set(fg, EFL_GFX_JOIN_ROUND);
evas_vg_shape_stroke_color_set(fg, 70, 70, 0, 70);
Efl_VG *tst = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *tst;
eo_add(tst, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("tst"));
evas_vg_shape_shape_append_rect(tst, 50, 25, 200, 200, 3, 5);
evas_vg_node_color_set(tst, 0, 0, 200, 200);
evas_vg_shape_stroke_width_set(tst, 2);
evas_vg_shape_stroke_color_set(tst, 255, 0, 0, 255);
Efl_VG *vc = eo_add(EFL_VG_SHAPE_CLASS, root,
Efl_VG *vc;
eo_add(vc, EFL_VG_SHAPE_CLASS, root,
efl_vg_name_set("vc"));
evas_vg_shape_shape_append_circle(vc, 100, 100, 23);
evas_vg_node_color_set(vc, 0, 200, 0, 255);
evas_vg_shape_stroke_width_set(vc, 4);
evas_vg_shape_stroke_color_set(vc, 255, 0, 0, 255);
beginning = eo_add(EFL_VG_CONTAINER_CLASS, NULL,
eo_add(beginning, EFL_VG_CONTAINER_CLASS, NULL,
efl_vg_dup(root));
end = eo_add(EFL_VG_CONTAINER_CLASS, NULL,
eo_add(end, EFL_VG_CONTAINER_CLASS, NULL,
efl_vg_dup(root));
eo_do(end, circle = efl_vg_container_child_get("circle"));

View File

@ -26,13 +26,13 @@ _distance(float x1, float z1, float x2, float z2)
void
_camera_setup(Scene_Data *data)
{
data->camera = eo_add(EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_add(data->camera, EVAS_CANVAS3D_CAMERA_CLASS, evas);
eo_do(data->camera,
evas_canvas3d_camera_projection_perspective_set(65.0, 1.0, 1.0, 300.0));
data->mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
data->camera_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->camera_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_CAMERA));
eo_do(data->root_node, evas_canvas3d_node_member_add(data->mediator_node));
@ -47,7 +47,7 @@ _camera_setup(Scene_Data *data)
void
_light_setup(Scene_Data *data)
{
data->light = eo_add(EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_add(data->light, EVAS_CANVAS3D_LIGHT_CLASS, evas);
eo_do(data->light,
evas_canvas3d_light_ambient_set(0.2, 0.2, 0.2, 1.0),
@ -55,7 +55,7 @@ _light_setup(Scene_Data *data)
evas_canvas3d_light_specular_set(0.2, 0.2, 0.2, 1.0),
evas_canvas3d_light_projection_perspective_set(100.0, 1.0, 1.0, 200.0));
data->light_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->light_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_LIGHT));
eo_do(data->light_node,

View File

@ -127,7 +127,7 @@ typedef struct _vec2
#define ADD_MESH(Object, Name, a, d, s) \
data->material_##Object = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
eo_add(data->material_##Object, EVAS_CANVAS3D_MATERIAL_CLASS, evas); \
\
eo_do(data->material_##Object, \
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE), \
@ -139,7 +139,7 @@ typedef struct _vec2
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, s, s, s, 1.0), \
evas_canvas3d_material_shininess_set(50.0)); \
\
data->mesh_##Name = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh_##Name, EVAS_CANVAS3D_MESH_CLASS, evas);
#define SETUP_DEFAULT_MESH(Object, Name, Shade_Mode) \
eo_do(data->mesh_##Name, \
@ -149,7 +149,7 @@ typedef struct _vec2
#define SETUP_MESH_NODE(Name) \
data->mesh_node_##Name = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas, \
eo_add(data->mesh_node_##Name, EVAS_CANVAS3D_NODE_CLASS, evas, \
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH)); \
\
eo_do(data->mesh_node_##Name, \
@ -161,7 +161,7 @@ typedef struct _vec2
efl_file_set(file, NULL)); \
\
SETUP_DEFAULT_MESH(Object, Name, PHONG) \
data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
eo_add(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_diffuse_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
@ -183,7 +183,7 @@ typedef struct _vec2
evas_canvas3d_mesh_frame_vertex_data_set(0, EVAS_CANVAS3D_VERTEX_ATTRIB_TEXCOORD, \
2 * sizeof(float), vertex)); \
SETUP_DEFAULT_MESH(Object, Name, NORMAL_MAP) \
data->texture_diffuse_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
eo_add(data->texture_diffuse_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_diffuse_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \
@ -200,7 +200,7 @@ typedef struct _vec2
#define NORMAL_SET(Object, Name, normal) \
data->texture_normal_##Object = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
eo_add(data->texture_normal_##Object, EVAS_CANVAS3D_TEXTURE_CLASS, evas); \
\
eo_do(data->texture_normal_##Object, \
evas_canvas3d_texture_atlas_enable_set(EINA_FALSE), \

View File

@ -884,7 +884,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_node_position_set(10 , 9.0, -12));
/* Setup mesh for bounding sphere */
data->material_ball = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material_ball, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material_ball,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
@ -894,7 +894,7 @@ _mesh_setup_gun_planet(Scene_Data *data)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
data->mesh_ball = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh_ball, EVAS_CANVAS3D_MESH_CLASS, evas);
_set_ball(data->mesh_ball, 10);
@ -949,7 +949,7 @@ _mesh_setup_column(Scene_Data *data, int index)
{
/* Setup mesh for column */
data->material_column = eo_add(EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_add(data->material_column, EVAS_CANVAS3D_MATERIAL_CLASS, evas);
eo_do(data->material_column,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
@ -961,7 +961,7 @@ _mesh_setup_column(Scene_Data *data, int index)
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, 1.0, 1.0, 1.0, 1.0),
evas_canvas3d_material_shininess_set(50.0));
data->mesh_column[index] = eo_add(EVAS_CANVAS3D_MESH_CLASS, evas);
eo_add(data->mesh_column[index], EVAS_CANVAS3D_MESH_CLASS, evas);
SETUP_MESH_NODE(column[index])
@ -972,7 +972,7 @@ _mesh_setup_column(Scene_Data *data, int index)
evas_canvas3d_mesh_shade_mode_set(EVAS_CANVAS3D_SHADE_MODE_PHONG),
evas_canvas3d_mesh_frame_material_set(0, data->material_column));
data->texture_diffuse_column = eo_add(EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_add(data->texture_diffuse_column, EVAS_CANVAS3D_TEXTURE_CLASS, evas);
eo_do(data->texture_diffuse_column,
evas_canvas3d_texture_file_set(red_brick_path, NULL),
@ -1090,23 +1090,23 @@ _scene_setup(Scene_Data *data)
for (i = 0; i < 4; i++)
motion_vec[i] = 0;
data->cube_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cube_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cube_primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE),
evas_canvas3d_primitive_precision_set(10));
data->sphere_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->sphere_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->sphere_primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(50));
global_scene = eo_add(EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_add(global_scene, EVAS_CANVAS3D_SCENE_CLASS, evas);
eo_do(global_scene,
evas_canvas3d_scene_size_set(WIDTH, HEIGHT),
evas_canvas3d_scene_background_color_set(0.5, 0.5, 0.9, 0.0));
data->root_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->root_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_NODE));
_camera_setup(data);
@ -1117,7 +1117,7 @@ _scene_setup(Scene_Data *data)
for (i = 0; i < 10; i++)
_mesh_setup_rocket(data, i);
data->cylinder_primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_add(data->cylinder_primitive, EVAS_CANVAS3D_PRIMITIVE_CLASS, evas);
eo_do(data->cylinder_primitive,
evas_canvas3d_primitive_mode_set(EVAS_CANVAS3D_PRIMITIVE_MODE_WITHOUT_BASE),
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CYLINDER),
@ -1174,7 +1174,7 @@ _scene_setup(Scene_Data *data)
}
}
data->carp_mediator_node = eo_add(EVAS_CANVAS3D_NODE_CLASS, evas,
eo_add(data->carp_mediator_node, EVAS_CANVAS3D_NODE_CLASS, evas,
evas_canvas3d_node_constructor(EVAS_CANVAS3D_NODE_TYPE_MESH));
eo_do(data->carp_mediator_node,

View File

@ -262,7 +262,7 @@ ecore_init(void)
#if defined(GLIB_INTEGRATION_ALWAYS)
if (_ecore_glib_always_integrate) ecore_main_loop_glib_integrate();
#endif
_ecore_parent = eo_add(ECORE_PARENT_CLASS, NULL);
eo_add(_ecore_parent, ECORE_PARENT_CLASS, NULL);
#if defined(HAVE_MALLINFO) || defined(HAVE_MALLOC_INFO)
if (getenv("ECORE_MEM_STAT"))

View File

@ -319,7 +319,7 @@ _do_tick(void)
eina_inlist_remove(EINA_INLIST_GET(animators),
EINA_INLIST_GET(animator));
eo_do(animator->obj, eo_parent_set(NULL));
eo_do(animator->obj, eo_parent_set(animator->obj, NULL));
if (eo_destructed_is(animator->obj))
eo_manual_free(animator->obj);
else
@ -372,8 +372,8 @@ ecore_animator_add(Ecore_Task_Cb func,
{
Ecore_Animator *animator = NULL;
animator = eo_add(MY_CLASS, _ecore_parent,
ecore_animator_constructor(func, data));
eo_add(animator, MY_CLASS, _ecore_parent,
ecore_animator_constructor(NULL, func, data));
return animator;
}
@ -391,8 +391,8 @@ ecore_animator_timeline_add(double runtime,
const void *data)
{
Ecore_Animator *animator;
animator = eo_add(MY_CLASS, _ecore_parent,
ecore_animator_timeline_constructor(runtime, func, data));
eo_add(animator, MY_CLASS, _ecore_parent,
ecore_animator_timeline_constructor(NULL, runtime, func, data));
return animator;
}
@ -690,7 +690,7 @@ _ecore_animator_eo_base_destructor(Eo *obj, Ecore_Animator_Data *pd)
pd->delete_me = EINA_TRUE;
animators_delete_me++;
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -701,7 +701,7 @@ _ecore_animator_eo_base_finalize(Eo *obj, Ecore_Animator_Data *pd)
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
EAPI void
@ -729,7 +729,7 @@ EAPI void
ecore_animator_freeze(Ecore_Animator *animator)
{
ECORE_ANIMATOR_CHECK(animator);
eo_do(animator, eo_event_freeze());
eo_do(animator, eo_event_freeze(animator));
}
EOLIAN static void
@ -752,7 +752,7 @@ EAPI void
ecore_animator_thaw(Ecore_Animator *animator)
{
ECORE_ANIMATOR_CHECK(animator);
eo_do(animator, eo_event_thaw());
eo_do(animator, eo_event_thaw(animator));
}
EOLIAN static void
@ -838,7 +838,7 @@ _ecore_animator_shutdown(void)
if (animator->suspended) animators_suspended--;
animators = (Ecore_Animator_Data *)eina_inlist_remove(EINA_INLIST_GET(animators), EINA_INLIST_GET(animators));
eo_do(animator->obj, eo_parent_set(NULL));
eo_do(animator->obj, eo_parent_set(animator->obj, NULL));
if (eo_destructed_is(animator->obj))
eo_manual_free(animator->obj);
else

View File

@ -67,7 +67,8 @@ ecore_exe_pipe_run(const char *exe_cmd,
Ecore_Exe_Flags flags,
const void *data)
{
Ecore_Exe *ret = eo_add(MY_CLASS, NULL, ecore_obj_exe_command_set(exe_cmd, flags));
Ecore_Exe *ret;
eo_add(ret, MY_CLASS, NULL, ecore_obj_exe_command_set(NULL, exe_cmd, flags));
if (ret)
{
Ecore_Exe_Data *pd = eo_data_scope_get(ret, MY_CLASS);
@ -95,7 +96,7 @@ EOLIAN static Eo *
_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
{
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
eo_do_super(obj, MY_CLASS, obj = eo_finalize());
obj = eo_super_eo_finalize(MY_CLASS, obj);
if (!obj)
return obj;
@ -216,7 +217,7 @@ ecore_exe_free(Ecore_Exe *obj)
EOLIAN static void
_ecore_exe_eo_base_destructor(Eo *obj, Ecore_Exe_Data *exe)
{
eo_do_super(obj, ECORE_EXE_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_EXE_CLASS, obj);
_impl_ecore_exe_eo_base_destructor(obj, exe);
}
@ -247,7 +248,7 @@ ecore_exe_cmd_get(const Ecore_Exe *obj)
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
const char *ret = NULL;
eo_do(obj, ecore_obj_exe_command_get(&ret, NULL));
eo_do(obj, ecore_obj_exe_command_get(obj, &ret, NULL));
return ret;
}
@ -292,13 +293,13 @@ ecore_exe_flags_get(const Ecore_Exe *obj)
EAPI void
ecore_exe_pause(Ecore_Exe *obj)
{
eo_do(obj, efl_control_suspend_set(EINA_TRUE));
eo_do(obj, efl_control_suspend_set(obj, EINA_TRUE));
}
EAPI void
ecore_exe_continue(Ecore_Exe *obj)
{
eo_do(obj, efl_control_suspend_set(EINA_FALSE));
eo_do(obj, efl_control_suspend_set(obj, EINA_FALSE));
}
EOLIAN static void

View File

@ -1171,7 +1171,7 @@ _ecore_exe_data_generic_handler(void *data,
ecore_event_add(event_type, e,
_ecore_exe_event_exe_data_free,
NULL);
eo_do(obj, eo_event_callback_call(eo_event, e));
eo_do(obj, eo_event_callback_call(obj, eo_event, e));
}
}
}

View File

@ -61,7 +61,7 @@ ecore_idle_enterer_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(func, data));
eo_add(ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_after_constructor(NULL, func, data));
return ie;
}
@ -82,7 +82,7 @@ ecore_idle_enterer_before_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Enterer *ie = NULL;
ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(func, data));
eo_add(ie, MY_CLASS, _ecore_parent, ecore_idle_enterer_before_constructor(NULL, func, data));
return ie;
}
@ -130,7 +130,7 @@ _ecore_idle_enterer_eo_base_destructor(Eo *obj, Ecore_Idle_Enterer_Data *idle_en
idle_enterer->delete_me = 1;
idle_enterers_delete_me = 1;
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -141,7 +141,7 @@ _ecore_idle_enterer_eo_base_finalize(Eo *obj, Ecore_Idle_Enterer_Data *idle_ente
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
void
@ -152,7 +152,7 @@ _ecore_idle_enterer_shutdown(void)
{
idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(idle_enterers));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@ -214,7 +214,7 @@ _ecore_idle_enterer_call(void)
idle_enterers = (Ecore_Idle_Enterer_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_enterers), EINA_INLIST_GET(ie));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else

View File

@ -37,7 +37,7 @@ ecore_idle_exiter_add(Ecore_Task_Cb func,
const void *data)
{
Ecore_Idle_Exiter *ie = NULL;
ie = eo_add(MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(func, data));
eo_add(ie, MY_CLASS, _ecore_parent, ecore_idle_exiter_constructor(NULL, func, data));
return ie;
}
@ -99,7 +99,7 @@ _ecore_idle_exiter_eo_base_finalize(Eo *obj, Ecore_Idle_Exiter_Data *idle_exiter
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
EOLIAN static void
@ -109,7 +109,7 @@ _ecore_idle_exiter_eo_base_destructor(Eo *obj, Ecore_Idle_Exiter_Data *idle_exit
idle_exiter->delete_me = 1;
idle_exiters_delete_me = 1;
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
void
@ -120,7 +120,7 @@ _ecore_idle_exiter_shutdown(void)
{
idle_exiters = (Ecore_Idle_Exiter_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(idle_exiters));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@ -183,7 +183,7 @@ _ecore_idle_exiter_call(void)
idle_exiters = (Ecore_Idle_Exiter_Data *)eina_inlist_remove(EINA_INLIST_GET(idle_exiters), EINA_INLIST_GET(ie));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else

View File

@ -39,7 +39,7 @@ ecore_idler_add(Ecore_Task_Cb func,
_ecore_lock();
ie = eo_add(MY_CLASS, _ecore_parent, ecore_idler_constructor(func, data));
eo_add(ie, MY_CLASS, _ecore_parent, ecore_idler_constructor(NULL, func, data));
_ecore_unlock();
return ie;
@ -98,7 +98,7 @@ _ecore_idler_eo_base_destructor(Eo *obj, Ecore_Idler_Data *idler)
idler->delete_me = 1;
idlers_delete_me = 1;
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -109,7 +109,7 @@ _ecore_idler_eo_base_finalize(Eo *obj, Ecore_Idler_Data *idler)
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
void
@ -120,7 +120,7 @@ _ecore_idler_shutdown(void)
{
idlers = (Ecore_Idler_Data *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(idlers));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else
@ -179,7 +179,7 @@ _ecore_idler_all_call(void)
idlers = (Ecore_Idler_Data *)eina_inlist_remove(EINA_INLIST_GET(idlers), EINA_INLIST_GET(ie));
eo_do(ie->obj, eo_parent_set(NULL));
eo_do(ie->obj, eo_parent_set(ie->obj, NULL));
if (eo_destructed_is(ie->obj))
eo_manual_free(ie->obj);
else

View File

@ -49,7 +49,8 @@ EAPI Ecore_Job *
ecore_job_add(Ecore_Cb func,
const void *data)
{
Ecore_Job *job = eo_add(MY_CLASS, _ecore_parent, ecore_job_constructor(func, data));
Ecore_Job *job;
eo_add(job, MY_CLASS, _ecore_parent, ecore_job_constructor(NULL, func, data));
return job;
}
@ -88,7 +89,7 @@ ecore_job_del(Ecore_Job *obj)
Ecore_Job_Data *job = eo_data_scope_get(obj, MY_CLASS);
data = job->data;
ecore_event_del(job->event);
eo_do(obj, eo_parent_set(NULL));
eo_do(obj, eo_parent_set(obj, NULL));
return data;
}
@ -96,7 +97,7 @@ EOLIAN static void
_ecore_job_eo_base_destructor(Eo *obj, Ecore_Job_Data *_pd EINA_UNUSED)
{
/*FIXME: check if ecore_event_del should be called from here*/
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -107,7 +108,7 @@ _ecore_job_eo_base_finalize(Eo *obj, Ecore_Job_Data *pd)
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
static Eina_Bool
@ -126,7 +127,7 @@ static void
_ecore_job_event_free(void *data,
void *job EINA_UNUSED)
{
eo_do(data, eo_parent_set(NULL));
eo_do(data, eo_parent_set(data, NULL));
Ecore_Job *obj = data;

View File

@ -2323,7 +2323,7 @@ EAPI Eo *ecore_main_loop_get(void)
{
if (!_mainloop_singleton)
{
_mainloop_singleton = eo_add(ECORE_MAINLOOP_CLASS, NULL);
eo_add(_mainloop_singleton, ECORE_MAINLOOP_CLASS, NULL);
}
return _mainloop_singleton;

View File

@ -173,7 +173,7 @@ _ecore_poller_cb_timer(void *data EINA_UNUSED)
{
pollers[i] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(poller));
eo_do(poller->obj, eo_parent_set(NULL));
eo_do(poller->obj, eo_parent_set(poller->obj, NULL));
if (eo_destructed_is(poller->obj))
eo_manual_free(poller->obj);
else
@ -237,8 +237,8 @@ ecore_poller_add(Ecore_Poller_Type type EINA_UNUSED,
const void *data)
{
Ecore_Poller *poller;
poller = eo_add(MY_CLASS, _ecore_parent,
ecore_poller_constructor(type, interval, func, data));
eo_add(poller, MY_CLASS, _ecore_parent,
ecore_poller_constructor(NULL, type, interval, func, data));
return poller;
}
@ -352,7 +352,7 @@ ecore_poller_del(Ecore_Poller *obj)
data = poller->data;
pollers[poller->ibit] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[poller->ibit]), EINA_INLIST_GET(poller));
eo_do(poller->obj, eo_parent_set(NULL));
eo_do(poller->obj, eo_parent_set(poller->obj, NULL));
if (eo_destructed_is(poller->obj))
eo_manual_free(obj);
else
@ -371,7 +371,7 @@ _ecore_poller_eo_base_destructor(Eo *obj, Ecore_Poller_Data *pd)
poller_delete_count++;
}
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -382,7 +382,7 @@ _ecore_poller_eo_base_finalize(Eo *obj, Ecore_Poller_Data *pd)
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
void
@ -396,7 +396,7 @@ _ecore_poller_shutdown(void)
while ((poller = pollers[i]))
{
pollers[i] = (Ecore_Poller_Data *)eina_inlist_remove(EINA_INLIST_GET(pollers[i]), EINA_INLIST_GET(pollers[i]));
eo_do(poller->obj, eo_parent_set(NULL));
eo_do(poller->obj, eo_parent_set(poller->obj, NULL));
if (eo_destructed_is(poller->obj))
eo_manual_free(poller->obj);
else

View File

@ -97,7 +97,7 @@ ecore_timer_add(double in,
Ecore_Timer *timer = NULL;
EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL);
timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(in, func, data));
eo_add(timer, MY_CLASS, _ecore_parent, ecore_obj_timer_constructor(NULL, in, func, data));
return timer;
}
@ -261,7 +261,7 @@ EAPI void
ecore_timer_freeze(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
eo_do(timer, eo_event_freeze());
eo_do(timer, eo_event_freeze(timer));
}
EOLIAN static void
@ -294,7 +294,7 @@ ecore_timer_freeze_get(Ecore_Timer *timer)
{
int r = 0;
eo_do(timer, r = eo_event_freeze_count_get());
eo_do(timer, r = eo_event_freeze_count_get(timer));
return !!r;
}
@ -310,7 +310,7 @@ EAPI void
ecore_timer_thaw(Ecore_Timer *timer)
{
ECORE_TIMER_CHECK(timer);
eo_do(timer, eo_event_thaw());
eo_do(timer, eo_event_thaw(timer));
}
EOLIAN static void
@ -396,7 +396,7 @@ _ecore_timer_loop_add(double in,
const void *data)
{
Ecore_Timer *timer = NULL;
timer = eo_add(MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(in, func, data));
eo_add(timer, MY_CLASS, _ecore_parent, ecore_obj_timer_loop_constructor(NULL, in, func, data));
return timer;
}
@ -436,7 +436,7 @@ _ecore_timer_del(Ecore_Timer *obj)
if (timer->delete_me)
timers_delete_me--;
eo_do(obj, eo_parent_set(NULL));
eo_do(obj, eo_parent_set(obj, NULL));
if (eo_destructed_is(obj))
eo_manual_free(obj);
@ -460,7 +460,7 @@ _ecore_timer_eo_base_destructor(Eo *obj, Ecore_Timer_Data *pd)
timers_delete_me++;
}
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EOLIAN static Eo *
@ -471,7 +471,7 @@ _ecore_timer_eo_base_finalize(Eo *obj, Ecore_Timer_Data *pd)
return NULL;
}
return eo_do_super_ret(obj, MY_CLASS, obj, eo_finalize());
return eo_super_eo_finalize(MY_CLASS, obj);
}
void
@ -484,7 +484,7 @@ _ecore_timer_shutdown(void)
timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timers));
eo_data_unref(timer->obj, timer);
eo_do(timer->obj, eo_parent_set(NULL));
eo_do(timer->obj, eo_parent_set(timer->obj, NULL));
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@ -496,7 +496,7 @@ _ecore_timer_shutdown(void)
suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(suspended));
eo_data_unref(timer->obj, timer);
eo_do(timer->obj, eo_parent_set(NULL));
eo_do(timer->obj, eo_parent_set(timer->obj, NULL));
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@ -528,7 +528,7 @@ _ecore_timer_cleanup(void)
timers = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(timers), EINA_INLIST_GET(timer));
eo_data_unref(timer->obj, timer);
eo_do(timer->obj, eo_parent_set(NULL));
eo_do(timer->obj, eo_parent_set(timer->obj, NULL));
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else
@ -553,7 +553,7 @@ _ecore_timer_cleanup(void)
suspended = (Ecore_Timer_Data *)eina_inlist_remove(EINA_INLIST_GET(suspended), EINA_INLIST_GET(timer));
eo_data_unref(timer->obj, timer);
eo_do(timer->obj, eo_parent_set(NULL));
eo_do(timer->obj, eo_parent_set(timer->obj, NULL));
if (eo_destructed_is(timer->obj))
eo_manual_free(timer->obj);
else

View File

@ -58,7 +58,7 @@ EOLIAN static Eo *
_ecore_audio_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Object *obj)
{
obj->volume = 1.0;
return eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
return eo_super_eo_constructor(MY_CLASS, eo_obj);
}
#include "ecore_audio.eo.c"

View File

@ -27,7 +27,7 @@ _ecore_audio_in_speed_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, double
obj->speed = speed;
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
}
EOLIAN static double
@ -41,7 +41,7 @@ _ecore_audio_in_samplerate_set(Eo *eo_obj EINA_UNUSED, Ecore_Audio_Input *obj, i
{
obj->samplerate = samplerate;
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, NULL));
}
EOLIAN static int
@ -89,7 +89,7 @@ _ecore_audio_in_remaining_get(Eo *eo_obj, Ecore_Audio_Input *obj)
if (!obj->seekable) return -1;
else {
double ret = 0.0;
eo_do(eo_obj, ret = ecore_audio_obj_in_seek(0, SEEK_CUR));
eo_do(eo_obj, ret = ecore_audio_obj_in_seek(eo_obj, 0, SEEK_CUR));
return obj->length - ret;
}
}
@ -104,14 +104,14 @@ _ecore_audio_in_read(Eo *eo_obj, Ecore_Audio_Input *obj, void *buf, size_t len)
memset(buf, 0, len);
len_read = len;
} else {
eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(buf, len));
eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len));
if (len_read == 0) {
if (!obj->looped || !obj->seekable) {
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_STOPPED, NULL));
} else {
eo_do(eo_obj, ecore_audio_obj_in_seek(0, SEEK_SET));
eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(buf, len));
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL));
eo_do(eo_obj, ecore_audio_obj_in_seek(eo_obj, 0, SEEK_SET));
eo_do(eo_obj, len_read = ecore_audio_obj_in_read_internal(eo_obj, buf, len));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_IN_EVENT_IN_LOOPED, NULL));
}
}
@ -173,7 +173,7 @@ _ecore_audio_in_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Input *obj, Ecore_Au
EOLIAN static Eo *
_ecore_audio_in_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Input *obj)
{
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
eo_obj = eo_super_eo_constructor(MY_CLASS, eo_obj);
obj->speed = 1.0;
@ -184,9 +184,9 @@ EOLIAN static void
_ecore_audio_in_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Input *obj)
{
if(obj->output)
eo_do(obj->output, ecore_audio_obj_out_input_detach(eo_obj));
eo_do(obj->output, ecore_audio_obj_out_input_detach(obj->output, eo_obj));
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_in.eo.c"

View File

@ -205,7 +205,7 @@ _ecore_audio_in_sndfile_eo_base_destructor(Eo *eo_obj, Ecore_Audio_In_Sndfile_Da
if (ea_obj->vio)
_free_vio(ea_obj);
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_in_sndfile.eo.c"

View File

@ -90,7 +90,7 @@ _ecore_audio_in_tone_eo_base_key_data_set(Eo *eo_obj, Ecore_Audio_In_Tone_Data *
if (!strcmp(key, ECORE_AUDIO_ATTR_TONE_FREQ)) {
obj->freq = *(int *)val;
} else {
eo_do_super(eo_obj, MY_CLASS, eo_key_data_set(key, val));
eo_super_eo_key_data_set(MY_CLASS, eo_obj, key, val);
}
}
@ -102,7 +102,7 @@ _ecore_audio_in_tone_eo_base_key_data_get(Eo *eo_obj, Ecore_Audio_In_Tone_Data *
return (void *) (intptr_t) obj->freq;
} else {
void *ret = NULL;
eo_do_super(eo_obj, MY_CLASS, ret = eo_key_data_get(key));
ret = eo_super_eo_key_data_get(MY_CLASS, eo_obj, key);
return ret;
}
}
@ -112,7 +112,7 @@ _ecore_audio_in_tone_eo_base_constructor(Eo *eo_obj, Ecore_Audio_In_Tone_Data *o
{
Ecore_Audio_Input *in_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_IN_CLASS);
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
eo_obj = eo_super_eo_constructor(MY_CLASS, eo_obj);
in_obj->channels = 1;
in_obj->samplerate = 44100;

View File

@ -34,7 +34,7 @@ static Eina_Bool _write_cb(void *data)
/* FIXME: Multiple inputs */
in = eina_list_data_get(out_obj->inputs);
eo_do(in, bread = ecore_audio_obj_in_read(buf, 4*1024));
eo_do(in, bread = ecore_audio_obj_in_read(in, buf, 4*1024));
if (bread == 0) {
ea_obj->paused = EINA_TRUE;
@ -61,7 +61,7 @@ _ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Output *obj, Eo *input)
if (in->output == eo_obj)
return EINA_FALSE;
if (in->output) eo_do(in->output, ecore_audio_obj_out_input_detach(input));
if (in->output) eo_do(in->output, ecore_audio_obj_out_input_detach(in->output, input));
in->output = eo_obj;
/* TODO: Send event */
@ -132,7 +132,7 @@ _ecore_audio_out_ecore_audio_vio_set(Eo *eo_obj, Ecore_Audio_Output *_pd EINA_UN
EOLIAN static Eo *
_ecore_audio_out_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Output *obj)
{
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
eo_obj = eo_super_eo_constructor(MY_CLASS, eo_obj);
obj->need_writer = EINA_TRUE;
@ -146,10 +146,10 @@ _ecore_audio_out_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Output *obj)
Eo *in;
EINA_LIST_FOREACH_SAFE(obj->inputs, cur, tmp, in) {
eo_do(eo_obj, ecore_audio_obj_out_input_detach(in));
eo_do(eo_obj, ecore_audio_obj_out_input_detach(eo_obj, in));
}
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_out.eo.c"

View File

@ -219,7 +219,7 @@ EOLIAN static void
_ecore_audio_out_core_audio_ecore_audio_volume_set(Eo *obj, Ecore_Audio_Out_Core_Audio_Data *sd EINA_UNUSED, double volume)
{
// TODO Change volume of playing inputs
eo_do_super(obj, MY_CLASS, ecore_audio_obj_volume_set(volume));
eo_super_ecore_audio_obj_volume_set(MY_CLASS, volume);
}
EOLIAN static Eina_Bool
@ -230,7 +230,7 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_attach(Eo *obj, Ecore_Audio_Ou
OSStatus err;
Eina_Bool chk;
eo_do_super(obj, MY_CLASS, chk = ecore_audio_obj_out_input_attach(input));
chk = eo_super_ecore_audio_obj_out_input_attach(MY_CLASS, input);
if (EINA_UNLIKELY(!chk))
{
ERR("Failed to attach input (eo_do_super)");
@ -322,7 +322,7 @@ free_proc_id:
free_helper:
free(helper);
detach:
eo_do_super(obj, MY_CLASS, ecore_audio_obj_out_input_detach(input));
eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, input);
return_failure:
return EINA_FALSE;
}
@ -338,7 +338,7 @@ _ecore_audio_out_core_audio_ecore_audio_out_input_detach(Eo *obj, Ecore_Audio_Ou
eo_do(input, data = eo_key_data_get("coreaudio_data"));
_core_audio_helper_free(data);
eo_do_super(obj, MY_CLASS, ret = ecore_audio_obj_out_input_detach(input));
ret = eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, input);
return ret;
}

View File

@ -61,10 +61,10 @@ _ecore_audio_out_pulse_ecore_audio_volume_set(Eo *eo_obj, Ecore_Audio_Out_Pulse_
pa_cvolume_set(&pa_volume, 2, volume * PA_VOLUME_NORM);
eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_volume_set(volume));
eo_super_ecore_audio_obj_volume_set(MY_CLASS, eo_obj, volume);
EINA_LIST_FOREACH(out_obj->inputs, input, in) {
eo_do(in, stream = eo_key_data_get("pulse_data"));
eo_do(in, stream = eo_key_data_get(in, "pulse_data"));
idx = pa_stream_get_index(stream);
pa_operation_unref(pa_context_set_sink_input_volume(class_vars.context, idx, &pa_volume, NULL, NULL));
}
@ -81,7 +81,7 @@ static void _write_cb(pa_stream *stream, size_t len, void *data)
pa_stream_begin_write(stream, &buf, &wlen);
eo_do(in, bread = ecore_audio_obj_in_read(buf, wlen));
eo_do(in, bread = ecore_audio_obj_in_read(in, buf, wlen));
pa_stream_write(stream, buf, bread, NULL, 0, PA_SEEK_RELATIVE);
if (bread < (int)len)
@ -96,10 +96,10 @@ static Eina_Bool _update_samplerate_cb(void *data EINA_UNUSED, Eo *eo_obj, const
int samplerate = 0;
double speed = 0;
eo_do(eo_obj, samplerate = ecore_audio_obj_in_samplerate_get());
eo_do(eo_obj, speed = ecore_audio_obj_in_speed_get());
eo_do(eo_obj, samplerate = ecore_audio_obj_in_samplerate_get(eo_obj));
eo_do(eo_obj, speed = ecore_audio_obj_in_speed_get(eo_obj));
eo_do(eo_obj, stream = eo_key_data_get("pulse_data"));
eo_do(eo_obj, stream = eo_key_data_get(eo_obj, "pulse_data"));
pa_operation_unref(pa_stream_update_sample_rate(stream, samplerate * speed, NULL, NULL));
@ -115,28 +115,28 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
Eina_Bool ret = EINA_FALSE;
Ecore_Audio_Object *ea_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_CLASS);
eo_do_super(eo_obj, MY_CLASS, ret = ecore_audio_obj_out_input_attach(in));
ret = eo_super_ecore_audio_obj_out_input_attach(MY_CLASS, eo_obj, in);
if (!ret)
return EINA_FALSE;
ss.format = PA_SAMPLE_FLOAT32LE;
eo_do(in, ss.rate = ecore_audio_obj_in_samplerate_get());
eo_do(in, speed = ecore_audio_obj_in_speed_get());
eo_do(in, ss.channels = ecore_audio_obj_in_channels_get());
eo_do(in, name = ecore_audio_obj_name_get());
eo_do(in, ss.rate = ecore_audio_obj_in_samplerate_get(in));
eo_do(in, speed = ecore_audio_obj_in_speed_get(in));
eo_do(in, ss.channels = ecore_audio_obj_in_channels_get(in));
eo_do(in, name = ecore_audio_obj_name_get(in));
ss.rate = ss.rate * speed;
stream = pa_stream_new(class_vars.context, name, &ss, NULL);
if (!stream) {
ERR("Could not create stream");
eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_detach(in));
eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, eo_obj, in);
return EINA_FALSE;
}
eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj));
eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_SAMPLERATE_CHANGED, _update_samplerate_cb, eo_obj));
eo_do(in, eo_key_data_set("pulse_data", stream));
eo_do(in, eo_key_data_set(in, "pulse_data", stream));
pa_stream_set_write_callback(stream, _write_cb, in);
@ -151,7 +151,7 @@ static Eina_Bool _input_attach_internal(Eo *eo_obj, Eo *in)
static Eina_Bool _delayed_attach_cb(void *data, Eo *eo_obj, const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
{
Eo *in = data;
eo_do(eo_obj, eo_event_callback_del(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
eo_do(eo_obj, eo_event_callback_del(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
_input_attach_internal(eo_obj, in);
@ -165,7 +165,7 @@ _ecore_audio_out_pulse_ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Out_
if (class_vars.state != PA_CONTEXT_READY) {
DBG("Delaying input_attach because PA context is not ready.");
eo_do(eo_obj, eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
eo_do(eo_obj, eo_event_callback_add(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, _delayed_attach_cb, in));
} else {
retval = _input_attach_internal(eo_obj, in);
}
@ -186,11 +186,11 @@ _ecore_audio_out_pulse_ecore_audio_out_input_detach(Eo *eo_obj, Ecore_Audio_Out_
Eina_Bool ret2 = EINA_FALSE;
pa_operation *op;
eo_do_super(eo_obj, MY_CLASS, ret2 = ecore_audio_obj_out_input_detach(in));
ret2 = eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, eo_obj, in);
if (!ret2)
return EINA_FALSE;
eo_do(in, stream = eo_key_data_get("pulse_data"));
eo_do(in, stream = eo_key_data_get(in, "pulse_data"));
pa_stream_set_write_callback(stream, NULL, NULL);
op = pa_stream_drain(stream, _drain_cb, NULL);
@ -221,12 +221,12 @@ static void _state_cb(pa_context *context, void *data EINA_UNUSED)
if (state == PA_CONTEXT_READY) {
DBG("PA context ready.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_READY, NULL));
}
} else if ((state == PA_CONTEXT_FAILED) || (state == PA_CONTEXT_TERMINATED)) {
DBG("PA context fail.");
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
}
} else {
DBG("Connection state %i", state);
@ -252,7 +252,7 @@ static void _state_job(void *data EINA_UNUSED)
}
// the callback here can delete things in the list..
EINA_LIST_FOREACH(class_vars.outputs, out, eo_obj) {
eo_do(eo_obj, eo_event_callback_call(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
eo_do(eo_obj, eo_event_callback_call(eo_obj, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, NULL));
}
// now unref everything safely
EINA_LIST_FOREACH_SAFE(class_vars.outputs, out, tmp, eo_obj) {
@ -269,7 +269,7 @@ _ecore_audio_out_pulse_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Dat
char **argv;
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
eo_super_eo_constructor(MY_CLASS, eo_obj);
out_obj->need_writer = EINA_FALSE;
@ -296,7 +296,7 @@ EOLIAN static void
_ecore_audio_out_pulse_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Out_Pulse_Data *_pd EINA_UNUSED)
{
class_vars.outputs = eina_list_remove(class_vars.outputs, eo_obj);
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_out_pulse.eo.c"

View File

@ -43,7 +43,7 @@ static Eina_Bool _write_cb(void *data)
/* TODO: Support mixing of multiple inputs */
in = eina_list_data_get(out_obj->inputs);
eo_do(in, bread = ecore_audio_obj_in_read(buf, 4*1024));
eo_do(in, bread = ecore_audio_obj_in_read(in, buf, 4*1024));
if (bread == 0) {
sf_write_sync(obj->handle);
@ -66,19 +66,19 @@ _ecore_audio_out_sndfile_ecore_audio_out_input_attach(Eo *eo_obj, Ecore_Audio_Ou
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
Eina_Bool ret2 = EINA_FALSE;
eo_do_super(eo_obj, MY_CLASS, ret2 = ecore_audio_obj_out_input_attach(in));
ret2 = eo_super_ecore_audio_obj_out_input_attach(MY_CLASS, eo_obj, in);
if (!ret2)
return EINA_FALSE;
eo_do(in, obj->sfinfo.samplerate = ecore_audio_obj_in_samplerate_get());
eo_do(in, obj->sfinfo.channels = ecore_audio_obj_in_channels_get());
eo_do(in, obj->sfinfo.samplerate = ecore_audio_obj_in_samplerate_get(in));
eo_do(in, obj->sfinfo.channels = ecore_audio_obj_in_channels_get(in));
obj->handle = sf_open(ea_obj->source, SFM_WRITE, &obj->sfinfo);
if (!obj->handle) {
eina_stringshare_del(ea_obj->source);
ea_obj->source = NULL;
eo_do_super(eo_obj, MY_CLASS, ecore_audio_obj_out_input_detach(in));
eo_super_ecore_audio_obj_out_input_detach(MY_CLASS, eo_obj, in);
return EINA_FALSE;
}
@ -163,9 +163,9 @@ _ecore_audio_out_sndfile_eo_base_constructor(Eo *eo_obj, Ecore_Audio_Out_Sndfile
{
Ecore_Audio_Output *out_obj = eo_data_scope_get(eo_obj, ECORE_AUDIO_OUT_CLASS);
eo_obj = eo_do_super_ret(eo_obj, MY_CLASS, eo_obj, eo_constructor());
eo_super_eo_constructor(MY_CLASS, eo_obj);
eo_do(eo_obj, ecore_audio_obj_format_set(ECORE_AUDIO_FORMAT_OGG));
eo_do(eo_obj, ecore_audio_obj_format_set(eo_obj, ECORE_AUDIO_FORMAT_OGG));
// FIXME: Use writer from output
out_obj->need_writer = EINA_FALSE;
@ -182,7 +182,7 @@ _ecore_audio_out_sndfile_eo_base_destructor(Eo *eo_obj, Ecore_Audio_Out_Sndfile_
if (out_obj->write_idler)
ecore_idler_del(out_obj->write_idler);
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, eo_obj);
}
#include "ecore_audio_out_sndfile.eo.c"

View File

@ -109,7 +109,7 @@ static const char *_ecore_con_pretty_ip(struct sockaddr *client_addr);
#define EO_CONSTRUCTOR_CHECK_RETURN(obj) do { \
Eina_Bool finalized; \
if (eo_do_ret(obj, finalized, eo_finalized_get())) \
if (eo_do_ret(obj, finalized, eo_finalized_get(obj))) \
{ \
ERR("This function is only allowed during construction."); \
return; \
@ -306,10 +306,10 @@ _ecore_con_base_lookup(Eo *kls_obj EINA_UNUSED, void *pd EINA_UNUSED, const char
if (!name || !done_cb)
return EINA_FALSE;
obj = eo_add(ECORE_CON_CONNECTOR_CLASS, NULL,
ecore_con_server_obj_connection_type_set(ECORE_CON_REMOTE_TCP),
ecore_con_server_obj_name_set(name),
ecore_con_obj_port_set(1025));
eo_add(obj, ECORE_CON_CONNECTOR_CLASS, NULL,
ecore_con_server_obj_connection_type_set(NULL, ECORE_CON_REMOTE_TCP),
ecore_con_server_obj_name_set(NULL, name),
ecore_con_obj_port_set(NULL, 1025));
lk = malloc(sizeof (Ecore_Con_Lookup));
if (!lk)
@ -363,10 +363,10 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
obj = eo_add(ECORE_CON_SERVER_CLASS, NULL,
ecore_con_server_obj_connection_type_set(compl_type),
ecore_con_server_obj_name_set(name),
ecore_con_obj_port_set(port));
eo_add(obj, ECORE_CON_SERVER_CLASS, NULL,
ecore_con_server_obj_connection_type_set(NULL, compl_type),
ecore_con_server_obj_name_set(NULL, name),
ecore_con_obj_port_set(NULL, port));
ecore_con_server_data_set(obj, (void *) data);
@ -376,7 +376,7 @@ ecore_con_server_add(Ecore_Con_Type compl_type,
EOLIAN static Eo *
_ecore_con_server_eo_base_constructor(Ecore_Con_Server *obj, Ecore_Con_Server_Data *svr)
{
obj = eo_do_super_ret(obj, ECORE_CON_SERVER_CLASS, obj, eo_constructor());
eo_super_eo_constructor(ECORE_CON_SERVER_CLASS, obj);
svr->fd = -1;
svr->reject_excess_clients = EINA_FALSE;
@ -392,7 +392,7 @@ _ecore_con_server_eo_base_finalize(Ecore_Con_Server *obj, Ecore_Con_Server_Data
Ecore_Con_Type compl_type = svr->type;
Ecore_Con_Type type;
eo_do_super(obj, ECORE_CON_SERVER_CLASS, eo_finalize());
eo_super_eo_finalize(ECORE_CON_SERVER_CLASS, obj);
svr->created = EINA_TRUE;
svr->ppid = getpid();
@ -462,10 +462,10 @@ ecore_con_server_connect(Ecore_Con_Type compl_type,
/* local user socket: FILE: ~/.ecore/[name]/[port] */
/* local system socket: FILE: /tmp/.ecore_service|[name]|[port] */
/* remote system socket: TCP/IP: [name]:[port] */
obj = eo_add(ECORE_CON_CONNECTOR_CLASS, NULL,
ecore_con_server_obj_connection_type_set(compl_type),
ecore_con_server_obj_name_set(name),
ecore_con_obj_port_set(port));
eo_add(obj, ECORE_CON_CONNECTOR_CLASS, NULL,
ecore_con_server_obj_connection_type_set(NULL, compl_type),
ecore_con_server_obj_name_set(NULL, name),
ecore_con_obj_port_set(NULL, port));
ecore_con_server_data_set(obj, (void *) data);
@ -481,7 +481,7 @@ _ecore_con_connector_eo_base_finalize(Ecore_Con_Server *obj, void *pd EINA_UNUSE
/* XXX: We intentionally put SERVER class here and not connector, as we'd
* like to skip that one. */
eo_do_super(obj, ECORE_CON_SERVER_CLASS, eo_finalize());
eo_super_eo_finalize(ECORE_CON_SERVER_CLASS, obj);
svr->use_cert = (compl_type & ECORE_CON_SSL & ECORE_CON_LOAD_CERT) == ECORE_CON_LOAD_CERT;
svr->disable_proxy = (compl_type & ECORE_CON_SUPER_SSL & ECORE_CON_NO_PROXY) == ECORE_CON_NO_PROXY;
@ -548,7 +548,7 @@ error:
EAPI void
ecore_con_server_timeout_set(Ecore_Con *obj, double timeout)
{
eo_do((Ecore_Con *)obj, ecore_con_obj_timeout_set(timeout));
eo_do((Ecore_Con *)obj, ecore_con_obj_timeout_set(obj, timeout));
}
EOLIAN static void
@ -566,7 +566,7 @@ EAPI double
ecore_con_server_timeout_get(const Ecore_Con *obj)
{
double ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_timeout_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_timeout_get(obj));
}
EOLIAN static double
@ -620,7 +620,7 @@ EAPI Eina_Bool
ecore_con_server_connected_get(const Ecore_Con *obj)
{
Eina_Bool ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_connected_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_connected_get(obj));
}
EOLIAN static Eina_Bool
@ -670,7 +670,7 @@ EAPI int
ecore_con_server_port_get(const Ecore_Con *obj)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_port_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_port_get(obj));
}
EOLIAN static void
@ -691,7 +691,7 @@ EAPI int
ecore_con_server_send(Ecore_Con *obj, const void *data, int size)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_send(data, size));
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_send(obj, data, size));
}
EOLIAN static int
@ -748,7 +748,7 @@ EAPI const char *
ecore_con_server_ip_get(const Ecore_Con *obj)
{
const char *ret;
return eo_do_ret(obj, ret, ecore_con_obj_ip_get());
return eo_do_ret(obj, ret, ecore_con_obj_ip_get(obj));
}
EOLIAN static const char *
@ -761,7 +761,7 @@ EAPI double
ecore_con_server_uptime_get(const Ecore_Con *obj)
{
double ret;
return eo_do_ret(obj, ret, ecore_con_obj_uptime_get());
return eo_do_ret(obj, ret, ecore_con_obj_uptime_get(obj));
}
EOLIAN static double
@ -773,7 +773,7 @@ _ecore_con_server_ecore_con_base_uptime_get(Eo *obj EINA_UNUSED, Ecore_Con_Serve
EAPI void
ecore_con_server_flush(Ecore_Con *obj)
{
eo_do((Ecore_Con *)obj, ecore_con_obj_flush());
eo_do((Ecore_Con *)obj, ecore_con_obj_flush(obj));
}
EOLIAN static void
@ -803,7 +803,7 @@ EAPI int
ecore_con_client_send(Ecore_Con *obj, const void *data, int size)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_send(data, size));
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_send(obj, data, size));
}
EOLIAN static int
@ -871,7 +871,7 @@ EAPI Eina_Bool
ecore_con_client_connected_get(const Ecore_Con *obj)
{
Eina_Bool ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_connected_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_connected_get(obj));
}
EOLIAN static void
@ -885,7 +885,7 @@ _ecore_con_client_ecore_con_base_timeout_set(Eo *obj, Ecore_Con_Client_Data *cl,
EAPI void
ecore_con_client_timeout_set(Ecore_Con *obj, double timeout)
{
eo_do((Ecore_Con *)obj, ecore_con_obj_timeout_set(timeout));
eo_do((Ecore_Con *)obj, ecore_con_obj_timeout_set(obj, timeout));
}
EOLIAN static double
@ -898,7 +898,7 @@ EAPI double
ecore_con_client_timeout_get(const Ecore_Con *obj)
{
double ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_timeout_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_timeout_get(obj));
}
EAPI void *
@ -950,7 +950,7 @@ EAPI const char *
ecore_con_client_ip_get(const Ecore_Con *obj)
{
const char *ret;
return eo_do_ret(obj, ret, ecore_con_obj_ip_get());
return eo_do_ret(obj, ret, ecore_con_obj_ip_get(obj));
}
EOLIAN static int
@ -978,7 +978,7 @@ EAPI int
ecore_con_client_port_get(const Ecore_Con *obj)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_port_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_port_get(obj));
}
EOLIAN static double
@ -991,7 +991,7 @@ EAPI double
ecore_con_client_uptime_get(const Ecore_Con *obj)
{
double ret;
return eo_do_ret(obj, ret, ecore_con_obj_uptime_get());
return eo_do_ret(obj, ret, ecore_con_obj_uptime_get(obj));
}
EOLIAN static void
@ -1003,14 +1003,14 @@ _ecore_con_client_ecore_con_base_flush(Eo *obj, Ecore_Con_Client_Data *cl EINA_U
EAPI void
ecore_con_client_flush(Ecore_Con *obj)
{
eo_do((Ecore_Con *)obj, ecore_con_obj_flush());
eo_do((Ecore_Con *)obj, ecore_con_obj_flush(obj));
}
EAPI int
ecore_con_server_fd_get(const Ecore_Con *obj)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_fd_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_fd_get(obj));
}
EOLIAN static int
@ -1031,7 +1031,7 @@ EAPI int
ecore_con_client_fd_get(const Ecore_Con *obj)
{
int ret;
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_fd_get());
return eo_do_ret((Ecore_Con *)obj, ret, ecore_con_obj_fd_get(obj));
}
/**
@ -1077,7 +1077,7 @@ ecore_con_event_server_add(Ecore_Con_Server *obj)
if (svr->upgrade) ev = ECORE_CON_EVENT_SERVER_UPGRADE;
ecore_event_add(ev, e,
_ecore_con_event_server_add_free, NULL);
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_CONNECTION_UPGRADED, NULL));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_CONNECTION_UPGRADED, NULL));
_ecore_con_event_count++;
}
@ -1156,7 +1156,7 @@ ecore_con_event_server_data(Ecore_Con_Server *obj, unsigned char *buf, int num,
Ecore_Con_Event_Data_Received event_info = { NULL, 0 };
event_info.data = e->data;
event_info.size = e->size;
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_DATA_RECEIVED, &event_info));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_DATA_RECEIVED, &event_info));
}
_ecore_con_event_count++;
}
@ -1181,7 +1181,7 @@ ecore_con_event_client_add(Ecore_Con_Client *obj)
if (cl->upgrade) ev = ECORE_CON_EVENT_CLIENT_UPGRADE;
ecore_event_add(ev, e,
(Ecore_End_Cb)_ecore_con_event_client_add_free, cl->host_server);
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_CONNECTION_UPGRADED, NULL));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_CONNECTION_UPGRADED, NULL));
_ecore_con_event_count++;
}
@ -1263,7 +1263,7 @@ ecore_con_event_client_data(Ecore_Con_Client *obj, unsigned char *buf, int num,
Ecore_Con_Event_Data_Received event_info = { NULL, 0 };
event_info.data = e->data;
event_info.size = e->size;
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_DATA_RECEIVED, &event_info));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_DATA_RECEIVED, &event_info));
}
_ecore_con_event_count++;
}
@ -1289,7 +1289,7 @@ _ecore_con_event_server_error(Ecore_Con_Server *obj, char *error, Eina_Bool dupl
DBG("%s", error);
svr->event_count = eina_list_append(svr->event_count, e);
ecore_event_add(ECORE_CON_EVENT_SERVER_ERROR, e, (Ecore_End_Cb)_ecore_con_event_server_error_free, NULL);
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_CONNECTION_ERROR, e->error));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_CONNECTION_ERROR, e->error));
_ecore_con_event_count++;
}
@ -1310,7 +1310,7 @@ ecore_con_event_client_error(Ecore_Con_Client *obj, const char *error)
cl->event_count = eina_list_append(cl->event_count, e);
host_server->event_count = eina_list_append(host_server->event_count, e);
ecore_event_add(ECORE_CON_EVENT_CLIENT_ERROR, e, (Ecore_End_Cb)_ecore_con_event_client_error_free, cl->host_server);
eo_do(obj, eo_event_callback_call(ECORE_CON_BASE_EVENT_CONNECTION_ERROR, e->error));
eo_do(obj, eo_event_callback_call(obj, ECORE_CON_BASE_EVENT_CONNECTION_ERROR, e->error));
_ecore_con_event_count++;
}
@ -1397,7 +1397,7 @@ _ecore_con_server_eo_base_destructor(Eo *obj, Ecore_Con_Server_Data *svr)
servers = eina_list_remove(servers, obj);
svr->data = NULL;
eo_do_super(obj, ECORE_CON_SERVER_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_CON_SERVER_CLASS, obj);
end:
return;
}
@ -1460,7 +1460,7 @@ _ecore_con_client_eo_base_destructor(Eo *obj, Ecore_Con_Client_Data *cl)
eina_stringshare_del(cl->ip);
cl->data = NULL;
eo_do_super(obj, ECORE_CON_CLIENT_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_CON_CLIENT_CLASS, obj);
}
static Eina_Bool
@ -2080,7 +2080,7 @@ _ecore_con_svr_tcp_handler(void *data,
/* a new client */
obj = eo_add(ECORE_CON_CLIENT_CLASS, NULL);
eo_add(obj, ECORE_CON_CLIENT_CLASS, NULL);
Ecore_Con_Client_Data *cl = eo_data_scope_get(obj, ECORE_CON_CLIENT_CLASS);
if (!cl)
{
@ -2355,7 +2355,7 @@ _ecore_con_svr_udp_handler(void *data,
}
/* Create a new client for use in the client data event */
obj = eo_add(ECORE_CON_CLIENT_CLASS, NULL);
eo_add(obj, ECORE_CON_CLIENT_CLASS, NULL);
Ecore_Con_Client_Data *cl = eo_data_scope_get(obj, ECORE_CON_CLIENT_CLASS);
EINA_SAFETY_ON_NULL_RETURN_VAL(cl, ECORE_CALLBACK_RENEW);

View File

@ -580,7 +580,7 @@ _ecore_con_eet_base_register(Eo *obj EINA_UNUSED, Ecore_Con_Eet_Base_Data *pd, c
EOLIAN static Eo_Base *
_ecore_con_eet_server_obj_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Server_Obj_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, ECORE_CON_EET_SERVER_OBJ_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECORE_CON_EET_SERVER_OBJ_CLASS, obj);
if (!obj) return NULL;
@ -615,13 +615,13 @@ _ecore_con_eet_server_obj_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Server_Obj_D
ecore_event_handler_del(pd->handler_del);
ecore_event_handler_del(pd->handler_data);
eo_do_super(obj, ECORE_CON_EET_SERVER_OBJ_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_CON_EET_SERVER_OBJ_CLASS, obj);
}
EOLIAN static Eo_Base *
_ecore_con_eet_client_obj_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Client_Obj_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, obj, eo_constructor());
eo_super_eo_constructor(ECORE_CON_EET_CLIENT_OBJ_CLASS, obj);
if (!obj) return NULL;
@ -654,13 +654,13 @@ _ecore_con_eet_client_obj_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Client_Obj_D
ecore_event_handler_del(pd->handler_del);
ecore_event_handler_del(pd->handler_data);
eo_do_super(obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_CON_EET_CLIENT_OBJ_CLASS, obj);
}
EOLIAN static Eo_Base *
_ecore_con_eet_base_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
{
obj = eo_do_super_ret(obj, ECORE_CON_EET_BASE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor(ECORE_CON_EET_BASE_CLASS, obj);
if (!obj) return NULL;
@ -675,7 +675,7 @@ _ecore_con_eet_base_eo_base_constructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
EOLIAN static void
_ecore_con_eet_base_eo_base_destructor(Eo *obj, Ecore_Con_Eet_Base_Data *pd)
{
eo_do_super(obj, ECORE_CON_EET_BASE_CLASS, eo_destructor());
eo_super_eo_destructor(ECORE_CON_EET_BASE_CLASS, obj);
eet_data_descriptor_free(pd->edd);
eet_data_descriptor_free(pd->matching);
@ -722,8 +722,8 @@ ecore_con_eet_server_new(Ecore_Con_Server *server)
if (!server) return NULL;
ece_obj = eo_add(ECORE_CON_EET_SERVER_OBJ_CLASS, NULL,
ecore_con_eet_base_server_set(server));
eo_add(ece_obj, ECORE_CON_EET_SERVER_OBJ_CLASS, NULL,
ecore_con_eet_base_server_set(NULL, server));
return ece_obj;
}
@ -735,8 +735,8 @@ ecore_con_eet_client_new(Ecore_Con_Server *server)
if (!server) return NULL;
ece_obj = eo_add(ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL,
ecore_con_eet_base_server_set(server));
eo_add(ece_obj, ECORE_CON_EET_CLIENT_OBJ_CLASS, NULL,
ecore_con_eet_base_server_set(NULL, server));
return ece_obj;
}
@ -750,31 +750,31 @@ ecore_con_eet_server_free(Ecore_Con_Eet *r)
EAPI void
ecore_con_eet_register(Ecore_Con_Eet *ece, const char *name, Eet_Data_Descriptor *edd)
{
eo_do(ece, ecore_con_eet_base_register(name, edd));
eo_do(ece, ecore_con_eet_base_register(ece, name, edd));
}
EAPI void
ecore_con_eet_data_callback_add(Ecore_Con_Eet *ece, const char *name, Ecore_Con_Eet_Data_Cb func, const void *data)
{
eo_do(ece, ecore_con_eet_base_data_callback_set(name, func, data));
eo_do(ece, ecore_con_eet_base_data_callback_set(ece, name, func, data));
}
EAPI void
ecore_con_eet_data_callback_del(Ecore_Con_Eet *ece, const char *name)
{
eo_do(ece, ecore_con_eet_base_data_callback_del(name));
eo_do(ece, ecore_con_eet_base_data_callback_del(ece, name));
}
EAPI void
ecore_con_eet_raw_data_callback_add(Ecore_Con_Eet *ece, const char *name, Ecore_Con_Eet_Raw_Data_Cb func, const void *data)
{
eo_do(ece, ecore_con_eet_base_raw_data_callback_set(name, func, data));
eo_do(ece, ecore_con_eet_base_raw_data_callback_set(ece, name, func, data));
}
EAPI void
ecore_con_eet_raw_data_callback_del(Ecore_Con_Eet *ece, const char *name)
{
eo_do(ece, ecore_con_eet_base_raw_data_callback_del(name));
eo_do(ece, ecore_con_eet_base_raw_data_callback_del(ece, name));
}
EAPI void
@ -920,7 +920,7 @@ ecore_con_eet_server_disconnect_callback_del(Ecore_Con_Eet *ece, Ecore_Con_Eet_S
EAPI void
ecore_con_eet_data_set(Ecore_Con_Eet *ece, const void *data)
{
eo_do(ece,eo_key_data_set(ECORE_CON_EET_DATA_KEY, data));
eo_do(ece,eo_key_data_set(ece, ECORE_CON_EET_DATA_KEY, data));
}
EAPI const void *
@ -928,7 +928,7 @@ ecore_con_eet_data_get(Ecore_Con_Eet *ece)
{
const void *temp;
return eo_do_ret(ece, temp, eo_key_data_get(ECORE_CON_EET_DATA_KEY));
return eo_do_ret(ece, temp, eo_key_data_get(ece, ECORE_CON_EET_DATA_KEY));
}
EAPI Ecore_Con_Eet *
@ -941,14 +941,14 @@ ecore_con_eet_reply(Ecore_Con_Reply *reply)
EAPI void
ecore_con_eet_send(Ecore_Con_Reply *reply, const char *name, void *value)
{
eo_do(reply->ece, ecore_con_eet_base_send(reply, name, value));
eo_do(reply->ece, ecore_con_eet_base_send(reply->ece, reply, name, value));
}
EAPI void
ecore_con_eet_raw_send(Ecore_Con_Reply *reply, const char *protocol_name, const char *section, void *value, unsigned int length)
{
eo_do(reply->ece,
ecore_con_eet_base_raw_send(reply, protocol_name, section, value,
ecore_con_eet_base_raw_send(reply->ece, reply, protocol_name, section, value,
length));
}

View File

@ -5,7 +5,7 @@ EAPI Eina_Bool
ecore_con_url_url_set(Ecore_Con_Url *obj, const char *url)
{
Eina_Bool ret;
eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_set(url));
eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_set(obj, url));
return ret;
}
@ -13,7 +13,7 @@ EAPI const char *
ecore_con_url_url_get(const Ecore_Con_Url *obj)
{
const char * ret;
eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_get());
eo_do((Ecore_Con_Url *)obj, ret = efl_network_url_get(obj));
return ret;
}

View File

@ -286,7 +286,8 @@ _ecore_con_local_win32_client_add(void *data, Ecore_Win32_Handler *wh)
(svr->client_count >= (unsigned int)svr->client_limit))
return ECORE_CALLBACK_CANCEL;
Ecore_Con_Client *cl_obj = eo_add(ECORE_CON_CLIENT_CLASS, NULL);
Ecore_Con_Client *cl_obj;
eo_add(cl_obj, ECORE_CON_CLIENT_CLASS, NULL);
Ecore_Con_Client_Data *cl = eo_data_scope_get(obj, ECORE_CON_CLIENT_CLASS);
if (!cl)
{

View File

@ -225,11 +225,11 @@ EAPI Ecore_Con_Url *
ecore_con_url_new(const char *url)
{
Ecore_Con_Url *url_obj;
url_obj = eo_add(EFL_NETWORK_URL_CLASS, NULL,
efl_network_url_set(url));
eo_add(url_obj, EFL_NETWORK_URL_CLASS, NULL,
efl_network_url_set(NULL, url));
eo_do(url_obj,
eo_event_callback_array_add(efl_network_url_event_table_callbacks(),
eo_event_callback_array_add(url_obj, efl_network_url_event_table_callbacks(),
NULL));
return url_obj;
@ -238,7 +238,7 @@ ecore_con_url_new(const char *url)
EOLIAN static Eo *
_efl_network_url_eo_base_constructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con EINA_UNUSED)
{
url_obj = eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_constructor());
url_obj = eo_super_eo_constructor( MY_CLASS, url_obj);
if (!_init_count || !_c_init())
{
@ -338,7 +338,7 @@ _efl_network_url_eo_base_finalize(Efl_Network_Url *url_obj, Efl_Network_Url_Data
*/
_c->curl_easy_setopt(url_con->curl_easy, CURLOPT_CONNECTTIMEOUT, 30);
_c->curl_easy_setopt(url_con->curl_easy, CURLOPT_FOLLOWLOCATION, 1);
return eo_do_super_ret(url_obj, MY_CLASS, url_obj, eo_finalize());
return eo_super_eo_finalize( MY_CLASS, url_obj);
}
EAPI Ecore_Con_Url *
@ -376,7 +376,7 @@ ecore_con_url_free(Ecore_Con_Url *url_obj)
return;
eo_do(url_obj,
eo_event_callback_array_del(efl_network_url_event_table_callbacks(),
eo_event_callback_array_del(url_obj, efl_network_url_event_table_callbacks(),
NULL));
eo_del(url_obj);
@ -400,7 +400,7 @@ _ecore_con_url_free_internal(Ecore_Con_Url *url_obj)
EOLIAN static void
_efl_network_url_eo_base_destructor(Efl_Network_Url *url_obj, Efl_Network_Url_Data *url_con)
{
eo_do_super(url_obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, url_obj);
if (!_c) return;
if (url_con->curl_easy)
@ -1145,7 +1145,7 @@ _ecore_con_url_event_url_complete(Ecore_Con_Url *url_obj, CURLMsg *curlmsg)
e.status = status;
e.url_con = url_obj;
url_con->event_count++;
eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_COMPLETE, &e));
eo_do(url_obj, eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_COMPLETE, &e));
}
static void
@ -1206,7 +1206,7 @@ _ecore_con_url_data_cb(void *buffer, size_t size, size_t nitems, void *userp)
e.size = real_size;
e.data = buffer;
url_con->event_count++;
eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_DATA, &e));
eo_do(url_obj, eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_DATA, &e));
}
else
{
@ -1265,7 +1265,7 @@ _ecore_con_url_progress_cb(void *clientp, double dltotal, double dlnow, double u
e.up.total = ultotal;
e.up.now = ulnow;
url_con->event_count++;
eo_do(url_obj, eo_event_callback_call(EFL_NETWORK_URL_EVENT_PROGRESS, &e));
eo_do(url_obj, eo_event_callback_call(url_obj, EFL_NETWORK_URL_EVENT_PROGRESS, &e));
return 0;
}

View File

@ -63,10 +63,10 @@ _ector_cairo_symbol_get(Eo *obj, const char *name)
Eo *parent;
void *sym;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return NULL;
eo_do(parent, sym = ector_cairo_surface_symbol_get(name));
eo_do(parent, sym = ector_cairo_surface_symbol_get(parent, name));
return sym;
}

View File

@ -61,14 +61,16 @@ _ector_cairo_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
Ector_Cairo_Surface_Data *pd EINA_UNUSED,
const Eo_Class *type)
{
Eo* o = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
return eo_add(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
eo_add(o, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj);
eo_add(o, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj);
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
return eo_add(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj);
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
eo_add(o, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj);
else
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return o;
}
typedef struct _cairo_surface_t cairo_surface_t;
@ -121,7 +123,7 @@ static Eo *
_ector_cairo_surface_eo_base_constructor(Eo *obj,
Ector_Cairo_Surface_Data *pd)
{
obj = eo_do_super_ret(obj, ECTOR_CAIRO_SURFACE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_CAIRO_SURFACE_CLASS, obj);
_cairo_count++;
_ector_cairo_surface_context_set(obj, pd, NULL);
@ -133,7 +135,7 @@ static void
_ector_cairo_surface_eo_base_destructor(Eo *obj EINA_UNUSED,
Ector_Cairo_Surface_Data *pd EINA_UNUSED)
{
eo_do_super(obj, ECTOR_CAIRO_SURFACE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_CAIRO_SURFACE_CLASS, obj);

View File

@ -101,7 +101,7 @@ _ector_renderer_cairo_base_ector_renderer_generic_base_prepare(Eo *obj, Ector_Re
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->parent = eo_data_xref(parent, ECTOR_CAIRO_SURFACE_CLASS, obj);
}
@ -198,7 +198,7 @@ _ector_renderer_cairo_base_ector_renderer_generic_base_draw(Eo *obj,
static Eo *
_ector_renderer_cairo_base_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Base_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_RENDERER_CAIRO_BASE_CLASS, obj);
pd->generic = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
@ -216,11 +216,11 @@ _ector_renderer_cairo_base_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Base
free(pd->m);
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->parent, obj);
eo_data_xunref(obj, pd->generic, obj);
eo_do_super(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_CAIRO_BASE_CLASS, obj);
}
#include "ector_renderer_cairo_base.eo.c"

View File

@ -51,13 +51,13 @@ static Eina_Bool
_ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_prepare(Eo *obj,
Ector_Renderer_Cairo_Gradient_Linear_Data *pd)
{
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_prepare());
eo_super_ector_renderer_prepare(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj);
if (!pd->parent)
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->parent = eo_data_xref(parent, ECTOR_CAIRO_SURFACE_CLASS, obj);
}
@ -82,7 +82,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_draw(Eo *obj,
pat = _ector_renderer_cairo_gradient_linear_prepare(obj, gld, gd, mul_col);
if (!pat) return EINA_FALSE;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, ector_renderer_draw(op, clips, mul_col));
eo_super_ector_renderer_draw(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj, op, clips, mul_col);
USE(obj, cairo_rectangle, EINA_FALSE);
USE(obj, cairo_fill, EINA_FALSE);
@ -147,10 +147,10 @@ _ector_renderer_cairo_gradient_linear_eo_base_destructor(Eo *obj,
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->parent, obj);
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj);
}
void
@ -159,8 +159,7 @@ _ector_renderer_cairo_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj,
const Efl_Gfx_Gradient_Stop *colors,
unsigned int length)
{
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS,
efl_gfx_gradient_stop_set(colors, length));
eo_super_efl_gfx_gradient_stop_set(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj, colors, length);
}
static unsigned int
@ -170,8 +169,7 @@ _ector_renderer_cairo_gradient_linear_ector_renderer_generic_base_crc_get(Eo *ob
Ector_Renderer_Generic_Gradient_Data *gd;
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS,
crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_CAIRO_GRADIENT_LINEAR_CLASS, obj);
gld = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN);
gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);

View File

@ -34,13 +34,13 @@ struct _Ector_Renderer_Cairo_Gradient_Radial_Data
static Eina_Bool
_ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_prepare(Eo *obj, Ector_Renderer_Cairo_Gradient_Radial_Data *pd)
{
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_prepare());
eo_super_ector_renderer_prepare(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj);
if (!pd->parent)
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->parent = eo_data_xref(parent, ECTOR_CAIRO_SURFACE_CLASS, obj);
}
@ -86,7 +86,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_draw(Eo *obj,
pat = _ector_renderer_cairo_gradient_radial_prepare(obj, grd, gd, mul_col);
if (!pat) return EINA_FALSE;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, ector_renderer_draw(op, clips, mul_col));
eo_super_ector_renderer_draw(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj, op, clips, mul_col);
USE(obj, cairo_arc, EINA_FALSE);
USE(obj, cairo_fill, EINA_FALSE);
@ -152,10 +152,10 @@ _ector_renderer_cairo_gradient_radial_eo_base_destructor(Eo *obj,
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->parent, obj);
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj);
}
void
@ -164,8 +164,7 @@ _ector_renderer_cairo_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj,
const Efl_Gfx_Gradient_Stop *colors,
unsigned int length)
{
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
efl_gfx_gradient_stop_set(colors, length));
eo_super_efl_gfx_gradient_stop_set(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj, colors, length);
}
static unsigned int
@ -175,8 +174,7 @@ _ector_renderer_cairo_gradient_radial_ector_renderer_generic_base_crc_get(Eo *ob
Ector_Renderer_Generic_Gradient_Data *gd;
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS,
crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_CAIRO_GRADIENT_RADIAL_CLASS, obj);
grd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN);
gd = eo_data_scope_get(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN);

View File

@ -85,27 +85,27 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_prepare(Eo *obj, Ector_R
const Efl_Gfx_Path_Command *cmds = NULL;
const double *pts = NULL;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_prepare());
eo_super_ector_renderer_prepare(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
if (pd->shape->fill)
eo_do(pd->shape->fill, ector_renderer_prepare());
eo_do(pd->shape->fill, ector_renderer_prepare(pd->shape->fill));
if (pd->shape->stroke.fill)
eo_do(pd->shape->stroke.fill, ector_renderer_prepare());
eo_do(pd->shape->stroke.fill, ector_renderer_prepare(pd->shape->stroke.fill));
if (pd->shape->stroke.marker)
eo_do(pd->shape->stroke.marker, ector_renderer_prepare());
eo_do(pd->shape->stroke.marker, ector_renderer_prepare(pd->shape->stroke.marker));
// shouldn't that be moved to the cairo base object
if (!pd->parent)
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->parent = eo_data_xref(parent, ECTOR_CAIRO_SURFACE_CLASS, obj);
if (!pd->parent) return EINA_FALSE;
}
eo_do(obj, efl_gfx_shape_path_get(&cmds, &pts));
eo_do(obj, efl_gfx_shape_path_get(obj, &cmds, &pts));
if (!pd->path && cmds)
{
USE(obj, cairo_new_path, EINA_FALSE);
@ -172,7 +172,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
USE(obj, cairo_save, EINA_FALSE);
cairo_save(pd->parent->cairo);
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, ector_renderer_draw(op, clips, mul_col));
eo_super_ector_renderer_draw(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj, op, clips, mul_col);
USE(obj, cairo_new_path, EINA_FALSE);
USE(obj, cairo_append_path, EINA_FALSE);
@ -181,7 +181,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
cairo_append_path(pd->parent->cairo, pd->path);
if (pd->shape->fill)
eo_do(pd->shape->fill, ector_renderer_cairo_base_fill(mul_col));
eo_do(pd->shape->fill, ector_renderer_cairo_base_fill(pd->shape->fill, mul_col));
if (pd->shape->stroke.fill || pd->shape->stroke.color.a > 0)
{
@ -195,7 +195,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_draw(Eo *obj, Ector_Rend
cairo_fill_preserve(pd->parent->cairo);
if (pd->shape->stroke.fill)
eo_do(pd->shape->stroke.fill, ector_renderer_cairo_base_fill(mul_col));
eo_do(pd->shape->stroke.fill, ector_renderer_cairo_base_fill(pd->shape->stroke.fill, mul_col));
else
{
r = (((pd->shape->stroke.color.r * R_VAL(&mul_col)) + 0xff) >> 8);
@ -256,7 +256,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_bounds_get(Eo *obj,
Ector_Renderer_Cairo_Base_Data *bd;
// FIXME: It should be possible to actually ask cairo about that
eo_do(obj, efl_gfx_shape_bounds_get(r));
eo_do(obj, efl_gfx_shape_bounds_get(obj, r));
bd = eo_data_scope_get(obj, ECTOR_RENDERER_CAIRO_BASE_CLASS);
r->x += bd->generic->origin.x;
@ -266,12 +266,12 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_bounds_get(Eo *obj,
Eo *
_ector_renderer_cairo_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Cairo_Shape_Data *pd)
{
obj = eo_do_super_ret(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
eo_do(obj,
eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_cairo_shape_path_changed, pd));
eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_cairo_shape_path_changed, pd));
return obj;
}
@ -282,15 +282,15 @@ _ector_renderer_cairo_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Cairo_Sha
Eo *parent;
//FIXME, As base class destructor can't call destructor of mixin class.
// call explicit API to free shape data.
eo_do(obj, efl_gfx_shape_reset());
eo_do(obj, efl_gfx_shape_reset(obj));
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->parent, obj);
eo_data_xunref(obj, pd->shape, obj);
eo_data_xunref(obj, pd->base, obj);
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
USE(obj, cairo_path_destroy, );
if (pd->path) cairo_path_destroy(pd->path);
@ -302,8 +302,7 @@ _ector_renderer_cairo_shape_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_CAIRO_SHAPE_CLASS,
crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_CAIRO_SHAPE_CLASS, obj);
crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
crc = eina_crc((void*) &pd->shape->stroke.scale, sizeof (pd->shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered

View File

@ -150,7 +150,7 @@ _renderer_crc_get(Eo *obj, unsigned int crc)
{
unsigned int id;
eo_do(obj, id = ector_renderer_crc_get());
eo_do(obj, id = ector_renderer_crc_get(obj));
crc = eina_crc((void*) &id, sizeof (id), crc, EINA_FALSE);
return crc;
}

View File

@ -11,7 +11,7 @@ static void
_ector_renderer_generic_base_eo_base_destructor(Eo *obj, Ector_Renderer_Generic_Base_Data *pd)
{
if (pd->m) free(pd->m);
eo_do_super(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
}
static void
@ -130,7 +130,7 @@ _ector_renderer_generic_base_prepare(Eo *obj EINA_UNUSED,
Ector_Renderer_Generic_Base_Data *pd)
{
if (pd->mask)
eo_do(pd->mask, ector_renderer_prepare());
eo_do(pd->mask, ector_renderer_prepare(pd->mask));
return EINA_TRUE;
}

View File

@ -42,7 +42,7 @@ _ector_renderer_software_gradient_linear_ector_renderer_generic_base_prepare(Eo
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->surface = eo_data_xref(parent, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
}
@ -75,7 +75,7 @@ Eo *
_ector_renderer_software_gradient_linear_eo_base_constructor(Eo *obj,
Ector_Renderer_Software_Gradient_Data *pd)
{
obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj);
pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj);
pd->gld = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN, obj);
@ -90,20 +90,19 @@ _ector_renderer_software_gradient_linear_eo_base_destructor(Eo *obj,
destroy_color_table(pd);
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->surface, obj);
eo_data_xunref(obj, pd->gd, obj);
eo_data_xunref(obj, pd->gld, obj);
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj);
}
void
_ector_renderer_software_gradient_linear_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
efl_gfx_gradient_stop_set(colors, length));
eo_super_efl_gfx_gradient_stop_set(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj, colors, length);
destroy_color_table(pd);
}
@ -113,8 +112,7 @@ _ector_renderer_software_gradient_linear_ector_renderer_generic_base_crc_get(Eo
{
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS,
crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj);
crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gd->colors_count)

View File

@ -52,7 +52,7 @@ _ector_renderer_software_gradient_radial_ector_renderer_generic_base_prepare(Eo
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->surface = eo_data_xref(parent, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
}
@ -83,7 +83,7 @@ Eo *
_ector_renderer_software_gradient_radial_eo_base_constructor(Eo *obj,
Ector_Renderer_Software_Gradient_Data *pd)
{
obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj);
pd->gd = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_MIXIN, obj);
pd->gld = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN, obj);
@ -98,20 +98,19 @@ _ector_renderer_software_gradient_radial_eo_base_destructor(Eo *obj,
destroy_color_table(pd);
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->surface, obj);
eo_data_xunref(obj, pd->gd, obj);
eo_data_xunref(obj, pd->gld, obj);
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj);
}
void
_ector_renderer_software_gradient_radial_efl_gfx_gradient_base_stop_set(Eo *obj, Ector_Renderer_Software_Gradient_Data *pd, const Efl_Gfx_Gradient_Stop *colors, unsigned int length)
{
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS,
efl_gfx_gradient_stop_set(colors, length));
eo_super_efl_gfx_gradient_stop_set(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj, colors, length);
destroy_color_table(pd);
}
@ -121,8 +120,8 @@ _ector_renderer_software_gradient_radial_ector_renderer_generic_base_crc_get(Eo
{
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS,
crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj);
crc = eina_crc((void*) pd->gd->s, sizeof (Efl_Gfx_Gradient_Spread), crc, EINA_FALSE);
if (pd->gd->colors_count)

View File

@ -520,7 +520,7 @@ _update_rle(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
Eina_Bool close_path;
Outline *outline, *dash_outline;
eo_do(obj, efl_gfx_shape_path_get(&cmds, &pts));
eo_do(obj, efl_gfx_shape_path_get(obj, &cmds, &pts));
if (cmds && (_generate_stroke_data(pd) || _generate_shape_data(pd)))
{
outline = _outline_create();
@ -570,17 +570,17 @@ _ector_renderer_software_shape_ector_renderer_generic_base_prepare(Eo *obj,
{
// FIXME: shouldn't that be part of the shape generic implementation ?
if (pd->shape->fill)
eo_do(pd->shape->fill, ector_renderer_prepare());
eo_do(pd->shape->fill, ector_renderer_prepare(pd->shape->fill));
if (pd->shape->stroke.fill)
eo_do(pd->shape->stroke.fill, ector_renderer_prepare());
eo_do(pd->shape->stroke.fill, ector_renderer_prepare(pd->shape->stroke.fill));
if (pd->shape->stroke.marker)
eo_do(pd->shape->stroke.marker, ector_renderer_prepare());
eo_do(pd->shape->stroke.marker, ector_renderer_prepare(pd->shape->stroke.marker));
// shouldn't that be moved to the software base object
if (!pd->surface)
{
Eo *parent;
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
if (!parent) return EINA_FALSE;
pd->surface = eo_data_xref(parent, ECTOR_SOFTWARE_SURFACE_CLASS, obj);
if (!pd->surface) return EINA_FALSE;
@ -609,7 +609,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
if (pd->shape->fill)
{
eo_do(pd->shape->fill, ector_renderer_software_base_fill());
eo_do(pd->shape->fill, ector_renderer_software_base_fill(pd->shape->fill));
ector_software_rasterizer_draw_rle_data(pd->surface->software,
x, y, mul_col, op,
pd->shape_data);
@ -631,7 +631,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_draw(Eo *obj,
if (pd->shape->stroke.fill)
{
eo_do(pd->shape->stroke.fill, ector_renderer_software_base_fill());
eo_do(pd->shape->stroke.fill, ector_renderer_software_base_fill(pd->shape->stroke.fill));
ector_software_rasterizer_draw_rle_data(pd->surface->software,
x, y, mul_col, op,
pd->outline_data);
@ -674,7 +674,7 @@ _ector_renderer_software_shape_efl_gfx_shape_path_set(Eo *obj,
pd->shape_data = NULL;
pd->outline_data = NULL;
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, efl_gfx_shape_path_set(op, points));
eo_super_efl_gfx_shape_path_set(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj, op, points);
}
@ -697,11 +697,11 @@ _ector_renderer_software_shape_path_changed(void *data, Eo *obj EINA_UNUSED,
Eo *
_ector_renderer_software_shape_eo_base_constructor(Eo *obj, Ector_Renderer_Software_Shape_Data *pd)
{
obj = eo_do_super_ret(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj);
pd->shape = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_SHAPE_MIXIN, obj);
pd->base = eo_data_xref(obj, ECTOR_RENDERER_GENERIC_BASE_CLASS, obj);
eo_do(obj,
eo_event_callback_add(EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd));
eo_event_callback_add(obj, EFL_GFX_PATH_CHANGED, _ector_renderer_software_shape_path_changed, pd));
return obj;
}
@ -712,17 +712,17 @@ _ector_renderer_software_shape_eo_base_destructor(Eo *obj, Ector_Renderer_Softwa
Eo *parent;
//FIXME, As base class destructor can't call destructor of mixin class.
// call explicit API to free shape data.
eo_do(obj, efl_gfx_shape_reset());
eo_do(obj, efl_gfx_shape_reset(obj));
if (pd->shape_data) ector_software_rasterizer_destroy_rle_data(pd->shape_data);
if (pd->outline_data) ector_software_rasterizer_destroy_rle_data(pd->outline_data);
eo_do(obj, parent = eo_parent_get());
eo_do(obj, parent = eo_parent_get(obj));
eo_data_xunref(parent, pd->surface, obj);
eo_data_xunref(obj, pd->shape, obj);
eo_data_xunref(obj, pd->base, obj);
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj);
}
@ -732,7 +732,7 @@ _ector_renderer_software_shape_ector_renderer_generic_base_crc_get(Eo *obj,
{
unsigned int crc;
eo_do_super(obj, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, crc = ector_renderer_crc_get());
crc = eo_super_ector_renderer_crc_get(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj);
crc = eina_crc((void*) &pd->shape->stroke.marker, sizeof (pd->shape->stroke.marker), crc, EINA_FALSE);
crc = eina_crc((void*) &pd->shape->stroke.scale, sizeof (pd->shape->stroke.scale) * 3, crc, EINA_FALSE); // scale, width, centered

View File

@ -18,14 +18,16 @@ _ector_software_surface_ector_generic_surface_renderer_factory_new(Eo *obj,
Ector_Software_Surface_Data *pd EINA_UNUSED,
const Eo_Class *type)
{
Eo* o = NULL;
if (type == ECTOR_RENDERER_GENERIC_SHAPE_MIXIN)
return eo_add(ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj);
eo_add(o, ECTOR_RENDERER_SOFTWARE_SHAPE_CLASS, obj);
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_LINEAR_MIXIN)
return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj);
eo_add(o, ECTOR_RENDERER_SOFTWARE_GRADIENT_LINEAR_CLASS, obj);
else if (type == ECTOR_RENDERER_GENERIC_GRADIENT_RADIAL_MIXIN)
return eo_add(ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj);
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return NULL;
eo_add(o, ECTOR_RENDERER_SOFTWARE_GRADIENT_RADIAL_CLASS, obj);
else
ERR("Couldn't find class for type: %s\n", eo_class_name_get(type));
return o;
}
static void
@ -67,7 +69,7 @@ static Eo *
_ector_software_surface_eo_base_constructor(Eo *obj,
Ector_Software_Surface_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, ECTOR_SOFTWARE_SURFACE_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( ECTOR_SOFTWARE_SURFACE_CLASS, obj);
pd->software = (Software_Rasterizer *) calloc(1, sizeof(Software_Rasterizer));
ector_software_rasterizer_init(pd->software);
return obj;
@ -80,7 +82,7 @@ _ector_software_surface_eo_base_destructor(Eo *obj EINA_UNUSED,
ector_software_rasterizer_done(pd->software);
free(pd->software);
pd->software = NULL;
eo_do_super(obj, ECTOR_SOFTWARE_SURFACE_CLASS, eo_destructor());
eo_super_eo_destructor(ECTOR_SOFTWARE_SURFACE_CLASS, obj);
}
static void

View File

@ -58,12 +58,12 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
eina_quaternion_scale(&quaternion, &quaternion, 1/norm); \
\
eo_do(ep->node, \
evas_canvas3d_node_orientation_set(quaternion.x, quaternion.y, \
evas_canvas3d_node_orientation_set(ep->node, quaternion.x, quaternion.y, \
quaternion.z, quaternion.w));
#define SET_LOOK_AT(type) \
eo_do(ep->node, \
evas_canvas3d_node_look_at_set(pd_##type->type.position.space, \
evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, \
pd_##type->type.orientation.data[0], \
pd_##type->type.orientation.data[1], \
pd_##type->type.orientation.data[2], \
@ -77,9 +77,9 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
Evas_Real x, y ,z; \
look_to = ed->table_parts[pd_##type->type.orientation.look_to % ed->table_parts_size]; \
eo_do(look_to->node, \
evas_canvas3d_node_position_get(pd_##type->type.position.space, &x, &y, &z)); \
evas_canvas3d_node_position_get(look_to->node, pd_##type->type.position.space, &x, &y, &z)); \
eo_do(ep->node, \
evas_canvas3d_node_look_at_set(pd_##type->type.position.space, x, y, z, \
evas_canvas3d_node_look_at_set(ep->node, pd_##type->type.position.space, x, y, z, \
pd_##type->type.position.space, \
pd_##type->type.orientation.data[3], \
pd_##type->type.orientation.data[4], \
@ -87,7 +87,7 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
#define SET_ANGLE_AXIS(type) \
eo_do(ep->node, \
evas_canvas3d_node_orientation_angle_axis_set(pd_##type->type.orientation.data[0], \
evas_canvas3d_node_orientation_angle_axis_set(ep->node, pd_##type->type.orientation.data[0], \
pd_##type->type.orientation.data[1], \
pd_##type->type.orientation.data[2], \
pd_##type->type.orientation.data[3]));
@ -843,7 +843,7 @@ _edje_recalc_do(Edje *ed)
if (!ed->calc_only)
{
if (ed->recalc_call)
eo_do(ed->obj, eo_event_callback_call(EDJE_OBJECT_EVENT_RECALC, NULL));
eo_do(ed->obj, eo_event_callback_call(ed->obj, EDJE_OBJECT_EVENT_RECALC, NULL));
}
else
evas_object_smart_need_recalculate_set(ed->obj, need_calc);
@ -855,8 +855,8 @@ _edje_recalc_do(Edje *ed)
ed->recalc_hints = EINA_FALSE;
eo_do(ed->obj, edje_obj_size_min_calc(&w, &h));
eo_do(ed->obj, evas_obj_size_hint_min_set(w, h));
eo_do(ed->obj, edje_obj_size_min_calc(ed->obj, &w, &h));
eo_do(ed->obj, evas_obj_size_hint_min_set(ed->obj, w, h));
}
if (!ed->collection) return;
@ -1436,8 +1436,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
if (ep->part->scale) base_s = TO_DOUBLE(sc);
eo_do(ep->object,
evas_obj_scale_set(base_s),
evas_obj_textblock_size_native_get(&tw, &th));
evas_obj_scale_set(ep->object, base_s),
evas_obj_textblock_size_native_get(ep->object, &tw, &th));
orig_s = base_s;
/* Now make it bigger so calculations will be more accurate
@ -1446,8 +1446,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
orig_s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
orig_s * TO_INT(params->eval.w) / tw);
eo_do(ep->object,
evas_obj_scale_set(orig_s),
evas_obj_textblock_size_native_get(&tw, &th));
evas_obj_scale_set(ep->object, orig_s),
evas_obj_textblock_size_native_get(ep->object, &tw, &th));
}
if (chosen_desc->text.fit_x)
{
@ -1456,8 +1456,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
s = _edje_part_recalc_single_textblock_scale_range_adjust(chosen_desc, base_s,
orig_s * TO_INT(params->eval.w) / tw);
eo_do(ep->object,
evas_obj_scale_set(s),
evas_obj_textblock_size_native_get(NULL, NULL));
evas_obj_scale_set(ep->object, s),
evas_obj_textblock_size_native_get(ep->object, NULL, NULL));
}
}
if (chosen_desc->text.fit_y)
@ -1474,8 +1474,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
}
eo_do(ep->object,
evas_obj_scale_set(s),
evas_obj_textblock_size_native_get(NULL, NULL));
evas_obj_scale_set(ep->object, s),
evas_obj_textblock_size_native_get(ep->object, NULL, NULL));
}
}
@ -1485,7 +1485,7 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
int i = 5; /* Tries before we give up. */
Evas_Coord fw, fh;
eo_do(ep->object,
evas_obj_textblock_size_native_get(&fw, &fh));
evas_obj_textblock_size_native_get(ep->object, &fw, &fh));
/* If we are still too big, try reducing the size to
* 95% each try. */
@ -1501,8 +1501,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
s = tmp_s;
eo_do(ep->object,
evas_obj_scale_set(s),
evas_obj_textblock_size_native_get(&fw, &fh));
evas_obj_scale_set(ep->object, s),
evas_obj_textblock_size_native_get(ep->object, &fw, &fh));
i--;
}
}
@ -1535,8 +1535,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
if (!chosen_desc->text.min_x)
{
eo_do(ep->object,
efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
evas_obj_textblock_size_formatted_get(&tw, &th));
efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h)),
evas_obj_textblock_size_formatted_get(ep->object, &tw, &th));
}
else
evas_object_textblock_size_native_get(ep->object, &tw, &th);
@ -1563,8 +1563,8 @@ _edje_part_recalc_single_textblock(FLOAT_T sc,
if (!chosen_desc->text.max_x)
{
eo_do(ep->object,
efl_gfx_size_set(TO_INT(params->eval.w), TO_INT(params->eval.h)),
evas_obj_textblock_size_formatted_get(&tw, &th));
efl_gfx_size_set(ep->object, TO_INT(params->eval.w), TO_INT(params->eval.h)),
evas_obj_textblock_size_formatted_get(ep->object, &tw, &th));
}
else
evas_object_textblock_size_native_get(ep->object, &tw, &th);
@ -1651,7 +1651,7 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
return;
// Note: No need to add padding to that, it's already in the geometry
eo_do(ep->object, efl_gfx_size_get(&mw, &mh));
eo_do(ep->object, efl_gfx_size_get(ep->object, &mw, &mh));
if (chosen_desc->text.max_x)
{
@ -2503,7 +2503,7 @@ _edje_part_recalc_single_filter(Edje *ed,
code = _edje_filter_get(ed, filter);
if (!code)
{
eo_do(obj, efl_gfx_filter_program_set(NULL, NULL));
eo_do(obj, efl_gfx_filter_program_set(obj, NULL, NULL));
return;
}
@ -2525,7 +2525,7 @@ _edje_part_recalc_single_filter(Edje *ed,
continue;
if (!data->value)
{
efl_gfx_filter_data_set(data->name, NULL, EINA_FALSE);
efl_gfx_filter_data_set(obj, data->name, NULL, EINA_FALSE);
}
else if (!strncmp(data->value, "color_class('", sizeof("color_class('") - 1))
{
@ -2555,7 +2555,7 @@ _edje_part_recalc_single_filter(Edje *ed,
(int) cc->r2, (int) cc->g2, (int) cc->b2, (int) cc->a2,
(int) cc->r3, (int) cc->g3, (int) cc->b3, (int) cc->a3);
buffer[len - 1] = 0;
efl_gfx_filter_data_set(data->name, buffer, EINA_TRUE);
efl_gfx_filter_data_set(obj, data->name, buffer, EINA_TRUE);
}
else
{
@ -2572,10 +2572,10 @@ _edje_part_recalc_single_filter(Edje *ed,
}
}
else
efl_gfx_filter_data_set(data->name, data->value, EINA_FALSE);
efl_gfx_filter_data_set(obj, data->name, data->value, EINA_FALSE);
}
}
efl_gfx_filter_program_set(code, filter->name);
efl_gfx_filter_program_set(obj, code, filter->name);
if (prev_sources != filter_sources)
{
/* remove sources that are not there anymore
@ -2595,12 +2595,12 @@ _edje_part_recalc_single_filter(Edje *ed,
{
part = strchr(src1, ':');
if (!part)
efl_gfx_filter_source_set(src1, NULL);
efl_gfx_filter_source_set(obj, src1, NULL);
else
{
char *name = strdup(src1);
name[part - src1] = 0;
efl_gfx_filter_source_set(name, NULL);
efl_gfx_filter_source_set(obj, name, NULL);
free(name);
}
}
@ -2619,20 +2619,20 @@ _edje_part_recalc_single_filter(Edje *ed,
else
part = src1;
rp = _edje_real_part_get(ed, part);
efl_gfx_filter_source_set(name ? name : part, rp ? rp->object : NULL);
efl_gfx_filter_source_set(obj, name ? name : part, rp ? rp->object : NULL);
free(name);
}
}
/* pass edje state for transitions */
if (ep->param2)
{
efl_gfx_filter_state_set(chosen_desc->state.name, chosen_desc->state.value,
efl_gfx_filter_state_set(obj, chosen_desc->state.name, chosen_desc->state.value,
ep->param2->description->state.name, ep->param2->description->state.value,
pos);
}
else
{
efl_gfx_filter_state_set(chosen_desc->state.name, chosen_desc->state.value,
efl_gfx_filter_state_set(obj, chosen_desc->state.name, chosen_desc->state.value,
NULL, 0.0, pos);
}
);
@ -2812,9 +2812,9 @@ _edje_part_recalc_single(Edje *ed,
Evas_Coord lminw = 0, lminh = 0;
eo_do(ep->object,
evas_obj_smart_need_recalculate_set(1),
evas_obj_smart_calculate(),
evas_obj_size_hint_min_get(&lminw, &lminh));
evas_obj_smart_need_recalculate_set(ep->object, 1),
evas_obj_smart_calculate(ep->object),
evas_obj_size_hint_min_get(ep->object, &lminw, &lminh));
if (((Edje_Part_Description_Table *)chosen_desc)->table.min.h)
{
if (lminw > minw) minw = lminw;
@ -2831,9 +2831,9 @@ _edje_part_recalc_single(Edje *ed,
Evas_Coord lminw = 0, lminh = 0;
eo_do(ep->object,
evas_obj_smart_need_recalculate_set(1),
evas_obj_smart_calculate(),
evas_obj_size_hint_min_get(&lminw, &lminh));
evas_obj_smart_need_recalculate_set(ep->object, 1),
evas_obj_smart_calculate(ep->object),
evas_obj_size_hint_min_get(ep->object, &lminw, &lminh));
if (((Edje_Part_Description_Box *)chosen_desc)->box.min.h)
{
if (lminw > minw) minw = lminw;
@ -2994,14 +2994,14 @@ _edje_table_recalc_apply(Edje *ed EINA_UNUSED,
Edje_Part_Description_Table *chosen_desc)
{
eo_do(ep->object,
evas_obj_table_homogeneous_set(chosen_desc->table.homogeneous),
evas_obj_table_align_set(TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y)),
evas_obj_table_padding_set(chosen_desc->table.padding.x, chosen_desc->table.padding.y));
evas_obj_table_homogeneous_set(ep->object, chosen_desc->table.homogeneous),
evas_obj_table_align_set(ep->object, TO_DOUBLE(chosen_desc->table.align.x), TO_DOUBLE(chosen_desc->table.align.y)),
evas_obj_table_padding_set(ep->object, chosen_desc->table.padding.x, chosen_desc->table.padding.y));
if (evas_object_smart_need_recalculate_get(ep->object))
{
eo_do(ep->object,
evas_obj_smart_need_recalculate_set(0),
evas_obj_smart_calculate());
evas_obj_smart_need_recalculate_set(ep->object, 0),
evas_obj_smart_calculate(ep->object));
}
}
@ -3064,13 +3064,13 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
}
eo_do(ep->object,
efl_gfx_fill_set(p3->type.common.fill.x,
efl_gfx_fill_set(ep->object, p3->type.common.fill.x,
p3->type.common.fill.y,
p3->type.common.fill.w,
p3->type.common.fill.h),
efl_image_smooth_scale_set(p3->smooth),
evas_obj_image_source_visible_set(chosen_desc->proxy.source_visible),
evas_obj_image_source_clip_set(chosen_desc->proxy.source_clip));
efl_image_smooth_scale_set(ep->object, p3->smooth),
evas_obj_image_source_visible_set(ep->object, chosen_desc->proxy.source_visible),
evas_obj_image_source_clip_set(ep->object, chosen_desc->proxy.source_clip));
}
static void
@ -3105,9 +3105,9 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
}
eo_do(ep->object,
efl_gfx_fill_set(p3->type.common.fill.x, p3->type.common.fill.y,
efl_gfx_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y,
p3->type.common.fill.w, p3->type.common.fill.h),
efl_image_smooth_scale_set(p3->smooth));
efl_image_smooth_scale_set(ep->object, p3->smooth));
if (chosen_desc->image.border.scale)
{
if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0))
@ -4345,7 +4345,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
/* visibility and color have no meaning on SWALLOW and GROUP part. */
#ifdef HAVE_EPHYSICS
eo_do(ep->object,
efl_gfx_size_set(pf->final.w, pf->final.h));
efl_gfx_size_set(ep->object, pf->final.w, pf->final.h));
if ((ep->part->physics_body) && (!ep->body))
{
if (_edje_physics_world_geometry_check(ed->world))
@ -4363,7 +4363,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
}
else
eo_do(ep->object,
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y));
efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y));
#else
eo_do(ep->object,
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
@ -4373,8 +4373,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (ep->nested_smart) /* Move, Resize all nested parts */
{ /* Not really needed but will improve the bounding box evaluation done by Evas */
eo_do(ep->nested_smart,
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
efl_gfx_size_set(pf->final.w, pf->final.h));
efl_gfx_position_set(ep->nested_smart, ed->x + pf->final.x, ed->y + pf->final.y),
efl_gfx_size_set(ep->nested_smart, pf->final.w, pf->final.h));
}
if (ep->part->entry_mode > EDJE_ENTRY_EDIT_MODE_NONE)
_edje_entry_real_part_configure(ed, ep);
@ -4406,14 +4406,14 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Edje_Part_Description_Camera *pd_camera;
pd_camera = (Edje_Part_Description_Camera*) ep->chosen_description;
eo_do(ep->node, camera = evas_canvas3d_node_camera_get());
eo_do(ep->node, camera = evas_canvas3d_node_camera_get(ep->node));
eo_do(camera,
evas_canvas3d_camera_projection_perspective_set(pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect,
evas_canvas3d_camera_projection_perspective_set(camera, pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect,
pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far));
eo_do(ep->node,
evas_canvas3d_node_position_set(pd_camera->camera.position.point.x, pd_camera->camera.position.point.y,
evas_canvas3d_node_position_set(ep->node, pd_camera->camera.position.point.x, pd_camera->camera.position.point.y,
pd_camera->camera.position.point.z));
switch (pd_camera->camera.orientation.type)
{
@ -4443,19 +4443,19 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Edje_Part_Description_Light *pd_light;
pd_light = (Edje_Part_Description_Light*) ep->chosen_description;
eo_do(ep->node, light_node = evas_canvas3d_node_light_get());
eo_do(ep->node, light_node = evas_canvas3d_node_light_get(ep->node));
eo_do(light_node,
evas_canvas3d_light_ambient_set(pd_light->light.properties.ambient.r / 255, pd_light->light.properties.ambient.g / 255,
evas_canvas3d_light_ambient_set(light_node, pd_light->light.properties.ambient.r / 255, pd_light->light.properties.ambient.g / 255,
pd_light->light.properties.ambient.b / 255, pd_light->light.properties.ambient.a / 255),
evas_canvas3d_light_diffuse_set(pd_light->light.properties.diffuse.r / 255, pd_light->light.properties.diffuse.g / 255,
evas_canvas3d_light_diffuse_set(light_node, pd_light->light.properties.diffuse.r / 255, pd_light->light.properties.diffuse.g / 255,
pd_light->light.properties.diffuse.b / 255, pd_light->light.properties.diffuse.a / 255),
evas_canvas3d_light_specular_set(pd_light->light.properties.specular.r / 255, pd_light->light.properties.specular.g / 255,
evas_canvas3d_light_specular_set(light_node, pd_light->light.properties.specular.r / 255, pd_light->light.properties.specular.g / 255,
pd_light->light.properties.specular.b / 255, pd_light->light.properties.specular.a / 255),
evas_canvas3d_light_directional_set(EINA_TRUE));
evas_canvas3d_light_directional_set(light_node, EINA_TRUE));
eo_do(ep->node,
evas_canvas3d_node_position_set(pd_light->light.position.point.x, pd_light->light.position.point.y,
evas_canvas3d_node_position_set(ep->node, pd_light->light.position.point.x, pd_light->light.position.point.y,
pd_light->light.position.point.z));
switch (pd_light->light.orientation.type)
{
@ -4489,36 +4489,36 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
const Eina_List *meshes;
const Eina_List *list;
eo_do(ep->node, meshes = evas_canvas3d_node_mesh_list_get());
eo_do(ep->node, meshes = evas_canvas3d_node_mesh_list_get(ep->node));
EINA_LIST_FOREACH(meshes, list, mesh)
{
eo_do(mesh, material = evas_canvas3d_mesh_frame_material_get(0));
eo_do(material, texture = evas_canvas3d_material_texture_get(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE));
eo_do(mesh, material = evas_canvas3d_mesh_frame_material_get(mesh, 0));
eo_do(material, texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE));
pd_mesh_node = (Edje_Part_Description_Mesh_Node*) ep->chosen_description;
eo_do(material,
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
evas_canvas3d_material_enable_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, pd_mesh_node->mesh_node.properties.normal),
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT, EINA_TRUE),
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE, EINA_TRUE),
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR, EINA_TRUE),
evas_canvas3d_material_enable_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_NORMAL, pd_mesh_node->mesh_node.properties.normal),
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_AMBIENT,
pd_mesh_node->mesh_node.properties.ambient.r / 255,
pd_mesh_node->mesh_node.properties.ambient.g / 255,
pd_mesh_node->mesh_node.properties.ambient.b / 255,
pd_mesh_node->mesh_node.properties.ambient.a / 255),
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE,
pd_mesh_node->mesh_node.properties.diffuse.r / 255,
pd_mesh_node->mesh_node.properties.diffuse.g / 255,
pd_mesh_node->mesh_node.properties.diffuse.b / 255,
pd_mesh_node->mesh_node.properties.diffuse.a / 255),
evas_canvas3d_material_color_set(EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
evas_canvas3d_material_color_set(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_SPECULAR,
pd_mesh_node->mesh_node.properties.specular.r / 255,
pd_mesh_node->mesh_node.properties.specular.g / 255,
pd_mesh_node->mesh_node.properties.specular.b / 255,
pd_mesh_node->mesh_node.properties.specular.a / 255),
evas_canvas3d_material_shininess_set(pd_mesh_node->mesh_node.properties.shininess));
evas_canvas3d_material_shininess_set(material, pd_mesh_node->mesh_node.properties.shininess));
switch(pd_mesh_node->mesh_node.mesh.primitive)
{
@ -4527,10 +4527,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Eo *primitive = NULL;
eo_do(primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_CUBE));
eo_do(mesh,
evas_canvas3d_mesh_from_primitive_set(0, primitive));
evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive));
break;
}
case EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE:
@ -4538,11 +4538,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
Eo *primitive = NULL;
eo_do(primitive,
evas_canvas3d_primitive_form_set(EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(20));
evas_canvas3d_primitive_form_set(primitive, EVAS_CANVAS3D_MESH_PRIMITIVE_SPHERE),
evas_canvas3d_primitive_precision_set(primitive, 20));
eo_do(mesh,
evas_canvas3d_mesh_from_primitive_set(0, primitive));
evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive));
break;
}
default:
@ -4554,7 +4554,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
proxy = NULL;
eo_do(material,
texture = evas_canvas3d_material_texture_get(EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE));
texture = evas_canvas3d_material_texture_get(material, EVAS_CANVAS3D_MATERIAL_ATTRIB_DIFFUSE));
//proxy = _edje_image_name_find(ed, pd_mesh_node->mesh_node.texture.id);
/*FIXME Conflict with function _edje_image_name_find (two places in edje_utils and edje_edit.c,
@ -4563,22 +4563,22 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (proxy)
{
eo_do(texture,
evas_canvas3d_texture_file_set(eina_stringshare_add(proxy), NULL),
evas_canvas3d_texture_filter_set(pd_mesh_node->mesh_node.texture.filter1,
evas_canvas3d_texture_file_set(texture, eina_stringshare_add(proxy), NULL),
evas_canvas3d_texture_filter_set(texture, pd_mesh_node->mesh_node.texture.filter1,
pd_mesh_node->mesh_node.texture.filter2),
evas_canvas3d_texture_wrap_set(pd_mesh_node->mesh_node.texture.wrap1,
evas_canvas3d_texture_wrap_set(texture, pd_mesh_node->mesh_node.texture.wrap1,
pd_mesh_node->mesh_node.texture.wrap2));
}
}
eo_do(mesh,
evas_canvas3d_mesh_frame_material_set(0, material),
evas_canvas3d_mesh_shade_mode_set(pd_mesh_node->mesh_node.properties.shade),
evas_canvas3d_mesh_vertex_assembly_set(pd_mesh_node->mesh_node.mesh.assembly));
evas_canvas3d_mesh_frame_material_set(mesh, 0, material),
evas_canvas3d_mesh_shade_mode_set(mesh, pd_mesh_node->mesh_node.properties.shade),
evas_canvas3d_mesh_vertex_assembly_set(mesh, pd_mesh_node->mesh_node.mesh.assembly));
eo_do(ep->node,
evas_canvas3d_node_scale_set(ep->part->scale_3d.x, ep->part->scale_3d.y,
evas_canvas3d_node_scale_set(ep->node, ep->part->scale_3d.x, ep->part->scale_3d.y,
ep->part->scale_3d.z),
evas_canvas3d_node_position_set(pd_mesh_node->mesh_node.position.point.x,
evas_canvas3d_node_position_set(ep->node, pd_mesh_node->mesh_node.position.point.x,
pd_mesh_node->mesh_node.position.point.y,
pd_mesh_node->mesh_node.position.point.z));
switch (pd_mesh_node->mesh_node.orientation.type)
@ -4668,9 +4668,9 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (ep->part->type == EDJE_PART_TYPE_GROUP)
vis = evas_object_visible_get(ed->obj);
eo_do(ep->typedata.swallow->swallowed_object,
efl_gfx_position_set(ed->x + pf->final.x, ed->y + pf->final.y),
efl_gfx_size_set(pf->final.w, pf->final.h),
efl_gfx_visible_set(vis));
efl_gfx_position_set(ep->typedata.swallow->swallowed_object, ed->x + pf->final.x, ed->y + pf->final.y),
efl_gfx_size_set(ep->typedata.swallow->swallowed_object, pf->final.w, pf->final.h),
efl_gfx_visible_set(ep->typedata.swallow->swallowed_object, vis));
}
else evas_object_hide(ep->typedata.swallow->swallowed_object);
mo = ep->typedata.swallow->swallowed_object;
@ -4694,8 +4694,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (map_obj)
{
eo_do(map_obj,
evas_obj_map_set(map),
evas_obj_map_enable_set(EINA_TRUE));
evas_obj_map_set(map_obj, map),
evas_obj_map_enable_set(map_obj, EINA_TRUE));
}
}
else
@ -4703,8 +4703,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
if (ep->nested_smart) /* Cancel map of smart obj holding nested parts */
{
eo_do(ep->nested_smart,
evas_obj_map_enable_set(EINA_FALSE),
evas_obj_map_set(NULL));
evas_obj_map_enable_set(ep->nested_smart, EINA_FALSE),
evas_obj_map_set(ep->nested_smart, NULL));
}
else
{
@ -4714,8 +4714,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
#endif
if (mo)
eo_do(mo,
evas_obj_map_enable_set(0),
evas_obj_map_set(NULL));
evas_obj_map_enable_set(mo, 0),
evas_obj_map_set(mo, NULL));
#ifdef HAVE_EPHYSICS
}
#endif

View File

@ -466,28 +466,28 @@ EO_CALLBACKS_ARRAY_DEFINE(edje_focus_callbacks,
void
_edje_callbacks_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
{
eo_do(obj, eo_event_callback_array_add(edje_callbacks(), ed));
eo_do(obj, eo_event_callback_array_add(obj, edje_callbacks(), ed));
evas_object_data_set(obj, "real_part", rp);
}
void
_edje_callbacks_del(Evas_Object *obj, Edje *ed)
{
eo_do(obj, eo_event_callback_array_del(edje_callbacks(), ed));
eo_do(obj, eo_event_callback_array_del(obj, edje_callbacks(), ed));
evas_object_data_del(obj, "real_part");
}
void
_edje_callbacks_focus_add(Evas_Object *obj, Edje *ed, Edje_Real_Part *rp)
{
eo_do(obj, eo_event_callback_array_add(edje_focus_callbacks(), ed));
eo_do(obj, eo_event_callback_array_add(obj, edje_focus_callbacks(), ed));
evas_object_data_set(obj, "real_part", rp);
}
void
_edje_callbacks_focus_del(Evas_Object *obj, Edje *ed)
{
eo_do(obj, eo_event_callback_array_del(edje_focus_callbacks(), ed));
eo_do(obj, eo_event_callback_array_del(obj, edje_focus_callbacks(), ed));
evas_object_data_del(obj, "real_part");
}

View File

@ -152,7 +152,7 @@ _edje_edit_evas_object_smart_del(Eo *obj, Edje_Edit *eed)
{
_edje_edit_data_clean(eed);
eo_do_super(obj, MY_CLASS, evas_obj_smart_del());
eo_super_evas_obj_smart_del(MY_CLASS, obj);
}
static void
@ -190,7 +190,7 @@ _edje_edit_efl_file_file_set(Eo *obj, Edje_Edit *eed, const char *file, const ch
* groups).
*/
Eina_Bool int_ret = EINA_FALSE;
eo_do_super(obj, MY_CLASS, int_ret = efl_file_set(file, group));
int_ret = eo_super_efl_file_set(MY_CLASS, obj, file, group);
if (!int_ret)
return ret;
@ -231,7 +231,7 @@ EAPI Evas_Object *
edje_edit_object_add(Evas *evas)
{
Evas_Object *e;
e = eo_add(MY_CLASS, evas);
eo_add(e, MY_CLASS, evas);
return e;
}
@ -240,13 +240,13 @@ _edje_edit_eo_base_constructor(Eo *obj, Edje_Edit *eed)
{
eed->base = eo_data_ref(obj, EDJE_OBJECT_CLASS);
return eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
return eo_super_eo_constructor( MY_CLASS, obj);
}
EOLIAN static void
_edje_edit_eo_base_destructor(Eo *obj, Edje_Edit *class_data EINA_UNUSED)
{
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
eo_data_unref(obj, class_data);
}

View File

@ -780,7 +780,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
}
if (ep->no_render)
eo_do(rp->object, evas_obj_no_render_set(1));
eo_do(rp->object, evas_obj_no_render_set(rp->object, 1));
if (st_nested && st_nested->nested_children_count) /* Add this to list of children */
{
@ -834,8 +834,8 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
evas_object_pointer_mode_set(rp->object, EVAS_OBJECT_POINTER_MODE_NOGRAB);
}
eo_do(rp->object,
evas_obj_anti_alias_set(ep->anti_alias),
evas_obj_precise_is_inside_set(ep->precise_is_inside));
evas_obj_anti_alias_set(rp->object, ep->anti_alias),
evas_obj_precise_is_inside_set(rp->object, ep->precise_is_inside));
}
if (rp->part->clip_to_id < 0)
evas_object_clip_set(rp->object, ed->base->clipper);

View File

@ -202,18 +202,18 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
eet_data->vio.tell = eet_snd_file_tell;
eet_data->offset = 0;
in = eo_add(ECORE_AUDIO_IN_SNDFILE_CLASS, NULL,
ecore_audio_obj_name_set(snd_id_str),
ecore_audio_obj_in_speed_set(speed),
ecore_audio_obj_vio_set(&eet_data->vio, eet_data, _free),
eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
eo_add(in, ECORE_AUDIO_IN_SNDFILE_CLASS, NULL,
ecore_audio_obj_name_set(NULL, snd_id_str),
ecore_audio_obj_in_speed_set(NULL, speed),
ecore_audio_obj_vio_set(NULL, &eet_data->vio, eet_data, _free),
eo_event_callback_add(NULL, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
if (!out)
{
#if HAVE_COREAUDIO
out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
eo_add(out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
eo_add(out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
eo_event_callback_add(NULL, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
@ -227,7 +227,7 @@ _edje_multisense_internal_sound_sample_play(Edje *ed, const char *sample_name, c
eo_del(in);
return EINA_FALSE;
}
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
if (!ret)
{
ERR("Could not attach input");
@ -274,24 +274,24 @@ _edje_multisense_internal_sound_tone_play(Edje *ed, const char *tone_name, const
tone = &ed->file->sound_dir->tones[i];
if (!strcmp(tone->name, tone_name))
{
in = eo_add(ECORE_AUDIO_IN_TONE_CLASS, NULL);
eo_do(in, ecore_audio_obj_name_set("tone"));
eo_do(in, eo_key_data_set(ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value));
eo_do(in, ecore_audio_obj_in_length_set(duration));
eo_do(in, eo_event_callback_add(ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
eo_add(in, ECORE_AUDIO_IN_TONE_CLASS, NULL);
eo_do(in, ecore_audio_obj_name_set(in, "tone"));
eo_do(in, eo_key_data_set(in, ECORE_AUDIO_ATTR_TONE_FREQ, &tone->value));
eo_do(in, ecore_audio_obj_in_length_set(in, duration));
eo_do(in, eo_event_callback_add(in, ECORE_AUDIO_IN_EVENT_IN_STOPPED, _play_finished, NULL));
if (!out)
{
#if HAVE_COREAUDIO
out = eo_add(ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
eo_add(out, ECORE_AUDIO_OUT_CORE_AUDIO_CLASS, NULL);
#elif HAVE_PULSE
out = eo_add(ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
eo_event_callback_add(ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
eo_add(out, ECORE_AUDIO_OUT_PULSE_CLASS, NULL,
eo_event_callback_add(NULL, ECORE_AUDIO_OUT_PULSE_EVENT_CONTEXT_FAIL, _out_fail, NULL));
#endif
if (out) outs++;
}
eo_do(out, ret = ecore_audio_obj_out_input_attach(in));
eo_do(out, ret = ecore_audio_obj_out_input_attach(out, in));
if (!ret)
{
ERR("Could not attach input");

View File

@ -261,7 +261,7 @@ edje_object_signal_callback_del(Evas_Object *obj, const char *emission, const ch
{
if (!obj) return NULL;
void *ret = NULL;
eo_do(obj, ret = edje_obj_signal_callback_del(emission, source, (Edje_Signal_Cb)func, NULL));
eo_do(obj, ret = edje_obj_signal_callback_del(obj, emission, source, (Edje_Signal_Cb)func, NULL));
return ret;
}
@ -290,7 +290,7 @@ edje_object_signal_callback_del_full(Evas_Object *obj, const char *emission, con
{
if (!obj) return NULL;
void *ret = NULL;
eo_do(obj, ret = edje_obj_signal_callback_del(emission, source, func, data));
eo_do(obj, ret = edje_obj_signal_callback_del(obj, emission, source, func, data));
return ret;
}

View File

@ -20,7 +20,7 @@ edje_object_add(Evas *evas)
{
Evas_Object *e;
EINA_SAFETY_ON_NULL_RETURN_VAL(evas, NULL);
e = eo_add(MY_CLASS, evas);
eo_add(e, MY_CLASS, evas);
return e;
}
@ -30,8 +30,8 @@ _edje_object_eo_base_constructor(Eo *obj, Edje *ed)
ed->base = eo_data_ref(obj, EVAS_SMART_CLIPPED_CLASS);
ed->duration_scale = 1.0;
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
eo_do(obj, evas_obj_type_set(MY_CLASS_NAME_LEGACY));
obj = eo_super_eo_constructor( MY_CLASS, obj);
eo_do(obj, evas_obj_type_set(obj, MY_CLASS_NAME_LEGACY));
_edje_lib_ref();
return obj;
@ -40,23 +40,23 @@ _edje_object_eo_base_constructor(Eo *obj, Edje *ed)
EOLIAN static void
_edje_object_eo_base_destructor(Eo *obj, Edje *class_data)
{
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
eo_data_unref(obj, class_data->base);
}
EOLIAN static void
_edje_object_eo_base_dbg_info_get(Eo *eo_obj, Edje *_pd EINA_UNUSED, Eo_Dbg_Info *root) EINA_ARG_NONNULL(3)
{
eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(root));
eo_super_eo_dbg_info_get(MY_CLASS, eo_obj, root);
Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
const char *file, *edje_group;
eo_do(eo_obj, efl_file_get(&file, &edje_group));
eo_do(eo_obj, efl_file_get(eo_obj, &file, &edje_group));
EO_DBG_INFO_APPEND(group, "File", EINA_VALUE_TYPE_STRING, file);
EO_DBG_INFO_APPEND(group, "Group", EINA_VALUE_TYPE_STRING, edje_group);
Edje_Load_Error error = EDJE_LOAD_ERROR_NONE;
eo_do(eo_obj, error = edje_obj_load_error_get());
eo_do(eo_obj, error = edje_obj_load_error_get(eo_obj));
if (error != EDJE_LOAD_ERROR_NONE)
{
EO_DBG_INFO_APPEND(group, "Error", EINA_VALUE_TYPE_STRING,
@ -81,7 +81,7 @@ _edje_object_evas_object_smart_add(Eo *obj, Edje *ed)
evas_event_freeze(tev);
eo_do_super(obj, MY_CLASS, evas_obj_smart_add());
eo_super_evas_obj_smart_add(MY_CLASS, obj);
ed->is_rtl = EINA_FALSE;
ed->have_objects = EINA_TRUE;
@ -260,7 +260,7 @@ _edje_object_evas_object_smart_show(Eo *obj, Edje *ed)
Eina_List *l;
Edje *edg;
eo_do_super(obj, MY_CLASS, evas_obj_smart_show());
eo_super_evas_obj_smart_show(MY_CLASS, obj);
if (evas_object_visible_get(obj)) return;
if (_edje_lua_script_only(ed))
{
@ -288,7 +288,7 @@ _edje_object_evas_object_smart_hide(Eo *obj, Edje *ed)
Eina_List *l;
Edje *edg;
eo_do_super(obj, MY_CLASS, evas_obj_smart_hide());
eo_super_evas_obj_smart_hide(MY_CLASS, obj);
if (!evas_object_visible_get(obj)) return;
if (_edje_lua_script_only(ed))
{
@ -372,21 +372,21 @@ edje_object_mmap_set(Edje_Object *obj, const Eina_File *file, const char *group)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_file_mmap_set(file, group));
return eo_do_ret(obj, ret, efl_file_mmap_set(obj, file, group));
}
EAPI Eina_Bool
edje_object_file_set(Edje_Object *obj, const char *file, const char *group)
{
Eina_Bool ret = 0;
eo_do(obj, ret = efl_file_set(file, group));
eo_do(obj, ret = efl_file_set(obj, file, group));
return ret;
}
EAPI void
edje_object_file_get(const Edje_Object *obj, const char **file, const char **group)
{
eo_do((Edje_Object *)obj, efl_file_get(file, group));
eo_do((Edje_Object *)obj, efl_file_get(obj, file, group));
}
#include "edje_object.eo.c"

View File

@ -19,7 +19,7 @@ static inline void
part_get_geometry(Edje_Real_Part *rp, Evas_Coord *w, Evas_Coord *h)
{
if (!rp->part->use_alternate_font_metrics)
eo_do(rp->object, efl_gfx_size_get(w, h));
eo_do(rp->object, efl_gfx_size_get(rp->object, w, h));
else
{
if (w) *w = evas_object_text_horiz_advance_get(rp->object);
@ -132,10 +132,10 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
eo_do(ep->object,
evas_obj_text_ellipsis_set(chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
efl_text_properties_font_set(font, size),
efl_text_set(text),
efl_gfx_size_set(sw, sh));
evas_obj_text_ellipsis_set(ep->object, chosen_desc->text.min_x ? -1 : params->type.text.ellipsis),
efl_text_properties_font_set(ep->object, font, size),
efl_text_set(ep->object, text),
efl_gfx_size_set(ep->object, sw, sh));
return text;
}
@ -323,13 +323,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
{
eo_do(ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL);
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL);
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(font, size);
efl_text_set(text));
efl_text_properties_font_set(ep->object, font, size);
efl_text_set(ep->object, text));
part_get_geometry(ep, &tw, &th);
/* Find the wanted font size */
@ -339,12 +339,12 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
eo_do(ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL);
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL);
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(font, size));
efl_text_properties_font_set(ep->object, font, size));
part_get_geometry(ep, &tw, &th);
}
@ -363,13 +363,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
eo_do(ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL);
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL);
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(font, size);
efl_text_set(text));
efl_text_properties_font_set(ep->object, font, size);
efl_text_set(ep->object, text));
part_get_geometry(ep, &tw, &th);
/* only grow the font size if we didn't already reach the max size
@ -388,11 +388,11 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
eo_do(ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL);
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL);
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
efl_text_properties_font_set(font, size));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(ep->object, font, size));
part_get_geometry(ep, &tw, &th);
if ((size > 0) && (th == 0)) break;
@ -404,8 +404,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
int current;
eo_do(ep->object,
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
efl_text_properties_font_set(font, 10));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(ep->object, font, 10));
part_get_geometry(ep, &tw, &th);
@ -427,8 +427,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
current = (top + bottom) / 2;
eo_do(ep->object,
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
efl_text_properties_font_set(font, current));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(ep->object, font, current));
part_get_geometry(ep, &tw, &th);
@ -444,8 +444,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
current++;
eo_do(ep->object,
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
efl_text_properties_font_set(font, current));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(ep->object, font, current));
part_get_geometry(ep, &tw, &th);
} while (th <= sh);
@ -466,8 +466,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
if (!chosen_desc->text.min_x)
{
eo_do (ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL));
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL));
text = _edje_text_fit_x(ed, ep, params, chosen_desc,
text, font, size,
@ -509,13 +509,13 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
arrange_text:
eo_do(ep->object,
if (inlined_font) efl_text_properties_font_source_set(ed->path);
else efl_text_properties_font_source_set(NULL);
if (inlined_font) efl_text_properties_font_source_set(ep->object, ed->path);
else efl_text_properties_font_source_set(ep->object, NULL);
if (ep->part->scale) evas_obj_scale_set(TO_DOUBLE(sc));
if (ep->part->scale) evas_obj_scale_set(ep->object, TO_DOUBLE(sc));
efl_text_properties_font_set(font, size);
efl_text_set(text));
efl_text_properties_font_set(ep->object, font, size);
efl_text_set(ep->object, text));
part_get_geometry(ep, &tw, &th);
/* Handle alignment */
@ -544,10 +544,10 @@ arrange_text:
if (!calc_only)
{
eo_do(ep->object,
efl_gfx_position_set(ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
efl_gfx_position_set(ep->object, ed->x + TO_INT(params->eval.x) + ep->typedata.text->offset.x,
ed->y + TO_INT(params->eval.y) + ep->typedata.text->offset.y);
efl_gfx_visible_set(params->visible));
efl_gfx_visible_set(ep->object, params->visible));
}
{
@ -608,11 +608,11 @@ arrange_text:
case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
eo_do(ep->object,
evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255,
(params->type.text.color2.g * params->type.text.color2.a) / 255,
(params->type.text.color2.b * params->type.text.color2.a) / 255,
params->type.text.color2.a),
evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255,
(params->type.text.color3.g * params->type.text.color3.a) / 255,
(params->type.text.color3.b * params->type.text.color3.a) / 255,
params->type.text.color3.a));
@ -621,11 +621,11 @@ arrange_text:
case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
eo_do(ep->object,
evas_obj_text_outline_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255,
(params->type.text.color2.g * params->type.text.color2.a) / 255,
(params->type.text.color2.b * params->type.text.color2.a) / 255,
params->type.text.color2.a),
evas_obj_text_shadow_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255,
(params->type.text.color3.g * params->type.text.color3.a) / 255,
(params->type.text.color3.b * params->type.text.color3.a) / 255,
params->type.text.color3.a));
@ -652,11 +652,11 @@ arrange_text:
case EDJE_TEXT_EFFECT_GLOW:
style = EVAS_TEXT_STYLE_GLOW;
eo_do(ep->object,
evas_obj_text_glow_color_set((params->type.text.color2.r * params->type.text.color2.a) / 255,
evas_obj_text_glow_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255,
(params->type.text.color2.g * params->type.text.color2.a) / 255,
(params->type.text.color2.b * params->type.text.color2.a) / 255,
params->type.text.color2.a),
evas_obj_text_glow2_color_set((params->type.text.color3.r * params->type.text.color3.a) / 255,
evas_obj_text_glow2_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255,
(params->type.text.color3.g * params->type.text.color3.a) / 255,
(params->type.text.color3.b * params->type.text.color3.a) / 255,
params->type.text.color3.a));

View File

@ -5519,8 +5519,8 @@ _edje_real_part_swallow(Edje *ed,
evas_object_pass_events_set(obj_swallow, 1);
_edje_callbacks_focus_add(rp->typedata.swallow->swallowed_object, ed, rp);
eo_do(obj_swallow,
evas_obj_anti_alias_set(rp->part->anti_alias),
evas_obj_precise_is_inside_set(rp->part->precise_is_inside));
evas_obj_anti_alias_set(obj_swallow, rp->part->anti_alias),
evas_obj_precise_is_inside_set(obj_swallow, rp->part->precise_is_inside));
ed->dirty = EINA_TRUE;
ed->recalc_call = EINA_TRUE;

View File

@ -181,8 +181,8 @@ _efl_gfx_shape_path_set(Eo *obj, Efl_Gfx_Shape_Data *pd,
end:
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -294,14 +294,14 @@ static inline void
gfx_property_get(const Eo *obj, Efl_Gfx_Property *property)
{
eo_do(obj,
property->scale = efl_gfx_shape_stroke_scale_get(),
efl_gfx_shape_stroke_color_get(&property->r, &property->g, &property->b, &property->a),
efl_gfx_color_get(&property->fr, &property->fg, &property->fb, &property->fa),
property->w = efl_gfx_shape_stroke_width_get(),
property->centered = efl_gfx_shape_stroke_location_get(),
efl_gfx_shape_stroke_dash_get(&property->dash, &property->dash_length),
property->c = efl_gfx_shape_stroke_cap_get(),
property->j = efl_gfx_shape_stroke_join_get());
property->scale = efl_gfx_shape_stroke_scale_get(obj),
efl_gfx_shape_stroke_color_get(obj, &property->r, &property->g, &property->b, &property->a),
efl_gfx_color_get(obj, &property->fr, &property->fg, &property->fb, &property->fa),
property->w = efl_gfx_shape_stroke_width_get(obj),
property->centered = efl_gfx_shape_stroke_location_get(obj),
efl_gfx_shape_stroke_dash_get(obj, &property->dash, &property->dash_length),
property->c = efl_gfx_shape_stroke_cap_get(obj),
property->j = efl_gfx_shape_stroke_join_get(obj));
}
static Eina_Bool
@ -389,23 +389,23 @@ _efl_gfx_shape_interpolate(Eo *obj, Efl_Gfx_Shape_Data *pd,
eo_do(obj,
efl_gfx_shape_stroke_scale_set(interpolate(property_to.scale, property_from.scale, pos_map)),
efl_gfx_shape_stroke_color_set(interpolatei(property_to.r, property_from.r, pos_map),
efl_gfx_shape_stroke_scale_set(obj, interpolate(property_to.scale, property_from.scale, pos_map)),
efl_gfx_shape_stroke_color_set(obj, interpolatei(property_to.r, property_from.r, pos_map),
interpolatei(property_to.g, property_from.g, pos_map),
interpolatei(property_to.b, property_from.b, pos_map),
interpolatei(property_to.a, property_from.a, pos_map)),
efl_gfx_color_set(interpolatei(property_to.fr, property_from.fr, pos_map),
efl_gfx_color_set(obj, interpolatei(property_to.fr, property_from.fr, pos_map),
interpolatei(property_to.fg, property_from.fg, pos_map),
interpolatei(property_to.fb, property_from.fb, pos_map),
interpolatei(property_to.fa, property_from.fa, pos_map)),
efl_gfx_shape_stroke_width_set(interpolate(property_to.w, property_from.w, pos_map)),
efl_gfx_shape_stroke_location_set(interpolate(property_to.centered, property_from.centered, pos_map)),
efl_gfx_shape_stroke_dash_set(dash, property_to.dash_length),
efl_gfx_shape_stroke_cap_set(pos_map < 0.5 ? property_from.c : property_to.c),
efl_gfx_shape_stroke_join_set(pos_map < 0.5 ? property_from.j : property_to.j),
efl_gfx_shape_stroke_width_set(obj, interpolate(property_to.w, property_from.w, pos_map)),
efl_gfx_shape_stroke_location_set(obj, interpolate(property_to.centered, property_from.centered, pos_map)),
efl_gfx_shape_stroke_dash_set(obj, dash, property_to.dash_length),
efl_gfx_shape_stroke_cap_set(obj, pos_map < 0.5 ? property_from.c : property_to.c),
efl_gfx_shape_stroke_join_set(obj, pos_map < 0.5 ? property_from.j : property_to.j),
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
return EINA_TRUE;
}
@ -440,27 +440,27 @@ _efl_gfx_shape_dup(Eo *obj, Efl_Gfx_Shape_Data *pd, const Eo *dup_from)
if (!from) return ;
eo_do(dup_from,
scale = efl_gfx_shape_stroke_scale_get(),
efl_gfx_shape_stroke_color_get(&sr, &sg, &sb, &sa),
sw = efl_gfx_shape_stroke_width_get(),
location = efl_gfx_shape_stroke_location_get(),
efl_gfx_shape_stroke_dash_get(&dash, &dash_length),
cap = efl_gfx_shape_stroke_cap_get(),
j = efl_gfx_shape_stroke_join_get());
scale = efl_gfx_shape_stroke_scale_get(dup_from),
efl_gfx_shape_stroke_color_get(dup_from, &sr, &sg, &sb, &sa),
sw = efl_gfx_shape_stroke_width_get(dup_from),
location = efl_gfx_shape_stroke_location_get(dup_from),
efl_gfx_shape_stroke_dash_get(dup_from, &dash, &dash_length),
cap = efl_gfx_shape_stroke_cap_get(dup_from),
j = efl_gfx_shape_stroke_join_get(dup_from));
eo_do(obj,
efl_gfx_shape_stroke_scale_set(scale),
efl_gfx_shape_stroke_color_set(sr, sg, sb, sa),
efl_gfx_shape_stroke_width_set(sw),
efl_gfx_shape_stroke_location_set(location),
efl_gfx_shape_stroke_dash_set(dash, dash_length),
efl_gfx_shape_stroke_cap_set(cap),
efl_gfx_shape_stroke_join_set(j));
efl_gfx_shape_stroke_scale_set(obj, scale),
efl_gfx_shape_stroke_color_set(obj, sr, sg, sb, sa),
efl_gfx_shape_stroke_width_set(obj, sw),
efl_gfx_shape_stroke_location_set(obj, location),
efl_gfx_shape_stroke_dash_set(obj, dash, dash_length),
efl_gfx_shape_stroke_cap_set(obj, cap),
efl_gfx_shape_stroke_join_set(obj, j));
_efl_gfx_shape_path_set(obj, pd, from->commands, from->points);
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -480,8 +480,8 @@ _efl_gfx_shape_reset(Eo *obj, Efl_Gfx_Shape_Data *pd)
pd->current_ctrl.y = 0;
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -501,8 +501,8 @@ _efl_gfx_shape_append_move_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current.y = y;
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -522,8 +522,8 @@ _efl_gfx_shape_append_line_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current.y = y;
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -551,8 +551,8 @@ _efl_gfx_shape_append_cubic_to(Eo *obj, Efl_Gfx_Shape_Data *pd,
pd->current_ctrl.y = ctrl_y1;
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void
@ -821,8 +821,8 @@ _efl_gfx_shape_append_close(Eo *obj, Efl_Gfx_Shape_Data *pd)
pd, &offset_point);
eo_do(obj,
eo_event_callback_call(EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(EFL_GFX_CHANGED, NULL));
eo_event_callback_call(obj, EFL_GFX_PATH_CHANGED, NULL),
eo_event_callback_call(obj, EFL_GFX_CHANGED, NULL));
}
static void

View File

@ -51,7 +51,7 @@ _load_set(Eio_Model_Data *priv, Efl_Model_Load_Status status)
if (priv->load.status != load.status)
{
priv->load.status = load.status;
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_LOAD_STATUS, &load));
}
}
@ -75,7 +75,7 @@ _eio_stat_done_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina_Stat *st
eina_value_set(priv->properties_value[EIO_MODEL_PROP_SIZE], eio_file_size(stat));
evt.changed_properties = priv->properties_name;
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
_load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_PROPERTIES);
@ -112,7 +112,7 @@ _eio_move_done_cb(void *data, Eio_File *handler EINA_UNUSED)
eina_array_push(properties, _eio_model_prop_names[EIO_MODEL_PROP_FILENAME]);
evt.changed_properties = properties;
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_PROPERTIES_CHANGED, &evt));
eina_array_free(properties);
}
@ -147,16 +147,16 @@ _efl_model_evt_added_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, void
Efl_Model_Children_Event cevt;
Eina_Value path;
cevt.child = eo_add_ref(EIO_MODEL_CLASS, priv->obj, eio_model_path_set(evt->filename));
eo_add_ref(cevt.child, EIO_MODEL_CLASS, priv->obj, eio_model_path_set(NULL, evt->filename));
priv->children_list = eina_list_append(priv->children_list, cevt.child);
cevt.index = eina_list_count(priv->children_list);
eina_value_setup(&path, EINA_VALUE_TYPE_STRING);
eina_value_set(&path, evt->filename);
eo_do(cevt.child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata));
eo_do(cevt.child, eio_model_children_filter_set(cevt.child, priv->filter_cb, priv->filter_userdata));
eina_value_flush(&path);
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_ADDED, &cevt));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILD_ADDED, &cevt));
return EINA_TRUE;
}
@ -185,7 +185,7 @@ _efl_model_evt_deleted_ecore_cb(void *data EINA_UNUSED, int type EINA_UNUSED, vo
cevt.index = i;
cevt.child = cur->data;
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILD_REMOVED, &cevt));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILD_REMOVED, &cevt));
priv->children_list = eina_list_remove_list(priv->children_list, cur);
eo_unref(cevt.child);
@ -407,10 +407,10 @@ _eio_main_children_load_cb(void *data, Eio_File *handler EINA_UNUSED, const Eina
Eio_Model_Data *priv = data;
EINA_SAFETY_ON_NULL_RETURN(priv);
child = eo_add(MY_CLASS, NULL, eio_model_path_set(info->path));
eo_add(child, MY_CLASS, NULL, eio_model_path_set(NULL, info->path));
eina_spinlock_take(&priv->filter_lock);
if (priv->filter_cb)
eo_do(child, eio_model_children_filter_set(priv->filter_cb, priv->filter_userdata));
eo_do(child, eio_model_children_filter_set(child, priv->filter_cb, priv->filter_userdata));
eina_spinlock_release(&priv->filter_lock);
priv->children_list = eina_list_append(priv->children_list, child);
@ -426,7 +426,7 @@ _eio_done_children_load_cb(void *data, Eio_File *handler EINA_UNUSED)
count = eina_list_count(priv->children_list);
_load_set(priv, EFL_MODEL_LOAD_STATUS_LOADED_CHILDREN);
eo_do(priv->obj, eo_event_callback_call(EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
eo_do(priv->obj, eo_event_callback_call(priv->obj, EFL_MODEL_BASE_EVENT_CHILDREN_COUNT_CHANGED, &count));
}
static void
@ -523,7 +523,9 @@ _eio_model_children_filter_set(Eo *obj EINA_UNUSED, Eio_Model_Data *priv, Eio_Fi
static Eo *
_eio_model_efl_model_base_child_add(Eo *obj EINA_UNUSED, Eio_Model_Data *priv EINA_UNUSED)
{
return eo_add(EIO_MODEL_CLASS, obj);
Eo* o;
eo_add(o, EIO_MODEL_CLASS, obj);
return o;
}
static void
@ -626,7 +628,7 @@ _eio_model_efl_model_base_children_slice_get(Eo *obj EINA_UNUSED, Eio_Model_Data
static Eo *
_eio_model_eo_base_constructor(Eo *obj, Eio_Model_Data *priv)
{
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
obj = eo_super_eo_constructor( MY_CLASS, obj);
unsigned int i;
priv->obj = obj;
@ -684,7 +686,7 @@ _eio_model_eo_base_destructor(Eo *obj , Eio_Model_Data *priv)
eo_unref(child);
free(priv->path);
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
#include "eio_model.eo.c"

View File

@ -236,15 +236,15 @@ EAPI Evas_Object *
emotion_object_add(Evas *evas)
{
Evas_Object *e;
e = eo_add(MY_CLASS, evas);
eo_add(e, MY_CLASS, evas);
return e;
}
EOLIAN static Eo *
_emotion_object_eo_base_constructor(Eo *obj, Emotion_Object_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
eo_do(obj, evas_obj_type_set(E_OBJ_NAME));
obj = eo_super_eo_constructor( MY_CLASS, obj);
eo_do(obj, evas_obj_type_set(obj, E_OBJ_NAME));
return obj;
}
@ -350,7 +350,7 @@ EAPI Eina_Bool
emotion_object_file_set(Evas_Object *obj, const char *file)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_file_set(file, NULL));
return eo_do_ret(obj, ret, efl_file_set(obj, file, NULL));
}
EOLIAN static Eina_Bool
@ -413,7 +413,7 @@ EAPI const char *
emotion_object_file_get(const Evas_Object *obj)
{
const char *file = NULL;
eo_do(obj, efl_file_get(&file, NULL));
eo_do(obj, efl_file_get(obj, &file, NULL));
return file;
}
@ -624,7 +624,7 @@ emotion_object_keep_aspect_get(const Evas_Object *obj)
EAPI void
emotion_object_play_set(Evas_Object *obj, Eina_Bool play)
{
eo_do(obj, efl_player_play_set(play));
eo_do(obj, efl_player_play_set(obj, play));
}
EOLIAN static void
@ -649,7 +649,7 @@ EAPI Eina_Bool
emotion_object_play_get(const Evas_Object *obj)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_player_play_get());
return eo_do_ret(obj, ret, efl_player_play_get(obj));
}
EOLIAN static Eina_Bool
@ -662,7 +662,7 @@ _emotion_object_efl_player_play_get(Eo *obj EINA_UNUSED, Emotion_Object_Data *sd
EAPI void
emotion_object_position_set(Evas_Object *obj, double sec)
{
eo_do(obj, efl_player_position_set(sec));
eo_do(obj, efl_player_position_set(obj, sec));
}
EOLIAN static void
@ -688,7 +688,7 @@ EAPI double
emotion_object_position_get(const Evas_Object *obj)
{
double ret;
return eo_do_ret(obj, ret, efl_player_position_get());
return eo_do_ret(obj, ret, efl_player_position_get(obj));
}
EOLIAN static double
@ -713,7 +713,7 @@ EAPI Eina_Bool
emotion_object_seekable_get(const Evas_Object *obj)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_player_seekable_get());
return eo_do_ret(obj, ret, efl_player_seekable_get(obj));
}
EAPI Eina_Bool
@ -740,7 +740,7 @@ EAPI double
emotion_object_play_length_get(const Evas_Object *obj)
{
double ret;
return eo_do_ret(obj, ret, efl_player_length_get());
return eo_do_ret(obj, ret, efl_player_length_get(obj));
}
EAPI void
@ -749,7 +749,7 @@ emotion_object_size_get(const Evas_Object *obj, int *iw, int *ih)
if (iw) *iw = 0;
if (ih) *ih = 0;
eo_do(obj, efl_image_load_size_get(iw, ih));
eo_do(obj, efl_image_load_size_get(obj, iw, ih));
}
EOLIAN static void
@ -762,7 +762,7 @@ _emotion_object_efl_image_load_size_get(Eo *obj EINA_UNUSED, Emotion_Object_Data
EAPI void
emotion_object_smooth_scale_set(Evas_Object *obj, Eina_Bool smooth)
{
eo_do(obj, efl_image_smooth_scale_set(smooth));
eo_do(obj, efl_image_smooth_scale_set(obj, smooth));
}
EOLIAN static void
@ -775,7 +775,7 @@ EAPI Eina_Bool
emotion_object_smooth_scale_get(const Evas_Object *obj)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_image_smooth_scale_get());
return eo_do_ret(obj, ret, efl_image_smooth_scale_get(obj));
}
EOLIAN static Eina_Bool
@ -788,7 +788,7 @@ EAPI double
emotion_object_ratio_get(const Evas_Object *obj)
{
double ret;
return eo_do_ret(obj, ret, efl_image_ratio_get());
return eo_do_ret(obj, ret, efl_image_ratio_get(obj));
}
EOLIAN static double
@ -814,7 +814,7 @@ emotion_object_event_simple_send(Evas_Object *obj, Emotion_Event ev)
EAPI void
emotion_object_audio_volume_set(Evas_Object *obj, double vol)
{
eo_do(obj, efl_player_audio_volume_set(vol));
eo_do(obj, efl_player_audio_volume_set(obj, vol));
}
EOLIAN static void
@ -829,7 +829,7 @@ EAPI double
emotion_object_audio_volume_get(const Evas_Object *obj)
{
double ret;
return eo_do_ret(obj, ret, efl_player_audio_volume_get());
return eo_do_ret(obj, ret, efl_player_audio_volume_get(obj));
}
EOLIAN static double
@ -842,7 +842,7 @@ _emotion_object_efl_player_audio_volume_get(Eo *obj EINA_UNUSED, Emotion_Object_
EAPI void
emotion_object_audio_mute_set(Evas_Object *obj, Eina_Bool mute)
{
eo_do(obj, efl_player_audio_mute_set(mute));
eo_do(obj, efl_player_audio_mute_set(obj, mute));
}
EOLIAN static void
@ -857,7 +857,7 @@ EAPI Eina_Bool
emotion_object_audio_mute_get(const Evas_Object *obj)
{
Eina_Bool ret;
return eo_do_ret(obj, ret, efl_player_audio_mute_get());
return eo_do_ret(obj, ret, efl_player_audio_mute_get(obj));
}
EOLIAN static Eina_Bool
@ -1148,7 +1148,7 @@ EAPI double
emotion_object_progress_status_get(const Evas_Object *obj)
{
double ret;
return eo_do_ret(obj, ret, efl_player_progress_get());
return eo_do_ret(obj, ret, efl_player_progress_get(obj));
}
EOLIAN static double
@ -1319,7 +1319,7 @@ _eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
eo_do(evas_object_smart_parent_get(sd->obj),
eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL));
eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_SUCCEED, NULL));
_eio_load_xattr_cleanup(sd, handler);
}
@ -1329,7 +1329,7 @@ _eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
Emotion_Object_Data *sd = data;
eo_do(evas_object_smart_parent_get(sd->obj),
eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL));
eo_event_callback_call(evas_object_smart_parent_get(sd->obj), EMOTION_OBJECT_EVENT_POSITION_LOAD_FAILED, NULL));
_eio_load_xattr_cleanup(sd, handler);
}
#endif
@ -1390,7 +1390,7 @@ _eio_save_xattr_done(void *data, Eio_File *handler)
{
Emotion_Object_Data *sd = data;
eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL));
eo_do(sd->obj, eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_SUCCEED, NULL));
_eio_save_xattr_cleanup(sd, handler);
}
@ -1399,7 +1399,7 @@ _eio_save_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
Emotion_Object_Data *sd = data;
eo_do(sd->obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL));
eo_do(sd->obj, eo_event_callback_call(sd->obj, EMOTION_OBJECT_EVENT_POSITION_SAVE_FAILED, NULL));
_eio_save_xattr_cleanup(sd, handler);
}
#endif
@ -1493,7 +1493,7 @@ _emotion_frame_anim(void *data)
_emotion_video_pos_update(obj,
emotion_engine_instance_pos_get(sd->engine_instance),
emotion_engine_instance_len_get(sd->engine_instance));
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_DECODE, NULL));
return EINA_FALSE;
}
@ -1518,9 +1518,9 @@ _emotion_video_pos_update(Evas_Object *obj, double pos, double len)
sd->pos = pos;
sd->len = len;
if (npos) eo_do(obj,
eo_event_callback_call(EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL));
eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_POSITION_UPDATE, NULL));
if (nlen) eo_do(obj,
eo_event_callback_call(EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL));
eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_LENGTH_CHANGE, NULL));
}
EAPI void
@ -1549,7 +1549,7 @@ _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio)
if (changed)
{
evas_object_size_hint_request_set(obj, w, h);
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_FRAME_RESIZE, NULL));
evas_object_geometry_get(obj, NULL, NULL, &w, &h);
_emotion_object_aspect_border_apply(obj, sd, w, h);
}
@ -1573,7 +1573,7 @@ _emotion_decode_stop(Evas_Object *obj)
if (sd->play)
{
sd->play = 0;
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_DECODE_STOP, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_DECODE_STOP, NULL));
}
}
@ -1589,26 +1589,26 @@ _emotion_open_done(Evas_Object *obj)
emotion_object_position_set(obj, sd->remember_jump);
if (sd->remember_play != sd->play)
emotion_object_play_set(obj, sd->remember_play);
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_OPEN_DONE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_OPEN_DONE, NULL));
}
EAPI void
_emotion_playback_started(Evas_Object *obj)
{
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_STARTED, NULL));
}
EAPI void
_emotion_playback_finished(Evas_Object *obj)
{
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PLAYBACK_FINISHED, NULL));
}
EAPI void
_emotion_audio_level_change(Evas_Object *obj)
{
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_AUDIO_LEVEL_CHANGE, NULL));
}
EAPI void
@ -1617,7 +1617,7 @@ _emotion_channels_change(Evas_Object *obj)
Emotion_Object_Data *sd;
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_CHANNELS_CHANGE, NULL));
}
EAPI void
@ -1627,7 +1627,7 @@ _emotion_title_set(Evas_Object *obj, char *title)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->title, title);
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_TITLE_CHANGE, NULL));
}
@ -1639,7 +1639,7 @@ _emotion_progress_set(Evas_Object *obj, char *info, double st)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->progress.info, info);
sd->progress.stat = st;
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_PROGRESS_CHANGE, NULL));
}
EAPI void
@ -1650,7 +1650,7 @@ _emotion_file_ref_set(Evas_Object *obj, const char *file, int num)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
eina_stringshare_replace(&sd->ref.file, file);
sd->ref.num = num;
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_REF_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_REF_CHANGE, NULL));
}
EAPI void
@ -1660,7 +1660,7 @@ _emotion_spu_button_num_set(Evas_Object *obj, int num)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button_num = num;
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_NUM_CHANGE, NULL));
}
EAPI void
@ -1670,7 +1670,7 @@ _emotion_spu_button_set(Evas_Object *obj, int button)
E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
sd->spu.button = button;
eo_do(obj, eo_event_callback_call(EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL));
eo_do(obj, eo_event_callback_call(obj, EMOTION_OBJECT_EVENT_BUTTON_CHANGE, NULL));
}
EAPI void

View File

@ -112,6 +112,102 @@ typedef struct _Eo_Opaque Eo;
*/
typedef Eo Eo_Class;
#define HAVE_EO_ID
typedef uintptr_t Eo_Id;
typedef struct _Eo_Class _Eo_Class;
typedef void (*eo_op_func_type)(Eo *, void *class_data, va_list *list);
typedef struct op_type_funcs
{
eo_op_func_type func;
const _Eo_Class *src;
} op_type_funcs;
struct _Eo_Header
{
#ifndef HAVE_EO_ID
EINA_MAGIC
#endif
Eo_Id id;
};
typedef struct _Eo_Header Eo_Header;
struct _Eo_Object
{
Eo_Header header;
const _Eo_Class *klass;
#ifdef EO_DEBUG
Eina_Inlist *xrefs;
Eina_Inlist *data_xrefs;
#endif
Eina_List *composite_objects;
int refcount;
int datarefcount;
Eina_Bool condtor_done:1;
Eina_Bool finalized:1;
Eina_Bool composite:1;
Eina_Bool del_triggered:1;
Eina_Bool destructed:1;
Eina_Bool manual_free:1;
///struct _Eo_Context context;
};
typedef struct _Eo_Class_Description Eo_Class_Description;
typedef struct Eo_Extension_Data_Offset Eo_Extension_Data_Offset;
typedef struct _Dich_Chain1 Dich_Chain1;
struct _Eo_Class
{
Eo_Header header;
const _Eo_Class *parent;
const Eo_Class_Description *desc;
Dich_Chain1 *chain; /**< The size is chain size */
const _Eo_Class **extensions;
Eo_Extension_Data_Offset *extn_data_off;
const _Eo_Class **mro;
/* cached object for faster allocation */
struct {
Eina_Trash *trash;
Eina_Spinlock trash_lock;
unsigned int trash_count;
} objects;
/* cached iterator for faster allocation cycle */
struct {
Eina_Trash *trash;
Eina_Spinlock trash_lock;
unsigned int trash_count;
} iterators;
unsigned int obj_size; /**< size of an object of this class */
unsigned int chain_size;
unsigned int base_id;
unsigned int data_offset; /* < Offset of the data within object data. */
Eina_Bool constructed : 1;
/* [extensions*] + NULL */
/* [mro*] + NULL */
/* [extensions data offset] + NULL */
};
__attribute__ ((visibility("default"))) struct _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id);
EAPI _Eo_Class * _eo_class_pointer_get(const Eo_Class *klass_id);
struct _Eo_Id_Resolve_Cache
{
int flags;
Eo* eoid;
struct _Eo_Object* object;
};
/**
* @var _eo_class_creation_lock
* This variable is used for locking purposes in the class_get function
@ -447,8 +543,15 @@ typedef void (*Eo_Hook_Call)(const Eo_Class *klass_id, const Eo *obj, const char
EAPI extern Eo_Hook_Call eo_hook_call_pre;
EAPI extern Eo_Hook_Call eo_hook_call_post;
typedef struct op_type_funcs op_type_funcs;
typedef struct _Eo_Class _Eo_Class;
typedef struct _Eo_Object _Eo_Object;
EAPI const op_type_funcs *_dich_func_get(const _Eo_Class *klass, Eo_Op op);
EAPI void *_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass);
// to pass the internal function call to EO_FUNC_BODY (as Func parameter)
#define EO_FUNC_CALL(...) __VA_ARGS__
#define EO_FUNC_CALL(...) , __VA_ARGS__
#define EO_HOOK_CALL_PREPARE(Hook, FuncName) \
if (Hook) \
@ -464,6 +567,89 @@ EAPI extern Eo_Hook_Call eo_hook_call_post;
# define EO_FUNC_COMMON_OP_FUNC(Name) ((const void *) #Name)
#endif
#define EO_FUNC_VOID_API_DEFINE(Name, Args, ...) \
EOAPI void Name(Eo const* ___object, ##__VA_ARGS__); \
EOAPI void _eo_impl_##Name(_Eo_Class const* ___klass, Eo* ___oid, _Eo_Object const* ___object, ##__VA_ARGS__) \
{ \
typedef Eo_Base * (*_Eo_func)(Eo*, void *obj_data, ##__VA_ARGS__); \
static Eo_Op ___op = EO_NOOP; \
if (EINA_UNLIKELY(___op == EO_NOOP)) \
{ \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
if (___op == EO_NOOP) return 0; \
} \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
const op_type_funcs *___func = _dich_func_get(___klass, ___op); \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
fprintf(stderr, "___func %p\n", ___func); fflush(stderr); \
fprintf(stderr, "___func->func %p\n", ___func->func);fflush(stderr); \
fprintf(stderr, "___func->src %p\n", ___func->src);fflush(stderr); \
_Eo_func ___func_ = (_Eo_func) ___func->func; \
void* ___data = _eo_data_scope_get(___object, ___func->src); \
___func_((Eo*)___oid, ___data Args); \
} \
EOAPI void Name(Eo const* ___object, ##__VA_ARGS__) \
{ \
_Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object); \
if(___obj) { \
_eo_impl_##Name(___obj->klass, ___object, ___obj Args); \
} \
} \
EOAPI void eo_super_##Name(Eo_Class const* ___klass, Eo const* ___object, ##__VA_ARGS__) \
{ \
_Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object); \
if(___obj) { \
_Eo_Class* ___kls = (_Eo_Class*)_eo_class_pointer_get((Eo_Id)___klass); \
if(___kls) \
return _eo_impl_##Name(___kls, ___object, ___obj Args); \
} \
} \
#define EO_FUNC_API_DEFINE(Name, R, DefRet, Args, ...) \
EOAPI R Name(Eo const* ___object, ##__VA_ARGS__); \
EOAPI R _eo_impl_##Name(_Eo_Class const* ___klass, Eo* ___oid, _Eo_Object const* ___object, ##__VA_ARGS__) \
{ \
typedef Eo_Base * (*_Eo_func)(Eo*, void *obj_data, ##__VA_ARGS__); \
static Eo_Op ___op = EO_NOOP; \
if (EINA_UNLIKELY(___op == EO_NOOP)) \
{ \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
___op = _eo_api_op_id_get(EO_FUNC_COMMON_OP_FUNC(Name)); \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
if (___op == EO_NOOP) return 0; \
} \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
const op_type_funcs *___func = _dich_func_get(___klass, ___op); \
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
fprintf(stderr, "___func %p\n", ___func); fflush(stderr); \
fprintf(stderr, "___func->func %p\n", ___func->func);fflush(stderr); \
fprintf(stderr, "___func->src %p\n", ___func->src);fflush(stderr); \
_Eo_func ___func_ = (_Eo_func) ___func->func; \
void* ___data = _eo_data_scope_get(___object, ___func->src); \
R _ret; \
_ret = ___func_((Eo*)___oid, ___data Args); \
return _ret; \
} \
EOAPI R Name(Eo const* ___object, ##__VA_ARGS__) \
{ \
_Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object); \
if(___obj) { \
return _eo_impl_##Name(___obj->klass, ___object, ___obj Args); \
} \
} \
EOAPI R eo_super_##Name(Eo_Class const* ___klass, Eo const* ___object, ##__VA_ARGS__) \
{ \
_Eo_Object* ___obj = (_Eo_Object*)_eo_obj_pointer_get((Eo_Id)___object); \
if(___obj) { \
_Eo_Class* ___kls = (_Eo_Class*)_eo_class_pointer_get((Eo_Id)___klass); \
if(___kls) \
return _eo_impl_##Name(___kls, ___object, ___obj Args); \
} \
} \
// cache OP id, get real fct and object data then do the call
#define EO_FUNC_COMMON_OP(Name, DefRet) \
Eo_Op_Call_Data ___call; \
@ -543,13 +729,13 @@ EAPI Eo_Op _eo_api_op_id_get(const void *api_func);
EAPI Eina_Bool _eo_call_resolve(const char *func_name, const Eo_Op op, Eo_Op_Call_Data *call, const char *file, int line);
// start of eo_do barrier, gets the object pointer and ref it, put it on the stask
EAPI Eina_Bool _eo_do_start(const Eo *obj, const Eo_Class *cur_klass, Eina_Bool is_super, void *eo_stack);
EAPI Eo* _eo_do_start(const Eo *obj, const Eo_Class *cur_klass, Eina_Bool is_super, void *eo_stack);
// end of the eo_do barrier, unref the obj, move the stack pointer
EAPI void _eo_do_end(void *eo_stack);
// end of the eo_add. Calls finalize among others
EAPI Eo * _eo_add_end(void *eo_stack);
EAPI Eo * _eo_add_end(Eo* obj_id, void *eo_stack, int x);
// XXX: We cheat and make it const to indicate to the compiler that the value never changes
EAPI EINA_CONST void *_eo_stack_get(void);
@ -558,35 +744,48 @@ EAPI EINA_CONST void *_eo_stack_get(void);
#define _eo_do_common(eoid, clsid, is_super, ...) \
do { \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
_eo_do_start(eoid, clsid, is_super, _eo_stack_get()); \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
__VA_ARGS__; \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
_eo_do_end(_eo_stack_get()); \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr); \
} while (0)
#define _eo_do_common_ret(eoid, clsid, is_super, ret_tmp, func) \
( \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__), fflush(stderr), \
_eo_do_start(eoid, clsid, is_super, _eo_stack_get()), \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__), fflush(stderr), \
ret_tmp = func, \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__), fflush(stderr), \
_eo_do_end(_eo_stack_get()), \
fprintf(stderr, "do super %s %s:%d\n", __func__, __FILE__, __LINE__), fflush(stderr), \
ret_tmp \
)
#define eo_do(eoid, ...) _eo_do_common(eoid, NULL, EINA_FALSE, __VA_ARGS__)
//#define eo_do(eoid, ...) _eo_do_common(eoid, NULL, EINA_FALSE, __VA_ARGS__)
#define eo_do_super(eoid, clsid, func) _eo_do_common(eoid, clsid, EINA_TRUE, func)
#define eo_do(eoid, ...) do { __VA_ARGS__; } while(0)
#define eo_do_ret(eoid, ret_tmp, func) _eo_do_common_ret(eoid, NULL, EINA_FALSE, ret_tmp, func)
//#define eo_do_super(eoid, clsid, func) _eo_do_common(eoid, clsid, EINA_TRUE, func)
#define eo_do_super_ret(eoid, clsid, ret_tmp, func) _eo_do_common_ret(eoid, clsid, EINA_TRUE, ret_tmp, func)
//#define eo_do_ret(eoid, ret_tmp, func) _eo_do_common_ret(eoid, NULL, EINA_FALSE, ret_tmp, func)
#define eo_do_part(eoid, part_func, ...) \
#define eo_do_ret(eoid, ret_tmp, func) \
(ret_tmp = (func))
//#define eo_do_super_ret(eoid, clsid, ret_tmp, func) _eo_do_common_ret(eoid, clsid, EINA_TRUE, ret_tmp, func)
/*
#define eo_do_part(eoid, part_func, ...) \
do { \
Eo *__eo_part = eoid; \
eo_do(eoid, __eo_part = part_func); \
eo_do(__eo_part, __VA_ARGS__); \
} while (0)
*/
/*****************************************************************************/
/**
@ -597,15 +796,28 @@ EAPI EINA_CONST void *_eo_stack_get(void);
* @see eo_class_name_get()
*/
EAPI const Eo_Class *eo_class_get(const Eo *obj);
#define _eo_add_common(klass, parent, is_ref, ...) \
( \
_eo_do_start(_eo_add_internal_start(__FILE__, __LINE__, klass, parent, is_ref), \
klass, EINA_FALSE, _eo_stack_get()) \
, ##__VA_ARGS__, \
(Eo *) _eo_add_end(_eo_stack_get()) \
)
/*
#define _eo_add_common(klass, parent, is_ref, ...) \
( \
(Eo *) _eo_add_end \
( \
_eo_do_start(_eo_add_internal_start(__FILE__, __LINE__, klass, parent, is_ref), \
klass, EINA_FALSE, _eo_stack_get()) \
, _eo_stack_get() \
, (0, ##__VA_ARGS__ , 0)))
*/
#define _eo_add_common(obj, klass, parent, is_ref, ...) \
do { \
obj = _eo_add_internal_start(__FILE__, __LINE__, klass, parent, is_ref); \
fprintf(stderr, "eo1: %p\n", obj); fflush(stderr); \
obj = _eo_do_start(obj, klass, EINA_FALSE, _eo_stack_get()); \
fprintf(stderr, "eo2: %p\n", obj); fflush(stderr); \
{__VA_ARGS__;} \
fprintf(stderr, "eo3: %p\n", obj); fflush(stderr); \
obj = _eo_add_end(obj, _eo_stack_get(), 0); \
fprintf(stderr, "eo4: %p\n", obj); fflush(stderr); \
} while(0)
/**
* @def eo_add
* @brief Create a new object and call its constructor(If it exits).
@ -625,7 +837,7 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
* @param ... The ops to run.
* @return An handle to the new object on success, NULL otherwise.
*/
#define eo_add(klass, parent, ...) _eo_add_common(klass, parent, EINA_FALSE, ##__VA_ARGS__)
#define eo_add(obj, klass, parent, ...) _eo_add_common(obj, klass, parent, EINA_FALSE, ##__VA_ARGS__)
/**
* @def eo_add_ref
@ -642,9 +854,11 @@ EAPI const Eo_Class *eo_class_get(const Eo *obj);
* @param ... The ops to run.
* @return An handle to the new object on success, NULL otherwise.
*/
#define eo_add_ref(klass, parent, ...) _eo_add_common(klass, parent, EINA_TRUE, ##__VA_ARGS__)
#define eo_add_ref(obj, klass, parent, ...) _eo_add_common(obj, klass, parent, EINA_TRUE, ##__VA_ARGS__)
EAPI Eo * _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo *parent, Eina_Bool ref);
struct _Eo_Call_Stack;
EAPI Eo * _eo_add_internal_end(Eo *eo_id, struct _Eo_Call_Stack *stack);
/**
* @brief Get a pointer to the data of an object for a specific class.
@ -902,7 +1116,7 @@ typedef void (*eo_key_data_free_func)(void *);
*/
#define eo_weak_unref(wref) \
do { \
if (*wref) eo_do(*wref, eo_wref_del(wref)); \
if (*wref) eo_do(*wref, eo_wref_del(*wref, wref)); \
} while (0)
/**
@ -993,8 +1207,8 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const
*
* @see eo_event_callback_priority_add()
*/
#define eo_event_callback_add(desc, cb, data) \
eo_event_callback_priority_add(desc, \
#define eo_event_callback_add(obj, desc, cb, data) \
eo_event_callback_priority_add(obj, desc, \
EO_CALLBACK_PRIORITY_DEFAULT, cb, data)
/**
@ -1007,8 +1221,8 @@ EAPI const Eo_Event_Description *eo_base_legacy_only_event_description_get(const
*
* @see eo_event_callback_array_priority_add()
*/
#define eo_event_callback_array_add(array, data) \
eo_event_callback_array_priority_add(array, \
#define eo_event_callback_array_add(obj, array, data) \
eo_event_callback_array_priority_add(obj, array, \
EO_CALLBACK_PRIORITY_DEFAULT, data)
/**

View File

@ -19,7 +19,7 @@
/* Used inside the class_get functions of classes, see #EO_DEFINE_CLASS */
EAPI Eina_Spinlock _eo_class_creation_lock;
int _eo_log_dom = -1;
__attribute__ ((visibility("default"))) int _eo_log_dom = -1;
static _Eo_Class **_eo_classes;
static Eo_Id _eo_classes_last_id;
@ -32,7 +32,7 @@ static size_t _eo_sz = 0;
static size_t _eo_class_sz = 0;
static void _eo_condtor_reset(_Eo_Object *obj);
static inline void *_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass);
/* static inline void *_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass); */
static inline void *_eo_data_xref_internal(const char *file, int line, _Eo_Object *obj, const _Eo_Class *klass, const _Eo_Object *ref_obj);
static inline void _eo_data_xunref_internal(_Eo_Object *obj, void *data, const _Eo_Object *ref_obj);
@ -90,7 +90,7 @@ _dich_copy_all(_Eo_Class *dst, const _Eo_Class *src)
}
}
static inline const op_type_funcs *
EAPI const op_type_funcs *
_dich_func_get(const _Eo_Class *klass, Eo_Op op)
{
size_t idx1 = DICH_CHAIN1(op);
@ -186,7 +186,7 @@ _eo_is_a_class(const Eo *eo_id)
return !!(oid & MASK_CLASS_TAG);
}
static inline _Eo_Class *
EAPI _Eo_Class *
_eo_class_pointer_get(const Eo_Class *klass_id)
{
#ifdef HAVE_EO_ID
@ -473,10 +473,9 @@ _eo_do_internal(const Eo *eo_id, const Eo_Class *cur_klass_id,
return EINA_TRUE;
}
EAPI Eina_Bool
EAPI Eo*
_eo_do_start(const Eo *eo_id, const Eo_Class *cur_klass_id, Eina_Bool is_super, void *eo_stack)
{
Eina_Bool ret = EINA_TRUE;
Eo_Stack_Frame *fptr;
Eo_Call_Stack *stack = eo_stack;
@ -492,12 +491,12 @@ _eo_do_start(const Eo *eo_id, const Eo_Class *cur_klass_id, Eina_Bool is_super,
fptr->o.obj = NULL;
fptr->cur_klass = NULL;
ret = EINA_FALSE;
return NULL;
}
stack->frame_ptr++;
return ret;
return eo_id;
}
EAPI void
@ -832,20 +831,20 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo
_eo_ref(obj);
eo_do(eo_id, eo_parent_set(parent_id));
eo_do(eo_id, eo_parent_set(eo_id, parent_id));
/* If there's a parent. Ref. Eo_add should return an object with either a
* parent ref, or with the lack of, just a ref. */
{
Eo *parent_tmp;
if (ref && eo_do_ret(eo_id, parent_tmp, eo_parent_get()))
if (ref && eo_do_ret(eo_id, parent_tmp, eo_parent_get(eo_id)))
{
_eo_ref(obj);
}
}
/* eo_id can change here. Freeing is done on the resolved object. */
eo_do(eo_id, eo_id = eo_constructor());
eo_do(eo_id, eo_id = eo_constructor(eo_id));
if (!eo_id)
{
ERR("Object of class '%s' - Error while constructing object",
@ -858,7 +857,7 @@ _eo_add_internal_start(const char *file, int line, const Eo_Class *klass_id, Eo
return eo_id;
}
static Eo *
EAPI Eo *
_eo_add_internal_end(Eo *eo_id, Eo_Call_Stack *stack)
{
Eo_Stack_Frame *fptr;
@ -909,11 +908,20 @@ cleanup:
}
EAPI Eo *
_eo_add_end(void *eo_stack)
_eo_add_end(Eo* obj_id, void *eo_stack, int x)
{
Eo *ret = eo_finalize();
ret = _eo_add_internal_end(ret, eo_stack);
_eo_do_end(eo_stack);
Eo* ret = NULL;
if(obj_id)
{
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
ret = eo_finalize(obj_id);
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
ret = _eo_add_internal_end(ret, eo_stack);
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
_eo_do_end(eo_stack);
}
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
return ret;
}
@ -1190,6 +1198,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
/* Build class extensions list */
{
DBG("Started building extensions list for class '%s'", desc->name);
fprintf(stderr, "Started building extensions list for class '%s'\n", desc->name); fflush(stderr);
extn_list = NULL;
const _Eo_Class *extn = NULL;
const Eo_Id *extn_id = NULL;
@ -1220,6 +1229,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
extn_sz = sizeof(_Eo_Class *) * (eina_list_count(extn_list) + 1);
DBG("Finished building extensions list for class '%s'", desc->name);
fprintf(stderr, "Finished building extensions list for class '%s'\n", desc->name); fflush(stderr);
}
/* Prepare mro list */
@ -1244,6 +1254,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
const _Eo_Class *kls_itr;
DBG("Started building Mixins list for class '%s'", desc->name);
fprintf(stderr, "Started building Mixins list for class '%s'\n", desc->name); fflush(stderr);
mixins = NULL;
EINA_LIST_FOREACH(mro, itr, kls_itr)
@ -1258,6 +1269,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
mixins_sz += sizeof(Eo_Extension_Data_Offset);
DBG("Finished building Mixins list for class '%s'", desc->name);
fprintf(stderr, "Finished building Mixins list for class '%s'\n", desc->name); fflush(stderr);
}
klass = calloc(1, _eo_class_sz + extn_sz + mro_sz + mixins_sz);
@ -1297,6 +1309,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
*(extn_itr++) = extn;
DBG("Added '%s' extension", extn->desc->name);
fprintf(stderr, "Added '%s' extension\n", extn->desc->name); fflush(stderr);
}
*(extn_itr) = NULL;
}
@ -1310,6 +1323,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
*(mro_itr++) = kls_itr;
DBG("Added '%s' to MRO", kls_itr->desc->name);
fprintf(stderr, "Added '%s' to MRO\n", kls_itr->desc->name); fflush(stderr);
}
*(mro_itr) = NULL;
}
@ -1331,6 +1345,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
extn_data_itr++;
DBG("Added '%s' to Data Offset info", kls_itr->desc->name);
fprintf(stderr, "Added '%s' to Data Offset info\n", kls_itr->desc->name);
}
extn_data_itr->klass = 0;
extn_data_itr->offset = 0;
@ -1410,6 +1425,7 @@ eo_class_new(const Eo_Class_Description *desc, const Eo_Class *parent_id, ...)
_eo_class_constructor(klass);
DBG("Finished building class '%s'", klass->desc->name);
fprintf(stderr, "Finished building class '%s'\n", klass->desc->name); fflush(stderr);
return _eo_class_id_get(klass);
}
@ -1499,13 +1515,18 @@ EAPI void
eo_del(const Eo *obj)
{
Eo *parent_tmp;
if (eo_do_ret(obj, parent_tmp, eo_parent_get()))
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
if (eo_do_ret(obj, parent_tmp, eo_parent_get(obj)))
{
eo_do(obj, eo_parent_set(NULL));
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
eo_do(obj, eo_parent_set(obj, NULL));
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
}
else
{
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
eo_unref(obj);
fprintf(stderr, "%s %s:%d\n", __func__, __FILE__, __LINE__); fflush(stderr);
}
}
@ -1541,7 +1562,7 @@ _eo_data_scope_safe_get(const _Eo_Object *obj, const _Eo_Class *klass)
return NULL;
}
static inline void *
EAPI void *
_eo_data_scope_get(const _Eo_Object *obj, const _Eo_Class *klass)
{
if (EINA_LIKELY(klass->desc->type != EO_CLASS_TYPE_MIXIN))
@ -1871,3 +1892,44 @@ eo_manual_free(Eo *obj_id)
return EINA_TRUE;
}
__attribute__ ((visibility("default"))) _Eo_Object *
_eo_obj_pointer_get(const Eo_Id obj_id)
{
#ifdef HAVE_EO_ID
_Eo_Id_Entry *entry;
Generation_Counter generation;
Table_Index mid_table_id, table_id, entry_id;
// NULL objects will just be sensibly ignored. not worth complaining
// every single time.
if (!obj_id)
{
DBG("obj_id is NULL. Possibly unintended access?");
return NULL;
}
else if (!(obj_id & MASK_OBJ_TAG))
{
DBG("obj_id is not a valid object id.");
return NULL;
}
EO_DECOMPOSE_ID(obj_id, mid_table_id, table_id, entry_id, generation);
/* Check the validity of the entry */
if (_eo_ids_tables[mid_table_id] && TABLE_FROM_IDS)
{
entry = &(TABLE_FROM_IDS->entries[entry_id]);
if (entry && entry->active && (entry->generation == generation))
return entry->ptr;
}
ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.",
(void *)obj_id);
return NULL;
#else
return (_Eo_Object *) obj_id;
#endif
}

View File

@ -66,7 +66,7 @@ _eo_base_key_data_set(Eo *obj, Eo_Base_Data *pd,
if (!key) return;
eo_do(obj, eo_key_data_del(key); );
eo_do(obj, eo_key_data_del(obj, key); );
node = malloc(sizeof(Eo_Generic_Data_Node));
if (!node) return;
@ -103,9 +103,9 @@ _eo_base_parent_set(Eo *obj, Eo_Base_Data *pd, Eo *parent_id)
if (pd->parent == parent_id)
return;
if (eo_do_ret(obj, tmp, eo_composite_part_is()) && pd->parent)
if (eo_do_ret(obj, tmp, eo_composite_part_is(obj)) && pd->parent)
{
eo_do(pd->parent, eo_composite_detach(obj));
eo_do(pd->parent, eo_composite_detach(pd->parent, obj));
}
if (pd->parent)
@ -574,7 +574,7 @@ _eo_base_event_callback_priority_add(Eo *obj, Eo_Base_Data *pd,
{
const Eo_Callback_Array_Item arr[] = { {desc, func}, {NULL, NULL}};
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_ADD, (void *)arr));
eo_do(obj, eo_event_callback_call(obj, EO_EV_CALLBACK_ADD, (void *)arr));
}
}
@ -596,7 +596,7 @@ _eo_base_event_callback_del(Eo *obj, Eo_Base_Data *pd,
cb->delete_me = EINA_TRUE;
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)arr); );
eo_do(obj, eo_event_callback_call(obj, EO_EV_CALLBACK_DEL, (void *)arr); );
return;
}
}
@ -621,7 +621,7 @@ _eo_base_event_callback_array_priority_add(Eo *obj, Eo_Base_Data *pd,
_eo_callbacks_sorted_insert(pd, cb);
{
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_ADD, (void *)array); );
eo_do(obj, eo_event_callback_call(obj, EO_EV_CALLBACK_ADD, (void *)array); );
}
}
@ -641,7 +641,7 @@ _eo_base_event_callback_array_del(Eo *obj, Eo_Base_Data *pd,
pd->deletions_waiting = EINA_TRUE;
_eo_callbacks_clear(pd);
eo_do(obj, eo_event_callback_call(EO_EV_CALLBACK_DEL, (void *)array); );
eo_do(obj, eo_event_callback_call(obj, EO_EV_CALLBACK_DEL, (void *)array); );
return;
}
}
@ -729,7 +729,7 @@ _eo_event_forwarder_callback(void *data, Eo *obj, const Eo_Event_Description *de
Eo *new_obj = (Eo *) data;
Eina_Bool ret = EINA_FALSE;
eo_do(new_obj, ret = eo_event_callback_call(desc, (void *)event_info); );
eo_do(new_obj, ret = eo_event_callback_call(new_obj, desc, (void *)event_info); );
return ret;
}
@ -743,7 +743,7 @@ _eo_base_event_callback_forwarder_add(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
eo_do(obj, eo_event_callback_add(desc, _eo_event_forwarder_callback, new_obj); );
eo_do(obj, eo_event_callback_add(obj, desc, _eo_event_forwarder_callback, new_obj); );
}
EOLIAN static void
@ -754,7 +754,7 @@ _eo_base_event_callback_forwarder_del(Eo *obj, Eo_Base_Data *pd EINA_UNUSED,
/* FIXME: Add it EO_MAGIC_RETURN(new_obj, EO_EINA_MAGIC); */
eo_do(obj, eo_event_callback_del(desc, _eo_event_forwarder_callback, new_obj); );
eo_do(obj, eo_event_callback_del(obj, desc, _eo_event_forwarder_callback, new_obj); );
}
EOLIAN static void
@ -829,7 +829,7 @@ _eo_base_composite_attach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_
comp_obj->composite = EINA_TRUE;
parent->composite_objects = eina_list_prepend(parent->composite_objects, comp_obj_id);
eo_do(comp_obj_id, eo_parent_set(parent_id));
eo_do(comp_obj_id, eo_parent_set(comp_obj_id, parent_id));
return EINA_TRUE;
}
@ -845,7 +845,7 @@ _eo_base_composite_detach(Eo *parent_id, Eo_Base_Data *pd EINA_UNUSED, Eo *comp_
comp_obj->composite = EINA_FALSE;
parent->composite_objects = eina_list_remove(parent->composite_objects, comp_obj_id);
eo_do(comp_obj_id, eo_parent_set(NULL));
eo_do(comp_obj_id, eo_parent_set(comp_obj_id, NULL));
return EINA_TRUE;
}
@ -981,14 +981,14 @@ _eo_base_destructor(Eo *obj, Eo_Base_Data *pd)
while (pd->children)
{
child = eina_list_data_get(pd->children);
eo_do(child, eo_parent_set(NULL));
eo_do(child, eo_parent_set(child, NULL));
}
if (pd->parent)
{
ERR("Object '%p' still has a parent at the time of destruction.", obj);
eo_ref(obj);
eo_do(obj, eo_parent_set(NULL));
eo_do(obj, eo_parent_set(obj, NULL));
}
_eo_generic_data_del_all(pd);

View File

@ -32,7 +32,7 @@
} while (0)
extern int _eo_log_dom;
__attribute__ ((visibility("default"))) extern int _eo_log_dom;
#ifdef CRI
#undef CRI
@ -65,7 +65,7 @@ typedef struct _Eo_Object _Eo_Object;
typedef struct _Eo_Header Eo_Header;
/* Retrieves the pointer to the object from the id */
static inline _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id);
//EAPI _Eo_Object *_eo_obj_pointer_get(const Eo_Id obj_id);
/* Allocates an entry for the given object */
static inline Eo_Id _eo_id_allocate(const _Eo_Object *obj);
@ -78,97 +78,60 @@ static inline void _eo_free_ids_tables(void);
void _eo_condtor_done(Eo *obj);
struct _Eo_Header
{
#ifndef HAVE_EO_ID
EINA_MAGIC
#endif
Eo_Id id;
};
struct _Eo_Object
{
Eo_Header header;
const _Eo_Class *klass;
#ifdef EO_DEBUG
Eina_Inlist *xrefs;
Eina_Inlist *data_xrefs;
#endif
Eina_List *composite_objects;
int refcount;
int datarefcount;
Eina_Bool condtor_done:1;
Eina_Bool finalized:1;
Eina_Bool composite:1;
Eina_Bool del_triggered:1;
Eina_Bool destructed:1;
Eina_Bool manual_free:1;
};
/* FIXME: Change the type to something generic that makes sense for eo */
typedef void (*eo_op_func_type)(Eo *, void *class_data, va_list *list);
typedef struct _Dich_Chain1 Dich_Chain1;
typedef struct
{
eo_op_func_type func;
const _Eo_Class *src;
} op_type_funcs;
struct _Dich_Chain1
{
op_type_funcs *funcs;
};
typedef struct
typedef struct Eo_Extension_Data_Offset
{
const _Eo_Class *klass;
size_t offset;
} Eo_Extension_Data_Offset;
struct _Eo_Class
{
Eo_Header header;
struct _Eo_Class;
// {
// Eo_Header header;
const _Eo_Class *parent;
const Eo_Class_Description *desc;
Dich_Chain1 *chain; /**< The size is chain size */
// const _Eo_Class *parent;
// const Eo_Class_Description *desc;
// Dich_Chain1 *chain; /**< The size is chain size */
const _Eo_Class **extensions;
// const _Eo_Class **extensions;
Eo_Extension_Data_Offset *extn_data_off;
// Eo_Extension_Data_Offset *extn_data_off;
const _Eo_Class **mro;
// const _Eo_Class **mro;
/* cached object for faster allocation */
struct {
Eina_Trash *trash;
Eina_Spinlock trash_lock;
unsigned int trash_count;
} objects;
// /* cached object for faster allocation */
// struct {
// Eina_Trash *trash;
// Eina_Spinlock trash_lock;
// unsigned int trash_count;
// } objects;
/* cached iterator for faster allocation cycle */
struct {
Eina_Trash *trash;
Eina_Spinlock trash_lock;
unsigned int trash_count;
} iterators;
// /* cached iterator for faster allocation cycle */
// struct {
// Eina_Trash *trash;
// Eina_Spinlock trash_lock;
// unsigned int trash_count;
// } iterators;
unsigned int obj_size; /**< size of an object of this class */
unsigned int chain_size;
unsigned int base_id;
unsigned int data_offset; /* < Offset of the data within object data. */
// unsigned int obj_size; /**< size of an object of this class */
// unsigned int chain_size;
// unsigned int base_id;
// unsigned int data_offset; /* < Offset of the data within object data. */
Eina_Bool constructed : 1;
/* [extensions*] + NULL */
/* [mro*] + NULL */
/* [extensions data offset] + NULL */
};
// Eina_Bool constructed : 1;
// /* [extensions*] + NULL */
// /* [mro*] + NULL */
// /* [extensions data offset] + NULL */
// };
typedef struct
{
@ -214,11 +177,11 @@ _eo_del_internal(const char *file, int line, _Eo_Object *obj)
const _Eo_Class *klass = obj->klass;
eo_do(_eo_id_get(obj), eo_event_callback_call(EO_EV_DEL, NULL));
eo_do(_eo_id_get(obj), eo_event_callback_call(_eo_id_get(obj), EO_EV_DEL, NULL));
_eo_condtor_reset(obj);
eo_do(_eo_id_get(obj), eo_destructor());
eo_do(_eo_id_get(obj), eo_destructor(_eo_id_get(obj)));
if (!obj->condtor_done)
{
@ -232,7 +195,7 @@ _eo_del_internal(const char *file, int line, _Eo_Object *obj)
Eo *emb_obj;
EINA_LIST_FOREACH_SAFE(obj->composite_objects, itr, itr_n, emb_obj)
{
eo_do(_eo_id_get(obj), eo_composite_detach(emb_obj));
eo_do(_eo_id_get(obj), eo_composite_detach(_eo_id_get(obj), emb_obj));
}
}

View File

@ -5,7 +5,7 @@
#include "eo_ptr_indirection.h"
/* Tables handling pointers indirection */
_Eo_Ids_Table **_eo_ids_tables[MAX_MID_TABLE_ID] = { NULL };
__attribute__ ((visibility("default"))) _Eo_Ids_Table **_eo_ids_tables[MAX_MID_TABLE_ID] = { NULL };
/* Current table used for following allocations */
_Eo_Ids_Table *_current_table = NULL;

View File

@ -227,7 +227,7 @@ typedef struct
} _Eo_Ids_Table;
/* Tables handling pointers indirection */
extern _Eo_Ids_Table **_eo_ids_tables[MAX_MID_TABLE_ID];
__attribute__ ((visibility("default"))) extern _Eo_Ids_Table **_eo_ids_tables[MAX_MID_TABLE_ID];
/* Current table used for following allocations */
extern _Eo_Ids_Table *_current_table;
@ -259,45 +259,6 @@ extern Generation_Counter _eo_generation_counter;
/* Macro used for readability */
#define TABLE_FROM_IDS _eo_ids_tables[mid_table_id][table_id]
static inline _Eo_Object *
_eo_obj_pointer_get(const Eo_Id obj_id)
{
#ifdef HAVE_EO_ID
_Eo_Id_Entry *entry;
Generation_Counter generation;
Table_Index mid_table_id, table_id, entry_id;
// NULL objects will just be sensibly ignored. not worth complaining
// every single time.
if (!obj_id)
{
DBG("obj_id is NULL. Possibly unintended access?");
return NULL;
}
else if (!(obj_id & MASK_OBJ_TAG))
{
DBG("obj_id is not a valid object id.");
return NULL;
}
EO_DECOMPOSE_ID(obj_id, mid_table_id, table_id, entry_id, generation);
/* Check the validity of the entry */
if (_eo_ids_tables[mid_table_id] && TABLE_FROM_IDS)
{
entry = &(TABLE_FROM_IDS->entries[entry_id]);
if (entry && entry->active && (entry->generation == generation))
return entry->ptr;
}
ERR("obj_id %p is not pointing to a valid object. Maybe it has already been freed.",
(void *)obj_id);
return NULL;
#else
return (_Eo_Object *) obj_id;
#endif
}
static inline _Eo_Id_Entry *
_get_available_entry(_Eo_Ids_Table *table)

View File

@ -153,7 +153,7 @@ evas_object_event_callback_all_del(Evas_Object *eo_obj)
if (!obj->callbacks) return;
EINA_INLIST_FOREACH_SAFE(obj->callbacks, itr, info)
{
eo_do(eo_obj, eo_event_callback_del(
eo_do(eo_obj, eo_event_callback_del(eo_obj,
_legacy_evas_callback_table[info->type], _eo_evas_object_cb, info));
obj->callbacks =
@ -180,7 +180,7 @@ evas_event_callback_all_del(Evas *eo_e)
EINA_INLIST_FOREACH_SAFE(e->callbacks, itr, info)
{
eo_do(eo_e, eo_event_callback_del(
eo_do(eo_e, eo_event_callback_del(eo_e,
_legacy_evas_callback_table[info->type], _eo_evas_cb, info));
e->callbacks =
@ -198,7 +198,7 @@ evas_event_callback_cleanup(Evas *eo_e)
void
evas_event_callback_call(Evas *eo_e, Evas_Callback_Type type, void *event_info)
{
eo_do(eo_e, eo_event_callback_call(_legacy_evas_callback_table[type], event_info));
eo_do(eo_e, eo_event_callback_call(eo_e, _legacy_evas_callback_table[type], event_info));
}
void
@ -259,7 +259,7 @@ evas_object_event_callback_call(Evas_Object *eo_obj, Evas_Object_Protected_Data
break;
}
eo_do(eo_obj, eo_event_callback_call(_legacy_evas_callback_table[type], event_info));
eo_do(eo_obj, eo_event_callback_call(eo_obj, _legacy_evas_callback_table[type], event_info));
if (type == EVAS_CALLBACK_MOUSE_DOWN)
{
@ -310,7 +310,7 @@ evas_object_event_callback_priority_add(Evas_Object *eo_obj, Evas_Callback_Type
cb_info->type = type;
const Eo_Event_Description *desc = _legacy_evas_callback_table[type];
eo_do(eo_obj, eo_event_callback_priority_add(desc, priority, _eo_evas_object_cb, cb_info));
eo_do(eo_obj, eo_event_callback_priority_add(eo_obj, desc, priority, _eo_evas_object_cb, cb_info));
obj->callbacks =
eina_inlist_append(obj->callbacks, EINA_INLIST_GET(cb_info));
@ -336,7 +336,7 @@ evas_object_event_callback_del(Evas_Object *eo_obj, Evas_Callback_Type type, Eva
if ((info->func == func) && (info->type == type))
{
void *tmp = info->data;
eo_do(eo_obj, eo_event_callback_del(
eo_do(eo_obj, eo_event_callback_del(eo_obj,
_legacy_evas_callback_table[type], _eo_evas_object_cb, info));
obj->callbacks =
@ -368,7 +368,7 @@ evas_object_event_callback_del_full(Evas_Object *eo_obj, Evas_Callback_Type type
if ((info->func == func) && (info->type == type) && info->data == data)
{
void *tmp = info->data;
eo_do(eo_obj, eo_event_callback_del(
eo_do(eo_obj, eo_event_callback_del(eo_obj,
_legacy_evas_callback_table[type], _eo_evas_object_cb, info));
obj->callbacks =
@ -404,7 +404,7 @@ evas_event_callback_priority_add(Evas *eo_e, Evas_Callback_Type type, Evas_Callb
cb_info->type = type;
const Eo_Event_Description *desc = _legacy_evas_callback_table[type];
eo_do(eo_e, eo_event_callback_priority_add(desc, priority, _eo_evas_cb, cb_info));
eo_do(eo_e, eo_event_callback_priority_add(eo_e, desc, priority, _eo_evas_cb, cb_info));
e->callbacks = eina_inlist_append(e->callbacks, EINA_INLIST_GET(cb_info));
}
@ -429,7 +429,7 @@ evas_event_callback_del(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb func)
if ((info->func == func) && (info->type == type))
{
void *tmp = info->data;
eo_do(eo_e, eo_event_callback_del(
eo_do(eo_e, eo_event_callback_del(eo_e,
_legacy_evas_callback_table[type], _eo_evas_cb, info));
e->callbacks =
@ -461,7 +461,7 @@ evas_event_callback_del_full(Evas *eo_e, Evas_Callback_Type type, Evas_Event_Cb
if ((info->func == func) && (info->type == type) && (info->data == data))
{
void *tmp = info->data;
eo_do(eo_e, eo_event_callback_del(
eo_do(eo_e, eo_event_callback_del(eo_e,
_legacy_evas_callback_table[type], _eo_evas_cb, info));
e->callbacks =

View File

@ -8,7 +8,7 @@ _camera_node_change_notify(const Eina_Hash *hash EINA_UNUSED, const void *key,
void *data EINA_UNUSED, void *fdata)
{
Evas_Canvas3D_Node *n = *(Evas_Canvas3D_Node **)key;
eo_do(n, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata));
eo_do(n, evas_canvas3d_object_change(n, EVAS_CANVAS3D_STATE_NODE_CAMERA, (Evas_Canvas3D_Object *)fdata));
return EINA_TRUE;
}
@ -66,8 +66,8 @@ EOLIAN static Eo *
_evas_canvas3d_camera_eo_base_constructor(Eo *obj,
Evas_Canvas3D_Camera_Data *pd EINA_UNUSED)
{
obj = eo_do_super_ret(obj, MY_CLASS, obj, eo_constructor());
eo_do(obj, evas_canvas3d_object_type_set(EVAS_CANVAS3D_OBJECT_TYPE_CAMERA));
obj = eo_super_eo_constructor( MY_CLASS, obj);
eo_do(obj, evas_canvas3d_object_type_set(obj, EVAS_CANVAS3D_OBJECT_TYPE_CAMERA));
return obj;
}
@ -92,7 +92,7 @@ _evas_canvas3d_camera_eo_base_destructor(Eo *obj,
eina_hash_free(pd->nodes);
}
eo_do_super(obj, MY_CLASS, eo_destructor());
eo_super_eo_destructor(MY_CLASS, obj);
}
EAPI Evas_Canvas3D_Camera *
@ -101,7 +101,8 @@ evas_canvas3d_camera_add(Evas *e)
MAGIC_CHECK(e, Evas, MAGIC_EVAS);
return NULL;
MAGIC_CHECK_END();
Evas_Object *eo_obj = eo_add(MY_CLASS, e);
Evas_Object *eo_obj;
eo_add(eo_obj, MY_CLASS, e);
return eo_obj;
}
@ -110,7 +111,7 @@ _evas_canvas3d_camera_projection_matrix_set(Eo *obj, Evas_Canvas3D_Camera_Data *
const Evas_Real *matrix)
{
evas_mat4_array_set(&pd->projection, matrix);
eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
eo_do(obj, evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
}
EOLIAN static void
@ -133,7 +134,7 @@ _evas_canvas3d_camera_projection_perspective_set(Eo *obj, Evas_Canvas3D_Camera_D
xmax = ymax * aspect;
evas_mat4_frustum_set(&pd->projection, -xmax, xmax, -ymax, ymax, dnear, dfar);
eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
eo_do(obj, evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
}
EOLIAN static void
@ -143,7 +144,7 @@ _evas_canvas3d_camera_projection_frustum_set(Eo *obj, Evas_Canvas3D_Camera_Data
Evas_Real dnear, Evas_Real dfar)
{
evas_mat4_frustum_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
eo_do(obj, evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
}
EOLIAN static void
@ -153,7 +154,7 @@ _evas_canvas3d_camera_projection_ortho_set(Eo *obj, Evas_Canvas3D_Camera_Data *p
Evas_Real dnear, Evas_Real dfar)
{
evas_mat4_ortho_set(&pd->projection, left, right, bottom, top, dnear, dfar);
eo_do(obj, evas_canvas3d_object_change(EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
eo_do(obj, evas_canvas3d_object_change(obj, EVAS_CANVAS3D_STATE_CAMERA_PROJECTION, NULL));
}
EOLIAN static Eina_Bool

Some files were not shown because too many files have changed in this diff Show More