summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Michael <cpmichael@osg.samsung.com>2016-07-07 14:33:38 -0400
committerChris Michael <cp.michael@samsung.com>2016-07-08 08:05:14 -0400
commite0cde404757e3c6775f5d8ffb14353e56e6b2a81 (patch)
tree1677aacd7ab60e254bcaaa9448f91893073e4370
parenteb1650d5f2442ea78f27e0cd44a119d0fb416a82 (diff)
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.michael@samsung.com>
-rw-r--r--src/lib/elput/Elput.h12
-rw-r--r--src/lib/elput/elput_input.c9
2 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/elput/Elput.h b/src/lib/elput/Elput.h
index 4595f58e61..3e7bd4b62b 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 *
401 */ 401 */
402EAPI void elput_input_keyboard_cached_keymap_set(Elput_Manager *manager, void *keymap); 402EAPI void elput_input_keyboard_cached_keymap_set(Elput_Manager *manager, void *keymap);
403 403
404/**
405 * Return the output name associated with a given device
406 *
407 * @param device
408 *
409 * @return An Eina_Stringshare of the output name for this device, or NULL on error
410 *
411 * @ingroup Elput_Input_Group
412 * @since 1.18
413 */
414EAPI Eina_Stringshare *elput_input_device_output_name_get(Elput_Device *device);
415
404# endif 416# endif
405 417
406# undef EAPI 418# undef EAPI
diff --git a/src/lib/elput/elput_input.c b/src/lib/elput/elput_input.c
index bff5503692..e5182a9ddc 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)
629 if ((keymap) && (manager->cached.keymap == keymap)) return; 629 if ((keymap) && (manager->cached.keymap == keymap)) return;
630 manager->cached.keymap = keymap; 630 manager->cached.keymap = keymap;
631} 631}
632
633EAPI Eina_Stringshare *
634elput_input_device_output_name_get(Elput_Device *device)
635{
636 EINA_SAFETY_ON_NULL_RETURN_VAL(device, NULL);
637 EINA_SAFETY_ON_NULL_RETURN_VAL(device->output_name, NULL):
638
639 return eina_stringshare_ref(device->output_name);
640}