[mutter] color-profile: Add getter for brightness profile



commit 985292c109bb143ebc8f89bbb3a813873198c807
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Fri Dec 3 17:41:20 2021 +0100

    color-profile: Add getter for brightness profile
    
    Will be used to set brightness from a color profile.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2165>

 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 201d1c57b6..43259a89c9 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 0367860323..a38b979f80 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 */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]