diff options
author | Mattias Andrée <maandree@kth.se> | 2021-03-05 19:18:09 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2021-03-05 19:18:09 +0100 |
commit | 5879cf0c50cecded79224b5207be9a83c204ccad (patch) | |
tree | 248c8b03d86b1679cfdb42b4f274839a8f981272 /fake-quartz-cg.h | |
parent | Update todo (diff) | |
download | libgamma-5879cf0c50cecded79224b5207be9a83c204ccad.tar.gz libgamma-5879cf0c50cecded79224b5207be9a83c204ccad.tar.bz2 libgamma-5879cf0c50cecded79224b5207be9a83c204ccad.tar.xz |
Fix support for fake methods
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r-- | fake-quartz-cg.h | 24 |
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 |