summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:32 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-12 12:08:25 -0400
commit2fabed32555d411b8c293556fb56abb90d4ae000 (patch)
tree37274127ebb6e1a675d322cc3e1610ed80c1e911 /src/lib/ecore_evas
parent34999448c21e660a09581bd8933e055a44fd3132 (diff)
ecore-evas: add function for unsetting a specific seat's cursor
@feature
Diffstat (limited to 'src/lib/ecore_evas')
-rw-r--r--src/lib/ecore_evas/Ecore_Evas.h17
-rw-r--r--src/lib/ecore_evas/ecore_evas.c17
2 files changed, 29 insertions, 5 deletions
diff --git a/src/lib/ecore_evas/Ecore_Evas.h b/src/lib/ecore_evas/Ecore_Evas.h
index 9a2d8dd38d..c4f7b3e22c 100644
--- a/src/lib/ecore_evas/Ecore_Evas.h
+++ b/src/lib/ecore_evas/Ecore_Evas.h
@@ -2424,6 +2424,23 @@ EAPI void ecore_evas_object_cursor_set(Ecore_Evas *ee, Evas_Object *obj,
2424EAPI Evas_Object* ecore_evas_cursor_unset(Ecore_Evas *ee); 2424EAPI Evas_Object* ecore_evas_cursor_unset(Ecore_Evas *ee);
2425 2425
2426/** 2426/**
2427 * @brief Unsets the cursor of the specified pointer device.
2428 *
2429 * @param ee The Ecore_Evas to unset the cursor.
2430 * @param pointer A pointer device to set the cursor. Use @c NULL for the default.
2431 *
2432 * This function unsets the cursor from the Ecore_Evas, and returns the cursor
2433 * object. If the cursor was set from ecore_evas_cursor_set(), this function
2434 * returns the image. In this case, the image should be deleted when it is
2435 * no longer needed.
2436 *
2437 * @see ecore_evas_cursor_device_set()
2438 * @see ecore_evas_object_cursor_device_set()
2439 * @since 1.20
2440 */
2441EAPI Evas_Object *ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer);
2442
2443/**
2427 * @brief Sets the cursor of an Ecore_Evas specified pointer device. 2444 * @brief Sets the cursor of an Ecore_Evas specified pointer device.
2428 * 2445 *
2429 * @param ee The Ecore_Evas 2446 * @param ee The Ecore_Evas
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 7c68126157..16a58c2b61 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -1858,16 +1858,17 @@ ecore_evas_cursor_get(const Ecore_Evas *ee, Evas_Object **obj, int *layer, int *
1858} 1858}
1859 1859
1860EAPI Evas_Object * 1860EAPI Evas_Object *
1861ecore_evas_cursor_unset(Ecore_Evas *ee) 1861ecore_evas_cursor_device_unset(Ecore_Evas *ee, Efl_Input_Device *pointer)
1862{ 1862{
1863 Ecore_Evas_Cursor *cursor; 1863 Ecore_Evas_Cursor *cursor = NULL;
1864 Efl_Input_Device *pointer;
1865 Evas_Object *obj; 1864 Evas_Object *obj;
1866 1865
1867 ECORE_EVAS_CHECK(ee, NULL); 1866 ECORE_EVAS_CHECK(ee, NULL);
1868 1867
1869 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE); 1868 if (!pointer)
1870 cursor = eina_hash_find(ee->prop.cursors, &pointer); 1869 pointer = evas_default_device_get(ee->evas, EFL_INPUT_DEVICE_CLASS_MOUSE);
1870 if (pointer)
1871 cursor = eina_hash_find(ee->prop.cursors, &pointer);
1871 EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL); 1872 EINA_SAFETY_ON_NULL_RETURN_VAL(cursor, NULL);
1872 obj = cursor->object; 1873 obj = cursor->object;
1873 if (ee->engine.func->fn_object_cursor_unset) 1874 if (ee->engine.func->fn_object_cursor_unset)
@@ -1880,6 +1881,12 @@ ecore_evas_cursor_unset(Ecore_Evas *ee)
1880 return obj; 1881 return obj;
1881} 1882}
1882 1883
1884EAPI Evas_Object *
1885ecore_evas_cursor_unset(Ecore_Evas *ee)
1886{
1887 return ecore_evas_cursor_device_unset(ee, NULL);
1888}
1889
1883EAPI void 1890EAPI void
1884ecore_evas_layer_set(Ecore_Evas *ee, int layer) 1891ecore_evas_layer_set(Ecore_Evas *ee, int layer)
1885{ 1892{