aboutsummaryrefslogtreecommitdiffstats
path: root/libgamma_get_crtc_information.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgamma_get_crtc_information.c')
-rw-r--r--libgamma_get_crtc_information.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libgamma_get_crtc_information.c b/libgamma_get_crtc_information.c
new file mode 100644
index 0000000..023c07f
--- /dev/null
+++ b/libgamma_get_crtc_information.c
@@ -0,0 +1,29 @@
+/* See LICENSE file for copyright and license details. */
+#include "common.h"
+
+
+
+/**
+ * Read information about a CRTC
+ *
+ * @param this Instance of a data structure to fill with the information about the CRTC
+ * @param crtc The state of the CRTC whose information should be read
+ * @param fields OR:ed identifiers for the information about the CRTC that should be read
+ * @return Zero on success, -1 on error; on error refer to the error reports in `this`
+ */
+int
+libgamma_get_crtc_information(libgamma_crtc_information_t *restrict this, libgamma_crtc_state_t *restrict crtc, int32_t fields)
+{
+ this->edid = NULL;
+ this->connector_name = NULL;
+
+ switch (crtc->partition->site->method) {
+#define X(CONST, CNAME, DEPTH, RAMPS)\
+ case CONST:\
+ return libgamma_##CNAME##_get_crtc_information(this, crtc, fields);
+ LIST_AVAILABLE_METHODS(X)
+#undef X
+ default:
+ return LIBGAMMA_NO_SUCH_ADJUSTMENT_METHOD;
+ }
+}