summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-05-04 14:41:18 -0400
committerChris Michael <cp.michael@samsung.com>2015-05-07 14:39:46 -0400
commit130ad6d60fa7e67c50db7aeffa3fab37b92de404 (patch)
treeb7ac12f5d70434514aca2af33385cea58cef3e12 /src
parent4d2290847fa921e3cb42a9fe45c1978c7c2d9eef (diff)
ecore-drm: Add API function to return if a given output has a backlight
Summary: This adds a new API function to call so we can check if a given Ecore_Drm_Output has a backlight @feature Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/ecore_drm/Ecore_Drm.h12
-rw-r--r--src/lib/ecore_drm/ecore_drm_output.c7
2 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/ecore_drm/Ecore_Drm.h b/src/lib/ecore_drm/Ecore_Drm.h
index 319d007047..d0a2c3673a 100644
--- a/src/lib/ecore_drm/Ecore_Drm.h
+++ b/src/lib/ecore_drm/Ecore_Drm.h
@@ -812,6 +812,18 @@ EAPI Eina_Bool ecore_drm_output_connected_get(Ecore_Drm_Output *output);
812 */ 812 */
813EAPI unsigned int ecore_drm_output_connector_type_get(Ecore_Drm_Output *output); 813EAPI unsigned int ecore_drm_output_connector_type_get(Ecore_Drm_Output *output);
814 814
815/**
816 * Get if a given output has a backlight
817 *
818 * @param output The Ecore_Drm_Output to get the backlight of
819 *
820 * @return EINA_TRUE if this output has a backlight, EINA_FALSE otherwise
821 *
822 * @ingroup Ecore_Drm_Output_Group
823 * @since 1.15
824 */
825EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output);
826
815#ifdef __cplusplus 827#ifdef __cplusplus
816} 828}
817#endif 829#endif
diff --git a/src/lib/ecore_drm/ecore_drm_output.c b/src/lib/ecore_drm/ecore_drm_output.c
index 78882d69e2..3ffc131530 100644
--- a/src/lib/ecore_drm/ecore_drm_output.c
+++ b/src/lib/ecore_drm/ecore_drm_output.c
@@ -1118,3 +1118,10 @@ ecore_drm_output_connector_type_get(Ecore_Drm_Output *output)
1118 1118
1119 return output->conn_type; 1119 return output->conn_type;
1120} 1120}
1121
1122EAPI Eina_Bool
1123ecore_drm_output_backlight_get(Ecore_Drm_Output *output)
1124{
1125 EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
1126 return (output->backlight != NULL);
1127}