aboutsummaryrefslogtreecommitdiffstats
path: root/fake-quartz-cg.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--fake-quartz-cg.h24
1 files changed, 4 insertions, 20 deletions
diff --git a/fake-quartz-cg.h b/fake-quartz-cg.h
index 361a73c..198d609 100644
--- a/fake-quartz-cg.h
+++ b/fake-quartz-cg.h
@@ -1,15 +1,5 @@
/* See LICENSE file for copyright and license details. */
-#ifndef LIBGAMMA_FAKE_QUARTZ_CG_H
-#define LIBGAMMA_FAKE_QUARTZ_CG_H
-
-#ifndef FAKE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
-# error Including fake-quartz-cg.h without FAKE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
-#endif
-
-
-#ifndef __GNUC__
-# define __attribute__(x)
-#endif
+#ifdef IN_LIBGAMMA_QUARTZ_CG
/* This header file contains some capabilities of
@@ -24,9 +14,6 @@
* https://developer.apple.com/library/mac/documentation/CoreGraphics/Reference/CoreGraphicsConstantsRef/Reference/reference.html#//apple_ref/c/tdef/CGError */
-#include <stdint.h>
-
-
/**
* Numerical `typedef` for errors that occur in CoreGraphics calls
*/
@@ -48,6 +35,7 @@ typedef float CGGammaValue;
typedef uint32_t CGDirectDisplayID;
+
/**
* Get a list of all online displays on the system
*
@@ -97,7 +85,8 @@ void CGDisplayRestoreColorSyncSettings(void);
* @param display The ID of the display
* @return The number of stops in the gamma ramps
*/
-uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID) __attribute__((const));
+LIBGAMMA_GCC_ONLY__(__attribute__((__const__)))
+uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID);
/* The follow part most only be used when this module is used,
@@ -112,9 +101,4 @@ uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID) __attribute__((const));
void close_fake_quartz_cg(void);
-
-#ifndef __GNUC__
-# undef __attribute__
-#endif
-
#endif