+
+TEST_F(EFLUtil, gesture_grab)
+{
+ int ret = EFL_UTIL_ERROR_NONE;
+ efl_util_gesture_h h_gesture = NULL;
+ efl_util_gesture_data d_edge_swipe = NULL;
+
+ h_gesture = efl_util_gesture_initialize();
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(h_gesture, nullptr);
+
+ d_edge_swipe = efl_util_gesture_edge_swipe_new(h_gesture, 1, EFL_UTIL_GESTURE_EDGE_TOP);
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(d_edge_swipe, nullptr);
+
+ ret = efl_util_gesture_grab(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_ungrab(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_edge_swipe_free(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_deinitialize(h_gesture);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+}
+
+static void
+cb_edge_swipe_gesture(void *data, int mode, int fingers, int sx, int sy, int edge)
+{
+//
+}
+
+TEST_F(EFLUtil, gesture_edge_swipe_cb_set)
+{
+ int ret = EFL_UTIL_ERROR_NONE;
+ efl_util_gesture_h h_gesture = NULL;
+ efl_util_gesture_data d_edge_swipe = NULL;
+ int flag = 0;
+
+ h_gesture = efl_util_gesture_initialize();
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(h_gesture, nullptr);
+
+ d_edge_swipe = efl_util_gesture_edge_swipe_new(h_gesture, 1, EFL_UTIL_GESTURE_EDGE_TOP);
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(d_edge_swipe, nullptr);
+
+ ret = efl_util_gesture_grab(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_edge_swipe_cb_set(h_gesture, cb_edge_swipe_gesture, &flag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ // EXPECT_EQ(flag, 1);
+
+ ret = efl_util_gesture_ungrab(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_edge_swipe_free(h_gesture, d_edge_swipe);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_deinitialize(h_gesture);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+}
+
+static void
+cb_edge_drag_gesture(void *data, int mode, int fingers, int cx, int cy, int edge)
+{
+//
+}
+
+TEST_F(EFLUtil, gesture_edge_drag_cb_set)
+{
+ int ret = EFL_UTIL_ERROR_NONE;
+ efl_util_gesture_h h_gesture = NULL;
+ efl_util_gesture_data d_edge_drag = NULL;
+ int flag = 0;
+
+ h_gesture = efl_util_gesture_initialize();
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(h_gesture, nullptr);
+
+ d_edge_drag = efl_util_gesture_edge_drag_new(h_gesture, 1, EFL_UTIL_GESTURE_EDGE_TOP);
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(d_edge_drag, nullptr);
+
+ ret = efl_util_gesture_grab(h_gesture, d_edge_drag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_edge_drag_cb_set(h_gesture, cb_edge_drag_gesture, &flag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ // EXPECT_EQ(flag, 1);
+
+ ret = efl_util_gesture_ungrab(h_gesture, d_edge_drag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_edge_drag_free(h_gesture, d_edge_drag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_deinitialize(h_gesture);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+}
+
+static void
+cb_tap_gesture(void *data, int mode, int fingers, int repeats)
+{
+//
+}
+
+TEST_F(EFLUtil, gesture_tap_cb_set)
+{
+ int ret = EFL_UTIL_ERROR_NONE;
+ efl_util_gesture_h h_gesture = NULL;
+ efl_util_gesture_data d_tap = NULL;
+ int flag = 0;
+
+ h_gesture = efl_util_gesture_initialize();
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(h_gesture, nullptr);
+
+ d_tap = efl_util_gesture_tap_new(h_gesture, 2, 2);
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(d_tap, nullptr);
+
+ ret = efl_util_gesture_grab(h_gesture, d_tap);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_tap_cb_set(h_gesture, cb_tap_gesture, &flag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ // EXPECT_EQ(flag, 1);
+
+ ret = efl_util_gesture_ungrab(h_gesture, d_tap);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_tap_free(h_gesture, d_tap);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_deinitialize(h_gesture);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+}
+
+static void
+cb_palm_cover_gesture(void *data, int mode, int duration, int cx, int cy, int size, double pressure)
+{
+//
+}
+
+TEST_F(EFLUtil, gesture_palm_cover_cb_set)
+{
+ int ret = EFL_UTIL_ERROR_NONE;
+ efl_util_gesture_h h_gesture = NULL;
+ efl_util_gesture_data d_palm_cover = NULL;
+ int flag = 0;
+
+ h_gesture = efl_util_gesture_initialize();
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(h_gesture, nullptr);
+
+ d_palm_cover = efl_util_gesture_palm_cover_new(h_gesture);
+ ret = get_last_result();
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ EXPECT_NE(d_palm_cover, nullptr);
+
+ ret = efl_util_gesture_grab(h_gesture, d_palm_cover);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_palm_cover_cb_set(h_gesture, cb_palm_cover_gesture, &flag);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+ // EXPECT_EQ(flag, 1);
+
+ ret = efl_util_gesture_ungrab(h_gesture, d_palm_cover);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_palm_cover_free(h_gesture, d_palm_cover);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+
+ ret = efl_util_gesture_deinitialize(h_gesture);
+ EXPECT_EQ(ret, EFL_UTIL_ERROR_NONE);
+}