* limitations under the License.
*/
+#define _GNU_SOURCE
+
#define LOG_TAG "TIZEN_N_EFL_UTIL"
#include <efl_util.h>
#define LOG_TAG "TIZEN_N_EFL_UTIL"
#define EFL_UTIL_INPUT_GENERATOR_TOUCH_MAX_FINGER 10
+#define NUM_EVENT_WAIT_DONE_COUNT 10
+
typedef struct _Efl_Util_Wl_Surface_Lv_Info
{
void *surface; /* wl_surface */
int max_touch_count;
int request_touch_count;
} devmgr;
- struct wl_seat *seat;
struct
{
unsigned int id;
struct tizen_gesture *proto;
int request_notified;
int event_init;
+ struct
+ {
+ efl_util_gesture_edge_swipe_cb func;
+ void *data;
+ } edge_swipe_cb;
+ struct
+ {
+ efl_util_gesture_edge_drag_cb func;
+ void *data;
+ } edge_drag_cb;
+ struct
+ {
+ efl_util_gesture_tap_cb func;
+ void *data;
+ } tap_cb;
+ struct
+ {
+ efl_util_gesture_palm_cover_cb func;
+ void *data;
+ } palm_cover_cb;
} gesture;
} wl;
} Efl_Util_Data_Default_Queue;
{ 0, NULL, NULL, NULL }, /* tizen_policy protocol */
{ NULL, NULL, NULL, NULL, 0 }, /* screenshooter protocol */
{ NULL, -1, NULL, NULL, NULL, 0, 0 }, /* tizen_input_device_manager protocol */
- NULL, /* wl_seat protocol */
{ 0, NULL, NULL } /* display_policy protocol */
},
};
};
static void
-_cb_seat_capabilities(void *data, struct wl_seat *seat, enum wl_seat_capability caps)
-{
-}
-
-static void
-_cb_seat_name(void *data, struct wl_seat *seat EINA_UNUSED, const char *name)
-{
-}
-
-static const struct wl_seat_listener _seat_listener =
-{
- _cb_seat_capabilities,
- _cb_seat_name,
-};
-
-static void
_cb_wl_reg_global(void *data,
struct wl_registry *reg,
unsigned int id,
output->output = wl_registry_bind(reg, id, &wl_output_interface, version);
wl_output_add_listener(output->output, &output_listener, output);
}
- else if(strcmp(interface, "wl_seat") == 0)
- {
- _eflutil.wl.seat = wl_registry_bind(reg, id, &wl_seat_interface, version);
- wl_seat_add_listener(_eflutil.wl.seat, &_seat_listener, NULL);
- }
else if (strcmp(interface, "tizen_input_device_manager") == 0)
{
_eflutil.wl.devmgr.devicemgr = wl_registry_bind(reg, id, &tizen_input_device_manager_interface, version);
struct wl_surface *surface;
Efl_Util_Wl_Surface_Lv_Info *lv_info;
Ecore_Wl2_Window_Type wl_type;
+ int ret_dispatch = 0;
res = _wl_init();
EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER);
EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
}
- while (!_eflutil.wl.policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
if (lv_info->wait_for_done)
{
int count = 0;
- while (lv_info->wait_for_done && (count < 3))
+ ret_dispatch = 0;
+ while (lv_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
count++;
}
struct wl_surface *surface;
Efl_Util_Wl_Surface_Lv_Info *lv_info;
Ecore_Wl2_Window_Type wl_type;
+ int ret_dispatch = 0;
res = _wl_init();
EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER);
EFL_UTIL_ERROR_NOT_SUPPORTED_WINDOW_TYPE);
}
- while (!_eflutil.wl.policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
if (lv_info->wait_for_done)
{
int count = 0;
- while ((lv_info->wait_for_done) && (count < 3))
+ ret_dispatch = 0;
+ while ((lv_info->wait_for_done) && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
count++;
}
struct wl_surface *surface;
Efl_Util_Wl_Surface_Scr_Mode_Info *scr_mode_info;
Eina_Bool res;
+ int ret_dispatch = 0;
res = _wl_init();
EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER);
wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
if (scr_mode_info->wait_for_done)
{
int count = 0;
- while (scr_mode_info->wait_for_done && (count < 3))
+ ret_dispatch = 0;
+ while (scr_mode_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
count++;
}
struct wl_surface *surface;
Efl_Util_Wl_Surface_Scr_Mode_Info *scr_mode_info;
Eina_Bool res;
+ int ret_dispatch = 0;
res = _wl_init();
EINA_SAFETY_ON_FALSE_RETURN_VAL(res, EFL_UTIL_ERROR_INVALID_PARAMETER);
wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
{
if (scr_mode_info->wait_for_done)
{
- while (scr_mode_info->wait_for_done)
+ ret_dispatch = 0;
+ while (scr_mode_info->wait_for_done && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
}
}
struct wl_surface *surface;
Efl_Util_Wl_Surface_Brightness_Info *brightness_info;
Eina_Bool res;
+ int ret_dispatch = 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_FALSE_RETURN_VAL(brightness <= 100, EFL_UTIL_ERROR_INVALID_PARAMETER);
wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window);
if (wlwin)
{
- while (!_eflutil.wl.display_policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.display_policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
if (brightness_info->wait_for_done)
{
int count = 0;
- while (brightness_info->wait_for_done && (count < 3))
+ ret_dispatch = 0;
+ while (brightness_info->wait_for_done && (count < NUM_EVENT_WAIT_DONE_COUNT) && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
count++;
}
struct wl_surface *surface;
Efl_Util_Wl_Surface_Brightness_Info *brightness_info;
Eina_Bool res;
+ int ret_dispatch = 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(window, EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_NULL_RETURN_VAL(brightness, EFL_UTIL_ERROR_INVALID_PARAMETER);
wlwin = (Ecore_Wl2_Window *)elm_win_wl_window_get(window);
if (!wlwin) return EFL_UTIL_ERROR_INVALID_PARAMETER;
- while (!_eflutil.wl.display_policy.proto)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.display_policy.proto && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
surface = ecore_wl2_window_surface_get(wlwin);
EINA_SAFETY_ON_NULL_RETURN_VAL(surface,
{
if (brightness_info->wait_for_done)
{
- while (brightness_info->wait_for_done)
+ ret_dispatch = 0;
+ while (brightness_info->wait_for_done && (ret_dispatch != -1))
{
ecore_wl2_display_flush(_eflutil.wl.wl2_display);
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
}
}
*brightness = brightness_info->brightness;
return EFL_UTIL_ERROR_NONE;
}
-
struct _efl_util_inputgen_h
{
unsigned int init_type;
E_Devicemgr_Inputgen_Touch_Axis *axis_info;
};
-/* LCOV_EXCL_STOP */
-
static void
_cb_device_add(void *data EINA_UNUSED,
struct tizen_input_device_manager *tizen_input_device_manager EINA_UNUSED,
{
efl_util_inputgen_h inputgen_h = NULL;
unsigned int clas = 0x0;
+ int ret_dispatch = 0;
if (!dev_type ||
dev_type & ~(EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN
if (dev_type & EFL_UTIL_INPUT_DEVTYPE_POINTER)
clas |= TIZEN_INPUT_DEVICE_MANAGER_CLAS_MOUSE;
- while (!_eflutil.wl.devmgr.devicemgr)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.devmgr.devicemgr && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
if (with_name == 2)
tizen_input_device_manager_init_generator_with_sync(_eflutil.wl.devmgr.devicemgr, clas, inputgen_h->name);
else
tizen_input_device_manager_init_generator(_eflutil.wl.devmgr.devicemgr, clas);
-
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = 0;
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
*ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
efl_util_input_set_touch_count(int max_count)
{
int ret = EFL_UTIL_ERROR_NONE;
+ int ret_dispatch = 0;
ret = _wl_init();
if (ret == (int)EINA_FALSE)
return EFL_UTIL_ERROR_INVALID_PARAMETER;
}
- while (!_eflutil.wl.devmgr.devicemgr)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while (!_eflutil.wl.devmgr.devicemgr && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
if (_eflutil.wl.devmgr.max_touch_count >= max_count)
return EFL_UTIL_ERROR_NONE;
tizen_input_device_manager_set_touch_count(_eflutil.wl.devmgr.devicemgr, max_count);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ ret_dispatch = 0;
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
{
int ret = EFL_UTIL_ERROR_NONE;
unsigned int clas = 0x0;
+ int ret_dispatch = 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
if (inputgen_h->init_type & EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN)
tizen_input_device_manager_deinit_generator(_eflutil.wl.devmgr.devicemgr, clas);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
efl_util_input_generate_key(efl_util_inputgen_h inputgen_h, const char *key_name, int pressed)
{
int ret = EFL_UTIL_ERROR_NONE;
+ int ret_dispatch = 0;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_NULL_RETURN_VAL(key_name, EFL_UTIL_ERROR_INVALID_PARAMETER);
tizen_input_device_manager_generate_key(_eflutil.wl.devmgr.devicemgr, key_name, pressed);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
efl_util_input_touch_type_e touch_type, int x, int y)
{
int ret;
+ int ret_dispatch = 0;
enum tizen_input_device_manager_pointer_event_type type;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_FALSE_RETURN_VAL((x > 0 && y > 0), EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_FALSE_RETURN_VAL(inputgen_h->init_type & EFL_UTIL_INPUT_DEVTYPE_TOUCHSCREEN, EFL_UTIL_ERROR_NO_SUCH_DEVICE);
+ if (_eflutil.wl.devmgr.request_touch_count != 0 &&
+ _eflutil.wl.devmgr.max_touch_count != _eflutil.wl.devmgr.request_touch_count)
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+
if (idx >= _eflutil.wl.devmgr.max_touch_count)
return EFL_UTIL_ERROR_INVALID_PARAMETER;
tizen_input_device_manager_generate_touch(_eflutil.wl.devmgr.devicemgr, type, x, y, idx);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
_efl_util_input_generate_touch_axis_send(unsigned int type, double value)
{
int ret;
+ int ret_dispatch = 0;
tizen_input_device_manager_generate_axis(_eflutil.wl.devmgr.devicemgr, type, wl_fixed_from_double(value));
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
double pressure, double angle, double palm)
{
int ret, version;
+ int ret_dispatch = 0;
enum tizen_input_device_manager_pointer_event_type type;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
tizen_input_device_manager_generate_touch(_eflutil.wl.devmgr.devicemgr, type, x, y, idx);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
efl_util_input_generate_pointer(efl_util_inputgen_h inputgen_h, int buttons, efl_util_input_pointer_type_e pointer_type, int x, int y)
{
int ret;
+ int ret_dispatch = 0;
enum tizen_input_device_manager_pointer_event_type type;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
tizen_input_device_manager_generate_pointer(_eflutil.wl.devmgr.devicemgr, type, x, y, buttons);
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
efl_util_input_generate_wheel(efl_util_inputgen_h inputgen_h, efl_util_input_pointer_wheel_type_e wheel_type, int value)
{
int ret, version;
+ int ret_dispatch = 0;
enum tizen_input_device_manager_pointer_event_type type;
EINA_SAFETY_ON_NULL_RETURN_VAL(inputgen_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
tizen_input_device_manager_generate_axis(_eflutil.wl.devmgr.devicemgr, type, wl_fixed_from_int(value));
- while (_eflutil.wl.devmgr.request_notified == -1)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ while ((_eflutil.wl.devmgr.request_notified == -1) && (ret_dispatch != -1))
+ ret_dispatch = wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
ret = _efl_util_input_convert_input_generator_error(_eflutil.wl.devmgr.request_notified);
_eflutil.wl.devmgr.request_notified = -1;
ret = pthread_create(&screenmirror->thread, NULL, _efl_util_screenmirror_loop, screenmirror);
if (ret < 0)
- fprintf(stderr, "[screenmirror] fail: thread create fail\n");
+ {
+ fprintf(stderr, "[screenmirror] fail: thread create fail\n");
+ _screenshot_mutex_unlock();
+ return EFL_UTIL_ERROR_SCREENSHOT_EXECUTION_FAIL;
+ }
+
+ pthread_setname_np(screenmirror->thread, "e_util_mirror");
_screenshot_mutex_unlock();
static void
_cb_gesture_edge_swipe_notify(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t fingers EINA_UNUSED, uint32_t edge EINA_UNUSED, uint32_t edge_size EINA_UNUSED, uint32_t start_point EINA_UNUSED, uint32_t end_point EINA_UNUSED, uint32_t error)
{
+ LOGD("");
_eflutil_defaultqueue.wl.gesture.request_notified = error;
}
static void
_cb_gesture_edge_swipe(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t mode, uint32_t fingers, int sx, int sy, uint32_t edge)
{
+ LOGD("");
efl_util_event_gesture_edge_swipe_s *ev = NULL;
ev = (efl_util_event_gesture_edge_swipe_s *)calloc(1, sizeof(*ev));
ev->edge = edge;
ecore_event_add(EFL_UTIL_EVENT_GESTURE_EDGE_SWIPE, ev, NULL, NULL);
+
+ if (_eflutil_defaultqueue.wl.gesture.edge_swipe_cb.func)
+ _eflutil_defaultqueue.wl.gesture.edge_swipe_cb.func(_eflutil_defaultqueue.wl.gesture.edge_swipe_cb.data, mode, fingers, sx, sy, edge);
}
static void
_cb_gesture_edge_drag_notify(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t fingers EINA_UNUSED, uint32_t edge EINA_UNUSED, uint32_t edge_size EINA_UNUSED, uint32_t start_point EINA_UNUSED, uint32_t end_point EINA_UNUSED, uint32_t error)
{
+ LOGD("");
_eflutil_defaultqueue.wl.gesture.request_notified = error;
}
static void
_cb_gesture_edge_drag(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t mode, uint32_t fingers, int cx, int cy, uint32_t edge)
{
+ LOGD("");
efl_util_event_gesture_edge_drag_s *ev = NULL;
ev = (efl_util_event_gesture_edge_drag_s *)calloc(1, sizeof(*ev));
ev->edge = edge;
ecore_event_add(EFL_UTIL_EVENT_GESTURE_EDGE_DRAG, ev, NULL, NULL);
+
+ if (_eflutil_defaultqueue.wl.gesture.edge_drag_cb.func)
+ _eflutil_defaultqueue.wl.gesture.edge_drag_cb.func(_eflutil_defaultqueue.wl.gesture.edge_drag_cb.data, mode, fingers, cx, cy, edge);
}
static void
_cb_gesture_tap_notify(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t fingers EINA_UNUSED, uint32_t repeat EINA_UNUSED, uint32_t error)
{
+ LOGD("");
_eflutil_defaultqueue.wl.gesture.request_notified = error;
}
static void
_cb_gesture_tap(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, uint32_t mode, uint32_t fingers, uint32_t repeats)
{
+ LOGD("");
efl_util_event_gesture_tap_s *ev = NULL;
ev = (efl_util_event_gesture_tap_s *)calloc(1, sizeof(*ev));
ev->repeats = repeats;
ecore_event_add(EFL_UTIL_EVENT_GESTURE_TAP, ev, NULL, NULL);
+
+ if (_eflutil_defaultqueue.wl.gesture.tap_cb.func)
+ _eflutil_defaultqueue.wl.gesture.tap_cb.func(_eflutil_defaultqueue.wl.gesture.tap_cb.data, mode, fingers, repeats);
}
/* LCOV_EXCL_STOP */
static void
_cb_gesture_palm_cover_notify(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, uint32_t error)
{
+ LOGD("");
_eflutil_defaultqueue.wl.gesture.request_notified = error;
}
static void
_cb_gesture_palm_cover(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, struct wl_surface *surface, uint32_t mode, uint32_t duration, int cx, int cy, uint32_t size, wl_fixed_t pressure)
{
+ LOGD("");
efl_util_event_gesture_palm_cover_s *ev = NULL;
ev = (efl_util_event_gesture_palm_cover_s *)calloc(1, sizeof(*ev));
ev->pressure = wl_fixed_to_int(pressure);
ecore_event_add(EFL_UTIL_EVENT_GESTURE_PALM_COVER, ev, NULL, NULL);
+
+ if (_eflutil_defaultqueue.wl.gesture.palm_cover_cb.func)
+ _eflutil_defaultqueue.wl.gesture.palm_cover_cb.func(_eflutil_defaultqueue.wl.gesture.palm_cover_cb.data, mode, duration, cx, cy, size, pressure);
}
/* LCOV_EXCL_STOP */
static void
_cb_gesture_activate_notify(void *data EINA_UNUSED, struct tizen_gesture *tizen_gesture EINA_UNUSED, struct wl_surface *surface EINA_UNUSED, uint32_t type EINA_UNUSED, uint32_t active EINA_UNUSED, uint32_t error)
{
+ LOGD("");
_eflutil_defaultqueue.wl.gesture.request_notified = error;
}
static int
_efl_util_gesture_grab_edge_swipe(efl_util_gesture_data data, Eina_Bool grabbed)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
Efl_Util_Gesture_Edge_Swipe_Grab_Data *edge_swipe_data = NULL;
static int
_efl_util_gesture_grab_edge_drag(efl_util_gesture_data data, Eina_Bool grabbed)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
Efl_Util_Gesture_Edge_Drag_Grab_Data *edge_drag_data = NULL;
static int
_efl_util_gesture_grab_tap(efl_util_gesture_data data, Eina_Bool grabbed)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
Efl_Util_Gesture_Tap_Grab_Data *tap_data = NULL;
static int
_efl_util_gesture_grab_palm_cover(efl_util_gesture_data data, Eina_Bool grabbed)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
API efl_util_gesture_h
efl_util_gesture_initialize(void)
{
+ LOGD("");
efl_util_gesture_h gesture_h = NULL;
gesture_h = (efl_util_gesture_h)calloc(1, sizeof(struct _efl_util_gesture_h));
API int
efl_util_gesture_deinitialize(efl_util_gesture_h gesture_h)
{
+ LOGD("");
EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
EINA_SAFETY_ON_FALSE_RETURN_VAL(gesture_h->init, EFL_UTIL_ERROR_INVALID_PARAMETER);
API efl_util_gesture_data
efl_util_gesture_edge_swipe_new(efl_util_gesture_h gesture_h, unsigned int fingers, efl_util_gesture_edge_e edge)
{
+ LOGD("");
Efl_Util_Gesture_Edge_Swipe_Grab_Data *data;
if (!gesture_h || gesture_h->init == EINA_FALSE)
API int
efl_util_gesture_edge_swipe_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
if (!gesture_h || gesture_h->init == EINA_FALSE)
{
return EFL_UTIL_ERROR_INVALID_PARAMETER;
API int
efl_util_gesture_edge_swipe_size_set(efl_util_gesture_data data, efl_util_gesture_edge_size_e edge_size, unsigned int start_point, unsigned int end_point)
{
+ LOGD("");
Efl_Util_Gesture_Edge_Swipe_Grab_Data *edge_swipe_data = data;
EINA_SAFETY_ON_NULL_RETURN_VAL(edge_swipe_data, EFL_UTIL_ERROR_INVALID_PARAMETER);
API efl_util_gesture_data
efl_util_gesture_edge_drag_new(efl_util_gesture_h gesture_h, unsigned int fingers, efl_util_gesture_edge_e edge)
{
+ LOGD("");
Efl_Util_Gesture_Edge_Drag_Grab_Data *data;
if (!gesture_h || gesture_h->init == EINA_FALSE)
API int
efl_util_gesture_edge_drag_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
if (!gesture_h || gesture_h->init == EINA_FALSE)
{
return EFL_UTIL_ERROR_INVALID_PARAMETER;
API int
efl_util_gesture_edge_drag_size_set(efl_util_gesture_data data, efl_util_gesture_edge_size_e edge_size, unsigned int start_point, unsigned int end_point)
{
+ LOGD("");
Efl_Util_Gesture_Edge_Drag_Grab_Data *edge_drag_data = data;
EINA_SAFETY_ON_NULL_RETURN_VAL(edge_drag_data, EFL_UTIL_ERROR_INVALID_PARAMETER);
API efl_util_gesture_data
efl_util_gesture_tap_new(efl_util_gesture_h gesture_h, unsigned int fingers, unsigned int repeats)
{
+ LOGD("");
Efl_Util_Gesture_Tap_Grab_Data *data;
if (!gesture_h || gesture_h->init == EINA_FALSE)
API int
efl_util_gesture_tap_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
if (!gesture_h || gesture_h->init == EINA_FALSE)
{
return EFL_UTIL_ERROR_INVALID_PARAMETER;
API efl_util_gesture_data
efl_util_gesture_palm_cover_new(efl_util_gesture_h gesture_h)
{
+ LOGD("");
Efl_Util_Gesture_Palm_Cover_Grab_Data *data;
if (!gesture_h || gesture_h->init == EINA_FALSE)
API int
efl_util_gesture_palm_cover_free(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
if (!gesture_h || gesture_h->init == EINA_FALSE)
{
return EFL_UTIL_ERROR_INVALID_PARAMETER;
API int
efl_util_gesture_grab(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
API int
efl_util_gesture_ungrab(efl_util_gesture_h gesture_h, efl_util_gesture_data data)
{
+ LOGD("");
int ret = EFL_UTIL_ERROR_NONE;
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
API int
efl_util_gesture_select(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data)
{
+ LOGD("");
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
Ecore_Wl2_Window *wlwin;
struct wl_surface *surface;
API int
efl_util_gesture_deselect(efl_util_gesture_h gesture_h, Evas_Object *window, efl_util_gesture_data data)
{
+ LOGD("");
Efl_Util_Gesture_Common_Grab_Data *base_data = NULL;
Ecore_Wl2_Window *wlwin;
struct wl_surface *surface;
API int
efl_util_gesture_activate_set(efl_util_gesture_h gesture_h, unsigned int type, Eina_Bool active)
{
+ LOGD("");
int ret;
EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
API int
efl_util_gesture_activate_set_on_window(efl_util_gesture_h gesture_h, Evas_Object *window, unsigned int type, Eina_Bool active)
{
+ LOGD("");
Ecore_Wl2_Window *wlwin;
struct wl_surface *surface;
int ret;
return ret;
}
+
+API int efl_util_gesture_edge_swipe_cb_set(efl_util_gesture_h gesture_h, efl_util_gesture_edge_swipe_cb cb_func, void *data)
+{
+ LOGD("");
+ int ret = EFL_UTIL_ERROR_NONE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(gesture_h->init, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+ _eflutil_defaultqueue.wl.gesture.edge_swipe_cb.func = cb_func;
+ _eflutil_defaultqueue.wl.gesture.edge_swipe_cb.data = data;
+
+ return ret;
+}
+
+API int efl_util_gesture_edge_drag_cb_set(efl_util_gesture_h gesture_h, efl_util_gesture_edge_drag_cb cb_func, void *data)
+{
+ LOGD("");
+ int ret = EFL_UTIL_ERROR_NONE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(gesture_h->init, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+ _eflutil_defaultqueue.wl.gesture.edge_drag_cb.func = cb_func;
+ _eflutil_defaultqueue.wl.gesture.edge_drag_cb.data = data;
+
+ return ret;
+}
+
+API int efl_util_gesture_tap_cb_set(efl_util_gesture_h gesture_h, efl_util_gesture_tap_cb cb_func, void *data)
+{
+ LOGD("");
+ int ret = EFL_UTIL_ERROR_NONE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(gesture_h->init, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+ _eflutil_defaultqueue.wl.gesture.tap_cb.func = cb_func;
+ _eflutil_defaultqueue.wl.gesture.tap_cb.data = data;
+
+ return ret;
+}
+
+API int efl_util_gesture_palm_cover_cb_set(efl_util_gesture_h gesture_h, efl_util_gesture_palm_cover_cb cb_func, void *data)
+{
+ LOGD("");
+ int ret = EFL_UTIL_ERROR_NONE;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(gesture_h, EFL_UTIL_ERROR_INVALID_PARAMETER);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(gesture_h->init, EFL_UTIL_ERROR_INVALID_PARAMETER);
+
+ _eflutil_defaultqueue.wl.gesture.palm_cover_cb.func = cb_func;
+ _eflutil_defaultqueue.wl.gesture.palm_cover_cb.data = data;
+
+ return ret;
+}