summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Michael <cp.michael@samsung.com>2019-03-06 09:31:21 -0500
committerChristopher Michael <cp.michael@samsung.com>2019-03-21 14:00:15 -0400
commitd0c777b3b8e18ba44439deb51d6e8347fae33f9b (patch)
treecca78f9ccab72f743704b9ad81b86000ce6b1a55
parent20b52359ff0205699df19caf9c609d181a40d2a0 (diff)
ecore-drm2: Add API function to return output rotation
Small patch to add an API function which can be used to return a given output's rotation value ref T7690 @feature Differential Revision: https://phab.enlightenment.org/D8114
-rw-r--r--src/lib/ecore_drm2/Ecore_Drm2.h12
-rw-r--r--src/lib/ecore_drm2/ecore_drm2_outputs.c7
2 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index fed477f56c..2274345590 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -793,6 +793,18 @@ EAPI int ecore_drm2_output_supported_rotations_get(Ecore_Drm2_Output *output);
793EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation); 793EAPI Eina_Bool ecore_drm2_output_rotation_set(Ecore_Drm2_Output *output, int rotation);
794 794
795/** 795/**
796 * Get current output rotation
797 *
798 * @param output
799 *
800 * @return An integer representing the output current rotation
801 *
802 * @ingroup Ecore_Drm2_Output_Group
803 * @since 1.22
804 */
805EAPI int ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output);
806
807/**
796 * Set the user data for the output's page flip handler 808 * Set the user data for the output's page flip handler
797 * 809 *
798 * @param output The output to update user data for 810 * @param output The output to update user data for
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 7642025ef4..c7540236f5 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -1576,6 +1576,13 @@ err:
1576 return ret; 1576 return ret;
1577} 1577}
1578 1578
1579EAPI int
1580ecore_drm2_output_rotation_get(Ecore_Drm2_Output *output)
1581{
1582 EINA_SAFETY_ON_NULL_RETURN_VAL(output, -1);
1583 return output->rotation;
1584}
1585
1579EAPI unsigned int 1586EAPI unsigned int
1580ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output) 1587ecore_drm2_output_subpixel_get(const Ecore_Drm2_Output *output)
1581{ 1588{