diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index feb48f8414..157d0b8f18 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -761,6 +761,20 @@ EAPI void ecore_drm_device_pointer_xy_get(Ecore_Drm_Device *dev, int *x, int *y) */ EAPI const Eina_List *ecore_drm_devices_get(void); +/** + * Get the minimum and maximum screen size range + * + * @param dev The Ecore_Drm_Device to get screen size range from + * @param *minw The parameter in which smallest width is stored + * @param *minh The parameter in which smallest height is stored + * @param *maxw The parameter in which largest width is stored + * @param *maxh The parameter in which largest height is stored + * + * @ingroup Ecore_Drm_Device_Group + * @since 1.15 + */ +EAPI void ecore_drm_screen_size_range_get(Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh); + #ifdef __cplusplus } #endif diff --git a/src/lib/ecore_drm/ecore_drm_device.c b/src/lib/ecore_drm/ecore_drm_device.c index 2646483436..bc28205c99 100644 --- a/src/lib/ecore_drm/ecore_drm_device.c +++ b/src/lib/ecore_drm/ecore_drm_device.c @@ -530,3 +530,14 @@ ecore_drm_device_output_find(Ecore_Drm_Device *dev, int x, int y) return NULL; } + +EAPI void +ecore_drm_screen_size_range_get(Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh) +{ + EINA_SAFETY_ON_NULL_RETURN(dev); + + if (minw) *minw = dev->min_width; + if (minh) *minh = dev->min_height; + if (maxw) *maxw = dev->max_width; + if (maxh) *maxh = dev->max_height; +}