devilhorns pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=bdddc912d78a028c3e6066ead64bdc868536a2ab
commit bdddc912d78a028c3e6066ead64bdc868536a2ab Author: Chris Michael <[email protected]> Date: Wed May 11 09:31:38 2016 -0400 ecore-drm2: Add API functions to get name & model of an output Signed-off-by: Chris Michael <[email protected]> --- src/lib/ecore_drm2/Ecore_Drm2.h | 24 ++++++++++++++++++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 16 ++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index df07a33..390f5d0 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -495,6 +495,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 * * Functions that deal with setup of framebuffers diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index 4a4fe0b..8b909be 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -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); +} --
