devilhorns pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=55f228a238ed93fa3e18af8531691371ce96eb36

commit 55f228a238ed93fa3e18af8531691371ce96eb36
Author: Chris Michael <[email protected]>
Date:   Wed May 11 09:28:20 2016 -0400

    ecore-drm2: Add API function to return information about a given output mode
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_drm2/Ecore_Drm2.h         | 14 ++++++++++++++
 src/lib/ecore_drm2/ecore_drm2_outputs.c | 16 ++++++++++++++++
 2 files changed, 30 insertions(+)

diff --git a/src/lib/ecore_drm2/Ecore_Drm2.h b/src/lib/ecore_drm2/Ecore_Drm2.h
index 7032afe..508c0fd 100644
--- a/src/lib/ecore_drm2/Ecore_Drm2.h
+++ b/src/lib/ecore_drm2/Ecore_Drm2.h
@@ -466,6 +466,20 @@ EAPI void 
ecore_drm2_output_physical_size_get(Ecore_Drm2_Output *output, int *w,
 EAPI const Eina_List *ecore_drm2_output_modes_get(Ecore_Drm2_Output *output);
 
 /**
+ * Get information from an existing output mode
+ *
+ * @param mode
+ * @param w
+ * @param h
+ * @param refresh
+ * @param flags
+ *
+ * @ingroup Ecore_Drm2_Output_Group
+ * @since 1.18
+ */
+EAPI void ecore_drm2_output_mode_info_get(Ecore_Drm2_Output_Mode *mode, int 
*w, int *h, unsigned int *refresh, unsigned int *flags);
+
+/**
  * @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 83ff1f3..0f89fe7 100644
--- a/src/lib/ecore_drm2/ecore_drm2_outputs.c
+++ b/src/lib/ecore_drm2/ecore_drm2_outputs.c
@@ -973,3 +973,19 @@ ecore_drm2_output_modes_get(Ecore_Drm2_Output *output)
    EINA_SAFETY_ON_NULL_RETURN_VAL(output, NULL);
    return output->modes;
 }
+
+EAPI void
+ecore_drm2_output_mode_info_get(Ecore_Drm2_Output_Mode *mode, int *w, int *h, 
unsigned int *refresh, unsigned int *flags)
+{
+   if (w) *w = 0;
+   if (h) *h = 0;
+   if (refresh) *refresh = 0;
+   if (flags) *flags = 0;
+
+   EINA_SAFETY_ON_NULL_RETURN(mode);
+
+   if (w) *w = mode->width;
+   if (h) *h = mode->height;
+   if (refresh) *refresh = mode->refresh;
+   if (flags) *flags = mode->flags;
+}

-- 


Reply via email to