}
void
-_edje_embryo_script_init(Edje *ed)
+_edje_embryo_script_init(Edje_Part_Collection *edc)
{
Embryo_Program *ep;
- if (!ed) return;
- if (!ed->collection) return;
- if (!ed->collection->script) return;
- ep = ed->collection->script;
- embryo_program_data_set(ep, ed);
+ if (!edc) return;
+ if (!edc->script) return;
+
+ ep = edc->script;
/* first advertise all the edje "script" calls */
embryo_program_native_call_add(ep, "get_int", _edje_embryo_fn_get_int);
embryo_program_native_call_add(ep, "set_int", _edje_embryo_fn_set_int);
embryo_program_native_call_add(ep, "external_param_set_choice", _edje_embryo_fn_external_param_set_choice);
embryo_program_native_call_add(ep, "external_param_get_bool", _edje_embryo_fn_external_param_get_bool);
embryo_program_native_call_add(ep, "external_param_set_bool", _edje_embryo_fn_external_param_set_bool);
-
-// embryo_program_vm_push(ed->collection->script);
-// _edje_embryo_globals_init(ed);
}
void
-_edje_embryo_script_shutdown(Edje *ed)
+_edje_embryo_script_shutdown(Edje_Part_Collection *edc)
{
- if (!ed) return;
- if (!ed->collection) return;
- if (!ed->collection->script) return;
- if (embryo_program_recursion_get(ed->collection->script) > 0) return;
-// embryo_program_vm_pop(ed->collection->script);
- embryo_program_free(ed->collection->script);
- ed->collection->script = NULL;
+ if (!edc) return;
+ if (!edc->script) return;
+ if (embryo_program_recursion_get(edc->script) > 0) return;
+ embryo_program_free(edc->script);
+ edc->script = NULL;
}
void
_edje_ref(ed);
_edje_block(ed);
_edje_freeze(ed);
- if (ed->collection->script) _edje_embryo_script_init(ed);
+// if (ed->collection->script) _edje_embryo_script_init(ed);
_edje_var_init(ed);
for (i = 0; i < ed->table_parts_size; i++)
{
_edje_block_violate(ed);
_edje_var_shutdown(ed);
_edje_programs_patterns_clean(ed);
+// if (ed->collection)
+// {
+// if (ed->collection->script) _edje_embryo_script_shutdown(ed);
+// }
if (!((ed->file) && (ed->collection))) return;
if (ed->table_parts)
Edje_Program *pr;
Edje_Part *ep;
+ _edje_embryo_script_shutdown(ec);
EINA_LIST_FREE(ec->programs, pr)
{
Edje_Program_Target *prt;
char *_edje_text_escape(const char *text);
char *_edje_text_unescape(const char *text);
-void _edje_embryo_script_init (Edje *ed);
-void _edje_embryo_script_shutdown (Edje *ed);
+void _edje_embryo_script_init (Edje_Part_Collection *edc);
+void _edje_embryo_script_shutdown (Edje_Part_Collection *edc);
void _edje_embryo_script_reset (Edje *ed);
void _edje_embryo_test_run (Edje *ed, const char *fname, const char *sig, const char *src);
Edje_Var *_edje_var_new (void);