devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=29362040b2a01e731d0dd7e3f52300a1d5ad8836

commit 29362040b2a01e731d0dd7e3f52300a1d5ad8836
Author: Chris Michael <cp.mich...@samsung.com>
Date:   Mon May 4 13:25:15 2015 -0400

    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.mich...@samsung.com>
---
 src/lib/ecore_drm/Ecore_Drm.h        | 14 ++++++++++++++
 src/lib/ecore_drm/ecore_drm_device.c | 11 +++++++++++
 2 files changed, 25 insertions(+)

diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index feb48f8..157d0b8 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 2646483..bc28205 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;
+}

-- 


Reply via email to