aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-05-28 05:17:14 +0200
committerMattias Andrée <maandree@operamail.com>2014-05-28 05:17:52 +0200
commit4e0dc2bed9493b2ae8b380e757da3a07757c3f78 (patch)
tree7dfd09268ae32e5acd0358c8bfd13b53f1587c26 /src/lib
parentadd LIBGAMMA_CONNECTOR_TYPE_COUNT, LIBGAMMA_SUBPIXEL_ORDER_COUNT and LIBGAMMA_CRTC_INFO_COUNT (diff)
downloadlibgamma-4e0dc2bed9493b2ae8b380e757da3a07757c3f78.tar.gz
libgamma-4e0dc2bed9493b2ae8b380e757da3a07757c3f78.tar.bz2
libgamma-4e0dc2bed9493b2ae8b380e757da3a07757c3f78.tar.xz
namespace some definitions
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r--src/libgamma-facade.c498
-rw-r--r--src/libgamma-facade.h4
-rw-r--r--src/libgamma-method.c2
-rw-r--r--src/libgamma-method.h44
4 files changed, 274 insertions, 274 deletions
diff --git a/src/libgamma-facade.c b/src/libgamma-facade.c
index 3f199a1..ef5d369 100644
--- a/src/libgamma-facade.c
+++ b/src/libgamma-facade.c
@@ -20,40 +20,40 @@
#include "libgamma-error.h"
#include "libgamma-method.h"
#include "gamma-helper.h"
-#ifdef HAVE_GAMMA_METHOD_DUMMY
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
# include "gamma-dummy.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
# include "gamma-x-randr.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
# include "gamma-x-vidmode.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
# include "gamma-linux-drm.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
# include "gamma-w32-gdi.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
# include "gamma-quartz-cg.h"
-# ifndef HAVE_GAMMA_METHODS
-# define HAVE_GAMMA_METHODS
+# ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_LIBGAMMA_METHODS
# endif
#endif
@@ -65,20 +65,20 @@
#include <errno.h>
-#ifndef HAVE_GAMMA_METHODS
-# define HAVE_NO_GAMMA_METHODS
+#ifndef HAVE_LIBGAMMA_METHODS
+# define HAVE_NO_LIBGAMMA_METHODS
#endif
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wsuggest-attribute=const"
#endif
-#ifdef HAVE_GAMMA_METHODS
-# ifdef HAVE_GAMMA_METHOD_LINUX_DRM
+#ifdef HAVE_LIBGAMMA_METHODS
+# ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
/**
* Test whether a file descriptor refers to a VT.
*
@@ -130,14 +130,14 @@ static int libgamma_list_method_test(int method, int operation)
case 1: /* Methods that the environment suggests will work, including fake. */
if (caps.real == 0)
return 0;
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- if (method == GAMMA_METHOD_LINUX_DRM)
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ if (method == LIBGAMMA_METHOD_LINUX_DRM)
return libgamma_is_vt_proper(STDIN_FILENO) ||
libgamma_is_vt_proper(STDOUT_FILENO) ||
libgamma_is_vt_proper(STDERR_FILENO);
#endif
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- if (method == GAMMA_METHOD_DUMMY)
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ if (method == LIBGAMMA_METHOD_DUMMY)
return 0;
#endif
return caps.default_site_known;
@@ -158,8 +158,8 @@ static int libgamma_list_method_test(int method, int operation)
/**
* List available adjustment methods by their order of preference based on the environment.
*
- * @param methods Output array of methods, should be able to hold `GAMMA_METHOD_COUNT` elements
- * @param buf_size The number of elements that fits in `methods`, it should be `GAMMA_METHOD_COUNT`,
+ * @param methods Output array of methods, should be able to hold `LIBGAMMA_METHOD_COUNT` elements
+ * @param buf_size The number of elements that fits in `methods`, it should be `LIBGAMMA_METHOD_COUNT`,
* This is used to avoid writing outside the output buffer if this library adds new
* adjustment methods without the users of the library recompiling.
* @param operation Allowed values:
@@ -174,36 +174,36 @@ static int libgamma_list_method_test(int method, int operation)
*/
size_t libgamma_list_methods(int* restrict methods, size_t buf_size, int operation)
{
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
(void) methods;
(void) operation;
return 0;
#else
size_t n = 0;
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- if (libgamma_list_method_test(GAMMA_METHOD_X_RANDR, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_X_RANDR;
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_X_RANDR, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_X_RANDR;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- if (libgamma_list_method_test(GAMMA_METHOD_X_VIDMODE, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_X_VIDMODE;
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_X_VIDMODE, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_X_VIDMODE;
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- if (libgamma_list_method_test(GAMMA_METHOD_LINUX_DRM, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_LINUX_DRM;
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_LINUX_DRM, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_LINUX_DRM;
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- if (libgamma_list_method_test(GAMMA_METHOD_W32_GDI, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_W32_GDI;
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_W32_GDI, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_W32_GDI;
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- if (libgamma_list_method_test(GAMMA_METHOD_QUARTZ_CORE_GRAPHICS, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_QUARTZ_CORE_GRAPHICS;
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS;
#endif
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- if (libgamma_list_method_test(GAMMA_METHOD_DUMMY, operation) && (n++ < buf_size))
- methods[n - 1] = GAMMA_METHOD_DUMMY;
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ if (libgamma_list_method_test(LIBGAMMA_METHOD_DUMMY, operation) && (n++ < buf_size))
+ methods[n - 1] = LIBGAMMA_METHOD_DUMMY;
#endif
return n;
@@ -223,33 +223,33 @@ void libgamma_method_capabilities(libgamma_method_capabilities_t* restrict this,
switch (method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
libgamma_dummy_method_capabilities(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
libgamma_x_randr_method_capabilities(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
libgamma_x_vidmode_method_capabilities(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
libgamma_linux_drm_method_capabilities(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
libgamma_w32_gdi_method_capabilities(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
libgamma_quartz_cg_method_capabilities(this);
break;
#endif
@@ -299,13 +299,13 @@ const char* libgamma_method_default_site_variable(int method)
{
switch (method)
{
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return "DISPLAY";
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return "DISPLAY";
#endif
@@ -338,28 +338,28 @@ int libgamma_site_initialise(libgamma_site_state_t* restrict this,
switch (method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_site_initialise(this, site);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_site_initialise(this, site);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_site_initialise(this, site);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_site_initialise(this, site);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_site_initialise(this, site);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_site_initialise(this, site);
#endif
@@ -378,33 +378,33 @@ void libgamma_site_destroy(libgamma_site_state_t* restrict this)
{
switch (this->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
libgamma_dummy_site_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
libgamma_x_randr_site_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
libgamma_x_vidmode_site_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
libgamma_linux_drm_site_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
libgamma_w32_gdi_site_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
libgamma_quartz_cg_site_destroy(this);
break;
#endif
@@ -442,28 +442,28 @@ int libgamma_site_restore(libgamma_site_state_t* restrict this)
{
switch (this->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_site_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_site_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_site_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_site_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_site_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_site_restore(this);
#endif
@@ -491,28 +491,28 @@ int libgamma_partition_initialise(libgamma_partition_state_t* restrict this,
switch (site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_partition_initialise(this, site, partition);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_partition_initialise(this, site, partition);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_partition_initialise(this, site, partition);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_partition_initialise(this, site, partition);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_partition_initialise(this, site, partition);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_partition_initialise(this, site, partition);
#endif
@@ -531,33 +531,33 @@ void libgamma_partition_destroy(libgamma_partition_state_t* restrict this)
{
switch (this->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
libgamma_dummy_partition_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
libgamma_x_randr_partition_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
libgamma_x_vidmode_partition_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
libgamma_linux_drm_partition_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
libgamma_w32_gdi_partition_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
libgamma_quartz_cg_partition_destroy(this);
break;
#endif
@@ -594,28 +594,28 @@ int libgamma_partition_restore(libgamma_partition_state_t* restrict this)
{
switch (this->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_partition_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_partition_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_partition_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_partition_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_partition_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_partition_restore(this);
#endif
@@ -643,28 +643,28 @@ int libgamma_crtc_initialise(libgamma_crtc_state_t* restrict this,
switch (partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_initialise(this, partition, crtc);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_crtc_initialise(this, partition, crtc);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_crtc_initialise(this, partition, crtc);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_crtc_initialise(this, partition, crtc);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_crtc_initialise(this, partition, crtc);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_crtc_initialise(this, partition, crtc);
#endif
@@ -683,33 +683,33 @@ void libgamma_crtc_destroy(libgamma_crtc_state_t* restrict this)
{
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
libgamma_dummy_crtc_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
libgamma_x_randr_crtc_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
libgamma_x_vidmode_crtc_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
libgamma_linux_drm_crtc_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
libgamma_w32_gdi_crtc_destroy(this);
break;
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
libgamma_quartz_cg_crtc_destroy(this);
break;
#endif
@@ -746,28 +746,28 @@ int libgamma_crtc_restore(libgamma_crtc_state_t* restrict this)
{
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_crtc_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_crtc_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_crtc_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_crtc_restore(this);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_crtc_restore(this);
#endif
@@ -789,7 +789,7 @@ int libgamma_crtc_restore(libgamma_crtc_state_t* restrict this)
int libgamma_get_crtc_information(libgamma_crtc_information_t* restrict this,
libgamma_crtc_state_t* restrict crtc, int32_t fields)
{
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
(void) fields;
#endif
@@ -798,28 +798,28 @@ int libgamma_get_crtc_information(libgamma_crtc_information_t* restrict this,
switch (crtc->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_get_crtc_information(this, crtc, fields);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_get_crtc_information(this, crtc, fields);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_get_crtc_information(this, crtc, fields);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_get_crtc_information(this, crtc, fields);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_get_crtc_information(this, crtc, fields);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_get_crtc_information(this, crtc, fields);
#endif
@@ -968,34 +968,34 @@ unsigned char* libgamma_unhex_edid(const char* restrict edid)
int libgamma_crtc_get_gamma_ramps(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_t* restrict ramps)
{
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
(void) ramps;
#endif
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_get_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_crtc_get_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_crtc_get_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_crtc_get_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_crtc_get_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
{
libgamma_gamma_ramps_any_t ramps_;
ramps_.bits16 = *ramps;
@@ -1021,34 +1021,34 @@ int libgamma_crtc_get_gamma_ramps(libgamma_crtc_state_t* restrict this,
int libgamma_crtc_set_gamma_ramps(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_t ramps)
{
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
(void) ramps;
#endif
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_set_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_RANDR
- case GAMMA_METHOD_X_RANDR:
+#ifdef HAVE_LIBGAMMA_METHOD_X_RANDR
+ case LIBGAMMA_METHOD_X_RANDR:
return libgamma_x_randr_crtc_set_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_X_VIDMODE
- case GAMMA_METHOD_X_VIDMODE:
+#ifdef HAVE_LIBGAMMA_METHOD_X_VIDMODE
+ case LIBGAMMA_METHOD_X_VIDMODE:
return libgamma_x_vidmode_crtc_set_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
- case GAMMA_METHOD_LINUX_DRM:
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
+ case LIBGAMMA_METHOD_LINUX_DRM:
return libgamma_linux_drm_crtc_set_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_W32_GDI
- case GAMMA_METHOD_W32_GDI:
+#ifdef HAVE_LIBGAMMA_METHOD_W32_GDI
+ case LIBGAMMA_METHOD_W32_GDI:
return libgamma_w32_gdi_crtc_set_gamma_ramps(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
{
libgamma_gamma_ramps_any_t ramps_;
ramps_.bits16 = ramps;
@@ -1078,12 +1078,12 @@ int libgamma_crtc_get_gamma_ramps32(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_get_gamma_ramps32(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.bits32 = *ramps;
return libgamma_translated_ramp_get(this, &ramps_, 32, -1,
libgamma_crtc_get_gamma_ramps);
@@ -1111,12 +1111,12 @@ int libgamma_crtc_set_gamma_ramps32(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_set_gamma_ramps32(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.bits32 = ramps;
return libgamma_translated_ramp_set(this, ramps_, 32, -1,
libgamma_crtc_set_gamma_ramps);
@@ -1145,12 +1145,12 @@ int libgamma_crtc_get_gamma_ramps64(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_get_gamma_ramps64(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.bits64 = *ramps;
return libgamma_translated_ramp_get(this, &ramps_, 64, -1,
libgamma_crtc_get_gamma_ramps);
@@ -1178,12 +1178,12 @@ int libgamma_crtc_set_gamma_ramps64(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_set_gamma_ramps64(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.bits64 = ramps;
return libgamma_translated_ramp_set(this, ramps_, 64, -1,
libgamma_crtc_set_gamma_ramps);
@@ -1212,12 +1212,12 @@ int libgamma_crtc_get_gamma_rampsf(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_get_gamma_rampsf(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_crtc_get_gamma_rampsf(this, ramps);
#endif
@@ -1242,12 +1242,12 @@ int libgamma_crtc_set_gamma_rampsf(libgamma_crtc_state_t* restrict this,
{
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_set_gamma_rampsf(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
return libgamma_quartz_cg_crtc_set_gamma_rampsf(this, ramps);
#endif
@@ -1277,12 +1277,12 @@ int libgamma_crtc_get_gamma_rampsd(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_get_gamma_rampsd(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.float_double = *ramps;
return libgamma_translated_ramp_get(this, &ramps_, -2, -1,
libgamma_crtc_get_gamma_ramps);
@@ -1310,12 +1310,12 @@ int libgamma_crtc_set_gamma_rampsd(libgamma_crtc_state_t* restrict this,
libgamma_gamma_ramps_any_t ramps_;
switch (this->partition->site->method)
{
-#ifdef HAVE_GAMMA_METHOD_DUMMY
- case GAMMA_METHOD_DUMMY:
+#ifdef HAVE_LIBGAMMA_METHOD_DUMMY
+ case LIBGAMMA_METHOD_DUMMY:
return libgamma_dummy_crtc_set_gamma_rampsd(this, ramps);
#endif
-#ifdef HAVE_GAMMA_METHOD_QUARTZ_CORE_GRAPHICS
- case GAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
+#ifdef HAVE_LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS
+ case LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS:
ramps_.float_double = ramps;
return libgamma_translated_ramp_set(this, ramps_, -2, -1,
libgamma_crtc_set_gamma_ramps);
@@ -1350,7 +1350,7 @@ int libgamma_crtc_set_gamma_ramps_f(libgamma_crtc_state_t* restrict this,
size_t i, n;
int e;
- if (libgamma_get_crtc_information(&info, this, CRTC_INFO_GAMMA_SIZE))
+ if (libgamma_get_crtc_information(&info, this, LIBGAMMA_CRTC_INFO_GAMMA_SIZE))
{
e = info.gamma_size_error;
if (e < 0)
@@ -1403,7 +1403,7 @@ int libgamma_crtc_set_gamma_ramps32_f(libgamma_crtc_state_t* restrict this,
size_t i, n;
int e;
- if (libgamma_get_crtc_information(&info, this, CRTC_INFO_GAMMA_SIZE))
+ if (libgamma_get_crtc_information(&info, this, LIBGAMMA_CRTC_INFO_GAMMA_SIZE))
{
e = info.gamma_size_error;
if (e < 0)
@@ -1456,7 +1456,7 @@ int libgamma_crtc_set_gamma_ramps64_f(libgamma_crtc_state_t* restrict this,
size_t i, n;
int e;
- if (libgamma_get_crtc_information(&info, this, CRTC_INFO_GAMMA_SIZE))
+ if (libgamma_get_crtc_information(&info, this, LIBGAMMA_CRTC_INFO_GAMMA_SIZE))
{
e = info.gamma_size_error;
if (e < 0)
@@ -1509,7 +1509,7 @@ int libgamma_crtc_set_gamma_rampsf_f(libgamma_crtc_state_t* restrict this,
size_t i, n;
int e;
- if (libgamma_get_crtc_information(&info, this, CRTC_INFO_GAMMA_SIZE))
+ if (libgamma_get_crtc_information(&info, this, LIBGAMMA_CRTC_INFO_GAMMA_SIZE))
{
e = info.gamma_size_error;
if (e < 0)
@@ -1562,7 +1562,7 @@ int libgamma_crtc_set_gamma_rampsd_f(libgamma_crtc_state_t* restrict this,
size_t i, n;
int e;
- if (libgamma_get_crtc_information(&info, this, CRTC_INFO_GAMMA_SIZE))
+ if (libgamma_get_crtc_information(&info, this, LIBGAMMA_CRTC_INFO_GAMMA_SIZE))
{
e = info.gamma_size_error;
if (e < 0)
@@ -1596,7 +1596,7 @@ int libgamma_crtc_set_gamma_rampsd_f(libgamma_crtc_state_t* restrict this,
-#ifdef HAVE_NO_GAMMA_METHODS
+#ifdef HAVE_NO_LIBGAMMA_METHODS
# pragma GCC diagnostic pop
#endif
diff --git a/src/libgamma-facade.h b/src/libgamma-facade.h
index 8f17a04..db5075b 100644
--- a/src/libgamma-facade.h
+++ b/src/libgamma-facade.h
@@ -76,8 +76,8 @@ typedef double libgamma_gamma_rampsd_fun(double encoding);
/**
* List available adjustment methods by their order of preference based on the environment.
*
- * @param methods Output array of methods, should be able to hold `GAMMA_METHOD_COUNT` elements
- * @param buf_size The number of elements that fits in `methods`, it should be `GAMMA_METHOD_COUNT`,
+ * @param methods Output array of methods, should be able to hold `LIBGAMMA_METHOD_COUNT` elements
+ * @param buf_size The number of elements that fits in `methods`, it should be `LIBGAMMA_METHOD_COUNT`,
* This is used to avoid writing outside the output buffer if this library adds new
* adjustment methods without the users of the library recompiling.
* @param operation Allowed values:
diff --git a/src/libgamma-method.c b/src/libgamma-method.c
index 67be316..4c81549 100644
--- a/src/libgamma-method.c
+++ b/src/libgamma-method.c
@@ -233,7 +233,7 @@ void libgamma_gamma_rampsf_free(libgamma_gamma_rampsf_t* restrict this)
int libgamma_gamma_rampsd_initialise(libgamma_gamma_rampsd_t* restrict this)
{
size_t n = this->red_size + this->green_size + this->blue_size;
-#ifdef HAVE_GAMMA_METHOD_LINUX_DRM
+#ifdef HAVE_LIBGAMMA_METHOD_LINUX_DRM
/* Valgrind complains about us reading uninitialize memory if we just use malloc. */
this->red = calloc(n, sizeof(double));
#else
diff --git a/src/libgamma-method.h b/src/libgamma-method.h
index 901cfe0..4b79e30 100644
--- a/src/libgamma-method.h
+++ b/src/libgamma-method.h
@@ -33,13 +33,13 @@
* This method can be configured and is useful for
* testing your program's ability to handle errors.
*/
-#define GAMMA_METHOD_DUMMY 0
+#define LIBGAMMA_METHOD_DUMMY 0
/**
* The identifier for the adjustment method with
* uses the RandR protocol under the X display server.
*/
-#define GAMMA_METHOD_X_RANDR 1
+#define LIBGAMMA_METHOD_X_RANDR 1
/**
* The identifier for the adjustment method with
@@ -49,7 +49,7 @@
* supported by RandR, however it can only control the
* primary CRTC per screen (partition).
*/
-#define GAMMA_METHOD_X_VIDMODE 2
+#define LIBGAMMA_METHOD_X_VIDMODE 2
/**
* The identifier for the Direct Rendering Manager
@@ -62,7 +62,7 @@
* started while this is running, but it can be
* started while a display server is running.
*/
-#define GAMMA_METHOD_LINUX_DRM 3
+#define LIBGAMMA_METHOD_LINUX_DRM 3
/**
* The identifier for the Graphics Device Interface
@@ -70,7 +70,7 @@
* This method is not well tested; it can be compiled
* to be available under X.org using a translation layer.
*/
-#define GAMMA_METHOD_W32_GDI 4
+#define LIBGAMMA_METHOD_W32_GDI 4
/**
* The identifier for the Core Graphics adjustment
@@ -79,7 +79,7 @@
* This method is not well tested; it can be compiled
* to be available under X.org using a translation layer.
*/
-#define GAMMA_METHOD_QUARTZ_CORE_GRAPHICS 5
+#define LIBGAMMA_METHOD_QUARTZ_CORE_GRAPHICS 5
/**
@@ -87,14 +87,14 @@
* nor any index before it may actually be supported
* as it could have been disabled at compile-time
*/
-#define GAMMA_METHOD_MAX 5
+#define LIBGAMMA_METHOD_MAX 5
/**
* The number adjustment methods provided by this library.
* Note however that this includes adjstment methods that
* have been removed at compile-time.
*/
-#define GAMMA_METHOD_COUNT (GAMMA_METHOD_MAX + 1)
+#define LIBGAMMA_METHOD_COUNT (LIBGAMMA_METHOD_MAX + 1)
@@ -388,84 +388,84 @@ typedef enum libgamma_subpixel_order
* For a `libgamma_crtc_information_t` fill in the
* values for `edid` and `edid_length` and report errors to `edid_error`.
*/
-#define CRTC_INFO_EDID (1 << 0)
+#define LIBGAMMA_CRTC_INFO_EDID (1 << 0)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `width_mm` and report errors to `width_mm_error`.
*/
-#define CRTC_INFO_WIDTH_MM (1 << 1)
+#define LIBGAMMA_CRTC_INFO_WIDTH_MM (1 << 1)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `height_mm` and report errors to `height_mm_error`.
*/
-#define CRTC_INFO_HEIGHT_MM (1 << 2)
+#define LIBGAMMA_CRTC_INFO_HEIGHT_MM (1 << 2)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `width_mm_edid` and report errors to `width_mm_edid_error`.
*/
-#define CRTC_INFO_WIDTH_MM_EDID (1 << 3)
+#define LIBGAMMA_CRTC_INFO_WIDTH_MM_EDID (1 << 3)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `height_mm_edid` and report errors to `height_mm_edid_error`.
*/
-#define CRTC_INFO_HEIGHT_MM_EDID (1 << 4)
+#define LIBGAMMA_CRTC_INFO_HEIGHT_MM_EDID (1 << 4)
/**
* For a `libgamma_crtc_information_t` fill in the
* values for `red_gamma_size`, `green_gamma_size` and `blue_gamma_size`.
* and report errors to `gamma_size_error`
*/
-#define CRTC_INFO_GAMMA_SIZE (1 << 5)
+#define LIBGAMMA_CRTC_INFO_GAMMA_SIZE (1 << 5)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `gamma_depth` and report errors to `gamma_depth_error`.
*/
-#define CRTC_INFO_GAMMA_DEPTH (1 << 6)
+#define LIBGAMMA_CRTC_INFO_GAMMA_DEPTH (1 << 6)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `gamma_support` and report errors to `gamma_support_error`.
*/
-#define CRTC_INFO_GAMMA_SUPPORT (1 << 7)
+#define LIBGAMMA_CRTC_INFO_GAMMA_SUPPORT (1 << 7)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `subpixel_order` and report errors to `subpixel_order_error`.
*/
-#define CRTC_INFO_SUBPIXEL_ORDER (1 << 8)
+#define LIBGAMMA_CRTC_INFO_SUBPIXEL_ORDER (1 << 8)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `active` and report errors to `active_error`.
*/
-#define CRTC_INFO_ACTIVE (1 << 9)
+#define LIBGAMMA_CRTC_INFO_ACTIVE (1 << 9)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `connector_name` and report errors to `connector_name_error`.
*/
-#define CRTC_INFO_CONNECTOR_NAME (1 << 10)
+#define LIBGAMMA_CRTC_INFO_CONNECTOR_NAME (1 << 10)
/**
* For a `libgamma_crtc_information_t` fill in the
* value for `connector_type` and report errors to `connector_type_error`.
*/
-#define CRTC_INFO_CONNECTOR_TYPE (1 << 11)
+#define LIBGAMMA_CRTC_INFO_CONNECTOR_TYPE (1 << 11)
/**
* For a `libgamma_crtc_information_t` fill in the
* values for `gamma_red`, `gamma_green` and `gamma_blue`
* and report errors to `connector_type_error`.
*/
-#define CRTC_INFO_GAMMA (1 << 12)
+#define LIBGAMMA_CRTC_INFO_GAMMA (1 << 12)
/**
- * The number of `CRTC_INFO_*` values defined.
+ * The number of `LIBGAMMA_CRTC_INFO_*` values defined.
*/
#define LIBGAMMA_CRTC_INFO_COUNT = 13