summaryrefslogtreecommitdiff
path: root/src/lib/ecore_drm2
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2017-06-08 09:23:17 -0400
committerChris Michael <cp.michael@samsung.com>2017-06-08 10:03:36 -0400
commitb7c7ce4ce0a6a6f87decdfc79cd53aa80bb13497 (patch)
treec4c716affa0f20b19586d3ece6853a80fc2c4535 /src/lib/ecore_drm2
parent26af19b543e313cdf1756cc1d158dca9d8cef02e (diff)
ecore-drm2: Add API function to set pointer rotation
This patch adds a new API function which can be used to swap x & y pointer axis and invert them according to rotation angle. Mouse input events occur according to canvas coordinates so this can be used when a canvas is rotated. @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_drm2')
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h13
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_device.c8
2 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index d62f4e8f4c..fc5c8b4f7e 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -285,6 +285,19 @@ EAPI void ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int w
285EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, int h); 285EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, int h);
286 286
287/** 287/**
288 * Set pointer value rotation
289 *
290 * @param device
291 * @param rotation
292 *
293 * @return EINA_TRUE on success, EINA_FALSE otherwise
294 *
295 * @ingroup Ecore_Drm2_Device_Group
296 * @since 1.20
297 */
298EAPI Eina_Bool ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device *device, int rotation);
299
300/**
288 * Set info to be used on keyboards 301 * Set info to be used on keyboards
289 * 302 *
290 * @param device 303 * @param device
diff --git a/src/lib/ecore_drm2/ecore_drm2_device.c b/src/lib/ecore_drm2/ecore_drm2_device.c
index 2a1680c1d7..9cc8c37046 100644
--- a/src/lib/ecore_drm2/ecore_drm2_device.c
+++ b/src/lib/ecore_drm2/ecore_drm2_device.c
@@ -761,6 +761,14 @@ ecore_drm2_device_pointer_left_handed_set(Ecore_Drm2_Device *device, Eina_Bool l
761 return elput_input_pointer_left_handed_set(device->em, NULL, left); 761 return elput_input_pointer_left_handed_set(device->em, NULL, left);
762} 762}
763 763
764EAPI Eina_Bool
765ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device *device, int rotation)
766{
767 EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
768
769 return elput_input_pointer_rotation_set(device->em, rotation);
770}
771
764EAPI void 772EAPI void
765ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int window) 773ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int window)
766{ 774{