ecore-drm2: Add API function to return output rotation
authorChristopher Michael <cp.michael@samsung.com>
Fri, 22 Mar 2019 16:41:21 +0000 (12:41 -0400)
committerYeongjong Lee <yj34.lee@samsung.com>
Tue, 2 Apr 2019 03:45:17 +0000 (12:45 +0900)
Summary:
Small patch to add an API function which can be used to return a given
output's rotation value

ref T7690

@feature

Depends on D8113

Reviewers: raster, cedric, zmike, stefan_schmidt, bu5hm4n

Reviewed By: cedric

Subscribers: cedric

Tags: #efl, #do_not_merge

Maniphest Tasks: T7690

Differential Revision: https://phab.enlightenment.org/D8114

src/lib/ecore_drm2/Ecore_Drm2.h
src/lib/ecore_drm2/ecore_drm2_outputs.c

index fed477f..2274345 100644 (file)
@@ -793,6 +793,18 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output);
 EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation);
 
 /**
+ * Get current output rotation
+ *
+ * @param output
+ *
+ * @return An integer representing the output current rotation
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.22
+ */
+EAPI int ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output);
+
+/**
  * Set the user data for the output's page flip handler
  *
  * @param output The output to update user data for
index 7642025..c754023 100644 (file)
@@ -1576,6 +1576,13 @@ err:
    return ret;
 }
 
+EAPI int
+ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1);
+   return output->rotation;
+}
+
 EAPI unsigned int
 ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output)
 {