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 < NUM_EVENT_WAIT_DONE_COUNT))
+ 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 < NUM_EVENT_WAIT_DONE_COUNT))
+ 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 < NUM_EVENT_WAIT_DONE_COUNT))
+ 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 < NUM_EVENT_WAIT_DONE_COUNT))
+ 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;
{
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(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)
- wl_display_dispatch_queue(_eflutil.wl.dpy, _eflutil.wl.queue);
+ _eflutil.wl.devmgr.max_touch_count != _eflutil.wl.devmgr.request_touch_count &&
+ (ret_dispatch != -1))
+ 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);
+ 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_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;