devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=758ce917193d82462d684ddbaad6d6a493a2cf41

commit 758ce917193d82462d684ddbaad6d6a493a2cf41
Author: Chris Michael <[email protected]>
Date:   Wed May 11 09:21:17 2016 -0400

    ecore-drm2: Add API functions to get/set if an output is primary
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm2/Ecore_Drm2.h         | 23 +++++++++++++++++++++++
 src/lib/ecore_drm2/ecore_drm2_outputs.c | 14 ++++++++++++++
 2 files changed, 37 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 480b373..bcbffcb 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -392,6 +392,29 @@ EAPI void ecore_drm2_output_next_fb_set(Ecore_Drm2_Output 
*output, Ecore_Drm2_Fb
 EAPI void ecore_drm2_output_crtc_size_get(Ecore_Drm2_Output *output, int *w, 
int *h);
 
 /**
+ * Get if a given output is marked as the primary output
+ *
+ * @param output
+ *
+ * @return EINA_TRUE if output is primary, EINA_FALSE otherwise
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI Eina_Bool ecore_drm2_output_primary_get(Ecore_Drm2_Output *output);
+
+/**
+ * Set a given output to be primary
+ *
+ * @param output
+ * @param primary
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_output_primary_set(Ecore_Drm2_Output *output, Eina_Bool 
primary);
+
+/**
  * @defgroup Ecore_Drm2_Fb_Group Drm framebuffer functions
  *
  * Functions that deal with setup of framebuffers
diff --git a/src/lib/ecore_drm2/ecore_drm2_outputs.c 
b/src/lib/ecore_drm2/ecore_drm2_outputs.c
index 9922cd7..285ca84 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -917,3 +917,17 @@ ecore_drm2_output_crtc_size_get(Ecore_Drm2_Output *output, 
int *w, int *h)
 
    drmModeFreeCrtc(crtc);
 }
+
+EAPI Eina_Bool
+ecore_drm2_output_primary_get(Ecore_Drm2_Output *output)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(output, EINA_FALSE);
+   return output->primary;
+}
+
+EAPI void
+ecore_drm2_output_primary_set(Ecore_Drm2_Output *output, Eina_Bool primary)
+{
+   EINA_SAFETY_ON_NULL_RETURN(output);
+   output->primary = primary;
+}

-- 


Reply via email to