color-profile: Add API to get file path

Each color profile has a corresponding ICC profile saved on the file
system. The getter returns a file path for that ICC profile file.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2165>
This commit is contained in:
Jonas Ådahl 2021-12-04 00:36:14 +01:00
parent 16149d7c25
commit 22064055be
2 changed files with 8 additions and 0 deletions

View File

@ -368,6 +368,12 @@ meta_color_profile_get_id (MetaColorProfile *color_profile)
return color_profile->cd_profile_id; return color_profile->cd_profile_id;
} }
const char *
meta_color_profile_get_file_path (MetaColorProfile *color_profile)
{
return cd_profile_get_filename (color_profile->cd_profile);
}
const char * const char *
meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile) meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile)
{ {

View File

@ -56,6 +56,8 @@ gboolean meta_color_profile_is_ready (MetaColorProfile *color_profile);
META_EXPORT_TEST META_EXPORT_TEST
const char * meta_color_profile_get_id (MetaColorProfile *color_profile); const char * meta_color_profile_get_id (MetaColorProfile *color_profile);
const char * meta_color_profile_get_file_path (MetaColorProfile *color_profile);
const char * meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile); const char * meta_color_profile_get_brightness_profile (MetaColorProfile *color_profile);
#endif /* META_COLOR_PROFILE_H */ #endif /* META_COLOR_PROFILE_H */