From a5d180b2826d27a492bc3cce980e437a708ba94f Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Wed, 8 Apr 2015 11:01:52 -0400 Subject: [PATCH] ecore-drm: Add an API function to return the connector id of an output Summary: This adds an API function to return the connector id of a given output. @feature Signed-off-by: Chris Michael --- src/lib/ecore_drm/Ecore_Drm.h | 14 ++++++++++++++ src/lib/ecore_drm/ecore_drm_output.c | 8 ++++++++ 2 files changed, 22 insertions(+) diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h index 1ebc2da6fd..b28e7f15ff 100644 --- a/src/lib/ecore_drm/Ecore_Drm.h +++ b/src/lib/ecore_drm/Ecore_Drm.h @@ -533,6 +533,20 @@ EAPI unsigned int ecore_drm_output_crtc_id_get(Ecore_Drm_Output *output); */ EAPI unsigned int ecore_drm_output_crtc_buffer_get(Ecore_Drm_Output *output); +/** + * Get the connector id of an output + * + * This function will return the default connector id for an output + * + * @param output The Ecore_Drm_Output to get the default connector of + * + * @return The id of the default connector id for this output + * + * @ingroup Ecore_Drm_Output_Group + * @since 1.15 + */ +EAPI unsigned int ecore_drm_output_connector_id_get(Ecore_Drm_Output *output); + /* TODO: Doxy */ EAPI Eina_Bool ecore_drm_inputs_create(Ecore_Drm_Device *dev); EAPI void ecore_drm_inputs_destroy(Ecore_Drm_Device *dev); diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c index 9ea0e3144d..67bd68f56d 100644 --- a/src/lib/ecore_drm/ecore_drm_output.c +++ b/src/lib/ecore_drm/ecore_drm_output.c @@ -1080,3 +1080,11 @@ ecore_drm_output_crtc_buffer_get(Ecore_Drm_Output *output) return id; } + +EAPI unsigned int +ecore_drm_output_connector_id_get(Ecore_Drm_Output *output) +{ + EINA_SAFETY_ON_NULL_RETURN_VAL(output, 0); + + return output->conn_id; +}