2003-06-02 16:49:56 -07:00
|
|
|
#include "edje_private.h"
|
|
|
|
|
2010-05-29 01:05:11 -07:00
|
|
|
static Edje_Version _version = { VMAJ, VMIN, VMIC, VREV };
|
|
|
|
EAPI Edje_Version *edje_version = &_version;
|
|
|
|
|
2009-10-08 00:05:19 -07:00
|
|
|
static int _edje_init_count = 0;
|
2013-03-12 22:30:21 -07:00
|
|
|
static Eina_Bool _need_imf = EINA_FALSE;
|
|
|
|
|
2009-12-22 05:46:00 -08:00
|
|
|
int _edje_default_log_dom = -1;
|
2009-08-14 10:19:42 -07:00
|
|
|
Eina_Mempool *_edje_real_part_mp = NULL;
|
|
|
|
Eina_Mempool *_edje_real_part_state_mp = NULL;
|
2013-03-12 22:30:21 -07:00
|
|
|
|
|
|
|
Eina_Cow *_edje_calc_params_map_cow = NULL;
|
|
|
|
Eina_Cow *_edje_calc_params_physics_cow = NULL;
|
|
|
|
|
|
|
|
static const Edje_Calc_Params_Map default_calc_map = {
|
|
|
|
{ 0, 0, 0 }, { 0.0, 0.0, 0.0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0 }
|
|
|
|
};
|
|
|
|
|
|
|
|
static const Edje_Calc_Params_Physics default_calc_physics = {
|
|
|
|
0.0, 0.0, 0.0, 0.0, 0.0, { 0.0, 0.0 }, { 0.0, 0.0 }, 0, 0, { { 0, 0, 0 }, { 0, 0, 0 } }, 0, 0, 0, 0
|
|
|
|
};
|
2004-01-12 09:41:48 -08:00
|
|
|
|
2009-09-17 15:38:35 -07:00
|
|
|
/*============================================================================*
|
|
|
|
* API *
|
|
|
|
*============================================================================*/
|
2006-01-07 00:54:30 -08:00
|
|
|
EAPI int
|
2003-06-17 01:15:06 -07:00
|
|
|
edje_init(void)
|
|
|
|
{
|
2009-10-08 00:05:19 -07:00
|
|
|
if (++_edje_init_count != 1)
|
|
|
|
return _edje_init_count;
|
|
|
|
|
|
|
|
srand(time(NULL));
|
2009-10-08 14:58:32 -07:00
|
|
|
|
|
|
|
if (!eina_init())
|
2012-01-03 09:04:44 -08:00
|
|
|
return --_edje_init_count;
|
2009-10-08 22:41:05 -07:00
|
|
|
|
2010-10-07 17:24:22 -07:00
|
|
|
_edje_default_log_dom = eina_log_domain_register
|
|
|
|
("edje", EDJE_DEFAULT_LOG_COLOR);
|
2009-12-22 05:46:00 -08:00
|
|
|
if (_edje_default_log_dom < 0)
|
2009-10-08 22:41:05 -07:00
|
|
|
{
|
2013-01-09 15:21:39 -08:00
|
|
|
EINA_LOG_ERR("Edje Can not create a general log domain.");
|
|
|
|
goto shutdown_eina;
|
2009-10-08 22:41:05 -07:00
|
|
|
}
|
|
|
|
|
2010-01-25 13:59:21 -08:00
|
|
|
if (!ecore_init())
|
2009-10-08 22:41:05 -07:00
|
|
|
{
|
2013-01-09 15:25:01 -08:00
|
|
|
ERR("Ecore init failed");
|
|
|
|
goto unregister_log_domain;
|
2009-10-08 22:41:05 -07:00
|
|
|
}
|
|
|
|
|
2009-10-08 14:58:32 -07:00
|
|
|
if (!embryo_init())
|
2009-10-08 22:41:05 -07:00
|
|
|
{
|
2013-01-09 15:27:31 -08:00
|
|
|
ERR("Embryo init failed");
|
|
|
|
goto shutdown_ecore;
|
2009-10-08 22:41:05 -07:00
|
|
|
}
|
|
|
|
|
2009-10-08 14:58:32 -07:00
|
|
|
if (!eet_init())
|
2009-10-08 22:41:05 -07:00
|
|
|
{
|
2010-06-26 12:41:04 -07:00
|
|
|
ERR("Eet init failed");
|
2009-10-08 22:41:05 -07:00
|
|
|
goto shutdown_embryo;
|
|
|
|
}
|
2009-10-08 14:58:32 -07:00
|
|
|
|
2012-05-09 02:16:52 -07:00
|
|
|
#ifdef HAVE_EIO
|
|
|
|
if (!eio_init())
|
|
|
|
{
|
|
|
|
ERR("Eio init failed");
|
|
|
|
goto shutdown_eet;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2009-12-09 07:44:54 -08:00
|
|
|
_edje_scale = FROM_DOUBLE(1.0);
|
|
|
|
|
2009-10-08 22:17:19 -07:00
|
|
|
_edje_edd_init();
|
2009-10-08 00:05:19 -07:00
|
|
|
_edje_text_init();
|
|
|
|
_edje_box_init();
|
2009-10-26 18:08:19 -07:00
|
|
|
_edje_external_init();
|
2009-11-23 07:03:19 -08:00
|
|
|
_edje_module_init();
|
2009-10-08 14:58:32 -07:00
|
|
|
_edje_message_init();
|
2011-11-04 05:18:13 -07:00
|
|
|
_edje_multisense_init();
|
2009-10-08 00:05:19 -07:00
|
|
|
|
|
|
|
_edje_real_part_mp = eina_mempool_add("chained_mempool",
|
|
|
|
"Edje_Real_Part", NULL,
|
2012-06-16 18:44:00 -07:00
|
|
|
sizeof (Edje_Real_Part), 32);
|
2009-10-08 00:05:19 -07:00
|
|
|
if (!_edje_real_part_mp)
|
2004-01-19 17:04:16 -08:00
|
|
|
{
|
2010-03-25 10:30:59 -07:00
|
|
|
ERR("Mempool for Edje_Real_Part cannot be allocated.");
|
2012-05-09 02:16:52 -07:00
|
|
|
goto shutdown_all;
|
2004-01-19 17:04:16 -08:00
|
|
|
}
|
2009-10-08 00:05:19 -07:00
|
|
|
|
|
|
|
_edje_real_part_state_mp = eina_mempool_add("chained_mempool",
|
|
|
|
"Edje_Real_Part_State", NULL,
|
2012-06-16 18:44:00 -07:00
|
|
|
sizeof (Edje_Real_Part_State), 32);
|
2009-10-08 00:05:19 -07:00
|
|
|
if (!_edje_real_part_state_mp)
|
|
|
|
{
|
2010-03-25 10:30:59 -07:00
|
|
|
ERR("Mempool for Edje_Real_Part_State cannot be allocated.");
|
2012-05-09 02:16:52 -07:00
|
|
|
goto shutdown_all;
|
2009-10-08 00:05:19 -07:00
|
|
|
}
|
|
|
|
|
2013-03-12 22:30:21 -07:00
|
|
|
_edje_calc_params_map_cow = eina_cow_add("Edje Calc Params Map", sizeof (Edje_Calc_Params), 8, &default_calc_map);
|
|
|
|
_edje_calc_params_physics_cow= eina_cow_add("Edje Calc Params Physics", sizeof (Edje_Calc_Params_Physics), 8, &default_calc_physics);
|
|
|
|
|
2009-10-08 00:05:19 -07:00
|
|
|
return _edje_init_count;
|
2009-08-14 10:19:42 -07:00
|
|
|
|
2012-05-09 02:16:52 -07:00
|
|
|
shutdown_all:
|
2009-08-14 10:19:42 -07:00
|
|
|
eina_mempool_del(_edje_real_part_state_mp);
|
|
|
|
eina_mempool_del(_edje_real_part_mp);
|
|
|
|
_edje_real_part_state_mp = NULL;
|
|
|
|
_edje_real_part_mp = NULL;
|
2009-10-08 14:58:32 -07:00
|
|
|
_edje_message_shutdown();
|
2009-11-23 07:03:19 -08:00
|
|
|
_edje_module_shutdown();
|
2009-10-26 18:08:19 -07:00
|
|
|
_edje_external_shutdown();
|
2009-10-08 14:58:32 -07:00
|
|
|
_edje_box_shutdown();
|
|
|
|
_edje_text_class_members_free();
|
|
|
|
_edje_text_class_hash_free();
|
2009-10-08 22:17:19 -07:00
|
|
|
_edje_edd_shutdown();
|
2012-05-09 02:16:52 -07:00
|
|
|
#ifdef HAVE_EIO
|
|
|
|
eio_shutdown();
|
|
|
|
shutdown_eet:
|
|
|
|
#endif
|
2009-10-08 14:58:32 -07:00
|
|
|
eet_shutdown();
|
|
|
|
shutdown_embryo:
|
|
|
|
embryo_shutdown();
|
2010-01-25 13:59:21 -08:00
|
|
|
shutdown_ecore:
|
|
|
|
ecore_shutdown();
|
2009-10-08 22:41:05 -07:00
|
|
|
unregister_log_domain:
|
2009-12-22 05:46:00 -08:00
|
|
|
eina_log_domain_unregister(_edje_default_log_dom);
|
|
|
|
_edje_default_log_dom = -1;
|
2009-10-08 14:58:32 -07:00
|
|
|
shutdown_eina:
|
|
|
|
eina_shutdown();
|
|
|
|
return --_edje_init_count;
|
2003-06-17 01:15:06 -07:00
|
|
|
}
|
|
|
|
|
2011-08-02 00:23:05 -07:00
|
|
|
static int _edje_users = 0;
|
2009-09-17 15:38:35 -07:00
|
|
|
|
2011-08-02 00:23:05 -07:00
|
|
|
static void
|
|
|
|
_edje_shutdown_core(void)
|
2004-01-12 09:41:48 -08:00
|
|
|
{
|
2011-08-02 00:23:05 -07:00
|
|
|
if (_edje_users > 0) return;
|
2007-10-04 22:12:38 -07:00
|
|
|
|
2005-04-03 04:43:00 -07:00
|
|
|
_edje_file_cache_shutdown();
|
2004-01-12 11:21:25 -08:00
|
|
|
_edje_color_class_members_free();
|
2005-01-12 22:29:52 -08:00
|
|
|
_edje_color_class_hash_free();
|
2009-08-14 10:19:42 -07:00
|
|
|
|
|
|
|
eina_mempool_del(_edje_real_part_state_mp);
|
|
|
|
eina_mempool_del(_edje_real_part_mp);
|
|
|
|
_edje_real_part_state_mp = NULL;
|
|
|
|
_edje_real_part_mp = NULL;
|
|
|
|
|
2011-11-04 05:18:13 -07:00
|
|
|
_edje_multisense_shutdown();
|
2009-10-08 14:58:32 -07:00
|
|
|
_edje_message_shutdown();
|
2009-11-23 07:03:19 -08:00
|
|
|
_edje_module_shutdown();
|
2009-10-26 18:08:19 -07:00
|
|
|
_edje_external_shutdown();
|
2009-10-08 14:58:32 -07:00
|
|
|
_edje_box_shutdown();
|
|
|
|
_edje_text_class_members_free();
|
|
|
|
_edje_text_class_hash_free();
|
2009-10-08 22:17:19 -07:00
|
|
|
_edje_edd_shutdown();
|
2009-10-08 14:58:32 -07:00
|
|
|
|
2013-03-12 22:30:21 -07:00
|
|
|
eina_cow_del(_edje_calc_params_map_cow);
|
|
|
|
eina_cow_del(_edje_calc_params_physics_cow);
|
|
|
|
_edje_calc_params_map_cow = NULL;
|
|
|
|
_edje_calc_params_physics_cow = NULL;
|
|
|
|
|
2013-01-05 08:17:53 -08:00
|
|
|
#ifdef HAVE_ECORE_IMF
|
|
|
|
if (_need_imf)
|
|
|
|
ecore_imf_shutdown();
|
|
|
|
#endif
|
|
|
|
|
2012-05-09 02:16:52 -07:00
|
|
|
#ifdef HAVE_EIO
|
|
|
|
eio_shutdown();
|
|
|
|
#endif
|
2009-10-08 00:05:19 -07:00
|
|
|
eet_shutdown();
|
2004-03-29 04:00:01 -08:00
|
|
|
embryo_shutdown();
|
2010-01-25 13:59:21 -08:00
|
|
|
ecore_shutdown();
|
2009-12-22 05:46:00 -08:00
|
|
|
eina_log_domain_unregister(_edje_default_log_dom);
|
|
|
|
_edje_default_log_dom = -1;
|
2008-10-15 07:11:11 -07:00
|
|
|
eina_shutdown();
|
2011-08-02 00:23:05 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_edje_lib_ref(void)
|
|
|
|
{
|
|
|
|
_edje_users++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_edje_lib_unref(void)
|
|
|
|
{
|
|
|
|
_edje_users--;
|
|
|
|
if (_edje_users != 0) return;
|
|
|
|
if (_edje_init_count == 0) _edje_shutdown_core();
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI int
|
|
|
|
edje_shutdown(void)
|
|
|
|
{
|
2012-05-30 03:08:41 -07:00
|
|
|
if (_edje_init_count <= 0)
|
|
|
|
{
|
|
|
|
ERR("Init count not greater than 0 in shutdown.");
|
|
|
|
return 0;
|
|
|
|
}
|
2011-08-02 00:23:05 -07:00
|
|
|
if (--_edje_init_count != 0)
|
|
|
|
return _edje_init_count;
|
|
|
|
|
|
|
|
if (_edje_timer)
|
|
|
|
ecore_animator_del(_edje_timer);
|
|
|
|
_edje_timer = NULL;
|
|
|
|
|
|
|
|
_edje_shutdown_core();
|
2008-03-24 01:22:01 -07:00
|
|
|
|
2009-10-08 00:05:19 -07:00
|
|
|
return _edje_init_count;
|
2004-01-12 09:41:48 -08:00
|
|
|
}
|
|
|
|
|
2004-06-05 21:42:17 -07:00
|
|
|
/* Private Routines */
|
2012-08-24 02:22:21 -07:00
|
|
|
static void
|
|
|
|
_class_member_free(Eina_Hash *hash,
|
|
|
|
void (*_edje_class_member_direct_del)(const char *class, void *l))
|
2011-06-22 02:47:16 -07:00
|
|
|
{
|
2012-08-24 02:22:21 -07:00
|
|
|
const char *color_class;
|
|
|
|
Eina_Iterator *it;
|
|
|
|
Eina_List *class_kill = NULL;
|
2011-06-23 02:55:57 -07:00
|
|
|
|
2012-08-24 02:22:21 -07:00
|
|
|
if (hash)
|
|
|
|
{
|
|
|
|
it = eina_hash_iterator_key_new(hash);
|
|
|
|
EINA_ITERATOR_FOREACH(it, color_class)
|
|
|
|
class_kill = eina_list_append(class_kill, color_class);
|
|
|
|
eina_iterator_free(it);
|
|
|
|
EINA_LIST_FREE(class_kill, color_class)
|
|
|
|
{
|
|
|
|
void *l;
|
|
|
|
|
|
|
|
l = eina_hash_find(hash, color_class);
|
|
|
|
_edje_class_member_direct_del(color_class, l);
|
|
|
|
}
|
|
|
|
eina_hash_free(hash);
|
|
|
|
}
|
2011-06-22 02:47:16 -07:00
|
|
|
}
|
2004-06-05 21:42:17 -07:00
|
|
|
|
2003-06-18 07:20:26 -07:00
|
|
|
void
|
|
|
|
_edje_del(Edje *ed)
|
|
|
|
{
|
2011-05-31 10:02:58 -07:00
|
|
|
Edje_Running_Program *runp;
|
|
|
|
Edje_Pending_Program *pp;
|
This causes segv's on 64bit!
Program received signal SIGSEGV, Segmentation fault.
_edje_emit_cb (ed=ed@entry=0x8ebd68, sig=sig@entry=0x8fba4c
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
warning: Source file is more recent than executable.
1442 eina_list_free(data.matches);
(gdb) bt
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
"focus,part,in", src=0x8222fc "elm.text", sdata=0x0, prop=0 '\000') at
lib/edje/edje_program.c:1366
_pd=0x8222f0, list=0x7fff00000001) at lib/edje/edje_message_queue.c:124
op_type=EO_OP_TYPE_REGULAR, op=564, p_list=0x7fffffffcf28) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ebae0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
(obj=<optimized out>) at lib/edje/edje_message_queue.c:71
(sid=sid@entry=0x8eae88) at elm_interface_scrollable.c:788
(sid=0x8eae88) at elm_interface_scrollable.c:805
_pd=0x8eae88, list=<optimized out>) at elm_interface_scrollable.c:3370
op_type=EO_OP_TYPE_REGULAR, op=840, p_list=0x7fffffffd158) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
_pd=0x8ead70, list=<optimized out>) at elm_entry.c:2804
op_type=EO_OP_TYPE_REGULAR, op=129, p_list=0x7fffffffd328) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:435
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd4a8) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
class_data=<optimized out>, list=<optimized out>) at elm_widget.c:5526
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd628) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_layout.c:2157
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd7b8) at
lib/eo/eo.c:364
op_type=<optimized out>, op=1) at lib/eo/eo.c:463
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd928) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_entry.c:3076
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffdad8) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:1162
elm_entry.c:3068
autorun=0x0) at test.c:441
Revert "edje: reduce memory usage of Edje signal callbacks and automates."
This reverts commit 15aae2c0a4b9f59199395884439626de39e80e62.
2013-03-12 07:48:42 -07:00
|
|
|
Edje_Signal_Callback *escb;
|
2011-05-31 10:02:58 -07:00
|
|
|
Edje_Text_Class *tc;
|
|
|
|
Edje_Text_Insert_Filter_Callback *cb;
|
|
|
|
|
2005-07-28 06:39:23 -07:00
|
|
|
if (ed->processing_messages)
|
|
|
|
{
|
2012-09-04 22:38:01 -07:00
|
|
|
ed->delete_me = EINA_TRUE;
|
2005-07-28 06:39:23 -07:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
_edje_message_del(ed);
|
This causes segv's on 64bit!
Program received signal SIGSEGV, Segmentation fault.
_edje_emit_cb (ed=ed@entry=0x8ebd68, sig=sig@entry=0x8fba4c
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
warning: Source file is more recent than executable.
1442 eina_list_free(data.matches);
(gdb) bt
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
"focus,part,in", src=0x8222fc "elm.text", sdata=0x0, prop=0 '\000') at
lib/edje/edje_program.c:1366
_pd=0x8222f0, list=0x7fff00000001) at lib/edje/edje_message_queue.c:124
op_type=EO_OP_TYPE_REGULAR, op=564, p_list=0x7fffffffcf28) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ebae0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
(obj=<optimized out>) at lib/edje/edje_message_queue.c:71
(sid=sid@entry=0x8eae88) at elm_interface_scrollable.c:788
(sid=0x8eae88) at elm_interface_scrollable.c:805
_pd=0x8eae88, list=<optimized out>) at elm_interface_scrollable.c:3370
op_type=EO_OP_TYPE_REGULAR, op=840, p_list=0x7fffffffd158) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
_pd=0x8ead70, list=<optimized out>) at elm_entry.c:2804
op_type=EO_OP_TYPE_REGULAR, op=129, p_list=0x7fffffffd328) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:435
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd4a8) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
class_data=<optimized out>, list=<optimized out>) at elm_widget.c:5526
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd628) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_layout.c:2157
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd7b8) at
lib/eo/eo.c:364
op_type=<optimized out>, op=1) at lib/eo/eo.c:463
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd928) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_entry.c:3076
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffdad8) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:1162
elm_entry.c:3068
autorun=0x0) at test.c:441
Revert "edje: reduce memory usage of Edje signal callbacks and automates."
This reverts commit 15aae2c0a4b9f59199395884439626de39e80e62.
2013-03-12 07:48:42 -07:00
|
|
|
_edje_callbacks_patterns_clean(ed);
|
2003-06-19 07:43:49 -07:00
|
|
|
_edje_file_del(ed);
|
2008-10-15 07:11:11 -07:00
|
|
|
if (ed->path) eina_stringshare_del(ed->path);
|
|
|
|
if (ed->group) eina_stringshare_del(ed->group);
|
|
|
|
if (ed->parent) eina_stringshare_del(ed->parent);
|
2005-11-30 01:56:15 -08:00
|
|
|
ed->path = NULL;
|
2008-08-14 11:04:43 -07:00
|
|
|
ed->group = NULL;
|
2004-03-07 18:43:48 -08:00
|
|
|
if ((ed->actions) || (ed->pending_actions))
|
|
|
|
{
|
2008-10-22 04:34:42 -07:00
|
|
|
_edje_animators = eina_list_remove(_edje_animators, ed);
|
2004-03-07 18:43:48 -08:00
|
|
|
}
|
2011-05-31 10:02:58 -07:00
|
|
|
EINA_LIST_FREE(ed->actions, runp)
|
|
|
|
free(runp);
|
|
|
|
EINA_LIST_FREE(ed->pending_actions, pp)
|
|
|
|
free(pp);
|
This causes segv's on 64bit!
Program received signal SIGSEGV, Segmentation fault.
_edje_emit_cb (ed=ed@entry=0x8ebd68, sig=sig@entry=0x8fba4c
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
warning: Source file is more recent than executable.
1442 eina_list_free(data.matches);
(gdb) bt
"focus,part,in", src=src@entry=0x8222fc "elm.text",
data=data@entry=0x0, prop=prop@entry=0 '\000') at
lib/edje/edje_program.c:1442
"focus,part,in", src=0x8222fc "elm.text", sdata=0x0, prop=0 '\000') at
lib/edje/edje_program.c:1366
_pd=0x8222f0, list=0x7fff00000001) at lib/edje/edje_message_queue.c:124
op_type=EO_OP_TYPE_REGULAR, op=564, p_list=0x7fffffffcf28) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ebae0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
(obj=<optimized out>) at lib/edje/edje_message_queue.c:71
(sid=sid@entry=0x8eae88) at elm_interface_scrollable.c:788
(sid=0x8eae88) at elm_interface_scrollable.c:805
_pd=0x8eae88, list=<optimized out>) at elm_interface_scrollable.c:3370
op_type=EO_OP_TYPE_REGULAR, op=840, p_list=0x7fffffffd158) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
op_type=op_type@entry=EO_OP_TYPE_REGULAR) at lib/eo/eo.c:435
_pd=0x8ead70, list=<optimized out>) at elm_entry.c:2804
op_type=EO_OP_TYPE_REGULAR, op=129, p_list=0x7fffffffd328) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:435
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd4a8) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
class_data=<optimized out>, list=<optimized out>) at elm_widget.c:5526
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd628) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_layout.c:2157
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd7b8) at
lib/eo/eo.c:364
op_type=<optimized out>, op=1) at lib/eo/eo.c:463
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffd928) at
lib/eo/eo.c:364
(obj=obj@entry=0x8ea9e0, op_type=op_type@entry=EO_OP_TYPE_REGULAR,
op=1) at lib/eo/eo.c:463
out>, list=<optimized out>) at elm_entry.c:3076
op_type=EO_OP_TYPE_REGULAR, op=1, p_list=0x7fffffffdad8) at
lib/eo/eo.c:364
op_type=EO_OP_TYPE_REGULAR, obj=0x8ea9e0) at lib/eo/eo.c:404
lib/eo/eo.c:1162
elm_entry.c:3068
autorun=0x0) at test.c:441
Revert "edje: reduce memory usage of Edje signal callbacks and automates."
This reverts commit 15aae2c0a4b9f59199395884439626de39e80e62.
2013-03-12 07:48:42 -07:00
|
|
|
EINA_LIST_FREE(ed->callbacks, escb)
|
|
|
|
{
|
|
|
|
if (escb->signal) eina_stringshare_del(escb->signal);
|
|
|
|
if (escb->source) eina_stringshare_del(escb->source);
|
|
|
|
free(escb);
|
|
|
|
}
|
2012-08-09 01:27:04 -07:00
|
|
|
eina_hash_free(ed->color_classes);
|
2011-05-31 10:02:58 -07:00
|
|
|
EINA_LIST_FREE(ed->text_classes, tc)
|
2003-07-12 19:06:46 -07:00
|
|
|
{
|
2008-10-15 07:11:11 -07:00
|
|
|
if (tc->name) eina_stringshare_del(tc->name);
|
|
|
|
if (tc->font) eina_stringshare_del(tc->font);
|
2003-07-12 19:06:46 -07:00
|
|
|
free(tc);
|
|
|
|
}
|
2011-05-31 10:02:58 -07:00
|
|
|
EINA_LIST_FREE(ed->text_insert_filter_callbacks, cb)
|
2010-05-28 23:40:56 -07:00
|
|
|
{
|
|
|
|
eina_stringshare_del(cb->part);
|
|
|
|
free(cb);
|
|
|
|
}
|
2012-02-19 07:28:42 -08:00
|
|
|
EINA_LIST_FREE(ed->markup_filter_callbacks, cb)
|
|
|
|
{
|
|
|
|
eina_stringshare_del(cb->part);
|
|
|
|
free(cb);
|
|
|
|
}
|
2011-06-06 10:47:32 -07:00
|
|
|
|
2012-08-24 02:22:21 -07:00
|
|
|
_class_member_free(ed->members.text_class, _edje_text_class_member_direct_del);
|
|
|
|
_class_member_free(ed->members.color_class, _edje_color_class_member_direct_del);
|
2003-06-18 07:20:26 -07:00
|
|
|
}
|
2003-06-26 07:04:31 -07:00
|
|
|
|
|
|
|
void
|
|
|
|
_edje_clean_objects(Edje *ed)
|
|
|
|
{
|
2012-10-21 03:46:58 -07:00
|
|
|
evas_object_del(ed->base->clipper);
|
|
|
|
ed->base->evas = NULL;
|
2003-06-26 07:04:31 -07:00
|
|
|
ed->obj = NULL;
|
2012-10-21 03:46:58 -07:00
|
|
|
ed->base->clipper = NULL;
|
2003-06-26 07:04:31 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_edje_ref(Edje *ed)
|
|
|
|
{
|
2005-09-30 21:15:15 -07:00
|
|
|
if (ed->references <= 0) return;
|
2003-06-26 07:04:31 -07:00
|
|
|
ed->references++;
|
|
|
|
}
|
|
|
|
|
|
|
|
void
|
|
|
|
_edje_unref(Edje *ed)
|
|
|
|
{
|
|
|
|
ed->references--;
|
2005-09-30 21:15:15 -07:00
|
|
|
if (ed->references == 0) _edje_del(ed);
|
2003-06-26 07:04:31 -07:00
|
|
|
}
|
2013-01-05 08:17:53 -08:00
|
|
|
|
|
|
|
void
|
|
|
|
_edje_need_imf(void)
|
|
|
|
{
|
|
|
|
if (_need_imf) return;
|
|
|
|
#ifdef HAVE_ECORE_IMF
|
|
|
|
_need_imf = EINA_TRUE;
|
|
|
|
ecore_imf_init();
|
|
|
|
#endif
|
|
|
|
}
|