From a53c02bba5326858dcbda45a86cd1a334a73e980 Mon Sep 17 00:00:00 2001 From: Dor Askayo Date: Sun, 11 Feb 2024 02:24:34 +0200 Subject: [PATCH] monitor: Add meta_monitor_get_min_refresh_rate() This function gets the minimum refresh rate of the monitor's main output. Part-of: --- src/backends/meta-monitor.c | 11 +++++++++++ src/backends/meta-monitor.h | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/backends/meta-monitor.c b/src/backends/meta-monitor.c index 6b275705b..080177bca 100644 --- a/src/backends/meta-monitor.c +++ b/src/backends/meta-monitor.c @@ -2274,6 +2274,17 @@ meta_monitor_set_privacy_screen_enabled (MetaMonitor *monitor, return meta_output_set_privacy_screen_enabled (output, enabled, error); } +gboolean +meta_monitor_get_min_refresh_rate (MetaMonitor *monitor, + int *min_refresh_rate) +{ + const MetaOutputInfo *output_info = + meta_monitor_get_main_output_info (monitor); + + return meta_output_info_get_min_refresh_rate (output_info, + min_refresh_rate); +} + gboolean meta_monitor_set_color_space (MetaMonitor *monitor, MetaOutputColorspace color_space, diff --git a/src/backends/meta-monitor.h b/src/backends/meta-monitor.h index f4acf268a..b3e9f46e6 100644 --- a/src/backends/meta-monitor.h +++ b/src/backends/meta-monitor.h @@ -303,6 +303,9 @@ gboolean meta_monitor_set_privacy_screen_enabled (MetaMonitor *monitor, gboolean enabled, GError **error); +gboolean meta_monitor_get_min_refresh_rate (MetaMonitor *monitor, + int *min_refresh_rate); + META_EXPORT_TEST size_t meta_monitor_get_gamma_lut_size (MetaMonitor *monitor);