ecore-drm2: Add API function to return physical size of a given output
authorChris Michael <cpmichael@osg.samsung.com>
Wed, 11 May 2016 13:25:36 +0000 (09:25 -0400)
committerChris Michael <cpmichael@osg.samsung.com>
Fri, 27 May 2016 15:57:53 +0000 (11:57 -0400)
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
src/lib/ecore_drm2/Ecore_Drm2.h
src/lib/ecore_drm2/ecore_drm2_outputs.c

index 3b4ffdf..41c1b41 100644 (file)
@@ -438,6 +438,20 @@ EAPI Eina_Bool ecore_drm2_output_enabled_get(Ecore_Drm2_Output *output);
 EAPI void ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled);
 
 /**
+ * Get the physical size of a given output
+ *
+ * This function will give the physical size (in mm) of an output
+ *
+ * @param output
+ * @param *w
+ * @param *h
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w, int *h);
+
+/**
  * @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
  *
  * Functions that deal with setup of framebuffers
index 553c911..1c8c576 100644 (file)
@@ -954,3 +954,15 @@ ecore_drm2_output_enabled_set(Ecore_Drm2_Output *output, Eina_Bool enabled)
 
    _output_event_send(output);
 }
+
+EAPI void
+ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w, int *h)
+{
+   if (w) *w = 0;
+   if (h) *h = 0;
+
+   EINA_SAFETY_ON_NULL_RETURN(output);
+
+   if (w) *w = output->pw;
+   if (h) *h = output->ph;
+}