From 037b945a9f253b97faffc02d8475574e75203516 Mon Sep 17 00:00:00 2001
From: Mattias Andrée <m@maandree.se>
Date: Thu, 27 Mar 2025 18:36:26 +0100
Subject: one dir per subproject
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Mattias Andrée <m@maandree.se>
---
 redshift/gamma-wingdi.c | 51 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
 create mode 100644 redshift/gamma-wingdi.c

(limited to 'redshift/gamma-wingdi.c')

diff --git a/redshift/gamma-wingdi.c b/redshift/gamma-wingdi.c
new file mode 100644
index 0000000..6d983c5
--- /dev/null
+++ b/redshift/gamma-wingdi.c
@@ -0,0 +1,51 @@
+/*-
+ * redshift-ng - Automatically adjust display colour temperature according the Sun
+ * 
+ * Copyright (c) 2009-2018        Jon Lund Steffensen <jonlst@gmail.com>
+ * Copyright (c) 2014-2016, 2025  Mattias Andrée <m@maandree.se>
+ * 
+ * redshift-ng 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.
+ * 
+ * redshift-ng 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 redshift-ng.  If not, see <http://www.gnu.org/licenses/>.
+ */
+#include "common.h"
+
+
+static int
+wingdi_is_available(void)
+{
+	return libgamma_is_method_available(LIBGAMMA_METHOD_W32_GDI);
+}
+
+
+static int
+wingdi_create(struct gamma_state **state_out)
+{
+	return direct_create(state_out, LIBGAMMA_METHOD_W32_GDI, "wingdi");
+}
+
+
+static void
+wingdi_print_help(void)
+{
+	printf(_("Adjust gamma ramps with the Windows GDI.\n"));
+	printf("\n");
+	direct_print_help(LIBGAMMA_METHOD_W32_GDI);
+}
+
+
+#define wingdi_set_option  direct_set_option
+#define wingdi_start       direct_start
+#define wingdi_apply       direct_apply
+#define wingdi_restore     direct_restore
+#define wingdi_free        direct_free
+const struct gamma_method wingdi_gamma_method = GAMMA_METHOD_INIT("wingdi", 1, 0, wingdi);
-- 
cgit v1.2.3-70-g09d2