EAPI const Eina_List *evas_device_list(Evas *e, const Evas_Device *dev);
/**
+ * Get a device by its name
+ *
+ * @param e The canvas to create the device node for.
+ * @param name The name of the device.
+ *
+ * Gets the first ocurrence of a device named as @p name
+ * on Evas @p e list of devices.
+ *
+ * @return the device or NULL if an error occurred, no name was provided,
+ * or no device with a matching name was found.
+ *
+ * @since 1.19
+ */
+EAPI Evas_Device *evas_device_get(Evas *e, const char *name);
+
+/**
* Set the name of a device as a string
*
* @p dev The device to set the name of
}
EAPI Evas_Device *
+evas_device_get(Evas *eo_e, const char *name)
+{
+ const char *dev_name;
+ Evas_Public_Data *e;
+ Evas_Device *dev;
+ Eina_List *l;
+
+ SAFETY_CHECK(eo_e, EVAS_CANVAS_CLASS, NULL);
+
+ if (!name)
+ return NULL;
+
+ e = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
+
+ EINA_LIST_FOREACH(e->devices, l, dev)
+ {
+ dev_name = efl_input_device_name_get(dev);
+
+ if (eina_streq(dev_name, name))
+ return dev;
+ }
+
+ return NULL;
+}
+
+EAPI Evas_Device *
evas_device_add(Evas *eo_e)
{
return evas_device_add_full(eo_e, NULL, NULL, NULL, NULL,