macos: add API to get monitor colorspace

This commit is contained in:
Christian Hergert 2022-02-04 09:45:55 -08:00
parent 8ea0a4fc50
commit 473aceea68
2 changed files with 13 additions and 4 deletions

View File

@ -33,6 +33,7 @@ GdkMacosMonitor *_gdk_macos_monitor_new (GdkMacosDisplay *display,
CGDirectDisplayID screen_id);
CGDirectDisplayID _gdk_macos_monitor_get_screen_id (GdkMacosMonitor *self);
gboolean _gdk_macos_monitor_reconfigure (GdkMacosMonitor *self);
CGColorSpaceRef _gdk_macos_monitor_copy_colorspace (GdkMacosMonitor *self);
G_END_DECLS

View File

@ -298,3 +298,11 @@ _gdk_macos_monitor_get_screen_id (GdkMacosMonitor *self)
return self->screen_id;
}
CGColorSpaceRef
_gdk_macos_monitor_copy_colorspace (GdkMacosMonitor *self)
{
g_return_val_if_fail (GDK_IS_MACOS_MONITOR (self), NULL);
return CGDisplayCopyColorSpace (self->screen_id);
}