devilhorns pushed a commit to branch master.

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

commit bb774a538e0f3a74cf9737f69a7ccba7b6909e61
Author: Chris Michael <cpmich...@osg.samsung.com>
Date:   Thu Feb 4 08:56:32 2016 -0500

    ecore-drm: Add API function to get supported rotations from an output
    
    This patch adds an API function so that we can get the supported
    rotations from an output. This is needed so that the Screen Setup
    dialog in Enlightenment can list the rotations supported for the user
    to choose from while running using drm
    
    @feature
    
    Signed-off-by: Chris Michael <cpmich...@osg.samsung.com>
---
 src/lib/ecore_drm/Ecore_Drm.h        |  4 ++++
 src/lib/ecore_drm/ecore_drm_output.c | 19 +++++++++++++++++++
 2 files changed, 23 insertions(+)

diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index 66ac7fe..2942eeb 100644
--- a/src/lib/ecore_drm/Ecore_Drm.h
+++ b/src/lib/ecore_drm/Ecore_Drm.h
@@ -1002,6 +1002,10 @@ EAPI Eina_Bool 
ecore_drm_output_possible_crtc_get(Ecore_Drm_Output *output, unsi
  */
 EAPI Eina_Bool ecore_drm_output_mode_set(Ecore_Drm_Output *output, 
Ecore_Drm_Output_Mode *mode, int x, int y);
 
+/* TODO: doxy */
+/* @since 1.18 */
+EAPI unsigned int ecore_drm_output_supported_rotations_get(Ecore_Drm_Output 
*output, Ecore_Drm_Plane_Type type);
+
 /**
  * Enable key remap functionality on a Ecore_Drm_Evdev
  *
diff --git a/src/lib/ecore_drm/ecore_drm_output.c 
b/src/lib/ecore_drm/ecore_drm_output.c
index c5fed37..9dd4fd3 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1481,3 +1481,22 @@ ecore_drm_output_mode_set(Ecore_Drm_Output *output, 
Ecore_Drm_Output_Mode *mode,
 
    return ret;
 }
+
+EAPI unsigned int
+ecore_drm_output_supported_rotations_get(Ecore_Drm_Output *output, 
Ecore_Drm_Plane_Type type)
+{
+   Ecore_Drm_Plane *plane;
+   Eina_List *l;
+   unsigned int rot = -1;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, rot);
+
+   EINA_LIST_FOREACH(output->planes, l, plane)
+     {
+        if (plane->type != type) continue;
+        rot = plane->supported_rotations;
+        break;
+     }
+
+   return rot;
+}

-- 


Reply via email to