[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [E-devel] evas_object_bottom_get



On Sun, 21 May 2006 14:25:32 -0400 (EDT) d.stonier@snorriheim.com babbled:

> 
> Sorry for a second query so quickly. I also have some old code that used
> to work with evas, but does no longer.

should be fixed now :)

> **************************************************
> 
> Evas *evas;
> Evas_Object *o;
> 
> while (( o = evas_object_bottom_get(evas) )) {
>   evas_object_del(o);
> }
> 
> **************************************************
> 
> It doesn't drop out of the while loop any longer. I set up a quick example
> with three rectangles. It'll pick up the bottom most rectangle and
> promptly appear to delete it (doesn't show up), but the next time the
> evas_object_bottom_get is called, it still picks up a pointer to the same
> object (pointer always returns the same address).
> 
> Example program below.
> 
> Cheers,
> Daniel.
> 
> **************************************************
> 
> #include <stdio.h>
> #include <Ecore_Evas.h>
> #include <Ecore.h>
> 
> #define WIDTH 400
> #define HEIGHT 400
> 
>         Ecore_Evas  *   ee;
>         Evas        *   evas;
>         Evas_Object *o1, *o2, *o3, *o;
> 
> int main(){
> 
>    ecore_init();
>    ecore_evas_init();
> 
>    ee = ecore_evas_software_x11_new(NULL, 0,  0, 0, WIDTH, HEIGHT);
>         ecore_evas_title_set(ee, "Ecore_Evas Template");
>         ecore_evas_borderless_set(ee, 0);
>         ecore_evas_show(ee);
> 
> 
>    evas = ecore_evas_get(ee);
> 
>    o1 = evas_object_rectangle_add(evas);
>    evas_object_resize(o1, (double)WIDTH, (double)HEIGHT);
>    evas_object_color_set(o1, 244, 243, 242, 255);
>    evas_object_show(o1);
> 
>    o2 = evas_object_rectangle_add(evas);
>    evas_object_resize(o2, (double)WIDTH/2.0, (double)HEIGHT/2.0);
>    evas_object_color_set(o2, 0, 243, 0, 255);
>    evas_object_show(o2);
> 
>    o3 = evas_object_rectangle_add(evas);
>    evas_object_resize(o3, (double)WIDTH/4.0, (double)HEIGHT/4.0);
>    evas_object_color_set(o3, 0, 0, 242, 255);
>    evas_object_show(o3);
> 
>    o = evas_object_bottom_get(evas);
>    printf("Bottom Rectangle: %p\n",o);
>    o = evas_object_above_get(o);
>    printf("Middle Rectangle: %p\n",o);
>    o = evas_object_above_get(o);
>    printf("Top Rectangle: %p\n",o);
>    if(( o = evas_object_above_get(o) )) {
>      printf("Object: %p\n",o);
>    } else {
>      printf("No object: %p\n",o);
>    }
>    printf("\n");
>    int i = 0;
>    while ((o = evas_object_bottom_get(evas))) {
> 	   evas_object_del(o);
> 	   printf("Iteration: %d ",i);
>            printf("Object: %p\n",o);
> 	   i++;
> 	   if (i > 30 ) { break; };
>    }
> 
>    /* Insert Object Here */
> 
>         ecore_main_loop_begin();
> 
>         return 0;
> }
> 
> 
> **************************************************
> 
> 
> 
> -------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    raster@rasterman.com
裸好多
Tokyo, Japan (東京 日本)