elput: Add API function to return a list of Elput_Devices on a given
authorChris Michael <cpmichael@osg.samsung.com>
Tue, 10 May 2016 17:49:38 +0000 (13:49 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Tue, 10 May 2016 17:49:38 +0000 (13:49 -0400)
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 <cpmichael@osg.samsung.com>
src/lib/elput/Elput.h
src/lib/elput/elput_input.c

index 98d81d7..87d3462 100644 (file)
@@ -286,6 +286,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
  *
  * Functions that deal with input devices.
index 8a15694..11269df 100644 (file)
@@ -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;
+}