ecore_drm2: Add API function to get display physical size
This commit is contained in:
parent
5574ab8707
commit
69ecb57c2b
|
@ -64,6 +64,7 @@ EAPI Eina_Bool ecore_drm2_display_backlight_get(Ecore_Drm2_Display *disp);
|
|||
EAPI Eina_Bool ecore_drm2_display_connected_get(Ecore_Drm2_Display *disp);
|
||||
EAPI unsigned int ecore_drm2_display_connector_type_get(Ecore_Drm2_Display *disp);
|
||||
EAPI unsigned int ecore_drm2_display_subpixel_get(Ecore_Drm2_Display *disp);
|
||||
EAPI void ecore_drm2_display_physical_size_get(Ecore_Drm2_Display *disp, int *w, int *h);
|
||||
|
||||
/* XXX: These are 'test' APIs */
|
||||
EAPI void ecore_drm2_display_mode_set(Ecore_Drm2_Display *disp, Ecore_Drm2_Display_Mode *mode, int x, int y);
|
||||
|
|
|
@ -578,3 +578,15 @@ ecore_drm2_display_subpixel_get(Ecore_Drm2_Display *disp)
|
|||
EINA_SAFETY_ON_NULL_RETURN_VAL(disp, 0);
|
||||
return disp->subpixel;
|
||||
}
|
||||
|
||||
EAPI void
|
||||
ecore_drm2_display_physical_size_get(Ecore_Drm2_Display *disp, int *w, int *h)
|
||||
{
|
||||
if (w) *w = 0;
|
||||
if (h) *h = 0;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(disp);
|
||||
|
||||
if (w) *w = disp->pw;
|
||||
if (h) *h = disp->ph;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue