How to detect and handling a zooming gesture in OpenGL 3D world
This code describe how to handling zooming gesture.
#include <gesture_recognition.h>
....
....
Evas_Object *ges = elm_gesture_layer_add(gl);
elm_gesture_layer_attach(ges, gl);
elm_gesture_layer_cb_set(ges, ELM_GESTURE_ZOOM, ELM_GESTURE_STATE_START, zoom_start_cb, ad);
....
static Evas_Event_Flags zoom_start_cb(void *data , void *event_info)
{
Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *)event_info;
appdata_s *ad = data;
zoom_record_3d_origin_eye_point(ad, p);
return EVAS_EVENT_FLAG_NONE;
}
static Evas_Event_Flags zoom_move_cb(void *data , void *event_info)
{
Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *)event_info;
appdata_s *ad = data;
zoom_move_eye_to_new_point(ad, p);
return EVAS_EVENT_FLAG_NONE;
}
static Evas_Event_Flags zoom_end_cb(void *data , void *event_info)
{
Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *)event_info;
appdata_s *ad = data;
zoom_record_new_3d_eye_point(ad, p);
return EVAS_EVENT_FLAG_NONE;
}