diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am index e7cc6dd63a..3492e6b45e 100644 --- a/src/Makefile_Edje.am +++ b/src/Makefile_Edje.am @@ -73,7 +73,6 @@ lib/edje/edje_misc.c \ lib/edje/edje_module.c \ lib/edje/edje_multisense.c \ lib/edje/edje_program.c \ -lib/edje/edje_script_only.c \ lib/edje/edje_smart.c \ lib/edje/edje_text.c \ lib/edje/edje_textblock_styles.c \ diff --git a/src/bin/edje/edje_cc_handlers.c b/src/bin/edje/edje_cc_handlers.c index 845aa53ab2..289708f032 100644 --- a/src/bin/edje/edje_cc_handlers.c +++ b/src/bin/edje/edje_cc_handlers.c @@ -214,7 +214,7 @@ static void st_collections_group_inherit(void); static void st_collections_group_program_source(void); static void st_collections_group_part_remove(void); static void st_collections_group_program_remove(void); -static void st_collections_group_script_only(void); +static void st_collections_group_lua_script_only(void); static void st_collections_group_script_recursion(void); static void st_collections_group_alias(void); static void st_collections_group_min(void); @@ -540,9 +540,8 @@ New_Statement_Handler statement_handlers[] = {"collections.group.target_group", st_collections_group_target_group}, /* dup */ {"collections.group.part_remove", st_collections_group_part_remove}, {"collections.group.program_remove", st_collections_group_program_remove}, - {"collections.group.script_only", st_collections_group_script_only}, + {"collections.group.lua_script_only", st_collections_group_lua_script_only}, {"collections.group.script_recursion", st_collections_group_script_recursion}, - {"collections.group.lua_script_only", st_collections_group_script_only}, {"collections.group.alias", st_collections_group_alias}, {"collections.group.min", st_collections_group_min}, {"collections.group.max", st_collections_group_max}, @@ -3475,7 +3474,7 @@ st_collections_group_inherit(void) /** @page edcref @property - script_only + lua_script_only @parameters [on/off] @effect @@ -3484,7 +3483,7 @@ st_collections_group_inherit(void) @endproperty */ static void -st_collections_group_script_only(void) +st_collections_group_lua_script_only(void) { Edje_Part_Collection *pc; diff --git a/src/bin/edje/edje_convert.c b/src/bin/edje/edje_convert.c index 41e319b6b6..fc98722a7b 100644 --- a/src/bin/edje/edje_convert.c +++ b/src/bin/edje/edje_convert.c @@ -371,7 +371,6 @@ _edje_collection_convert(Eet_File *ef, Edje_Part_Collection_Directory_Entry *ce, edc->prop.max = oedc->prop.max; edc->script = oedc->script; edc->part = oedc->part; - edc->script_only = oedc->script_only; edc->lua_script_only = oedc->lua_script_only; edc->checked = oedc->checked; diff --git a/src/bin/edje/edje_data_convert.c b/src/bin/edje/edje_data_convert.c index 0f72a296fe..3d451bb617 100644 --- a/src/bin/edje/edje_data_convert.c +++ b/src/bin/edje/edje_data_convert.c @@ -437,7 +437,6 @@ _edje_edd_old_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part_collection, Old_Edje_Part_Collection, "prop.max.w", prop.max.w, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part_collection, Old_Edje_Part_Collection, "prop.max.h", prop.max.h, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part_collection, Old_Edje_Part_Collection, "id", id, EET_T_INT); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part_collection, Old_Edje_Part_Collection, "script_only", script_only, EET_T_UCHAR); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_old_edje_part_collection, Old_Edje_Part_Collection, "lua_script_only", lua_script_only, EET_T_UCHAR); { diff --git a/src/lib/edje/edje_convert.c b/src/lib/edje/edje_convert.c index 2f923e1923..4a04ff4d1a 100644 --- a/src/lib/edje/edje_convert.c +++ b/src/lib/edje/edje_convert.c @@ -412,7 +412,6 @@ _edje_collection_convert(Edje_File *file, Old_Edje_Part_Collection *oedc) edc->prop.max = oedc->prop.max; edc->script = oedc->script; edc->part = oedc->part; - edc->script_only = oedc->script_only; edc->lua_script_only = oedc->lua_script_only; edc->checked = oedc->checked; diff --git a/src/lib/edje/edje_convert.h b/src/lib/edje/edje_convert.h index c37afd7bb8..951d0c6f24 100644 --- a/src/lib/edje/edje_convert.h +++ b/src/lib/edje/edje_convert.h @@ -103,8 +103,6 @@ struct _Old_Edje_Part_Collection Embryo_Program *script; /**< all the embryo script code for this group */ const char *part; /**< part name */ - unsigned char script_only; /**< script only */ - unsigned char lua_script_only; /** LUA script only */ unsigned char checked : 1; /**< contents checked and registered */ diff --git a/src/lib/edje/edje_data.c b/src/lib/edje/edje_data.c index ca1cbeea03..0220ecf265 100644 --- a/src/lib/edje/edje_data.c +++ b/src/lib/edje/edje_data.c @@ -1069,7 +1069,6 @@ _edje_edd_init(void) EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.w", prop.max.w, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.max.h", prop.max.h, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "part", part, EET_T_STRING); - EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "script_only", script_only, EET_T_UCHAR); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "lua_script_only", lua_script_only, EET_T_UCHAR); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "prop.orientation", prop.orientation, EET_T_INT); EET_DATA_DESCRIPTOR_ADD_BASIC(_edje_edd_edje_part_collection, Edje_Part_Collection, "broadcast_signal", broadcast_signal, EET_T_UCHAR); diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c index f9af9e3de9..9914ced7d0 100644 --- a/src/lib/edje/edje_load.c +++ b/src/lib/edje/edje_load.c @@ -352,7 +352,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch collect = _edje_object_collect(ed); - if (_edje_script_only(ed)) _edje_script_only_shutdown(ed); if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed); #ifdef HAVE_EPHYSICS @@ -398,12 +397,7 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch ed->groups = eina_list_append(ed->groups, ed); - if (ed->collection->script_only) - { - ed->load_error = EDJE_LOAD_ERROR_NONE; - _edje_script_only_init(ed); - } - else if (ed->collection->lua_script_only) + if (ed->collection->lua_script_only) { ed->load_error = EDJE_LOAD_ERROR_NONE; _edje_lua_script_only_init(ed); @@ -759,7 +753,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch _edje_ref(ed); _edje_block(ed); _edje_util_freeze(ed); - // if (ed->collection->script) _edje_embryo_script_init(ed); _edje_var_init(ed); for (i = 0; i < ed->table_parts_size; i++) { @@ -1258,10 +1251,6 @@ _edje_file_del(Edje *ed) _edje_message_del(ed); _edje_block_violate(ed); _edje_var_shutdown(ed); - // if (ed->collection) - // { - // if (ed->collection->script) _edje_embryo_script_shutdown(ed); - // } if (!((ed->file) && (ed->collection))) { diff --git a/src/lib/edje/edje_message_queue.c b/src/lib/edje/edje_message_queue.c index 524ed75f7a..4ed5a07ebe 100644 --- a/src/lib/edje/edje_message_queue.c +++ b/src/lib/edje/edje_message_queue.c @@ -665,11 +665,6 @@ _edje_message_process(Edje_Message *em) } /* now this message is destined for the script message handler fn */ if (!(em->edje->collection)) return; - if ((em->edje->collection->script) && _edje_script_only (em->edje)) - { - _edje_script_only_message(em->edje, em); - return; - } if (em->edje->L) { _edje_lua_script_only_message(em->edje, em); diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h index 32c5506507..a298684ac3 100644 --- a/src/lib/edje/edje_private.h +++ b/src/lib/edje/edje_private.h @@ -1016,8 +1016,6 @@ struct _Edje_Part_Collection } patterns; /* *** *** */ - unsigned char script_only; - unsigned char lua_script_only; unsigned char broadcast_signal; @@ -1488,7 +1486,6 @@ struct _Edje Eina_List *subobjs; Eina_List *text_insert_filter_callbacks; Eina_List *markup_filter_callbacks; - void *script_only_data; Eina_List *groups; @@ -2443,15 +2440,6 @@ void _edje_embryo_globals_init(Edje *ed); if ((___cptr = (int *)embryo_data_address_get(ep, (par)))) { \ *___cptr = (int)val; } } -Eina_Bool _edje_script_only(Edje *ed); -void _edje_script_only_init(Edje *ed); -void _edje_script_only_shutdown(Edje *ed); -void _edje_script_only_show(Edje *ed); -void _edje_script_only_hide(Edje *ed); -void _edje_script_only_move(Edje *ed); -void _edje_script_only_resize(Edje *ed); -void _edje_script_only_message(Edje *ed, Edje_Message *em); - extern jmp_buf _edje_lua_panic_jmp; #define _edje_lua_panic_here() setjmp(_edje_lua_panic_jmp) diff --git a/src/lib/edje/edje_script_only.c b/src/lib/edje/edje_script_only.c deleted file mode 100644 index 480e107455..0000000000 --- a/src/lib/edje/edje_script_only.c +++ /dev/null @@ -1,643 +0,0 @@ -#include "edje_private.h" - -/* - * ALREADY EXPORTED BY EMBRYO: - * - * enum Float_Round_Method { - * ROUND, FLOOR, CEIL, TOZERO - * }; - * enum Float_Angle_Mode { - * RADIAN, DEGREES, GRADES - * }; - * - * numargs(); - * getarg(arg, index=0); - * setarg(arg, index=0, value); - * - * Float:atof(string[]); - * Float:fract(Float:value); - * round(Float:value, Float_Round_Method:method=ROUND); - * Float:sqrt(Float:value); - * Float:pow(Float:value, Float:exponent); - * Float:log(Float:value, Float:base=10.0); - * Float:sin(Float:value, Float_Angle_Mode:mode=RADIAN); - * Float:cos(Float:value, Float_Angle_Mode:mode=RADIAN); - * Float:tan(Float:value, Float_Angle_Mode:mode=RADIAN); - * Float:abs(Float:value); - * atoi(str[]); - * fnmatch(glob[], str[]); - * strcmp(str1[], str2[]); - * strncmp(str1[], str2[]); - * strcpy(dst[], src[]); - * strncpy(dst[], src[], n); - * strlen(str[]); - * strcat(dst[], src[]); - * strncat(dst[], src[], n); - * strprep(dst[], src[]); - * strnprep(dst[], src[], n); - * strcut(dst[], str[], n, n2); - * snprintf(dst[], dstn, fmt[], ...); - * strstr(str[], ndl[]); - * strchr(str[], ch[]); - * strrchr(str[], ch[]); - * rand(); - * Float:randf(); - * Float:seconds(); - * date(&year, &month, &day, &yearday, &weekday, &hr, &min, &Float:sec); - * - */ - -typedef struct _Sinfo Sinfo; - -struct _Sinfo -{ - struct - { - Embryo_Function - obj_init, obj_shutdown, obj_show, obj_show_immediate, - obj_hide, obj_hide_immediate, obj_move, obj_move_immediate, - obj_resize, obj_resize_immediate, obj_message; - } fn; - struct - { - Ecore_Job * show, *hide, *move, *resize; - } job; - struct - { - int id; - Eina_Hash *hash; // FIXME: hash -> bad. too big. one-way lookup etc. - } oid; -}; - -static void _call_fn(Edje * ed, const char *fname, Embryo_Function fn); - -/* frankly - these make the code shorter to type and read - just sanity for - * development */ -#define IFFN(func) if (si->fn.func != EMBRYO_FUNCTION_NONE) -#define IFNO(func) if (si->fn.func == EMBRYO_FUNCTION_NONE) -#define CLFN(func) IFFN(func) {_call_fn(ed, #func, si->fn.func);} -#define SI Sinfo *si; si = ed->script_only_data; if (!si) return -#define SI_RETURN(ret) Sinfo *si; si = ed->script_only_data; if (!si) return (ret) -#define PINT(val) embryo_parameter_cell_push(ed->collection->script, (Embryo_Cell)(val)) -#define PSTR(val) embryo_parameter_string_push(ed->collection->script, val) -#define GTFN(func) si->fn.func = embryo_program_function_find(ed->collection->script, #func) -#define DELJ(type) if (si->job.type) ecore_job_del(si->job.type); -#define ADDJ(type, func) si->job.type = ecore_job_add(func, ed); -#define ZERJ(type) si->job.type = NULL; -#define IFNJ(type) if (!si->job.type) -#define EXPF(func) embryo_program_native_call_add(ed->collection->script, #func, _exp_##func) - -typedef struct _Oid Oid; - -struct _Oid -{ - Edje *ed; - Evas_Object *obj; - Evas_Coord x, y, w, h; - int oid; -}; - -/* FIXME: using eina_hash and strings is just nasty! make a custom int hash */ -static int -_oid_alloc(Edje * ed) -{ - SI_RETURN(0); - - si->oid.id++; - return si->oid.id; -} - -static Oid * -_oid_track(Edje * ed, Evas_Object * o) -{ - Oid *oi; - - char buf[64]; - - SI_RETURN(NULL); - - oi = calloc(1, sizeof(Oid)); - if (!oi) - return NULL; - oi->oid = _oid_alloc(ed); - if (!oi->oid) - { - free(oi); - return NULL; - } - oi->ed = ed; - oi->obj = o; - evas_object_smart_member_add(oi->obj, oi->ed->obj); - evas_object_clip_set(oi->obj, oi->ed->base->clipper); - evas_object_geometry_get(oi->obj, &(oi->x), &(oi->y), &(oi->w), &(oi->h)); - snprintf(buf, sizeof(buf), "%i", oi->oid); - if (!si->oid.hash) - si->oid.hash = eina_hash_string_superfast_new(NULL); - eina_hash_add(si->oid.hash, buf, oi); - return oi; -} - -static Oid * -_oid_find(Edje * ed, int oid) -{ - char buf[64]; - - SI_RETURN(NULL); - - snprintf(buf, sizeof(buf), "%i", oid); - return eina_hash_find(si->oid.hash, buf); -} - -static void -_oid_del(Edje * ed, int oid) -{ - char buf[64]; - - SI; - - snprintf(buf, sizeof(buf), "%i", oid); - eina_hash_del(si->oid.hash, buf, NULL); -} - -static void -_oid_free(Oid * oid) -{ - free(oid); -} - -static Eina_Bool -_oid_freeall_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata EINA_UNUSED) -{ - Oid *oid = data; - - evas_object_del(oid->obj); - free(oid); - return EINA_TRUE; -} - -static void -_oid_freeall(Edje * ed) -{ - SI; - if (!si->oid.hash) - return; - eina_hash_foreach(si->oid.hash, _oid_freeall_cb, ed); - eina_hash_free(si->oid.hash); - si->oid.hash = NULL; -} - -static Eina_Bool -_oid_moveall_cb(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata EINA_UNUSED) -{ - Oid *oid = data; - - evas_object_move(oid->obj, oid->ed->x + oid->x, oid->ed->y + oid->y); - return EINA_TRUE; -} - -static void -_oid_moveall(Edje * ed) -{ - SI; - if (!si->oid.hash) - return; - eina_hash_foreach(si->oid.hash, _oid_moveall_cb, ed); -} - -/**********/ - -static Embryo_Cell -_exp_e_obj_del(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(1); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - evas_object_del(oid->obj); - _oid_del(ed, oid->oid); - _oid_free(oid); - return 0; -} - -static Embryo_Cell -_exp_e_obj_rect_add(Embryo_Program * ep, Embryo_Cell * params EINA_UNUSED) -{ - Edje *ed = embryo_program_data_get(ep); - - Evas_Object *o; - - Oid *oid; - - SI_RETURN(-1); - - o = evas_object_rectangle_add(evas_object_evas_get(ed->obj)); - if (!o) - return 0; - oid = _oid_track(ed, o); - if (oid) - return oid->oid; - return 0; -} - -static Embryo_Cell -_exp_e_obj_show(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(1); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - evas_object_show(oid->obj); - return 0; -} - -static Embryo_Cell -_exp_e_obj_hide(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(1); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - evas_object_hide(oid->obj); - return 0; -} - -static Embryo_Cell -_exp_e_obj_move(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(3); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - if ((oid->x == params[2]) && (oid->y == params[3])) - return -1; - oid->x = params[2]; - oid->y = params[3]; - evas_object_move(oid->obj, ed->x + oid->x, ed->y + oid->y); - return 0; -} - -static Embryo_Cell -_exp_e_obj_resize(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(3); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - if ((oid->w == params[2]) && (oid->h == params[3])) - return -1; - oid->w = params[2]; - oid->h = params[3]; - evas_object_resize(oid->obj, oid->w, oid->h); - return 0; -} - -static Embryo_Cell -_exp_e_obj_geometry_set(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(5); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - if ((oid->x == params[2]) && (oid->y == params[3]) && - (oid->w == params[4]) && (oid->h == params[5])) - return -1; - oid->x = params[2]; - oid->y = params[3]; - oid->w = params[4]; - oid->h = params[5]; - evas_object_move(oid->obj, ed->x + oid->x, ed->y + oid->y); - evas_object_resize(oid->obj, oid->w, oid->h); - return 0; -} - -static Embryo_Cell -_exp_e_obj_geometry_get(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(5); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - SETINT(oid->x, params[2]); - SETINT(oid->y, params[3]); - SETINT(oid->w, params[4]); - SETINT(oid->h, params[5]); - return 0; -} - -static Embryo_Cell -_exp_e_obj_color_set(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - SI_RETURN(-1); - - CHKPARAM(5); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - evas_object_color_set(oid->obj, params[2], params[3], params[4], params[5]); - return 0; -} - -static Embryo_Cell -_exp_e_obj_color_get(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - Oid *oid; - - int r, g, b, a; - - SI_RETURN(-1); - - CHKPARAM(5); - if (!(oid = _oid_find(ed, params[1]))) - return -1; - evas_object_color_get(oid->obj, &r, &g, &b, &a); - SETINT(r, params[2]); - SETINT(g, params[3]); - SETINT(b, params[4]); - SETINT(a, params[5]); - return 0; -} - -static Embryo_Cell -_exp_e_signal_emit(Embryo_Program * ep, Embryo_Cell * params) -{ - Edje *ed = embryo_program_data_get(ep); - - char *sig = NULL, *src = NULL; - - SI_RETURN(-1); - - CHKPARAM(2); - GETSTR(sig, params[1]); - GETSTR(src, params[2]); - if ((!sig) || (!src)) - return -1; - _edje_emit(ed, sig, src); - return 0; -} - -/**********/ - -Eina_Bool -_edje_script_only(Edje * ed) -{ - if ((ed->collection) && (ed->collection->script) && - (ed->collection->script_only)) - return EINA_TRUE; - return EINA_FALSE; -} - -void -_edje_script_only_init(Edje * ed) -{ - Sinfo *si; - - si = calloc(1, sizeof(Sinfo)); - if (!si) - return; - ed->script_only_data = si; - - embryo_program_data_set(ed->collection->script, ed); - - EXPF(e_obj_del); - EXPF(e_obj_rect_add); - EXPF(e_obj_show); - EXPF(e_obj_hide); - EXPF(e_obj_move); - EXPF(e_obj_resize); - EXPF(e_obj_geometry_set); - EXPF(e_obj_geometry_get); - EXPF(e_obj_color_set); - EXPF(e_obj_color_get); - EXPF(e_signal_emit); - - embryo_program_vm_push(ed->collection->script); - embryo_program_max_cycle_run_set(ed->collection->script, 5000000); - - GTFN(obj_init); - GTFN(obj_shutdown); - GTFN(obj_show); - GTFN(obj_show_immediate); - GTFN(obj_hide); - GTFN(obj_hide_immediate); - GTFN(obj_move); - GTFN(obj_move_immediate); - GTFN(obj_resize); - GTFN(obj_resize_immediate); - GTFN(obj_message); - - CLFN(obj_init); - _edje_script_only_move(ed); -} - -void -_edje_script_only_shutdown(Edje * ed) -{ - SI; - - CLFN(obj_shutdown); - DELJ(show); - DELJ(hide); - DELJ(move); - DELJ(resize); - _oid_freeall(ed); -} - -static void -_show_job(void *data) -{ - Edje *ed = data; - - SI; - - ZERJ(show); - CLFN(obj_show); -} -void -_edje_script_only_show(Edje * ed) -{ - SI; - - IFFN(obj_show) - { - IFNJ(hide) - { - DELJ(show); - ADDJ(show, _show_job); - } - else - { - DELJ(hide); - } - } - IFNO(obj_show_immediate) return; - CLFN(obj_show_immediate); -} - -static void -_hide_job(void *data) -{ - Edje *ed = data; - - SI; - - ZERJ(hide); - CLFN(obj_hide); -} -void -_edje_script_only_hide(Edje * ed) -{ - SI; - - IFFN(obj_hide) - { - IFNJ(show) - { - DELJ(hide); - ADDJ(hide, _hide_job); - } - else - { - DELJ(show); - } - } - IFNO(obj_hide_immediate) return; - CLFN(obj_hide_immediate); -} - -static void -_move_job(void *data) -{ - Edje *ed = data; - - SI; - - _oid_moveall(ed); - ZERJ(move); - IFNO(obj_move) return; - PINT(ed->x); - PINT(ed->y); - CLFN(obj_move); -} -void -_edje_script_only_move(Edje * ed) -{ - SI; - - DELJ(move); - ADDJ(move, _move_job); - IFNO(obj_move_immediate) return; - PINT(ed->x); - PINT(ed->y); - CLFN(obj_move_immediate); -} - -static void -_resize_job(void *data) -{ - Edje *ed = data; - - SI; - - ZERJ(resize); - PINT(ed->w); - PINT(ed->h); - CLFN(obj_resize); -} -void -_edje_script_only_resize(Edje * ed) -{ - SI; - - IFFN(obj_resize) - { - DELJ(resize); - ADDJ(resize, _resize_job); - } - PINT(ed->w); - PINT(ed->h); - CLFN(obj_resize_immediate); -} - -void -_edje_script_only_message(Edje * ed, Edje_Message * em) -{ - SI; - - IFNO(obj_message) return; - _edje_message_parameters_push(em); - CLFN(obj_message); -} - -/**************************************************/ - -static void -_call_fn(Edje * ed, const char *fname, Embryo_Function fn) -{ - int ret; - - ret = embryo_program_run(ed->collection->script, fn); - if (ret == EMBRYO_PROGRAM_FAIL) - { - ERR("ERROR with embryo script. " - "OBJECT NAME: '%s', " - "OBJECT FILE: '%s', " - "ENTRY POINT: '%s', " - "ERROR: '%s'", - ed->collection->part, - ed->file->path, - fname, - embryo_error_string_get(embryo_program_error_get(ed->collection->script))); - } - else if (ret == EMBRYO_PROGRAM_TOOLONG) - { - ERR("ERROR with embryo script. " - "OBJECT NAME: '%s', " - "OBJECT FILE: '%s', " - "ENTRY POINT: '%s', " - "ERROR: 'Script exceeded maximum allowed cycle count of %i'", - ed->collection->part, - ed->file->path, - fname, - embryo_program_max_cycle_run_get(ed->collection->script)); - } -} diff --git a/src/lib/edje/edje_smart.c b/src/lib/edje/edje_smart.c index e35e9d5518..6a76abc72d 100644 --- a/src/lib/edje/edje_smart.c +++ b/src/lib/edje/edje_smart.c @@ -120,7 +120,6 @@ _edje_object_evas_object_smart_del(Eo *obj, Edje *ed) ed->delete_me = 1; _edje_edjes = eina_list_remove(_edje_edjes, obj); evas_object_smart_data_set(obj, NULL); - if (_edje_script_only(ed)) _edje_script_only_shutdown(ed); if (_edje_lua_script_only(ed)) _edje_lua_script_only_shutdown(ed); #ifdef HAVE_EPHYSICS /* clear physics world / shutdown ephysics */ @@ -147,11 +146,6 @@ _edje_object_evas_object_smart_move(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord x, ed->y = y; // evas_object_move(ed->clipper, ed->x, ed->y); - if (_edje_script_only(ed)) - { - _edje_script_only_move(ed); - return; - } if (_edje_lua_script_only(ed)) { _edje_lua_script_only_move(ed); @@ -252,11 +246,6 @@ _edje_object_evas_object_smart_resize(Eo *obj EINA_UNUSED, Edje *ed, Evas_Coord #ifdef EDJE_CALC_CACHE ed->all_part_change = EINA_TRUE; #endif - if (_edje_script_only(ed)) - { - _edje_script_only_resize(ed); - return; - } if (_edje_lua_script_only(ed)) { _edje_lua_script_only_resize(ed); @@ -276,11 +265,6 @@ _edje_object_evas_object_smart_show(Eo *obj, Edje *ed) eo_do_super(obj, MY_CLASS, evas_obj_smart_show()); if (evas_object_visible_get(obj)) return; - if (_edje_script_only(ed)) - { - _edje_script_only_show(ed); - return; - } if (_edje_lua_script_only(ed)) { _edje_lua_script_only_show(ed); @@ -309,11 +293,6 @@ _edje_object_evas_object_smart_hide(Eo *obj, Edje *ed) eo_do_super(obj, MY_CLASS, evas_obj_smart_hide()); if (!evas_object_visible_get(obj)) return; - if (_edje_script_only(ed)) - { - _edje_script_only_hide(ed); - return; - } if (_edje_lua_script_only(ed)) { _edje_lua_script_only_hide(ed);