From 7b1e89b046d1f9df51cfed2d2853fa33a090df3d Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Fri, 19 Jan 2024 19:24:52 +0100 Subject: [PATCH] monitor: Add a getter for the RGB range Part-of: --- src/backends/meta-monitor.c | 10 ++++++++++ src/backends/meta-monitor.h | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c index 16eddf686..fc9b0a892 100644 --- a/src/backends/meta-monitor.c +++ b/src/backends/meta-monitor.c @@ -381,6 +381,16 @@ meta_monitor_get_max_bpc (MetaMonitor *monitor, return meta_output_get_max_bpc (output, max_bpc); } +MetaOutputRGBRange +meta_monitor_get_rgb_range (MetaMonitor *monitor) +{ + MetaOutput *output; + + output = meta_monitor_get_main_output (monitor); + + return meta_output_peek_rgb_range (output); +} + gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor) { diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h index d8e9fd301..57275983a 100644 --- a/src/backends/meta-monitor.h +++ b/src/backends/meta-monitor.h @@ -121,6 +121,8 @@ gboolean meta_monitor_is_underscanning (MetaMonitor *monitor); gboolean meta_monitor_get_max_bpc (MetaMonitor *monitor, unsigned int *max_bpc); +MetaOutputRGBRange meta_monitor_get_rgb_range (MetaMonitor *monitor); + gboolean meta_monitor_is_laptop_panel (MetaMonitor *monitor); gboolean meta_monitor_is_virtual (MetaMonitor *monitor);