언어 설정

Menu
Sites
Language
How to get mouse speed ?

Hi all,

How to i get mouse speed, direction from mouse_move event ?

thanks !

Responses

2 댓글
Jean Yang

Hi, 

Please find the Multipoint touch tutorial in IDE help,  hope this can help you 

Tizen Mobile Native App Programming > Tutorials > UI Tutorials>Multipoint Touch Tutorial

 

static void
mousemove_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
   appdata_s *ad = data;
   Evas_Object *spot;
   char buf[1024];
   Evas_Event_Mouse_Move *ev = event_info;
   Evas_Coord x = ev->cur.canvas.x;
   Evas_Coord y = ev->cur.canvas.y;
   int size = (int) 5 * elm_config_scale_get();

   if (!ad->down)   return;

   snprintf(buf, sizeof(buf), "Mouse Move, %d, %d", x, y);
   elm_object_text_set(ad->label, buf);

   // Draw spot on event position
   spot = create_spot(ad->rect, x, y, size);
   evas_object_color_set(spot, 0, 0, 0, 255);
   ad->spots= eina_list_append(ad->spots, spot);
}

Vu Vuong

thank Jean