From: Rafael A. <ant...@pr...> - 2011-11-18 17:10:29
|
Hello, On Fri, Nov 18, 2011 at 9:36 AM, Paulo Benatto <be...@gm...> wrote: > with FrameBuffer > > 2011/11/18 Paulo Benatto <be...@gm...> > >> Hi, >> >> I'm cross-compiling eina, eet, evas, ecore, edje and elementary, I was >> using releases version (http://download.enlightenment.org/releases/), but >> yesterday I updated to trunk, and now my TouchScreen (tslib) stops working. >> Below a simple example that works with old EFL versions, but doesn't work >> with trunk. I would like a hint. Thanks. Sorry, I did some changes to the ecore_fb (framebuffer backend) input, and that may have broken the tslib input. However I didn't have any way to test it. I'll try to fix this, but only have time to look at this on Sunday. >> #include <stdio.h> >> #include <Ecore.h> >> #include <Ecore_Evas.h> >> #include <Evas.h> >> #include <Evas_Engine_FB.h> >> >> /* definitions */ >> struct _Color { >> int r; >> int g; >> int b; >> }; >> >> typedef struct _Color Color; >> static int LCD_WIDTH = 480; >> static int LCD_HEIGHT = 272; >> static Color COLOR_RED = {255,0,0}; >> static Color COLOR_GREEN = {0,255,0}; >> static Color COLOR_BLUE = {0,0,255}; >> static Color COLOR_BG = {0,0,0}; >> static Color BUTTON_DOWN = {200,0,0}; >> static Color BUTTON_UP = {255,0,0}; >> >> >> static void callback(void *data, Evas *e, Evas_Object *obj, void *event_info) >> { >> Color *color = (Color *) data; >> >> printf("CALLBACK: new color [%d,%d,%d]\n", color->r, color->g, color->b); >> evas_object_color_set(obj, color->r, color->g, color->b, 255); >> } >> >> int main(int argc, char **argv) >> { >> Ecore_Evas *ee = NULL; >> Evas *evas = NULL; >> if (!ecore_evas_init()) { >> printf("ERROR: Cannot init Evas!\n"); >> return -1; >> } >> >> ee = ecore_evas_fb_new(NULL, 0, LCD_WIDTH, LCD_HEIGHT); >> if (ee == NULL) { >> printf("ERROR: Cannot create new Ecore_Evas!\n"); >> return 0; >> } >> ecore_evas_show(ee); >> >> evas = ecore_evas_get(ee); >> Evas_Object * obj = evas_object_rectangle_add(evas); >> evas_object_resize(obj, LCD_WIDTH, LCD_HEIGHT); >> evas_object_color_set(obj, COLOR_BG.r, COLOR_BG.g, COLOR_BG.b, 255); >> evas_object_show(obj); >> >> obj = evas_object_rectangle_add(evas); >> evas_object_move(obj, 50, 50); >> evas_object_resize(obj, LCD_WIDTH-100, LCD_HEIGHT-100); >> evas_object_color_set(obj, BUTTON_UP.r, BUTTON_UP.g, BUTTON_UP.b, 255); >> evas_object_show(obj); >> >> evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_UP, callback, &BUTTON_UP); >> evas_object_event_callback_add(obj, EVAS_CALLBACK_MOUSE_DOWN, callback, &BUTTON_DOWN); >> >> ecore_main_loop_begin(); >> ecore_shutdown(); >> >> return 0; >> } >> >> >> >> >> >> -- >> Paulo Leonardo Benatto, patito >> "the fear of being free, makes you proud of being a slave" >> > > > > -- > Paulo Leonardo Benatto, patito > "the fear of being free, makes you proud of being a slave" > ------------------------------------------------------------------------------ > All the data continuously generated in your IT infrastructure > contains a definitive record of customers, application performance, > security threats, fraudulent activity, and more. Splunk takes this > data and makes sense of it. IT sense. And common sense. > http://p.sf.net/sfu/splunk-novd2d > _______________________________________________ > enlightenment-devel mailing list > enl...@li... > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > Regards, -- Rafael Antognolli ProFUSION embedded systems http://profusion.mobi |