From 1eb85aab57b1663d95889cb58924dd761f0e9ecd Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 11 May 2016 09:34:32 -0400 Subject: [PATCH] ecore-drm2: Add API function to return connector type of an output Signed-off-by: Chris Michael --- src/lib/ecore_drm2/Ecore_Drm2.h | 12 ++++++++++++ src/lib/ecore_drm2/ecore_drm2_outputs.c | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h index e9250ecab7..9792395d06 100644 --- a/src/lib/ecore_drm2/Ecore_Drm2.h +++ b/src/lib/ecore_drm2/Ecore_Drm2.h @@ -542,6 +542,18 @@ EAPI Eina_Bool ecore_drm2_output_connected_get(Ecore_Drm2_Output *output); */ EAPI Eina_Bool ecore_drm2_output_cloned_get(Ecore_Drm2_Output *output); +/** + * Get the connector type of a given output + * + * @param output + * + * @return An unsigned integer representing the type of connector for this output + * + * @ingroup Ecore_Drm2_Output_Group + * @since 1.18 + */ +EAPI unsigned int ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output); + /** * @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions * diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c b/src/lib/ecore_drm2/ecore_drm2_outputs.c index a39117ab50..da2ca928ca 100644 --- a/src/lib/ecore_drm2/ecore_drm2_outputs.c +++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c @@ -1062,3 +1062,10 @@ ecore_drm2_output_cloned_get(Ecore_Drm2_Output *output) EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE); return output->cloned; } + +EAPI unsigned int +ecore_drm2_output_connector_type_get(Ecore_Drm2_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + return output->conn_type; +}