diff options
Diffstat (limited to 'src/lib/fake-quartz-cg.h')
-rw-r--r-- | src/lib/fake-quartz-cg.h | 96 |
1 files changed, 38 insertions, 58 deletions
diff --git a/src/lib/fake-quartz-cg.h b/src/lib/fake-quartz-cg.h index a77ccc6..361a73c 100644 --- a/src/lib/fake-quartz-cg.h +++ b/src/lib/fake-quartz-cg.h @@ -1,20 +1,4 @@ -/** - * libgamma -- Display server abstraction layer for gamma ramp adjustments - * Copyright (C) 2014, 2015 Mattias Andrée (maandree@member.fsf.org) - * - * This library 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 library 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 library. If not, see <http://www.gnu.org/licenses/>. - */ +/* See LICENSE file for copyright and license details. */ #ifndef LIBGAMMA_FAKE_QUARTZ_CG_H #define LIBGAMMA_FAKE_QUARTZ_CG_H @@ -23,7 +7,7 @@ #endif -#ifndef __GCC__ +#ifndef __GNUC__ # define __attribute__(x) #endif @@ -44,79 +28,76 @@ /** - * Numerical `typedef` for errors that occur in CoreGraphics calls. + * Numerical `typedef` for errors that occur in CoreGraphics calls */ typedef int32_t CGError; /** - * The call was successful. + * The call was successful */ #define kCGErrorSuccess 0 /** - * The data type that is used for the values in the gamma ramps. + * The data type that is used for the values in the gamma ramps */ typedef float CGGammaValue; /** - * The data type for display ID:s. + * The data type for display ID:s */ typedef uint32_t CGDirectDisplayID; /** - * Get a list of all online displays on the system. + * Get a list of all online displays on the system * - * @param max_size The number of elements allocated for `displays_out`. - * @param displays_out List ot fill with the ID for each online display on the system. - * @param count_out Output parameter for the number of elements stored in `displays_out`. + * @param max_size The number of elements allocated for `displays_out` + * @param displays_out List ot fill with the ID for each online display on the system + * @param count_out Output parameter for the number of elements stored in `displays_out` * if `displays_out` is too small to fit all display ID:s, - * `*count_out` will be `max_size`. - * @return `kCGErrorSuccess` on success, and error number of failure. + * `*count_out` will be `max_size` + * @return `kCGErrorSuccess` on success, and error number of failure */ -CGError CGGetOnlineDisplayList(uint32_t max_size, - CGDirectDisplayID* restrict displays_out, uint32_t* restrict count_out); +CGError CGGetOnlineDisplayList(uint32_t, CGDirectDisplayID *restrict, uint32_t *restrict); /** - * Set the gamma ramps for a display. + * Set the gamma ramps for a display * - * @param display The ID of the display. - * @param gamma_size The number of stops in gamma ramps. - * @param red The gamma ramp for the red channel. - * @param green The gamma ramp for the green channel. - * @param blue The gamma ramp for the blue channel. - * @return `kCGErrorSuccess` on success, and error number of failure. + * @param display The ID of the display + * @param gamma_size The number of stops in gamma ramps + * @param red The gamma ramp for the red channel + * @param green The gamma ramp for the green channel + * @param blue The gamma ramp for the blue channel + * @return `kCGErrorSuccess` on success, and error number of failure */ -CGError CGSetDisplayTransferByTable(CGDirectDisplayID display, uint32_t gamma_size, const CGGammaValue* red, - const CGGammaValue* green, const CGGammaValue* blue); +CGError CGSetDisplayTransferByTable(CGDirectDisplayID, uint32_t, const CGGammaValue *, const CGGammaValue *, const CGGammaValue *); /** - * Get the current gamma ramps for a display. + * Get the current gamma ramps for a display * - * @param display The ID of the display. - * @param gamma_size The number of stops you have allocated for the gamma ramps. - * @param red Table allocated for the gamma ramp for the red channel. - * @param green Table allocated for the gamma ramp for the green channel. - * @param blue Table allocated for the gamma ramp for the blue channel. - * @param gamma_size_out Output parameter for the actual number of stops in the gamma ramps. - * @return `kCGErrorSuccess` on success, and error number of failure. + * @param display The ID of the display + * @param gamma_size The number of stops you have allocated for the gamma ramps + * @param red Table allocated for the gamma ramp for the red channel + * @param green Table allocated for the gamma ramp for the green channel + * @param blue Table allocated for the gamma ramp for the blue channel + * @param gamma_size_out Output parameter for the actual number of stops in the gamma ramps + * @return `kCGErrorSuccess` on success, and error number of failure */ -CGError CGGetDisplayTransferByTable(CGDirectDisplayID display, uint32_t gamma_size, - CGGammaValue* restrict red, CGGammaValue* restrict green, - CGGammaValue* restrict blue, uint32_t* restrict gamma_size_out); +CGError CGGetDisplayTransferByTable(CGDirectDisplayID, uint32_t, CGGammaValue *restrict, + CGGammaValue *restrict, CGGammaValue *restrict, uint32_t *restrict); /** - * Restore each display's gamma ramps to the settings in ColorSync. + * Restore each display's gamma ramps to the settings in ColorSync */ void CGDisplayRestoreColorSyncSettings(void); /** - * Get the number of stops in the gamma ramps for a display. + * Get the number of stops in the gamma ramps for a display * - * @param display The ID of the display. - * @return The number of stops in the gamma ramps. + * @param display The ID of the display + * @return The number of stops in the gamma ramps */ -uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID display) __attribute__((const)); +uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID) __attribute__((const)); /* The follow part most only be used when this module is used, @@ -126,15 +107,14 @@ uint32_t CGDisplayGammaTableCapacity(CGDirectDisplayID display) __attribute__((c * and free resources needed by this module. */ /** - * Release resources used by the backend. + * Release resources used by the backend */ void close_fake_quartz_cg(void); -#ifndef __GCC__ +#ifndef __GNUC__ # undef __attribute__ #endif #endif - |