From 5b84bf2c24f1998b21dfb6debdec397bc70a1df4 Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 7 Jun 2017 10:59:02 -0400 Subject: [PATCH] ecore-wl2: Add API function to return an output transformation Small patch to add a new API function that can be used to retrieve the current transform value for a given output. @feature Signed-off-by: Chris Michael --- src/lib/ecore_wl2/Ecore_Wl2.h | 11 +++++++++++ src/lib/ecore_wl2/ecore_wl2_output.c | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index 7267422..669564b 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -1367,6 +1367,17 @@ EAPI void ecore_wl2_subsurface_opaque_region_set(Ecore_Wl2_Subsurface *subsurfac EAPI int ecore_wl2_output_dpi_get(Ecore_Wl2_Output *output); /** + * Get the current transform of a given output + * + * @param output The output to get the transform of + * + * @return The output's current transform value + * @ingroup Ecore_Wl2_Output_Group + * @since 1.20 + */ +EAPI int ecore_wl2_output_transform_get(Ecore_Wl2_Output *output); + +/** * Return the version of the display's compositor object * * @param disp the display to get the compositor object version from diff --git a/src/lib/ecore_wl2/ecore_wl2_output.c b/src/lib/ecore_wl2/ecore_wl2_output.c index 1397ddf..abd43f2 100644 --- a/src/lib/ecore_wl2/ecore_wl2_output.c +++ b/src/lib/ecore_wl2/ecore_wl2_output.c @@ -131,3 +131,10 @@ ecore_wl2_output_dpi_get(Ecore_Wl2_Output *output) return (((w * 254) / mw) + 5) / 10; } + +EAPI int +ecore_wl2_output_transform_get(Ecore_Wl2_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + return output->transform; +} -- 2.7.4