struct wl_listener client_created;
};
-static Eina_Bool _e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Comp_Wl_Data *comp_wl, E_Client *ec);
+static Eina_Bool _e_comp_wl_cursor_timer_control(int type, E_Comp_Wl_Data *comp_wl, E_Client *ec);
/* local variables */
typedef struct _E_Comp_Wl_Key_Data
}
static Eina_Bool
-_e_comp_wl_cursor_timer_control(Evas_Callback_Type type, E_Comp_Wl_Data *comp_wl, E_Client *ec)
+_e_comp_wl_cursor_timer_control(int type, E_Comp_Wl_Data *comp_wl, E_Client *ec)
{
E_Pointer *comp_pointer = e_comp_pointer_get();
Eina_Bool ret = EINA_TRUE;
- switch (type)
- {
- case EVAS_CALLBACK_MOUSE_IN:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_IN, ec);
- if (!ret) break;
-
- if (comp_wl->ptr.hide_tmr)
- {
- ecore_timer_del(comp_wl->ptr.hide_tmr);
- cursor_timer_ec = ec;
- comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
- }
- else
- {
- if (e_pointer_is_hidden(comp_pointer))
- ret = EINA_FALSE;
- }
- break;
-
- case EVAS_CALLBACK_MOUSE_OUT:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_OUT, ec);
- if (!ret) break;
-
- if (!comp_wl->ptr.hide_tmr && e_pointer_is_hidden(comp_pointer))
- ret = EINA_FALSE;
- break;
-
- case EVAS_CALLBACK_MOUSE_MOVE:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_MOVE, ec);
- if (!ret) break;
-
- if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
- _e_comp_wl_cursor_reload(comp_wl, ec);
- break;
-
- case EVAS_CALLBACK_MOUSE_WHEEL:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_WHEEL, ec);
- if (!ret) break;
+ if (type == ECORE_EVENT_MOUSE_IN)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_IN, ec);
+ if (!ret) return ret;
- if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
- _e_comp_wl_cursor_reload(comp_wl, ec);
- break;
+ if (comp_wl->ptr.hide_tmr)
+ {
+ ecore_timer_del(comp_wl->ptr.hide_tmr);
+ cursor_timer_ec = ec;
+ comp_wl->ptr.hide_tmr = ecore_timer_add(e_config->cursor_timer_interval, _e_comp_wl_cursor_timer, ec);
+ }
+ else
+ {
+ if (e_pointer_is_hidden(comp_pointer))
+ ret = EINA_FALSE;
+ }
+ }
+ else if (type == ECORE_EVENT_MOUSE_OUT)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_OUT, ec);
+ if (!ret) return ret;
- case EVAS_CALLBACK_MOUSE_DOWN:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_DOWN, ec);
- if (!ret) break;
+ if (!comp_wl->ptr.hide_tmr && e_pointer_is_hidden(comp_pointer))
+ ret = EINA_FALSE;
+ }
+ else if (type == ECORE_EVENT_MOUSE_MOVE)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_MOVE, ec);
+ if (!ret) return ret;
- if (comp_wl->ptr.hide_tmr)
- {
- ecore_timer_del(comp_wl->ptr.hide_tmr);
- comp_wl->ptr.hide_tmr = NULL;
- }
- cursor_timer_ec = NULL;
+ if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
+ _e_comp_wl_cursor_reload(comp_wl, ec);
+ }
+ else if (type == ECORE_EVENT_MOUSE_WHEEL)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_WHEEL, ec);
+ if (!ret) return ret;
- if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
- _e_comp_wl_cursor_reload(comp_wl, ec);
- break;
+ if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
+ _e_comp_wl_cursor_reload(comp_wl, ec);
+ }
+ else if (type == ECORE_EVENT_MOUSE_BUTTON_DOWN)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_DOWN, ec);
+ if (!ret) return ret;
- case EVAS_CALLBACK_MOUSE_UP:
- ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_UP, ec);
- break;
+ if (comp_wl->ptr.hide_tmr)
+ {
+ ecore_timer_del(comp_wl->ptr.hide_tmr);
+ comp_wl->ptr.hide_tmr = NULL;
+ }
+ cursor_timer_ec = NULL;
- default:
- break;
+ if (e_pointer_is_hidden(comp_pointer) || !ec->pointer_enter_sent)
+ _e_comp_wl_cursor_reload(comp_wl, ec);
+ }
+ else if (type == ECORE_EVENT_MOUSE_BUTTON_UP)
+ {
+ ret = _e_comp_wl_intercept_hook_call(E_COMP_WL_INTERCEPT_HOOK_CURSOR_TIMER_MOUSE_UP, ec);
}
return ret;
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_IN, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_IN, comp_wl, ec))
return;
}
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_OUT, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_OUT, comp_wl, ec))
return;
}
{
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_MOVE, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_MOVE, comp_wl, ec))
return;
}
{
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_DOWN, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_BUTTON_DOWN, comp_wl, ec))
return;
}
{
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_UP, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_BUTTON_UP, comp_wl, ec))
return;
}
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_WHEEL, comp_wl, ec))
return;
}
{
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_MOVE, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_MOVE, comp_wl, ec))
goto end;
}
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_WHEEL, comp_wl, ec))
goto end;
}
{
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(pressed ? EVAS_CALLBACK_MOUSE_DOWN : EVAS_CALLBACK_MOUSE_UP, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(pressed ? ECORE_EVENT_MOUSE_BUTTON_DOWN : ECORE_EVENT_MOUSE_BUTTON_UP, comp_wl, ec))
return;
}
if (_e_comp_wl_check_cursor_timer_needed(ec))
{
- if (!_e_comp_wl_cursor_timer_control(EVAS_CALLBACK_MOUSE_WHEEL, comp_wl, ec))
+ if (!_e_comp_wl_cursor_timer_control(ECORE_EVENT_MOUSE_WHEEL, comp_wl, ec))
return EINA_TRUE;
}