ecore-wl2: Add API function to return an output transformation
authorChris Michael <cp.michael@samsung.com>
Wed, 7 Jun 2017 14:59:02 +0000 (10:59 -0400)
committerChris Michael <cp.michael@samsung.com>
Wed, 7 Jun 2017 15:09:58 +0000 (11:09 -0400)
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 <cp.michael@samsung.com>
src/lib/ecore_wl2/Ecore_Wl2.h
src/lib/ecore_wl2/ecore_wl2_output.c

index 7267422..669564b 100644 (file)
@@ -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
index 1397ddf..abd43f2 100644 (file)
@@ -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;
+}