On Mon, Feb 8, 2010 at 9:22 PM, Cedric BAIL <[email protected]> wrote:

> On Mon, Feb 8, 2010 at 2:11 PM, Shuduo Sang <[email protected]> wrote:
> > I am a newbie who study efl programming recently. I try to write my first
> > program but meet problem always return NULL for creating canvas. I have
> > googled someone met that too but no clear answer.
> > I can get supported engines by ecore_evas_engines_get(), are
> software_x11,
> > xrender_x11, opengl_x11, fb, and buffer.
> > My platform is Ubuntu 9.10 and I think I installed all necessary
> libraries
> > since I can build it successfully by command.
> >
> > gcc `pkg-config --libs --cflags evas ecore ecore-evas` ecore_test.c -o
> > ecore_test
> >
> > My code is following.
> >
> > ...
> >
> >  22         if ( !ecore_init()) return EXIT_FAILURE;
> >  23         if ( !ecore_evas_init()) return EXIT_FAILURE;
> >  24
> >  25         if (NULL == (eina_list = ecore_evas_engines_get()))
> >  26                 return EXIT_FAILURE;
> >  27
> >  28         EINA_LIST_FOREACH(eina_list, l, data)
> >  29                 if(data) printf("data %s\n", data);
> >  30         ecore_evas_engines_free(eina_list);
> >  31
> >  32         ecore_evas = ecore_evas_software_x11_new(NULL, 0, 0, 0, W,
> H);
> >  33         if (!ecore_evas)
> >  34                 ecore_evas = ecore_evas_gl_x11_new(NULL, 0, 0, 0, W,
> H);
> >  35         if (!ecore_evas)
> >  36                 ecore_evas = ecore_evas_fb_new(NULL, 0, W, H);
> >  37         if (!ecore_evas)
> >  38                 ecore_evas = ecore_evas_xrender_x11_new(NULL, 0, 0,
> 0,
> > W, H);
> >  39         if (!ecore_evas){
> >  40                 printf("ERROR: Cannot create canvas\n");
> >  41                 return EXIT_FAILURE;
> >  42         }
>
> You can use "ecore_evas = ecore_evas_new(NULL, 0, 0, W, H, NULL);".
> And it will automatically pick a working engine.
>

I got NULL again. :(


> --
> Cedric BAIL
>
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to