}
}
+/**
+ * An enum of gesture type
+ */
+typedef enum _Eext_Gesture_Event_Type
+{
+ EEXT_GESTURE_TAP, /**< Tap Gesture */
+ EEXT_GESTURE_SWIPE_RIGHT, /**< Swipe Right Gesutre */
+ EEXT_GESTURE_SWIPE_LEFT, /**< Swipe Left Gesutre */
+ EEXT_GESTURE_SWIPE_UP, /**< Swipe Up Gesutre */
+ EEXT_GESTURE_SWIPE_DOWN, /**< Swipe Down Gesutre */
+ EEXT_GESTURE_ZOOM_IN, /**< Zoom In Gesutre */
+ EEXT_GESTURE_ZOOM_OUT /**< Zoom Out Gesutre */
+} Eext_Gesture_Event_Type;
+
+/**
+ * @brief Dispatch gesture event given type and x, y position.
+ *
+ * @param[in] type Gesture type
+ * @param[in] x The x coordinate gesture event starts at
+ * @param[in] y The y coordinate gesture event starts at
+ */
+EAPI void eext_gesture_event_dispatch(Eext_Gesture_Event_Type type, int x, int y);
+
/**
* @}
*/
#include "efl_extension.h"
#include "efl_extension_private.h"
+#define E_A11Y_SERVICE_BUS_NAME "org.enlightenment.wm-screen-reader"
+#define E_A11Y_SERVICE_NAVI_OBJ_PATH "/org/tizen/GestureNavigation"
+#define E_A11Y_SERVICE_NAVI_IFC_NAME "org.tizen.GestureNavigation"
+
typedef struct _Eext_Event_Mgr Eext_Event_Mgr;
struct _Eext_Event_Mgr
obj_event->callbacks = eina_list_append(obj_event->callbacks, callback);
}
+
+EAPI void
+eext_gesture_event_dispatch(Eext_Gesture_Event_Type type, int x, int y)
+{
+ Eldbus_Connection *conn;
+ Eldbus_Object *dobj;
+ Eldbus_Proxy *proxy;
+
+ eldbus_init();
+ if (!(conn = eldbus_connection_get(ELDBUS_CONNECTION_TYPE_SYSTEM)))
+ {
+ ERR("Connection to system bus failed");
+ return;
+ }
+ if (!(dobj = eldbus_object_get(conn, E_A11Y_SERVICE_BUS_NAME, E_A11Y_SERVICE_NAVI_OBJ_PATH)))
+ {
+ ERR("Failed to create eldbus object");
+ goto fail_obj;
+ }
+ if (!(proxy = eldbus_proxy_get(dobj, E_A11Y_SERVICE_NAVI_IFC_NAME)))
+ {
+ ERR("Failed to create proxy object for 'org.tizen.GestureNavigation'");
+ goto fail_proxy;
+ }
+ eldbus_proxy_call(proxy, "DispatchGestureEvent", NULL, NULL, -1, "iii", type, x, y);
+
+fail_proxy:
+ eldbus_object_unref(dobj);
+fail_obj:
+ eldbus_connection_unref(conn);
+
+ eldbus_shutdown();
+ return;
+}