From 985292c109bb143ebc8f89bbb3a813873198c807 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20=C3=85dahl?= Date: Fri, 3 Dec 2021 17:41:20 +0100 Subject: [PATCH] color-profile: Add getter for brightness profile Will be used to set brightness from a color profile. Part-of: --- src/backends/meta-color-profile.c | 7 +++++++ src/backends/meta-color-profile.h | 2 ++ 2 files changed, 9 insertions(+) diff --git a/src/backends/meta-color-profile.c b/src/backends/meta-color-profile.c index 201d1c57b..43259a89c 100644 --- a/src/backends/meta-color-profile.c +++ b/src/backends/meta-color-profile.c @@ -367,3 +367,10 @@ meta_color_profile_get_id (MetaColorProfile *color_profile) { return color_profile->cd_profile_id; } + +const char * +meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile) +{ + return cd_profile_get_metadata_item (color_profile->cd_profile, + CD_PROFILE_METADATA_SCREEN_BRIGHTNESS); +} diff --git a/src/backends/meta-color-profile.h b/src/backends/meta-color-profile.h index 036786032..a38b979f8 100644 --- a/src/backends/meta-color-profile.h +++ b/src/backends/meta-color-profile.h @@ -56,4 +56,6 @@ gboolean meta_color_profile_is_ready (MetaColorProfile *color_profile); META_EXPORT_TEST const char * meta_color_profile_get_id (MetaColorProfile *color_profile); +const char * meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile); + #endif /* META_COLOR_PROFILE_H */