ecore-drm2: Add API functions to get name & model of an output

Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
This commit is contained in:
Chris Michael 2016-05-11 09:31:38 -04:00
parent a6b018a2a8
commit bdddc912d7
2 changed files with 40 additions and 0 deletions

View File

@ -494,6 +494,30 @@ EAPI void ecore_drm2_output_mode_info_get(Ecore_Drm2_Output_Mode *mode, int *w,
*/
EAPI Eina_Bool ecore_drm2_output_mode_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mode, int x, int y);
/**
* Get the name of a given output
*
* @param output
*
* @return A string representing the output's name. Caller should free this return.
*
* @ingroup Ecore_Drm2_Output_Group
* @since 1.18
*/
EAPI char *ecore_drm2_output_name_get(Ecore_Drm2_Output *output);
/**
* Get the model of a given output
*
* @param output
*
* @return A string representing the output's model. Caller should free this return.
*
* @ingroup Ecore_Drm2_Output_Group
* @since 1.18
*/
EAPI char *ecore_drm2_output_model_get(Ecore_Drm2_Output *output);
/**
* @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
*

View File

@ -1032,3 +1032,19 @@ ecore_drm2_output_mode_set(Ecore_Drm2_Output *output, Ecore_Drm2_Output_Mode *mo
return ret;
}
EAPI char *
ecore_drm2_output_name_get(Ecore_Drm2_Output *output)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(output->name, NULL);
return strdup(output->name);
}
EAPI char *
ecore_drm2_output_model_get(Ecore_Drm2_Output *output)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(output->model, NULL);
return strdup(output->model);
}