diff options
author | Chris Michael <cpmichael@osg.samsung.com> | 2016-05-11 09:31:38 -0400 |
---|---|---|
committer | Chris Michael <cpmichael@osg.samsung.com> | 2016-05-27 11:57:53 -0400 |
commit | bdddc912d78a028c3e6066ead64bdc868536a2ab (patch) | |
tree | 2784802240ce4d842e45a2446872a9d6f9872ef0 | |
parent | a6b018a2a8283e9244182152cc9187db818b7b63 (diff) | |
download | efl-bdddc912d78a028c3e6066ead64bdc868536a2ab.tar.gz |
ecore-drm2: Add API functions to get name & model of an output
Signed-off-by: Chris Michael <cpmichael@osg.samsung.com>
-rw-r--r-- | src/lib/ecore_drm2/Ecore_Drm2.h | 24 | ||||
-rw-r--r-- | src/lib/ecore_drm2/ecore_drm2_outputs.c | 16 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index df07a3316e..390f5d057a 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 4a4fe0bd99..8b909bef28 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); +} |