Summary: This adds a new API function to return the output which is
marked as the primary output.
@feature
Signed-off-by: Chris Michael <cp.michael@samsung.com>
*/
EAPI Eina_List *ecore_drm_output_modes_get(Ecore_Drm_Output *output);
+/**
+ * Get the output which is marked as primary
+ *
+ * @param dev The Ecore_Drm_Device to get the primary output from
+ *
+ * @return The primary Ecore_Drm_Output or NULL if no primary output is set
+ *
+ * @ingroup Ecore_Drm_Output_Group
+ * @since 1.15
+ */
+EAPI Ecore_Drm_Output *ecore_drm_output_primary_get(Ecore_Drm_Device *dev);
+
#ifdef __cplusplus
}
#endif
return output->modes;
}
+
+EAPI Ecore_Drm_Output *
+ecore_drm_output_primary_get(Ecore_Drm_Device *dev)
+{
+ Ecore_Drm_Output *ret;
+ const Eina_List *l;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(dev, NULL);
+
+ EINA_LIST_FOREACH(dev->outputs, l, ret)
+ if (ret->primary) return ret;
+
+ return NULL;
+}