Languages

Menu
Sites
Language
Who can explain the return value for the getsture call back function?

I'm trying to write the call back for zoom in/out getsture, but the return value puzzled me.

Let's see the getsture example.

The following example adds callbacks for listening to the tap gesture:

elm_gesture_layer_cb_set(g, ELM_GESTURE_N_TAPS,
   ELM_GESTURE_STATE_ABORT, n_finger_tap_abort, ad);

The following example adds a callback for getting the tap gesture finishing notification:

static Evas_Event_Flags
n_finger_tap_end(void *data, void *event_info)
{
   appdata_s *ad = data;
   Elm_Gesture_Taps_Info *p = (Elm_Gesture_Taps_Info *) event_info;
   return EVAS_EVENT_FLAG_ON_HOLD;
}

Let's see the definition for Evas_Event_Flags:

/**
 * @brief Enumeration for events.
 */
typedef enum _Evas_Event_Flags
{
   EVAS_EVENT_FLAG_NONE = 0, /**< No fancy flags set */
   EVAS_EVENT_FLAG_ON_HOLD = (1 << 0), /**< The event is being delivered but should be put "on hold" until the on hold flag is unset \n 
   The event should be used for informational purposes and maybe for some indications visually, but should not actually perform anything. */
   EVAS_EVENT_FLAG_ON_SCROLL = (1 << 1) /**< The event occurs while scrolling \n 
   For example, DOWN event occurs during scrolling; the event should be used for informational purposes and maybe for some indications visually, but should not actually perform anything. */
} Evas_Event_Flags; /**< Flags for Events */

I still cannot understand what return value should I set for my zoom gesture callback.

static Evas_Event_Flags zoom_end_cb(void *data , void *event_info)
{
    Elm_Gesture_Zoom_Info *p = (Elm_Gesture_Zoom_Info *)event_info;
    dlog_print(DLOG_ERROR, "zoom_end_cb", "Zoom info (x,y,radius,zoom,momentum) = (%d, %d, %d, %lf, %lf)", p->x, p->y, p->radius, p->zoom, p->momentum);

 return EVAS_EVENT_FLAG_??????;
}

Who can explain this?

 

 

Responses

2 Replies
colin Rao

Hi,

As the flags enumeration description. I think just keep the default flag to returned "EVAS_EVENT_FLAG_NONE". 

Also, it's confused me without code sample. :)

Alex Dem

Hi,
There is one more remark regarding flag:
https://developer.tizen.org/dev-guide/2.4b/org.tizen.native.mobile.apireference/group__Elm__Gesture__Layer.html#ga64cd8ad103829807cfbf8fc35c89f057
fyi: I use EVAS_EVENT_FLAG_NONE
Alexey.