diff --git a/src/backends/meta-backend-types.h b/src/backends/meta-backend-types.h index 7b404060d..0a24734db 100644 --- a/src/backends/meta-backend-types.h +++ b/src/backends/meta-backend-types.h @@ -23,6 +23,7 @@ typedef struct _MetaBackend MetaBackend; +typedef struct _MetaColorDevice MetaColorDevice; typedef struct _MetaColorManager MetaColorManager; typedef struct _MetaMonitorManager MetaMonitorManager; diff --git a/src/backends/meta-color-manager.c b/src/backends/meta-color-manager.c index fd1b47814..6f7ac24bf 100644 --- a/src/backends/meta-color-manager.c +++ b/src/backends/meta-color-manager.c @@ -355,3 +355,15 @@ meta_color_manager_get_cd_client (MetaColorManager *color_manager) return priv->cd_client; } + +MetaColorDevice * +meta_color_manager_get_color_device (MetaColorManager *color_manager, + MetaMonitor *monitor) +{ + MetaColorManagerPrivate *priv = + meta_color_manager_get_instance_private (color_manager); + g_autofree char *monitor_id = NULL; + + monitor_id = generate_monitor_id (monitor); + return g_hash_table_lookup (priv->devices, monitor_id); +} diff --git a/src/backends/meta-color-manager.h b/src/backends/meta-color-manager.h index 8053a6b2a..ca263ac61 100644 --- a/src/backends/meta-color-manager.h +++ b/src/backends/meta-color-manager.h @@ -21,6 +21,7 @@ #include #include "backends/meta-backend-types.h" +#include "core/util-private.h" #define META_TYPE_COLOR_MANAGER (meta_color_manager_get_type ()) G_DECLARE_DERIVABLE_TYPE (MetaColorManager, meta_color_manager, @@ -30,4 +31,8 @@ G_DECLARE_DERIVABLE_TYPE (MetaColorManager, meta_color_manager, MetaBackend * meta_color_manager_get_backend (MetaColorManager *color_manager); +META_EXPORT_TEST +MetaColorDevice * meta_color_manager_get_color_device (MetaColorManager *color_manager, + MetaMonitor *monitor); + #endif /* META_COLOR_MANAGER_H */