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>
This commit is contained in:
Jonas Ådahl 2021-12-03 17:41:20 +01:00
parent b59dc05b22
commit 985292c109
2 changed files with 9 additions and 0 deletions

View File

@ -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);
}

View File

@ -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 */