Hello and thanks I have rename my topic on callback . this topic follow the focus problem
i have update my code, and i have the minimum, so a background "object_01" and on object zozor and i want this object follow the move of the mouse. and with this code the zozor will be follow the mouse only if the mouse he is on it? but i want zozor follow evry time the mouse move, I don't understand what is wrong on the code please ? #include <Ecore.h> #include <Ecore_Evas.h> void cb_down(void *data, Evas *e, Evas_Object *obj, void *event_info) { Evas_Event_Mouse_Move *event; event = (Evas_Event_Mouse_Move *)event_info; printf("touche pressée: %d en coordonnée (%d,%d)\n", event->buttons,event->cur.output.x,event->cur.output.y );// show the buttons, and coordonnée evas_object_move (obj, event->cur.output.x,event->cur.output.y);//move the object } int main (int argc, char *argv[]) { Ecore_Evas *ecran; Evas *evas; Evas_Object *object_01,*zozor; int iw,ih; if (!ecore_evas_init()) { printf("Ecore_Evas failed. Please check your installation!\n"); return 1; } //NOTRE FENETRE VIDE ecran = ecore_evas_new ("software_x11", 0, 0, 800, 600, NULL); if (!ecran) // { ecore_evas_shutdown (); return EXIT_FAILURE; } ecore_evas_show (ecran); evas = ecore_evas_get (ecran); //Notre object qui vas contenir l'image object_01 = evas_object_image_add (evas); evas_object_image_file_set (object_01, "lac_en_montagne.jpg", NULL); evas_object_image_size_get(object_01, &iw, &ih); evas_object_image_size_set(object_01, iw, ih); evas_object_image_fill_set(object_01, 0, 0, iw, ih); evas_object_resize (object_01, iw, ih); evas_object_move (object_01, 0, 0); evas_object_show (object_01); //Notre object qui vas contenir l'image zozor = evas_object_image_add (evas); evas_object_image_file_set (zozor, "zozor_transparent.png", NULL); evas_object_image_size_get(zozor, &iw, &ih); evas_object_image_size_set(zozor, iw, ih); evas_object_image_fill_set(zozor, 0, 0, iw, ih); evas_object_resize (zozor, iw, ih); evas_object_move (zozor, 0, 0); evas_object_show (zozor); evas_object_event_callback_add(zozor, EVAS_CALLBACK_MOUSE_MOVE, cb_down, NULL); //Fin du programme ecore_main_loop_begin(); ecore_evas_shutdown (); return EXIT_SUCCESS; } Thanks ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel