devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e0cde404757e3c6775f5d8ffb14353e56e6b2a81

commit e0cde404757e3c6775f5d8ffb14353e56e6b2a81
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Thu Jul 7 14:33:38 2016 -0400

    elput: Add API function to return output name associated with input
    device
    
    This patch adds a new API function which we can call from Ecore_Drm2
    which will return the name of an output which is associated with a
    given input device. This output name can then be used to find a
    matching output, and perform any device calibration that is needed.
    
    @feature
    
    Signed-off-by: Chris Michael <cp.mich...@samsung.com>
---
 src/lib/elput/Elput.h       | 12 ++++++++++++
 src/lib/elput/elput_input.c |  9 +++++++++
 2 files changed, 21 insertions(+)

diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index 4595f58..3e7bd4b 100644
--- a/src/lib/elput/Elput.h
+++ b/src/lib/elput/Elput.h
@@ -401,6 +401,18 @@ EAPI void 
elput_input_keyboard_cached_context_set(Elput_Manager *manager, void *
  */
 EAPI void elput_input_keyboard_cached_keymap_set(Elput_Manager *manager, void 
*keymap);
 
+/**
+ * Return the output name associated with a given device
+ *
+ * @param device
+ *
+ * @return An Eina_Stringshare of the output name for this device, or NULL on 
error
+ *
+ * @ingroup Elput_Input_Group
+ * @since 1.18
+ */
+EAPI Eina_Stringshare *elput_input_device_output_name_get(Elput_Device 
*device);
+
 # endif
 
 # undef EAPI
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index bff5503..e5182a9 100644
--- a/src/lib/elput/elput_input.c
+++ b/src/lib/elput/elput_input.c
@@ -629,3 +629,12 @@ elput_input_keyboard_cached_keymap_set(Elput_Manager 
*manager, void *keymap)
    if ((keymap) && (manager->cached.keymap == keymap)) return;
    manager->cached.keymap = keymap;
 }
+
+EAPI Eina_Stringshare *
+elput_input_device_output_name_get(Elput_Device *device)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(device->output_name, NULL):
+
+   return eina_stringshare_ref(device->output_name);
+}

-- 


Reply via email to