ecore-drm2: Add API function to get screen size range

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-05-11 09:42:42 -04:00
parent f3b7672551
commit e934f546ad
3 changed files with 32 additions and 2 deletions

View File

@ -241,6 +241,20 @@ EAPI void ecore_drm2_device_pointer_max_set(Ecore_Drm2_Device *device, int w, in
*/
EAPI unsigned int *ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int *num);
/**
* Get the minimum and maximum screen size range
*
* @param device
* @param *minw
* @param *minh
* @param *maxw
* @param *maxh
*
* @ingroup Ecore_Drm2_Device_Group
* @since 1.18
*/
EAPI void ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, int *minw, int *minh, int *maxw, int *maxh);
/**
* @defgroup Ecore_Drm2_Output_Group Drm output functions
*

View File

@ -268,3 +268,19 @@ ecore_drm2_device_crtcs_get(Ecore_Drm2_Device *device, int *num)
if (num) *num = device->num_crtcs;
return device->crtcs;
}
EAPI void
ecore_drm2_device_screen_size_range_get(Ecore_Drm2_Device *device, int *minw, int *minh, int *maxw, int *maxh)
{
if (minw) *minw = 0;
if (minh) *minh = 0;
if (maxw) *maxw = 0;
if (maxh) *maxh = 0;
EINA_SAFETY_ON_NULL_RETURN(device);
if (minw) *minw = device->min.width;
if (minh) *minh = device->min.height;
if (maxw) *maxw = device->max.width;
if (maxh) *maxh = device->max.height;
}

View File

@ -58,8 +58,8 @@ _output_debug(Ecore_Drm2_Output *output, const drmModeConnector *conn)
EINA_LIST_FOREACH(output->modes, l, omode)
{
DBG("\tAdded Mode: %dx%d@%.1f%s%s%s",
omode->width, omode->height, (omode->refresh / 1000.0),
DBG("\tAdded Mode: %dx%d@%d%s%s%s",
omode->width, omode->height, omode->refresh,
(omode->flags & DRM_MODE_TYPE_PREFERRED) ? ", preferred" : "",
(omode->flags & DRM_MODE_TYPE_DEFAULT) ? ", current" : "",
(conn->count_modes == 0) ? ", built-in" : "");