Hello guys,
I've some issues with 'phantom' members within smart objects which I
encounter in an application.
The attached test shows that there's apparently something wrong with
Evas' accounting wrt to its Smart Objects' members.
In hope to be proven wrong,
BR,
Leif
//gcc `pkg-config --cflags --libs enlightenment` evas_bug.c -o /tmp/evas_bug
#include <Eina.h>
#include <Evas.h>
#include <Ecore.h>
#include <Ecore_Evas.h>
#include <stdio.h>
int main(int argc, const char **argv)
{
Ecore_Evas *window = NULL;
Evas *canvas = NULL;
Evas_Smart_Class smart_class;
Evas_Smart *evas_smart;
Evas_Object *smart_object = NULL, *child_object = NULL;
eina_init();
evas_init();
ecore_init();
ecore_evas_init();
window = ecore_evas_new(NULL, 0, 0, 100, 100, NULL);
if (!window)
{
EINA_LOG_CRIT("could not create window.");
return -1;
}
canvas = ecore_evas_get(window);
evas_object_smart_clipped_smart_set(&smart_class);
evas_smart = evas_smart_class_new(&smart_class);
smart_object = evas_object_smart_add(canvas, evas_smart);
printf("Smart object currently holds %d objects.\n", eina_list_count(evas_object_smart_members_get(smart_object)));
child_object = evas_object_rectangle_add(canvas);
evas_object_smart_member_add(child_object, smart_object);
printf("Added child element. Smart object now holds %d objects.\n", eina_list_count(evas_object_smart_members_get(smart_object)));
ecore_evas_show(window);
ecore_main_loop_begin();
ecore_evas_free(window);
ecore_evas_shutdown();
ecore_shutdown();
evas_shutdown();
eina_shutdown();
}
------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel