ecore-drm: Add API function to disable an output
authorChris Michael <cp.michael@samsung.com>
Tue, 7 Apr 2015 18:21:30 +0000 (14:21 -0400)
committerStefan Schmidt <s.schmidt@samsung.com>
Fri, 10 Apr 2015 09:09:50 +0000 (11:09 +0200)
Summary: This adds a new API function we can call to disable an Ecore_Drm_Output

@feature

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_drm/Ecore_Drm.h
src/lib/ecore_drm/ecore_drm_output.c

index 6b47e9e..8b07cb5 100644 (file)
@@ -229,6 +229,18 @@ EAPI Eina_Bool ecore_drm_outputs_create(Ecore_Drm_Device *dev);
 EAPI void ecore_drm_output_free(Ecore_Drm_Output *output);
 EAPI void ecore_drm_output_cursor_size_set(Ecore_Drm_Output *output, int handle, int w, int h);
 EAPI Eina_Bool ecore_drm_output_enable(Ecore_Drm_Output *output);
+
+/**
+ * Disable a Ecore_Drm_Output
+ *
+ * This function will disable rendering on an Ecore_Drm_Output
+ *
+ * @param output The Ecore_Drm_Output to disable
+ *
+ * @ingroup Ecore_Drm_Output_Group
+ * @since 1.15
+ */
+EAPI void ecore_drm_output_disable(Ecore_Drm_Output *output);
 EAPI void ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb);
 EAPI void ecore_drm_output_repaint(Ecore_Drm_Output *output);
 EAPI void ecore_drm_output_size_get(Ecore_Drm_Device *dev, int output, int *w, int *h);
index 1c1514f..e69a38a 100644 (file)
@@ -869,6 +869,17 @@ ecore_drm_output_enable(Ecore_Drm_Output *output)
    return EINA_TRUE;
 }
 
+EAPI void
+ecore_drm_output_disable(Ecore_Drm_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN(output);
+
+   output->enabled = EINA_FALSE;
+   output->need_repaint = EINA_FALSE;
+   ecore_drm_output_cursor_size_set(output, 0, 0, 0);
+   ecore_drm_output_dpms_set(output, DRM_MODE_DPMS_OFF);
+}
+
 EAPI void 
 ecore_drm_output_fb_release(Ecore_Drm_Output *output, Ecore_Drm_Fb *fb)
 {