devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ad58670c5632b6ce5dcb9d8afc7f04e1f8d7c0e3
commit ad58670c5632b6ce5dcb9d8afc7f04e1f8d7c0e3 Author: Chris Michael <[email protected]> Date: Wed May 11 09:25:36 2016 -0400 ecore-drm2: Add API function to return physical size of a given output Signed-off-by: Chris Michael <[email protected]> --- src/lib/ecore_drm2/Ecore_Drm2.h | 14 ++++++++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index 3b4ffdf..41c1b41 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -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 diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 553c911..1c8c576 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -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; +} --
