ecore-drm: Add API function to return screen size range
authorChris Michael <cp.michael@samsung.com>
Mon, 4 May 2015 17:25:15 +0000 (13:25 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 7 May 2015 18:39:45 +0000 (14:39 -0400)
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>
src/lib/ecore_drm/Ecore_Drm.h
src/lib/ecore_drm/ecore_drm_device.c

index feb48f8..157d0b8 100644 (file)
@@ -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
index 2646483..bc28205 100644 (file)
@@ -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;
+}