aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_drm
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/lib/ecore_drm
parentecore-drm: Add API function to return the connector type of a given output (diff)
downloadefl-130ad6d60fa7e67c50db7aeffa3fab37b92de404.tar.gz
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/lib/ecore_drm')
-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);
*/
EAPI unsigned int ecore_drm_output_connector_type_get(Ecore_Drm_Output *output);
+/**
+ * Get if a given output has a backlight
+ *
+ * @param output The Ecore_Drm_Output to get the backlight of
+ *
+ * @return EINA_TRUE if this output has a backlight, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm_Output_Group
+ * @since 1.15
+ */
+EAPI Eina_Bool ecore_drm_output_backlight_get(Ecore_Drm_Output *output);
+
#ifdef __cplusplus
}
#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)
return output->conn_type;
}
+
+EAPI Eina_Bool
+ecore_drm_output_backlight_get(Ecore_Drm_Output *output)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+ return (output->backlight != NULL);
+}