[gtk/wip/chergert/macos-fixes] macos: add API to get monitor colorspace
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/chergert/macos-fixes] macos: add API to get monitor colorspace
- Date: Fri, 4 Feb 2022 17:48:18 +0000 (UTC)
commit 473aceea68b8b947e33a735aece5054a2f43a3a8
Author: Christian Hergert <christian hergert me>
Date: Fri Feb 4 09:45:55 2022 -0800
macos: add API to get monitor colorspace
gdk/macos/gdkmacosmonitor-private.h | 9 +++++----
gdk/macos/gdkmacosmonitor.c | 8 ++++++++
2 files changed, 13 insertions(+), 4 deletions(-)
---
diff --git a/gdk/macos/gdkmacosmonitor-private.h b/gdk/macos/gdkmacosmonitor-private.h
index 3c6f058bd0..e15f17352d 100644
--- a/gdk/macos/gdkmacosmonitor-private.h
+++ b/gdk/macos/gdkmacosmonitor-private.h
@@ -29,10 +29,11 @@
G_BEGIN_DECLS
-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);
+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
diff --git a/gdk/macos/gdkmacosmonitor.c b/gdk/macos/gdkmacosmonitor.c
index a68668ced9..413b8f8c25 100644
--- a/gdk/macos/gdkmacosmonitor.c
+++ b/gdk/macos/gdkmacosmonitor.c
@@ -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);
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]