add pointer util function for changing cursor object without deleting it

This commit is contained in:
Mike Blumenkrantz 2015-02-09 12:23:59 -05:00
parent 790183d74a
commit 2a1525bdb0
2 changed files with 11 additions and 1 deletions

View File

@ -747,3 +747,13 @@ e_pointer_idler_before(void)
ptr->hot.update = EINA_FALSE;
}
}
EAPI void
e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y)
{
ecore_evas_cursor_unset(ptr->ee);
if (obj)
ecore_evas_object_cursor_set(ptr->ee, obj, EVAS_LAYER_MAX, x, y);
else
ecore_evas_object_cursor_set(ptr->ee, ptr->o_ptr, EVAS_LAYER_MAX, ptr->hot.x, ptr->hot.y);
}

View File

@ -69,6 +69,6 @@ EAPI void e_pointer_type_pop(E_Pointer *ptr, void *obj, const char *type);
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_idler_before(void);
EAPI void e_pointer_object_set(E_Pointer *ptr, Evas_Object *obj, int x, int y);
# endif
#endif