diff options
author | Chris Michael <cp.michael@samsung.com> | 2015-05-04 13:25:15 -0400 |
---|---|---|
committer | Chris Michael <cp.michael@samsung.com> | 2015-05-07 14:39:45 -0400 |
commit | 29362040b2a01e731d0dd7e3f52300a1d5ad8836 (patch) | |
tree | 85fe19eb8bc40e008fa9b8abe6ea314af3de3018 /src/lib | |
parent | b5a7a9b556e3966cccbdeece396ea48f0b4d84e9 (diff) |
ecore-drm: Add API function to return screen size range
Summary: This adds new API function to return the min & max width &
height of valid screen range for an Ecore_Drm_Device
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/ecore_drm/Ecore_Drm.h | 14 | ||||
-rw-r--r-- | src/lib/ecore_drm/ecore_drm_device.c | 11 |
2 files changed, 25 insertions, 0 deletions
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) | |||
761 | */ | 761 | */ |
762 | EAPI const Eina_List *ecore_drm_devices_get(void); | 762 | EAPI const Eina_List *ecore_drm_devices_get(void); |
763 | 763 | ||
764 | /** | ||
765 | * Get the minimum and maximum screen size range | ||
766 | * | ||
767 | * @param dev The Ecore_Drm_Device to get screen size range from | ||
768 | * @param *minw The parameter in which smallest width is stored | ||
769 | * @param *minh The parameter in which smallest height is stored | ||
770 | * @param *maxw The parameter in which largest width is stored | ||
771 | * @param *maxh The parameter in which largest height is stored | ||
772 | * | ||
773 | * @ingroup Ecore_Drm_Device_Group | ||
774 | * @since 1.15 | ||
775 | */ | ||
776 | EAPI void ecore_drm_screen_size_range_get(Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh); | ||
777 | |||
764 | #ifdef __cplusplus | 778 | #ifdef __cplusplus |
765 | } | 779 | } |
766 | #endif | 780 | #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) | |||
530 | 530 | ||
531 | return NULL; | 531 | return NULL; |
532 | } | 532 | } |
533 | |||
534 | EAPI void | ||
535 | ecore_drm_screen_size_range_get(Ecore_Drm_Device *dev, int *minw, int *minh, int *maxw, int *maxh) | ||
536 | { | ||
537 | EINA_SAFETY_ON_NULL_RETURN(dev); | ||
538 | |||
539 | if (minw) *minw = dev->min_width; | ||
540 | if (minh) *minh = dev->min_height; | ||
541 | if (maxw) *maxw = dev->max_width; | ||
542 | if (maxh) *maxh = dev->max_height; | ||
543 | } | ||