static Eina_List *_ptrs = NULL;
static Eina_Bool _initted = EINA_FALSE;
+/* move the cursor image with the calcaultion of the hot spot */
+static void
+_e_pointer_move(E_Pointer *ptr, int x, int y)
+{
+ int nx, ny;
+
+ nx = ptr->x - ptr->hot.x;
+ ny = ptr->y - ptr->hot.y;
+
+ evas_object_move(ptr->o_ptr, nx, ny);
+}
+
static void
_e_pointer_map_transform(int width, int height, uint32_t transform,
int sx, int sy, int *dx, int *dy)
}
}
+// TODO: transform the cursor position with hot spot...!!!!!!
static void
_e_pointer_rotation_apply(E_Pointer *ptr)
{
{
evas_object_map_set(ec->frame, NULL);
evas_object_map_enable_set(ec->frame, EINA_FALSE);
- evas_object_move(ec->frame, x, y);
+ _e_pointer_move(ptr, x, y);
return;
}
ptr->device = E_POINTER_NONE;
}
+ /* update the hot spot of the cursor */
+ ptr->hot.x = x;
+ ptr->hot.y = y;
+
/* if obj is not null, set the obj to ptr->o_ptr */
if (obj)
{
_e_pointer_rotation_apply(ptr);
/* move the pointer to the current position */
- evas_object_move(obj, ptr->x, ptr->y);
+ _e_pointer_move(ptr, ptr->x, ptr->y);
/* show cursor object */
evas_object_show(obj);
if (ptr->device != E_POINTER_TOUCH) ptr->device = E_POINTER_TOUCH;
_e_pointer_rotation_apply(ptr);
- evas_object_move(ptr->o_ptr, ptr->x, ptr->y);
+ _e_pointer_move(ptr, ptr->x, ptr->y);
}
EINTERN void
if (ptr->device != E_POINTER_MOUSE) ptr->device = E_POINTER_MOUSE;
_e_pointer_rotation_apply(ptr);
- evas_object_move(ptr->o_ptr, ptr->x, ptr->y);
+ _e_pointer_move(ptr, ptr->x, ptr->y);
}
E_API void
ptr->rotation = rotation;
_e_pointer_rotation_apply(ptr);
- evas_object_move(ptr->o_ptr, ptr->x, ptr->y);
+ _e_pointer_move(ptr, ptr->x, ptr->y);
}
E_API void