devilhorns pushed a commit to branch master.

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

commit b7c7ce4ce0a6a6f87decdfc79cd53aa80bb13497
Author: Chris Michael <[email protected]>
Date:   Thu Jun 8 09:23:17 2017 -0400

    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 <[email protected]>
---
 src/lib/ecore_drm2/Ecore_Drm2.h        | 13 +++++++++++++
 src/lib/ecore_drm2/ecore_drm2_device.c |  8 ++++++++
 2 files changed, 21 insertions(+)

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
 EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, 
int h);
 
 /**
+ * Set pointer value rotation
+ *
+ * @param device
+ * @param rotation
+ *
+ * @return EINA_TRUE on success, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm2_Device_Group
+ * @since 1.20
+ */
+EAPI Eina_Bool ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device 
*device, int rotation);
+
+/**
  * Set info to be used on keyboards
  *
  * @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
    return elput_input_pointer_left_handed_set(device->em, NULL, left);
 }
 
+EAPI Eina_Bool
+ecore_drm2_device_pointer_rotation_set(Ecore_Drm2_Device *device, int rotation)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(device, EINA_FALSE);
+
+   return elput_input_pointer_rotation_set(device->em, rotation);
+}
+
 EAPI void
 ecore_drm2_device_window_set(Ecore_Drm2_Device *device, unsigned int window)
 {

-- 


Reply via email to