forked from enlightenment/efl
ecore-drm: Add API function to get an output's crtc size
Summary: This adds a new API function to return an output's crtc size. This is mainly used for drm RandR config in E @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
8120cdcc13
commit
49de7d0ee8
|
@ -868,6 +868,18 @@ EAPI Eina_List *ecore_drm_output_modes_get(Ecore_Drm_Output *output);
|
||||||
*/
|
*/
|
||||||
EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev);
|
EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the size of the crtc for a given output
|
||||||
|
*
|
||||||
|
* @param output The Ecore_Drm_Output to get the crtc size of
|
||||||
|
* @param *width The parameter in which width is stored
|
||||||
|
* @param *height The parameter in which height is stored
|
||||||
|
*
|
||||||
|
* @ingroup Ecore_Drm_Output_Group
|
||||||
|
* @since 1.15
|
||||||
|
*/
|
||||||
|
EAPI void ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1263,3 +1263,15 @@ ecore_drm_output_primary_get(Ecore_Drm_Device *dev)
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI void
|
||||||
|
ecore_drm_output_crtc_size_get(Ecore_Drm_Output *output, int *width, int *height)
|
||||||
|
{
|
||||||
|
if (width) *width = 0;
|
||||||
|
if (height) *height = 0;
|
||||||
|
|
||||||
|
EINA_SAFETY_ON_NULL_RETURN(output);
|
||||||
|
|
||||||
|
if (width) *width = output->crtc->width;
|
||||||
|
if (height) *height = output->crtc->height;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue