remove e_pointer_block api

this was a failure idea for a way to block X cursor changes using an api, which turned out to be overengineered
This commit is contained in:
Mike Blumenkrantz 2014-01-23 17:04:41 -05:00
parent 1f25710907
commit 99a4e5bd27
3 changed files with 0 additions and 53 deletions

View File

@ -922,37 +922,3 @@ e_pointer_mode_pop(void *obj, E_Pointer_Mode mode)
default: break;
}
}
EAPI void
e_pointer_block_add(E_Pointer *p)
{
if (!p->blocks)
{
evas_object_hide(p->pointer_object);
if (p->pixmap)
{
int w, h;
e_pixmap_size_get(p->pixmap, &w, &h);
e_pointer_image_set(p, p->pixmap, w, h, p->hot.x, p->hot.y);
}
}
p->blocks++;
}
EAPI void
e_pointer_block_del(E_Pointer *p)
{
if (!p->blocks) return;
p->blocks--;
if (p->blocks) return;
e_pointers_size_set(e_config->cursor_size);
if (p->pointer_image)
{
if (p->canvas)
evas_object_resize(p->pointer_image, p->w, p->h);
else
evas_object_hide(p->pointer_image);
}
}

View File

@ -70,8 +70,5 @@ EAPI void e_pointer_idler_before(void);
EAPI void e_pointer_mode_push(void *obj, E_Pointer_Mode mode);
EAPI void e_pointer_mode_pop(void *obj, E_Pointer_Mode mode);
EAPI void e_pointer_block_add(E_Pointer *p);
EAPI void e_pointer_block_del(E_Pointer *p);
#endif
#endif

View File

@ -43,7 +43,6 @@ static void _e_wl_shell_shell_surface_cb_destroy(struct wl_listener *listener, v
static int _e_wl_shell_shell_surface_cb_ping_timeout(void *data);
static void _e_wl_shell_render_post(void *data, Evas *e EINA_UNUSED, void *event EINA_UNUSED);
static void _e_wl_shell_shell_surface_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
static void _e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
static void _e_wl_shell_shell_surface_cb_mouse_move(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
static void _e_wl_shell_shell_surface_cb_mouse_up(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event);
@ -631,8 +630,6 @@ _e_wl_shell_shell_surface_create_toplevel(E_Wayland_Surface *ews)
EC_CHANGED(ews->ec);
/* hook object callbacks */
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_IN,
_e_wl_shell_shell_surface_cb_mouse_in, ews);
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
_e_wl_shell_shell_surface_cb_mouse_out, ews);
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
@ -695,8 +692,6 @@ _e_wl_shell_shell_surface_create_popup(E_Wayland_Surface *ews)
EC_CHANGED(ews->ec);
/* hook object callbacks */
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_IN,
_e_wl_shell_shell_surface_cb_mouse_in, ews);
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
_e_wl_shell_shell_surface_cb_mouse_out, ews);
evas_object_event_callback_add(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
@ -924,8 +919,6 @@ _e_wl_shell_shell_surface_unmap(E_Wayland_Surface *ews)
if (ews->ec)
{
evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_IN,
_e_wl_shell_shell_surface_cb_mouse_in, ews);
//evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_OUT,
//_e_wl_shell_shell_surface_cb_mouse_out, ews);
evas_object_event_callback_del_full(ews->ec->frame, EVAS_CALLBACK_MOUSE_MOVE,
@ -1135,14 +1128,6 @@ _e_wl_shell_render_post(void *data EINA_UNUSED, Evas *e EINA_UNUSED, void *event
}
}
static void
_e_wl_shell_shell_surface_cb_mouse_in(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
{
E_Wayland_Surface *ews = data;
e_pointer_block_add(ews->ec->comp->pointer);
}
static void
_e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event)
{
@ -1153,7 +1138,6 @@ _e_wl_shell_shell_surface_cb_mouse_out(void *data, Evas *e EINA_UNUSED, Evas_Obj
/* try to cast data to our surface structure */
if (!(ews = data)) return;
if (ews->ec->cur_mouse_action || ews->ec->border_menu) return;
if (ews->ec->comp->pointer) e_pointer_block_del(ews->ec->comp->pointer);
if (e_object_is_del(E_OBJECT(ews->ec))) return;
/* try to get the pointer from this input */