forked from enlightenment/efl
ecore-evas: add function for unsetting a specific seat's cursor
@feature
This commit is contained in:
parent
34999448c2
commit
2fabed3255
|
@ -2423,6 +2423,23 @@ EAPI void ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj,
|
|||
*/
|
||||
EAPI Evas_Object* ecore_evas_cursor_unset(Ecore_Evas *ee);
|
||||
|
||||
/**
|
||||
* @brief Unsets the cursor of the specified pointer device.
|
||||
*
|
||||
* @param ee The Ecore_Evas to unset the cursor.
|
||||
* @param pointer A pointer device to set the cursor. Use @c NULL for the default.
|
||||
*
|
||||
* This function unsets the cursor from the Ecore_Evas, and returns the cursor
|
||||
* object. If the cursor was set from ecore_evas_cursor_set(), this function
|
||||
* returns the image. In this case, the image should be deleted when it is
|
||||
* no longer needed.
|
||||
*
|
||||
* @see ecore_evas_cursor_device_set()
|
||||
* @see ecore_evas_object_cursor_device_set()
|
||||
* @since 1.20
|
||||
*/
|
||||
EAPI Evas_Object *ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer);
|
||||
|
||||
/**
|
||||
* @brief Sets the cursor of an Ecore_Evas specified pointer device.
|
||||
*
|
||||
|
|
|
@ -1858,16 +1858,17 @@ ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *
|
|||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
ecore_evas_cursor_unset(Ecore_Evas *ee)
|
||||
ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer)
|
||||
{
|
||||
Ecore_Evas_Cursor *cursor;
|
||||
Efl_Input_Device *pointer;
|
||||
Ecore_Evas_Cursor *cursor = NULL;
|
||||
Evas_Object *obj;
|
||||
|
||||
ECORE_EVAS_CHECK(ee, NULL);
|
||||
|
||||
pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
|
||||
cursor = eina_hash_find(ee->prop.cursors, &pointer);
|
||||
if (!pointer)
|
||||
pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
|
||||
if (pointer)
|
||||
cursor = eina_hash_find(ee->prop.cursors, &pointer);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL);
|
||||
obj = cursor->object;
|
||||
if (ee->engine.func->fn_object_cursor_unset)
|
||||
|
@ -1880,6 +1881,12 @@ ecore_evas_cursor_unset(Ecore_Evas *ee)
|
|||
return obj;
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
ecore_evas_cursor_unset(Ecore_Evas *ee)
|
||||
{
|
||||
return ecore_evas_cursor_device_unset(ee, NULL);
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_evas_layer_set(Ecore_Evas *ee, int layer)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue