From be763a011c4d37edff48d8db99bf234514670cb6 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 10 May 2016 13:49:38 -0400 Subject: [PATCH] elput: Add API function to return a list of Elput_Devices on a given seat This patch adds a new API function which can be called to retrieve a list of existing Elput_Devices on a given Elput_Seat. @feature Signed-off-by: Chris Michael --- src/lib/elput/Elput.h | 12 ++++++++++++ src/lib/elput/elput_input.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h index 98d81d7a7f..87d3462466 100644 --- a/src/lib/elput/Elput.h +++ b/src/lib/elput/Elput.h @@ -285,6 +285,18 @@ EAPI void elput_input_pointer_xy_get(Elput_Manager *manager, const char *seat, i */ EAPI void elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, int x, int y); +/** + * Get the list of devices on a given seat + * + * @param seat + * + * @return An Eina_List of existing Elput_Devices on a given seat or NULL on failure + * + * @ingroup Elput_Input_Group + * @since 1.18 + */ +EAPI const Eina_List *elput_input_devices_get(Elput_Seat *seat); + /** * @defgroup Elput_Device_Group * diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c index 8a15694b16..11269dfe07 100644 --- a/src/lib/elput/elput_input.c +++ b/src/lib/elput/elput_input.c @@ -328,3 +328,10 @@ elput_input_pointer_xy_set(Elput_Manager *manager, const char *seat, int x, int } } } + +EAPI const Eina_List * +elput_input_devices_get(Elput_Seat *seat) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(seat, NULL); + return seat->devices; +}