summaryrefslogtreecommitdiffstats
path: root/src/fake_quartz.h
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-15 23:20:05 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-15 23:20:05 +0200
commit7078b46a5f0323b8e5f95c1b3f46d8b8c3c26f9f (patch)
tree08d99c1b4c6b7c3659226362b61badaa74d6fc06 /src/fake_quartz.h
parentPython side of W32 GDI support, W32 GDI works on GNU/Linux under X (diff)
downloadblueshift-7078b46a5f0323b8e5f95c1b3f46d8b8c3c26f9f.tar.gz
blueshift-7078b46a5f0323b8e5f95c1b3f46d8b8c3c26f9f.tar.bz2
blueshift-7078b46a5f0323b8e5f95c1b3f46d8b8c3c26f9f.tar.xz
add fake_quartz.h
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/fake_quartz.h')
-rw-r--r--src/fake_quartz.h58
1 files changed, 58 insertions, 0 deletions
diff --git a/src/fake_quartz.h b/src/fake_quartz.h
new file mode 100644
index 0000000..dc13b81
--- /dev/null
+++ b/src/fake_quartz.h
@@ -0,0 +1,58 @@
+/**
+ * Copyright © 2014 Mattias Andrée (maandree@member.fsf.org)
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+#ifndef BLUESHIFT_FAKE_QUARTZ_H
+#define BLUESHIFT_FAKE_QUARTZ_H
+
+
+/* This header file contains some capabilities of
+ <CoreGraphics/CGDirectDisplay.h> and <CoreGraphics/CGError.h>,
+ and can be used modify gamma ramps without Mac OS X and Quartz
+ but with its API.
+
+ The content of this file is based on the documentation found on:
+
+ https://developer.apple.com/library/mac/documentation/GraphicsImaging/Reference/Quartz_Services_Ref/Reference/reference.html
+
+ https://developer.apple.com/library/mac/documentation/CoreGraphics/Reference/CoreGraphicsConstantsRef/Reference/reference.html#//apple_ref/c/tdef/CGError
+*/
+
+
+#include <stdint.h>
+
+
+typedef int32_t CGError;
+#define kCGErrorSuccess 0
+
+typedef float CGGammaValue;
+typedef uint32_t CGDirectDisplayID;
+
+
+CGError CGGetActiveDisplayList(uint32_t max_size, CGDirectDisplayID* displays_out, uint32_t* count_out);
+
+CGError CGSetDisplayTransferByTable(CGDirectDisplayID display, uint32_t gamma_size, const CGGammaValue* red,
+ const CGGammaValue* green, const CGGammaValue* blue);
+
+CGError CGGetDisplayTransferByTable(CGDirectDisplayID display, uint32_t gamma_size, CGGammaValue* red,
+ CGGammaValue* green, CGGammaValue* blue, uint32_t *gamma_size_out);
+
+void CGDisplayRestoreColorSyncSettings(void);
+
+uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID display);
+
+
+#endif
+