color-device: Add getter for the associated monitor

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2164>
This commit is contained in:
Jonas Ådahl 2021-11-29 20:02:34 +01:00
parent 6403cfe170
commit 41ebf3b1bf
2 changed files with 10 additions and 0 deletions

View File

@ -360,3 +360,9 @@ meta_color_device_get_id (MetaColorDevice *color_device)
{
return color_device->cd_device_id;
}
MetaMonitor *
meta_color_device_get_monitor (MetaColorDevice *color_device)
{
return color_device->monitor;
}

View File

@ -21,6 +21,7 @@
#include <glib-object.h>
#include "backends/meta-backend-types.h"
#include "core/util-private.h"
#define META_TYPE_COLOR_DEVICE (meta_color_device_get_type ())
G_DECLARE_FINAL_TYPE (MetaColorDevice, meta_color_device,
@ -37,4 +38,7 @@ void meta_color_device_update_monitor (MetaColorDevice *color_device,
const char * meta_color_device_get_id (MetaColorDevice *color_device);
META_EXPORT_TEST
MetaMonitor * meta_color_device_get_monitor (MetaColorDevice *color_device);
#endif /* META_COLOR_DEVICE_H */