ecore-drm2: Add API function to return screen dpi
This patch adds a new API function which will be called from Ecore_Evas to return the screen dpi @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
a5ce6200a2
commit
e0b61a35c5
|
@ -460,6 +460,18 @@ EAPI Ecore_Drm2_Output *ecore_drm2_output_find(Ecore_Drm2_Device *device, int x,
|
|||
*/
|
||||
EAPI void ecore_drm2_output_geometry_get(Ecore_Drm2_Output *output, int *x, int *y, int *w, int *h);
|
||||
|
||||
/**
|
||||
* Get the dpi of a given output
|
||||
*
|
||||
* @param output
|
||||
* @param xdpi
|
||||
* @param ydpi
|
||||
*
|
||||
* @ingroup Ecore_Drm2_Output_Group
|
||||
* @since 1.19
|
||||
*/
|
||||
EAPI void ecore_drm2_output_dpi_get(Ecore_Drm2_Output *output, int *xdpi, int *ydpi);
|
||||
|
||||
/**
|
||||
* Get the id of the crtc that an output is using
|
||||
*
|
||||
|
|
|
@ -1114,6 +1114,19 @@ ecore_drm2_output_geometry_get(Ecore_Drm2_Output *output, int *x, int *y, int *w
|
|||
if (h) *h = output->current_mode->height;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_drm2_output_dpi_get(Ecore_Drm2_Output *output, int *xdpi, int *ydpi)
|
||||
{
|
||||
EINA_SAFETY_ON_NULL_RETURN(output);
|
||||
EINA_SAFETY_ON_TRUE_RETURN(!output->enabled);
|
||||
|
||||
if (xdpi)
|
||||
*xdpi = ((25.4 * (output->current_mode->width)) / output->pw);
|
||||
|
||||
if (ydpi)
|
||||
*ydpi = ((25.4 * (output->current_mode->height)) / output->ph);
|
||||
}
|
||||
|
||||
EAPI unsigned int
|
||||
ecore_drm2_output_crtc_get(Ecore_Drm2_Output *output)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue