aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-02-02 11:08:06 -0500
committerChris Michael <cp.michael@samsung.com>2017-02-07 09:38:33 -0500
commit2451f34a175d6b60a51c5d314cf1ed76769da320 (patch)
tree98f4aa3d99c2a7e19d98c1f5fd872f2f2c4edef8
parentelput: Add seat_device to Elput_Event_Device_Change (diff)
downloadefl-2451f34a175d6b60a51c5d314cf1ed76769da320.tar.gz
elput: Add API function to get evas_device from input device
Small patch to add an API function to retrieve the Evas_Device from a given Elput_Device. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
-rw-r--r--src/lib/elput/Elput.h16
-rw-r--r--src/lib/elput/elput_input.c7
2 files changed, 23 insertions, 0 deletions
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index 2af887bb68..042a8542b5 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -470,6 +470,22 @@ EAPI Elput_Device_Capability elput_input_device_capabilities_get(Elput_Device *d
EAPI void elput_input_device_evas_device_set(Elput_Device *device, Eo *evas_device);
/**
+ * Get the Evas_Device on a given Elput_Device
+ *
+ * @param device
+ *
+ * @return The Evas_Device associated with given Elput_Device, or NULL otherwise.
+ *
+ * @note: Do not ever use this function in applications !!!
+ * This is a special-purpose API function and should not be used by
+ * application developers.
+ *
+ * @ingroup Elput_Input_Group
+ * @since 1.19
+ */
+EAPI Eo *elput_input_device_evas_device_get(Elput_Device *device);
+
+/**
* Set the Evas_Device to use for events on a given seat
*
* @param seat
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index f49cffaddf..b3567e2d43 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -727,6 +727,13 @@ elput_input_device_evas_device_set(Elput_Device *device, Eo *evas_device)
device->evas_device = NULL;
}
+EAPI Eo *
+elput_input_device_evas_device_get(Elput_Device *device)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
+ return device->evas_device;
+}
+
EAPI void
elput_input_seat_evas_device_set(Elput_Seat *seat, Eo *evas_device)
{