[gtk+/wip/baedert/meson: 145/145] meson: make gtk buildable



commit 813a9f2399d7240f4806480cb045e177052a84ff
Author: Timm Bäder <mail baedert org>
Date:   Tue Aug 23 08:21:54 2016 +0200

    meson: make gtk buildable
    
    x11 only

 gdk/build_enum.py => build_enum.py |   17 +-
 build_marshal.py                   |    1 -
 gdk/Makefile.am                    |    3 +-
 gdk/gdk.gresource.xml              |   15 ++
 gdk/gdk.gresource.xml.meson        |    6 +
 gdk/gdkversionmacros.h.meson       |  416 ++++++++++++++++++++++++++++++++++++
 gdk/meson.build                    |  279 +++++++++++++++----------
 gtk/gentypefuncs.d                 |   45 ++++
 gtk/gtk.gresource.xml              |  269 +++++++++++++++++++++++
 gtk/gtkwindow.c                    |   11 +-
 gtk/meson.build                    |  367 ++++++++++++++++++++++++++++++-
 meson.build                        |   77 +++++---
 12 files changed, 1339 insertions(+), 167 deletions(-)
---
diff --git a/gdk/build_enum.py b/build_enum.py
similarity index 61%
rename from gdk/build_enum.py
rename to build_enum.py
index 9705497..c8e8322 100755
--- a/gdk/build_enum.py
+++ b/build_enum.py
@@ -6,21 +6,14 @@
 # backends is a fool's errand.
 
 import sys, os, shutil, subprocess
-
-# HORRIBLE, use current_source_dir() as an argument instead.
-h_array = ['--template', '../gdk/gdkenumtypes.h.template']
-
-c_array = ['--template', '../gdk/gdkenumtypes.c.template']
-
 # [perl, glib-mkenums]
 cmd = [sys.argv[1], sys.argv[2]]
-ofilename = sys.argv[3]
-headers = sys.argv[4:]
+template = sys.argv[3]
+ofilename = sys.argv[4]
+headers = sys.argv[5:]
+
 
-if ofilename.endswith('.h'):
-    arg_array = h_array
-else:
-    arg_array = c_array
+arg_array = ['--template', template];
 
 pc = subprocess.Popen(cmd + arg_array + headers, stdout=subprocess.PIPE)
 (stdo, _) = pc.communicate()
diff --git a/build_marshal.py b/build_marshal.py
index 5ec9cd0..ac09664 100755
--- a/build_marshal.py
+++ b/build_marshal.py
@@ -13,7 +13,6 @@ prefix = sys.argv[2]
 ifilename = sys.argv[3]
 ofilename = sys.argv[4]
 
-# HORRIBLE, use current_source_dir() as an argument instead.
 h_array = ['--prefix=' + prefix, '--header', '--valist-marshallers']
 
 c_array = ['--prefix=' + prefix, '--body', '--valist-marshallers']
diff --git a/gdk/Makefile.am b/gdk/Makefile.am
index 052d487..4980115 100644
--- a/gdk/Makefile.am
+++ b/gdk/Makefile.am
@@ -61,7 +61,8 @@ LDADD =                                       \
 # setup source file variables
 #
 #
-# GDK header files for public installation (non-generated)
+#
+#GDK header files for public installation (non-generated)
 #
 #
 gdk_public_h_sources =                                 \
diff --git a/gdk/gdk.gresource.xml b/gdk/gdk.gresource.xml
new file mode 100644
index 0000000..6eff39c
--- /dev/null
+++ b/gdk/gdk.gresource.xml
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gresources>
+  <gresource prefix='/org/gtk/libgdk'>
+    <file alias='glsl/gl2-texture-2d.fs.glsl'>resources/glsl/gl2-texture-2d.fs.glsl</file>
+    <file alias='glsl/gl2-texture-2d.vs.glsl'>resources/glsl/gl2-texture-2d.vs.glsl</file>
+    <file alias='glsl/gl2-texture-rect.fs.glsl'>resources/glsl/gl2-texture-rect.fs.glsl</file>
+    <file alias='glsl/gl2-texture-rect.vs.glsl'>resources/glsl/gl2-texture-rect.vs.glsl</file>
+    <file alias='glsl/gl3-texture-2d.fs.glsl'>resources/glsl/gl3-texture-2d.fs.glsl</file>
+    <file alias='glsl/gl3-texture-2d.vs.glsl'>resources/glsl/gl3-texture-2d.vs.glsl</file>
+    <file alias='glsl/gl3-texture-rect.fs.glsl'>resources/glsl/gl3-texture-rect.fs.glsl</file>
+    <file alias='glsl/gl3-texture-rect.vs.glsl'>resources/glsl/gl3-texture-rect.vs.glsl</file>
+    <file alias='glsl/gles2-texture.fs.glsl'>resources/glsl/gles2-texture.fs.glsl</file>
+    <file alias='glsl/gles2-texture.vs.glsl'>resources/glsl/gles2-texture.vs.glsl</file>
+  </gresource>
+</gresources>
diff --git a/gdk/gdk.gresource.xml.meson b/gdk/gdk.gresource.xml.meson
new file mode 100644
index 0000000..96cbff4
--- /dev/null
+++ b/gdk/gdk.gresource.xml.meson
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gresources>
+  <gresource prefix='/org/gtk/libgdk'>
+@GDK_GRESOURCE_XML_FILES@
+  </gresource>
+</gresources>
diff --git a/gdk/gdkversionmacros.h.meson b/gdk/gdkversionmacros.h.meson
new file mode 100644
index 0000000..63a4759
--- /dev/null
+++ b/gdk/gdkversionmacros.h.meson
@@ -0,0 +1,416 @@
+/* gdkversionmacros.h - version boundaries checks
+ * Copyright (C) 2012 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#if !defined (__GDK_H_INSIDE__) && !defined (GDK_COMPILATION)
+#error "Only <gdk/gdk.h> can be included directly."
+#endif
+
+#ifndef __GDK_VERSION_MACROS_H__
+#define __GDK_VERSION_MACROS_H__
+
+#include <glib.h>
+
+#mesondefine GDK_MAJOR_VERSION
+#mesondefine GDK_MINOR_VERSION
+#mesondefine GDK_MICRO_VERSION
+
+#ifndef _GDK_EXTERN
+#define _GDK_EXTERN extern
+#endif
+
+/**
+ * GDK_DISABLE_DEPRECATION_WARNINGS:
+ *
+ * A macro that should be defined before including the gdk.h header.
+ * If it is defined, no compiler warnings will be produced for uses
+ * of deprecated GDK and GTK+ APIs.
+ */
+
+#ifdef GDK_DISABLE_DEPRECATION_WARNINGS
+#define GDK_DEPRECATED _GDK_EXTERN
+#define GDK_DEPRECATED_FOR(f) _GDK_EXTERN
+#define GDK_UNAVAILABLE(maj,min) _GDK_EXTERN
+#else
+#define GDK_DEPRECATED G_DEPRECATED _GDK_EXTERN
+#define GDK_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f) _GDK_EXTERN
+#define GDK_UNAVAILABLE(maj,min) G_UNAVAILABLE(maj,min) _GDK_EXTERN
+#endif
+
+/* XXX: Every new stable minor release bump should add a macro here */
+
+/**
+ * GDK_VERSION_3_0:
+ *
+ * A macro that evaluates to the 3.0 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.4
+ */
+#define GDK_VERSION_3_0         (G_ENCODE_VERSION (3, 0))
+
+/**
+ * GDK_VERSION_3_2:
+ *
+ * A macro that evaluates to the 3.2 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.4
+ */
+#define GDK_VERSION_3_2         (G_ENCODE_VERSION (3, 2))
+
+/**
+ * GDK_VERSION_3_4:
+ *
+ * A macro that evaluates to the 3.4 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.4
+ */
+#define GDK_VERSION_3_4         (G_ENCODE_VERSION (3, 4))
+
+/**
+ * GDK_VERSION_3_6:
+ *
+ * A macro that evaluates to the 3.6 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.6
+ */
+#define GDK_VERSION_3_6         (G_ENCODE_VERSION (3, 6))
+
+/**
+ * GDK_VERSION_3_8:
+ *
+ * A macro that evaluates to the 3.8 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.8
+ */
+#define GDK_VERSION_3_8         (G_ENCODE_VERSION (3, 8))
+
+/**
+ * GDK_VERSION_3_10:
+ *
+ * A macro that evaluates to the 3.10 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.10
+ */
+#define GDK_VERSION_3_10        (G_ENCODE_VERSION (3, 10))
+
+/**
+ * GDK_VERSION_3_12:
+ *
+ * A macro that evaluates to the 3.12 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.12
+ */
+#define GDK_VERSION_3_12        (G_ENCODE_VERSION (3, 12))
+
+/**
+ * GDK_VERSION_3_14:
+ *
+ * A macro that evaluates to the 3.14 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.14
+ */
+#define GDK_VERSION_3_14        (G_ENCODE_VERSION (3, 14))
+
+/**
+ * GDK_VERSION_3_16:
+ *
+ * A macro that evaluates to the 3.16 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.16
+ */
+#define GDK_VERSION_3_16        (G_ENCODE_VERSION (3, 16))
+
+/**
+ * GDK_VERSION_3_18:
+ *
+ * A macro that evaluates to the 3.18 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.18
+ */
+#define GDK_VERSION_3_18        (G_ENCODE_VERSION (3, 18))
+
+/**
+ * GDK_VERSION_3_20:
+ *
+ * A macro that evaluates to the 3.20 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.18
+ */
+#define GDK_VERSION_3_20        (G_ENCODE_VERSION (3, 20))
+
+/**
+ * GDK_VERSION_3_22:
+ *
+ * A macro that evaluates to the 3.22 version of GDK, in a format
+ * that can be used by the C pre-processor.
+ *
+ * Since: 3.20
+ */
+#define GDK_VERSION_3_22        (G_ENCODE_VERSION (3, 22))
+
+/* evaluates to the current stable version; for development cycles,
+ * this means the next stable target
+ */
+#if (GDK_MINOR_VERSION % 2)
+#define GDK_VERSION_CUR_STABLE         (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION + 1))
+#else
+#define GDK_VERSION_CUR_STABLE         (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION))
+#endif
+
+/* evaluates to the previous stable version */
+#if (GDK_MINOR_VERSION % 2)
+#define GDK_VERSION_PREV_STABLE        (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 1))
+#else
+#define GDK_VERSION_PREV_STABLE        (G_ENCODE_VERSION (GDK_MAJOR_VERSION, GDK_MINOR_VERSION - 2))
+#endif
+
+/**
+ * GDK_VERSION_MIN_REQUIRED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the gdk.h header.
+ * The definition should be one of the predefined GDK version
+ * macros: %GDK_VERSION_3_0, %GDK_VERSION_3_2,...
+ *
+ * This macro defines the lower bound for the GDK API to use.
+ *
+ * If a function has been deprecated in a newer version of GDK,
+ * it is possible to use this symbol to avoid the compiler warnings
+ * without disabling warning for every deprecated function.
+ *
+ * Since: 3.4
+ */
+#ifndef GDK_VERSION_MIN_REQUIRED
+# define GDK_VERSION_MIN_REQUIRED      (GDK_VERSION_CUR_STABLE)
+#endif
+
+/**
+ * GDK_VERSION_MAX_ALLOWED:
+ *
+ * A macro that should be defined by the user prior to including
+ * the gdk.h header.
+ * The definition should be one of the predefined GDK version
+ * macros: %GDK_VERSION_3_0, %GDK_VERSION_3_2,...
+ *
+ * This macro defines the upper bound for the GDK API to use.
+ *
+ * If a function has been introduced in a newer version of GDK,
+ * it is possible to use this symbol to get compiler warnings when
+ * trying to use that function.
+ *
+ * Since: 3.4
+ */
+#ifndef GDK_VERSION_MAX_ALLOWED
+# if GDK_VERSION_MIN_REQUIRED > GDK_VERSION_PREV_STABLE
+#  define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_MIN_REQUIRED
+# else
+#  define GDK_VERSION_MAX_ALLOWED      GDK_VERSION_CUR_STABLE
+# endif
+#endif
+
+/* sanity checks */
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_MIN_REQUIRED
+#error "GDK_VERSION_MAX_ALLOWED must be >= GDK_VERSION_MIN_REQUIRED"
+#endif
+#if GDK_VERSION_MIN_REQUIRED < GDK_VERSION_3_0
+#error "GDK_VERSION_MIN_REQUIRED must be >= GDK_VERSION_3_0"
+#endif
+
+#define GDK_AVAILABLE_IN_ALL                  _GDK_EXTERN
+
+/* XXX: Every new stable minor release should add a set of macros here */
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_0
+# define GDK_DEPRECATED_IN_3_0                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_0_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_0                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_0_FOR(f)         _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_0
+# define GDK_AVAILABLE_IN_3_0                 GDK_UNAVAILABLE(3, 0)
+#else
+# define GDK_AVAILABLE_IN_3_0                 _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_2
+# define GDK_DEPRECATED_IN_3_2                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_2_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_2                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_2_FOR(f)         _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_2
+# define GDK_AVAILABLE_IN_3_2                 GDK_UNAVAILABLE(3, 2)
+#else
+# define GDK_AVAILABLE_IN_3_2                 _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_4
+# define GDK_DEPRECATED_IN_3_4                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_4_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_4                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_4_FOR(f)         _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_4
+# define GDK_AVAILABLE_IN_3_4                 GDK_UNAVAILABLE(3, 4)
+#else
+# define GDK_AVAILABLE_IN_3_4                 _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_6
+# define GDK_DEPRECATED_IN_3_6                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_6_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_6                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_6_FOR(f)         _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_6
+# define GDK_AVAILABLE_IN_3_6                 GDK_UNAVAILABLE(3, 6)
+#else
+# define GDK_AVAILABLE_IN_3_6                 _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_8
+# define GDK_DEPRECATED_IN_3_8                GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_8_FOR(f)         GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_8                _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_8_FOR(f)         _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_8
+# define GDK_AVAILABLE_IN_3_8                 GDK_UNAVAILABLE(3, 8)
+#else
+# define GDK_AVAILABLE_IN_3_8                 _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_10
+# define GDK_DEPRECATED_IN_3_10               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_10_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_10               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_10_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_10
+# define GDK_AVAILABLE_IN_3_10                GDK_UNAVAILABLE(3, 10)
+#else
+# define GDK_AVAILABLE_IN_3_10                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_12
+# define GDK_DEPRECATED_IN_3_12               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_12_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_12               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_12_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_12
+# define GDK_AVAILABLE_IN_3_12                GDK_UNAVAILABLE(3, 12)
+#else
+# define GDK_AVAILABLE_IN_3_12                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_14
+# define GDK_DEPRECATED_IN_3_14               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_14_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_14               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_14_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_14
+# define GDK_AVAILABLE_IN_3_14                GDK_UNAVAILABLE(3, 14)
+#else
+# define GDK_AVAILABLE_IN_3_14                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_16
+# define GDK_DEPRECATED_IN_3_16               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_16_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_16               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_16_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_16
+# define GDK_AVAILABLE_IN_3_16                GDK_UNAVAILABLE(3, 16)
+#else
+# define GDK_AVAILABLE_IN_3_16                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_18
+# define GDK_DEPRECATED_IN_3_18               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_18_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_18               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_18_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_18
+# define GDK_AVAILABLE_IN_3_18                GDK_UNAVAILABLE(3, 18)
+#else
+# define GDK_AVAILABLE_IN_3_18                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_20
+# define GDK_DEPRECATED_IN_3_20               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_20_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_20               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_20_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_20
+# define GDK_AVAILABLE_IN_3_20                GDK_UNAVAILABLE(3, 20)
+#else
+# define GDK_AVAILABLE_IN_3_20                _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MIN_REQUIRED >= GDK_VERSION_3_22
+# define GDK_DEPRECATED_IN_3_22               GDK_DEPRECATED
+# define GDK_DEPRECATED_IN_3_22_FOR(f)        GDK_DEPRECATED_FOR(f)
+#else
+# define GDK_DEPRECATED_IN_3_22               _GDK_EXTERN
+# define GDK_DEPRECATED_IN_3_22_FOR(f)        _GDK_EXTERN
+#endif
+
+#if GDK_VERSION_MAX_ALLOWED < GDK_VERSION_3_22
+# define GDK_AVAILABLE_IN_3_22                GDK_UNAVAILABLE(3, 22)
+#else
+# define GDK_AVAILABLE_IN_3_22                _GDK_EXTERN
+#endif
+
+#endif  /* __GDK_VERSION_MACROS_H__ */
+
diff --git a/gdk/meson.build b/gdk/meson.build
index 8165a01..96dde34 100644
--- a/gdk/meson.build
+++ b/gdk/meson.build
@@ -1,5 +1,5 @@
 deprecated_gdk_sources = ['deprecated/gdkcolor.c']
-gdk_sources = [
+gdk_sources = files([
   'gdk-private.c',
   'gdk.c',
   'gdkapplaunchcontext.c',
@@ -8,6 +8,7 @@ gdk_sources = [
   'gdkdeprecated.c',
   'gdkdevice.c',
   'gdkdevicemanager.c',
+  'gdkdevicepad.c',
   'gdkdisplay.c',
   'gdkdisplaymanager.c',
   'gdkdnd.c',
@@ -36,19 +37,22 @@ gdk_sources = [
   'gdkdevicetool.c',
   'gdkdrawingcontext.c',
   'gdkmonitor.c'
-]
+])
 
-gdk_public_h_sources = [
+gdk_public_h_sources = files([
   'gdk.h',
   'gdk-autocleanup.h',
   'gdkapplaunchcontext.h',
   'gdkcairo.h',
   'gdkcursor.h',
   'gdkdevice.h',
+  'gdkdevicetool.h',
   'gdkdevicemanager.h',
+  'gdkdevicepad.h',
   'gdkdisplay.h',
   'gdkdisplaymanager.h',
   'gdkdnd.h',
+  'gdkdrawingcontext.h',
   'gdkevents.h',
   'gdkframetimings.h',
   'gdkglcontext.h',
@@ -56,32 +60,31 @@ gdk_public_h_sources = [
   'gdkkeysyms.h',
   'gdkkeysyms-compat.h',
   'gdkmain.h',
+  'gdkmonitor.h',
   'gdkpango.h',
   'gdkframeclock.h',
   'gdkpixbuf.h',
+  'gdkprivate.h',
   'gdkproperty.h',
   'gdkrectangle.h',
   'gdkrgba.h',
   'gdkscreen.h',
+  'gdkseat.h',
   'gdkselection.h',
   'gdktestutils.h',
   'gdkthreads.h',
   'gdktypes.h',
   'gdkvisual.h',
   'gdkwindow.h',
-  'gdkseat.h',
-  'gdkmonitor.h',
-  'gdkdrawingcontext.h',
-  'gdkdevicetool.h'
-]
+])
 
-gdk_private_h_sources = [
+gdk_private_h_sources = files([
   'gdkseatdefaultprivate.h',
   'gdkdevicetoolprivate.h',
   'gdkdrawingcontextprivate.h',
   'gdkmonitorprivate.h',
   'gdkprivate.h',
-]
+])
 
 gdk_x_sources = [
   'x11/MwmUtil.h',
@@ -130,82 +133,106 @@ gdk_x_private_sources = [
   'x11/gdkdevicemanagerprivate-core.h',
 ]
 
-gdk_wayland_sources = [
-  'wayland/gdkapplaunchcontext-wayland.c',
-  'wayland/gdkcursor-wayland.c',
-  'wayland/gdkdevice-wayland.c',
-  'wayland/gdkdisplay-wayland.c',
-  'wayland/gdkdisplay-wayland.h',
-  'wayland/gdkdnd-wayland.c',
-  'wayland/gdkeventsource.c',
-  'wayland/gdkglcontext-wayland.c',
-  'wayland/gdkglcontext-wayland.h',
-  'wayland/gdkkeys-wayland.c',
-  'wayland/gdkmonitor-wayland.c',
-  'wayland/gdkmonitor-wayland.h',
-  'wayland/gdkscreen-wayland.c',
-  'wayland/gdkseat-wayland.h',
-  'wayland/gdkselection-wayland.c',
-  'wayland/gdkwaylanddevice.h',
-  'wayland/gdkwaylanddisplay.h',
-  'wayland/gdkwaylandglcontext.h',
-  'wayland/gdkwayland.h',
-  'wayland/gdkwaylandmonitor.h',
-  'wayland/gdkwaylandselection.h',
-  'wayland/gdkwaylandwindow.h',
-  'wayland/gdkwindow-wayland.c',
-  'wayland/wm-button-layout-translation.c',
-  'wayland/gtk-primary-selection-protocol.c',
-  'wayland/gtk-shell-protocol.c',
-  'wayland/xdg-shell-unstable-v5-protocol.c',
-  'wayland/pointer-gestures-unstable-v1-protocol.c',
-  'wayland/tablet-unstable-v2-protocol.c',
-]
-
-gdk_wayland_private_sources = [
-  'wayland/gdkprivate-wayland.h',
-]
-
-
-
-gdk_broadway_sources = [
-  'broadway/gdkdisplay-broadway.c',
-  'broadway/gdkdisplay-broadway.h',
-  'broadway/gdkscreen-broadway.c',
-  'broadway/gdkscreen-broadway.h',
-  'broadway/broadway-output.c',
-  'broadway/broadway-output.h',
-  'broadway/broadway-server.h',
-  'broadway/broadway-server.c',
-  'broadway/gdkbroadway-server.c',
-  'broadway/gdkcursor-broadway.c',
-  'broadway/gdkvisual-broadway.c',
-  'broadway/gdkselection-broadway.c',
-  'broadway/gdkwindow-broadway.c',
-  'broadway/gdkwindow-broadway.h',
-  'broadway/gdkmonitor-broadway.c',
-  'broadway/gdkmonitor-broadway.h',
-  'broadway/gdkkeys-broadway.c',
-  'broadway/gdkglobals-broadway.c',
-  'broadway/gdkeventsource.c',
-  'broadway/gdkeventsource.h',
-  'broadway/gdkdnd-broadway.c',
-  'broadway/broadwayd.c',
-  'broadway/gdkdevicemanager-broadway.c',
-  'broadway/gdkdevicemanager-broadway.h',
-  'broadway/gdkdevice-broadway.c',
-  'broadway/gdkdevice-broadway.h',
-  'broadway/broadway-buffer.c',
-  'broadway/broadway-buffer.h',
-  'broadway/gdktestutils-broadway.c',
-  'broadway/gdkproperty-broadway.c'
-]
-
-gdk_broadway_private_sources = [
-  'broadway/gdkprivate-broadway.h'
-]
-
-
+# gdk_wayland_sources = [
+  # 'wayland/gdkapplaunchcontext-wayland.c',
+  # 'wayland/gdkcursor-wayland.c',
+  # 'wayland/gdkdevice-wayland.c',
+  # 'wayland/gdkdisplay-wayland.c',
+  # 'wayland/gdkdisplay-wayland.h',
+  # 'wayland/gdkdnd-wayland.c',
+  # 'wayland/gdkeventsource.c',
+  # 'wayland/gdkglcontext-wayland.c',
+  # 'wayland/gdkglcontext-wayland.h',
+  # 'wayland/gdkkeys-wayland.c',
+  # 'wayland/gdkmonitor-wayland.c',
+  # 'wayland/gdkmonitor-wayland.h',
+  # 'wayland/gdkscreen-wayland.c',
+  # 'wayland/gdkseat-wayland.h',
+  # 'wayland/gdkselection-wayland.c',
+  # 'wayland/gdkwaylanddevice.h',
+  # 'wayland/gdkwaylanddisplay.h',
+  # 'wayland/gdkwaylandglcontext.h',
+  # 'wayland/gdkwayland.h',
+  # 'wayland/gdkwaylandmonitor.h',
+  # 'wayland/gdkwaylandselection.h',
+  # 'wayland/gdkwaylandwindow.h',
+  # 'wayland/gdkwindow-wayland.c',
+  # 'wayland/wm-button-layout-translation.c',
+  # 'wayland/gtk-primary-selection-protocol.c',
+  # 'wayland/gtk-shell-protocol.c',
+  # 'wayland/xdg-shell-unstable-v5-protocol.c',
+  # 'wayland/pointer-gestures-unstable-v1-protocol.c',
+  # 'wayland/tablet-unstable-v2-protocol.c',
+# ]
+
+# gdk_wayland_private_sources = [
+  # 'wayland/gdkprivate-wayland.h',
+# ]
+
+
+
+# gdk_broadway_sources = [
+  # 'broadway/gdkdisplay-broadway.c',
+  # 'broadway/gdkdisplay-broadway.h',
+  # 'broadway/gdkscreen-broadway.c',
+  # 'broadway/gdkscreen-broadway.h',
+  # 'broadway/broadway-output.c',
+  # 'broadway/broadway-output.h',
+  # 'broadway/broadway-server.h',
+  # 'broadway/broadway-server.c',
+  # 'broadway/gdkbroadway-server.c',
+  # 'broadway/gdkcursor-broadway.c',
+  # 'broadway/gdkvisual-broadway.c',
+  # 'broadway/gdkselection-broadway.c',
+  # 'broadway/gdkwindow-broadway.c',
+  # 'broadway/gdkwindow-broadway.h',
+  # 'broadway/gdkmonitor-broadway.c',
+  # 'broadway/gdkmonitor-broadway.h',
+  # 'broadway/gdkkeys-broadway.c',
+  # 'broadway/gdkglobals-broadway.c',
+  # 'broadway/gdkeventsource.c',
+  # 'broadway/gdkeventsource.h',
+  # 'broadway/gdkdnd-broadway.c',
+  # 'broadway/broadwayd.c',
+  # 'broadway/gdkdevicemanager-broadway.c',
+  # 'broadway/gdkdevicemanager-broadway.h',
+  # 'broadway/gdkdevice-broadway.c',
+  # 'broadway/gdkdevice-broadway.h',
+  # 'broadway/broadway-buffer.c',
+  # 'broadway/broadway-buffer.h',
+  # 'broadway/gdktestutils-broadway.c',
+  # 'broadway/gdkproperty-broadway.c'
+# ]
+
+# gdk_broadway_private_sources = [
+  # 'broadway/gdkprivate-broadway.h'
+# ]
+
+# glsl_sources = [
+  # 'gl3-texture-2d.fs.glsl',
+  # 'gl3-texture-2d.vs.glsl',
+  # 'gl3-texture-rect.fs.glsl',
+  # 'gl3-texture-rect.vs.glsl',
+  # 'gl2-texture-2d.fs.glsl',
+  # 'gl2-texture-2d.fs.glsl',
+  # 'gl2-texture-rect.vs.glsl',
+  # 'gl2-texture-rect.vs.glsl',
+  # 'gles2-texture.fs.glsl',
+  # 'gles2-texture.vs.glsl',
+# ]
+# resource_xml = ''
+# foreach glsl_file : glsl_sources
+  # resource_xml += '    <file alias="glsl/@0@">resources/glsl/@0@</file>\n'.format(glsl_file)
+# endforeach
+
+
+# cdata = configuration_data()
+# cdata.set('GDK_GRESOURCE_XML_FILES', resource_xml)
+# gdkresources_xml = configure_file(
+  # input  : 'gdk.gresource.xml.meson',
+  # output : 'gdk.gresource.xml',
+  # configuration : cdata
+# )
 
 gdkresources = gnome.compile_resources(
   'gdkresources',
@@ -216,47 +243,59 @@ gdkresources = gnome.compile_resources(
 )
 
 
-deprecated_h_sources = ['deprecated/gdkcolor.h']
-
-gdk_headers = gdk_public_h_sources + deprecated_h_sources
+deprecated_h_sources = files(['deprecated/gdkcolor.h'])
 
-mkenum = find_program('build_enum.py')
-perl = find_program('perl')
-glib_mkenums = find_program('glib-mkenums')
+gdk_headers = gdk_public_h_sources + deprecated_h_sources + gdk_private_h_sources
 
-
-gdkenum_h = custom_target('gdkenum_h',
+gdkenum_h = custom_target(
+  'gdkenum_h',
   output  : 'gdkenumtypes.h',
   input   : gdk_headers,
-  command : [mkenum, perl, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.h.template', 
'@OUTPUT@', '@INPUT@'])
 
-gdkenum_c = custom_target('gdkenum_c',
+gdkenum_c = custom_target(
+  'gdkenum_c',
   output  : 'gdkenumtypes.c',
   input   : gdk_headers,
-  depends : [gdkenum_h],
-  command : [mkenum, perl, glib_mkenums, '@OUTPUT@', '@INPUT@'])
+  depends : gdkenum_h,
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gdkenumtypes.c.template', 
'@OUTPUT@', '@INPUT@'])
 
-gdkmarshal_h = custom_target('gdkmarshal_h',
-  output  : 'gdkmarshall.h',
+gdkmarshal_h = custom_target(
+  'gdkmarshal_h',
+  output  : 'gdkmarshalers.h',
   input   : 'gdkmarshalers.list',
-  command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@'])
+  command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
+)
 
-gdkmarshal_c = custom_target('gdkmarshal_c',
-  output  : 'gdkmarshall.c',
+gdkmarshal_c = custom_target(
+  'gdkmarshal_c',
+  output  : 'gdkmarshalers.c',
   input   : 'gdkmarshalers.list',
-  command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@'])
-
+  command : [mkmarshal, glib_marshal, '_gdk_marshal', '@INPUT@', '@OUTPUT@']
+)
 
 cdata = configuration_data()
-if x11_enabled      cdata.set('GDK_WINDOWING_X11', 1)      endif
-if wayland_enabled  cdata.set('GDK_WINDOWING_WAYLAND', 1)  endif
-if broadway_enabled cdata.set('GDK_WINDOWING_BROADWAY', 1) endif
+cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
+cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
+cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
+
+
+
+if x11_enabled      cdata.set('GDK_WINDOWING_X11', '')      endif
+if wayland_enabled  cdata.set('GDK_WINDOWING_WAYLAND', '')  endif
+if broadway_enabled cdata.set('GDK_WINDOWING_BROADWAY', '') endif
 gdkconfig = configure_file(
   input  : 'gdkconfig.h.meson',
   output : 'gdkconfig.h',
   configuration : cdata
 )
 
+gdkversionmacros = configure_file(
+  input  : 'gdkversionmacros.h.in',
+  output : 'gdkversionmacros.h',
+  configuration: cdata
+)
+
 xinc = include_directories('x11')
 wlinc = include_directories('wayland')
 
@@ -280,7 +319,9 @@ gdk_sources = [
   deprecated_gdk_sources,
   gdkenum_c, gdkenum_h,
   gdkmarshal_c, gdkmarshal_h,
-  gdkresources
+  gdkresources,
+  gdkversionmacros,
+  gdk_headers
 ]
 
 if x11_enabled
@@ -289,6 +330,10 @@ if x11_enabled
     xi_dep,
     xext_dep,
     x11_dep,
+    xcursor_dep,
+    xdamage_dep,
+    xfixes_dep,
+    xcomposite_dep
   ]
   gdk_sources += [
     gdk_x_sources,
@@ -311,19 +356,29 @@ if wayland_enabled
   ]
 endif
 
+if broadway_enabled
+  gdk_deps += [
+    shmlib,
+  ]
+  gdk_sources += [
+    gdk_broadway_sources,
+    gdk_broadway_private_sources
+  ]
+endif
+
 
 libgdk = shared_library('gdk',
   gdk_sources,
   c_args: ['-DHAVE_CONFIG_H', '-DGDK_COMPILATION'],
-  include_directories: [confinc, xinc, wlinc],
+  include_directories: [confinc, xinc],
   dependencies: gdk_deps,
 )
 
 
 libgdk_dep = declare_dependency(
-  sources: ['gdk.h', gdkenum_h],
+  sources: ['gdk.h', gdkconfig, gdkenum_h],
   depends: gdk_sources,
-  include_directories: [confinc, xinc, wlinc],
+  include_directories: [confinc, xinc],
   dependencies: gdk_deps,
   link_with: libgdk
 )
diff --git a/gtk/gentypefuncs.d b/gtk/gentypefuncs.d
new file mode 100755
index 0000000..f7a0528
--- /dev/null
+++ b/gtk/gentypefuncs.d
@@ -0,0 +1,45 @@
+#!/usr/bin/rdmd
+
+import std.stdio;
+import std.file;
+import std.process;
+import std.regex;
+import std.array;
+import std.algorithm;
+
+void main(string[] args) {
+       string out_file   = args[1];
+       string[] in_files = args[3..$];
+
+       auto regex = ctRegex!("g[td]k_[a-zA-Z0-9_]*_get_type");
+
+       string[] funcs;
+
+       foreach (filename; in_files) {
+               auto file = File(filename);
+               foreach (line; file.byLine()) {
+                       auto match = line.matchFirst(regex);
+                       if (!match.empty) {
+                               // *cough*, not exactly the fastest way to do this...
+                               if (!funcs.canFind(match.hit))
+                                       funcs ~= cast(string)match.hit.idup;
+                       }
+               }
+       }
+
+       funcs.sort();
+
+       //writeln(funcs);
+       //writeln(funcs.length);
+
+       string file_output = "G_GNUC_BEGIN_IGNORE_DEPRECATIONS\n";
+       foreach (func; funcs) {
+               if (func.startsWith("gdk_x11") || func.startsWith("gtk_socket") || 
func.startsWith("gtk_plug")) {
+                       file_output ~= "#ifdef GDK_WINDOWING_X11\n*tp++ = " ~ func ~ "();\n#endif\n";
+               } else if (func != ("gtk_text_handle_get_type")){
+                       file_output ~= "*tp++ = " ~ func ~ "();\n";
+               }
+       }
+
+       std.file.write(out_file, file_output);
+}
diff --git a/gtk/gtk.gresource.xml b/gtk/gtk.gresource.xml
new file mode 100644
index 0000000..1f9992a
--- /dev/null
+++ b/gtk/gtk.gresource.xml
@@ -0,0 +1,269 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<gresources>
+  <gresource prefix='/org/gtk/libgtk'>
+    <file alias='theme/Raleigh/gtk.css'>theme/Raleigh/gtk-default.css</file>
+    <file>theme/Adwaita/gtk.css</file>
+    <file>theme/Adwaita/gtk-dark.css</file>
+    <file>theme/Adwaita/gtk-contained.css</file>
+    <file>theme/Adwaita/gtk-contained-dark.css</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/bullet-symbolic.symbolic.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-active-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-active-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-backdrop-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-backdrop-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-active-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-active-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-backdrop-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-backdrop-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-hover-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-hover-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-checked-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-hover-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-hover-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-selectionmode 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/checkbox-selectionmode.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/check-symbolic.symbolic.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/dash-symbolic.symbolic.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-backdrop.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-above.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-backdrop.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-horz-scale-has-marks-below.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-backdrop.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-above.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-backdrop.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive 2 
png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive-dark 2 
png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive-dark.png</file>
+    <file 
preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below-insensitive.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/slider-vert-scale-has-marks-below.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-end.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-active.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover-dark 2 png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover-dark.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start-hover.png</file>
+    <file preprocess='to-pixdata'>theme/Adwaita/assets/text-select-start.png</file>
+    <file>theme/Adwaita/assets/bullet-symbolic.svg</file>
+    <file>theme/Adwaita/assets/check-symbolic.svg</file>
+    <file>theme/Adwaita/assets/dash-symbolic.svg</file>
+    <file>theme/HighContrast/gtk.css</file>
+    <file alias='theme/HighContrastInverse/gtk.css'>theme/HighContrast/gtk-inverse.css</file>
+    <file>theme/HighContrast/gtk-contained.css</file>
+    <file>theme/HighContrast/gtk-contained-inverse.css</file>
+    <file preprocess='to-pixdata'>theme/HighContrast/assets/bullet-symbolic.symbolic.png</file>
+    <file preprocess='to-pixdata'>theme/HighContrast/assets/check-symbolic.symbolic.png</file>
+    <file preprocess='to-pixdata'>theme/HighContrast/assets/dash-symbolic.symbolic.png</file>
+    <file>theme/HighContrast/assets/bullet-symbolic.svg</file>
+    <file>theme/HighContrast/assets/check-symbolic.svg</file>
+    <file>theme/HighContrast/assets/dash-symbolic.svg</file>
+    <file>theme/win32/gtk-win32-base.css</file>
+    <file>theme/win32/gtk.css</file>
+    <file>cursor/dnd-ask.png</file>
+    <file>cursor/dnd-copy.png</file>
+    <file>cursor/dnd-link.png</file>
+    <file>cursor/dnd-move.png</file>
+    <file>cursor/dnd-none.png</file>
+    <file 
alias='icons/64x64/actions/gesture-pinch-symbolic.symbolic.png'>gesture/gesture-pinch-symbolic.symbolic.png</file>
+    <file 
alias='icons/64x64/actions/gesture-rotate-anticlockwise-symbolic.symbolic.png'>gesture/gesture-rotate-anticlockwise-symbolic.symbolic.png</file>
+    <file 
alias='icons/64x64/actions/gesture-rotate-clockwise-symbolic.symbolic.png'>gesture/gesture-rotate-clockwise-symbolic.symbolic.png</file>
+    <file 
alias='icons/64x64/actions/gesture-stretch-symbolic.symbolic.png'>gesture/gesture-stretch-symbolic.symbolic.png</file>
+    <file 
alias='icons/64x64/actions/gesture-two-finger-swipe-left-symbolic.symbolic.png'>gesture/gesture-two-finger-swipe-left-symbolic.symbolic.png</file>
+    <file 
alias='icons/64x64/actions/gesture-two-finger-swipe-right-symbolic.symbolic.png'>gesture/gesture-two-finger-swipe-right-symbolic.symbolic.png</file>
+    <file compressed='true'>ui/gtkaboutdialog.ui</file>
+    <file compressed='true'>ui/gtkactionbar.ui</file>
+    <file compressed='true'>ui/gtkappchooserdialog.ui</file>
+    <file compressed='true'>ui/gtkappchooserwidget.ui</file>
+    <file compressed='true'>ui/gtkapplication-quartz.ui</file>
+    <file compressed='true'>ui/gtkassistant.ui</file>
+    <file compressed='true'>ui/gtkcolorchooserdialog.ui</file>
+    <file compressed='true'>ui/gtkcoloreditor.ui</file>
+    <file compressed='true'>ui/gtkcombobox.ui</file>
+    <file compressed='true'>ui/gtkdialog.ui</file>
+    <file compressed='true'>ui/gtkfilechooserbutton.ui</file>
+    <file compressed='true'>ui/gtkfilechooserdialog.ui</file>
+    <file compressed='true'>ui/gtkfilechooserwidget.ui</file>
+    <file compressed='true'>ui/gtkfontbutton.ui</file>
+    <file compressed='true'>ui/gtkfontchooserdialog.ui</file>
+    <file compressed='true'>ui/gtkfontchooserwidget.ui</file>
+    <file compressed='true'>ui/gtkinfobar.ui</file>
+    <file compressed='true'>ui/gtklockbutton.ui</file>
+    <file compressed='true'>ui/gtkmessagedialog.ui</file>
+    <file compressed='true'>ui/gtkpagesetupunixdialog.ui</file>
+    <file compressed='true'>ui/gtkpathbar.ui</file>
+    <file compressed='true'>ui/gtkplacesviewrow.ui</file>
+    <file compressed='true'>ui/gtkplacesview.ui</file>
+    <file compressed='true'>ui/gtkprintunixdialog.ui</file>
+    <file compressed='true'>ui/gtkrecentchooserdefault.ui</file>
+    <file compressed='true'>ui/gtkscalebutton.ui</file>
+    <file compressed='true'>ui/gtksearchbar.ui</file>
+    <file compressed='true'>ui/gtksidebarrow.ui</file>
+    <file compressed='true'>ui/gtkstatusbar.ui</file>
+    <file compressed='true'>ui/gtktooltipwindow.ui</file>
+    <file compressed='true'>ui/gtkvolumebutton.ui</file>
+    <file>icons/16x16/actions/gtk-caps-lock-warning.png</file>
+    <file>icons/16x16/actions/gtk-color-picker.png</file>
+    <file>icons/16x16/actions/gtk-connect.png</file>
+    <file>icons/16x16/actions/gtk-convert.png</file>
+    <file>icons/16x16/actions/gtk-disconnect.png</file>
+    <file>icons/16x16/actions/gtk-edit.png</file>
+    <file>icons/16x16/actions/gtk-index.png</file>
+    <file>icons/16x16/actions/gtk-orientation-landscape.png</file>
+    <file>icons/16x16/actions/gtk-orientation-portrait.png</file>
+    <file>icons/16x16/actions/gtk-orientation-reverse-landscape.png</file>
+    <file>icons/16x16/actions/gtk-orientation-reverse-portrait.png</file>
+    <file>icons/16x16/actions/gtk-page-setup.png</file>
+    <file>icons/16x16/actions/gtk-preferences.png</file>
+    <file>icons/16x16/actions/gtk-select-color.png</file>
+    <file>icons/16x16/actions/gtk-select-font.png</file>
+    <file>icons/16x16/actions/gtk-undelete.png</file>
+    <file>icons/16x16/actions/gtk-undelete-rtl.png</file>
+    <file>icons/16x16/status/image-missing.png</file>
+    <file>icons/22x22/actions/gtk-apply.png</file>
+    <file>icons/22x22/actions/gtk-cancel.png</file>
+    <file>icons/22x22/actions/gtk-no.png</file>
+    <file>icons/22x22/actions/gtk-ok.png</file>
+    <file>icons/22x22/actions/gtk-yes.png</file>
+    <file>icons/24x24/actions/gtk-caps-lock-warning.png</file>
+    <file>icons/24x24/actions/gtk-color-picker.png</file>
+    <file>icons/24x24/actions/gtk-connect.png</file>
+    <file>icons/24x24/actions/gtk-convert.png</file>
+    <file>icons/24x24/actions/gtk-disconnect.png</file>
+    <file>icons/24x24/actions/gtk-edit.png</file>
+    <file>icons/24x24/actions/gtk-index.png</file>
+    <file>icons/24x24/actions/gtk-orientation-landscape.png</file>
+    <file>icons/24x24/actions/gtk-orientation-portrait.png</file>
+    <file>icons/24x24/actions/gtk-orientation-reverse-landscape.png</file>
+    <file>icons/24x24/actions/gtk-orientation-reverse-portrait.png</file>
+    <file>icons/24x24/actions/gtk-page-setup.png</file>
+    <file>icons/24x24/actions/gtk-preferences.png</file>
+    <file>icons/24x24/actions/gtk-select-color.png</file>
+    <file>icons/24x24/actions/gtk-select-font.png</file>
+    <file>icons/24x24/actions/gtk-undelete.png</file>
+    <file>icons/24x24/actions/gtk-undelete-rtl.png</file>
+    <file>icons/24x24/status/image-missing.png</file>
+    <file>icons/32x32/actions/gtk-dnd-multiple.png</file>
+    <file>icons/32x32/actions/gtk-dnd.png</file>
+    <file>icons/32x32/status/image-missing.png</file>
+    <file>icons/48x48/status/image-missing.png</file>
+    <file compressed='true'>inspector/actions.ui</file>
+    <file compressed='true'>inspector/css-editor.ui</file>
+    <file compressed='true'>inspector/css-node-tree.ui</file>
+    <file compressed='true'>inspector/data-list.ui</file>
+    <file compressed='true'>inspector/general.ui</file>
+    <file compressed='true'>inspector/magnifier.ui</file>
+    <file compressed='true'>inspector/menu.ui</file>
+    <file compressed='true'>inspector/misc-info.ui</file>
+    <file compressed='true'>inspector/object-hierarchy.ui</file>
+    <file compressed='true'>inspector/object-tree.ui</file>
+    <file compressed='true'>inspector/prop-list.ui</file>
+    <file compressed='true'>inspector/resource-list.ui</file>
+    <file compressed='true'>inspector/selector.ui</file>
+    <file compressed='true'>inspector/signals-list.ui</file>
+    <file compressed='true'>inspector/statistics.ui</file>
+    <file compressed='true'>inspector/visual.ui</file>
+    <file compressed='true'>inspector/window.ui</file>
+    <file>inspector/logo.png</file>
+  </gresource>
+</gresources>
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index d8b3c21..b120476 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -9698,8 +9698,9 @@ gtk_window_move_resize (GtkWindow *window)
   /* handle resizing/moving and widget tree allocation
    */
   if (priv->configure_notify_received)
-    { 
+    {
       GtkAllocation allocation;
+      int min, nat;
 
       /* If we have received a configure event since
        * the last time in this function, we need to
@@ -9716,8 +9717,12 @@ gtk_window_move_resize (GtkWindow *window)
 
       allocation.x = 0;
       allocation.y = 0;
-      allocation.width = current_width;
-      allocation.height = current_height;
+      /*allocation.width = current_width;*/
+
+      gtk_widget_get_preferred_width (widget, &min, &nat);
+      allocation.width = MAX (min, current_width);
+      gtk_widget_get_preferred_height_for_width (widget, allocation.width, &min, &nat);
+      allocation.height = MAX (min, current_height);
 
       gtk_widget_size_allocate (widget, &allocation);
 
diff --git a/gtk/meson.build b/gtk/meson.build
index 157ceea..494f8fe 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -251,6 +251,7 @@ gtk_sources = [
   'gtkoffscreenwindow.c',
   'gtkorientable.c',
   'gtkoverlay.c',
+  'gtkpadcontroller.c',
   'gtkpagesetup.c',
   'gtkpaned.c',
   'gtkpango.c',
@@ -265,7 +266,6 @@ gtk_sources = [
   'gtkprintsettings.c',
   'gtkprintutils.c',
   'gtkprivate.c',
-  'gtkprivatetypebuiltins.c',
   'gtkprogressbar.c',
   'gtkpixelcache.c',
   'gtkpopover.c',
@@ -356,7 +356,6 @@ gtk_sources = [
   'gtktreestore.c',
   'gtktreeview.c',
   'gtktreeviewcolumn.c',
-  'gtktypebuiltins.c',
   'gtkvolumebutton.c',
   'gtkviewport.c',
   'gtkwidget.c',
@@ -367,6 +366,284 @@ gtk_sources = [
   'fallback-c89.c'
 ]
 
+gtk_private_type_headers = [
+  'gtkcsstypesprivate.h',
+  'gtktexthandleprivate.h',
+]
+
+gtk_private_h_sources = files([
+  gtk_private_type_headers,
+  'gtkrecentchooserutils.h',
+  'gtkrbtree.h',
+])
+
+gtk_public_h_sources = files([
+  'gtk.h',
+  'gtk-autocleanups.h',
+  'gtkx.h',
+  'gtkx-autocleanups.h',
+  'gtk-a11y.h',
+  'gtkaboutdialog.h',
+  'gtkaccelgroup.h',
+  'gtkaccellabel.h',
+  'gtkaccelmap.h',
+  'gtkaccessible.h',
+  'gtkactionable.h',
+  'gtkactionbar.h',
+  'gtkadjustment.h',
+  'gtkappchooser.h',
+  'gtkappchooserbutton.h',
+  'gtkappchooserdialog.h',
+  'gtkappchooserwidget.h',
+  'gtkapplication.h',
+  'gtkapplicationwindow.h',
+  'gtkaspectframe.h',
+  'gtkassistant.h',
+  'gtkbbox.h',
+  'gtkbin.h',
+  'gtkbindings.h',
+  'gtkborder.h',
+  'gtkbox.h',
+  'gtkbuilder.h',
+  'gtkbuildable.h',
+  'gtkbutton.h',
+  'gtkcalendar.h',
+  'gtkcellarea.h',
+  'gtkcellareacontext.h',
+  'gtkcellareabox.h',
+  'gtkcelleditable.h',
+  'gtkcelllayout.h',
+  'gtkcellrenderer.h',
+  'gtkcellrendereraccel.h',
+  'gtkcellrenderercombo.h',
+  'gtkcellrendererpixbuf.h',
+  'gtkcellrendererprogress.h',
+  'gtkcellrendererspin.h',
+  'gtkcellrendererspinner.h',
+  'gtkcellrenderertext.h',
+  'gtkcellrenderertoggle.h',
+  'gtkcellview.h',
+  'gtkcheckbutton.h',
+  'gtkcheckmenuitem.h',
+  'gtkclipboard.h',
+  'gtkcolorbutton.h',
+  'gtkcolorchooser.h',
+  'gtkcolorchooserwidget.h',
+  'gtkcolorchooserdialog.h',
+  'gtkcolorutils.h',
+  'gtkcombobox.h',
+  'gtkcomboboxtext.h',
+  'gtkcontainer.h',
+  'gtkcssprovider.h',
+  'gtkcsssection.h',
+  'gtkdebug.h',
+  'gtkdialog.h',
+  'gtkdnd.h',
+  'gtkdragdest.h',
+  'gtkdragsource.h',
+  'gtkdrawingarea.h',
+  'gtkeditable.h',
+  'gtkentry.h',
+  'gtkentrybuffer.h',
+  'gtkentrycompletion.h',
+  'gtkenums.h',
+  'gtkeventbox.h',
+  'gtkeventcontroller.h',
+  'gtkexpander.h',
+  'gtkfilechooser.h',
+  'gtkfilechooserbutton.h',
+  'gtkfilechooserdialog.h',
+  'gtkfilechoosernative.h',
+  'gtkfilechooserwidget.h',
+  'gtkfilefilter.h',
+  'gtkfixed.h',
+  'gtkflowbox.h',
+  'gtkfontbutton.h',
+  'gtkfontchooser.h',
+  'gtkfontchooserdialog.h',
+  'gtkfontchooserwidget.h',
+  'gtkframe.h',
+  'gtkgesture.h',
+  'gtkgesturedrag.h',
+  'gtkgesturelongpress.h',
+  'gtkgesturemultipress.h',
+  'gtkgesturepan.h',
+  'gtkgesturerotate.h',
+  'gtkgesturesingle.h',
+  'gtkgestureswipe.h',
+  'gtkgesturezoom.h',
+  'gtkglarea.h',
+  'gtkgrid.h',
+  'gtkheaderbar.h',
+  'gtkicontheme.h',
+  'gtkiconview.h',
+  'gtkimage.h',
+  'gtkimcontext.h',
+  'gtkimcontextinfo.h',
+  'gtkimcontextsimple.h',
+  'gtkimmodule.h',
+  'gtkimmulticontext.h',
+  'gtkinfobar.h',
+  'gtkinvisible.h',
+  'gtklabel.h',
+  'gtklayout.h',
+  'gtklevelbar.h',
+  'gtklinkbutton.h',
+  'gtklistbox.h',
+  'gtkliststore.h',
+  'gtklockbutton.h',
+  'gtkmain.h',
+  'gtkmenu.h',
+  'gtkmenubar.h',
+  'gtkmenubutton.h',
+  'gtkmenuitem.h',
+  'gtkmenushell.h',
+  'gtkmenutoolbutton.h',
+  'gtkmessagedialog.h',
+  'gtkmodelbutton.h',
+  'gtkmodules.h',
+  'gtkmountoperation.h',
+  'gtknativedialog.h',
+  'gtknotebook.h',
+  'gtkoffscreenwindow.h',
+  'gtkorientable.h',
+  'gtkoverlay.h',
+  'gtkpadcontroller.h',
+  'gtkpagesetup.h',
+  'gtkpaned.h',
+  'gtkpapersize.h',
+  'gtkplacessidebar.h',
+  'gtkplug.h',
+  'gtkpopover.h',
+  'gtkpopovermenu.h',
+  'gtkprintcontext.h',
+  'gtkprintoperation.h',
+  'gtkprintoperationpreview.h',
+  'gtkprintsettings.h',
+  'gtkprogressbar.h',
+  'gtkradiobutton.h',
+  'gtkradiomenuitem.h',
+  'gtkradiotoolbutton.h',
+  'gtkrange.h',
+  'gtkrecentchooser.h',
+  'gtkrecentchooserdialog.h',
+  'gtkrecentchoosermenu.h',
+  'gtkrecentchooserwidget.h',
+  'gtkrecentfilter.h',
+  'gtkrecentmanager.h',
+  'gtkrender.h',
+  'gtkrevealer.h',
+  'gtkscale.h',
+  'gtkscalebutton.h',
+  'gtkscrollable.h',
+  'gtkscrollbar.h',
+  'gtkscrolledwindow.h',
+  'gtksearchbar.h',
+  'gtksearchentry.h',
+  'gtkselection.h',
+  'gtkseparator.h',
+  'gtkseparatormenuitem.h',
+  'gtkseparatortoolitem.h',
+  'gtksettings.h',
+  'gtkshortcutlabel.h',
+  'gtkshortcutsgroup.h',
+  'gtkshortcutssection.h',
+  'gtkshortcutsshortcut.h',
+  'gtkshortcutswindow.h',
+  'gtkshow.h',
+  'gtkstacksidebar.h',
+  'gtksizegroup.h',
+  'gtksizerequest.h',
+  'gtksocket.h',
+  'gtkspinbutton.h',
+  'gtkspinner.h',
+  'gtkstack.h',
+  'gtkstackswitcher.h',
+  'gtkstatusbar.h',
+  'gtkstylecontext.h',
+  'gtkstyleprovider.h',
+  'gtkswitch.h',
+  'gtktestutils.h',
+  'gtktextattributes.h',
+  'gtktextbuffer.h',
+  'gtktextbufferrichtext.h',
+  'gtktextchild.h',
+  'gtktextdisplay.h',
+  'gtktextiter.h',
+  'gtktextmark.h',
+  'gtktexttag.h',
+  'gtktexttagtable.h',
+  'gtktextview.h',
+  'gtktogglebutton.h',
+  'gtktoggletoolbutton.h',
+  'gtktoolbar.h',
+  'gtktoolbutton.h',
+  'gtktoolitem.h',
+  'gtktoolitemgroup.h',
+  'gtktoolpalette.h',
+  'gtktoolshell.h',
+  'gtktooltip.h',
+  'gtktreednd.h',
+  'gtktreemodel.h',
+  'gtktreemodelfilter.h',
+  'gtktreemodelsort.h',
+  'gtktreeselection.h',
+  'gtktreesortable.h',
+  'gtktreestore.h',
+  'gtktreeview.h',
+  'gtktreeviewcolumn.h',
+  'gtktypes.h',
+  'gtkviewport.h',
+  'gtkvolumebutton.h',
+  'gtkwidget.h',
+  'gtkwidgetpath.h',
+  'gtkwindow.h',
+  'gtkwindowgroup.h',
+])
+
+gtk_deprecated_type_headers = ([
+  'deprecated/gtkactivatable.h',
+  'deprecated/gtkaction.h',
+  'deprecated/gtkactiongroup.h',
+  'deprecated/gtkalignment.h',
+  'deprecated/gtkarrow.h',
+  'deprecated/gtkcolorsel.h',
+  'deprecated/gtkcolorseldialog.h',
+  'deprecated/gtkfontsel.h',
+  'deprecated/gtkgradient.h',
+  'deprecated/gtkhandlebox.h',
+  'deprecated/gtkhbbox.h',
+  'deprecated/gtkhbox.h',
+  'deprecated/gtkhpaned.h',
+  'deprecated/gtkhscale.h',
+  'deprecated/gtkhscrollbar.h',
+  'deprecated/gtkhseparator.h',
+  'deprecated/gtkhsv.h',
+  'deprecated/gtkiconfactory.h',
+  'deprecated/gtkimagemenuitem.h',
+  'deprecated/gtkmisc.h',
+  'deprecated/gtknumerableicon.h',
+  'deprecated/gtkradioaction.h',
+  'deprecated/gtkrc.h',
+  'deprecated/gtkrecentaction.h',
+  'deprecated/gtkstatusicon.h',
+  'deprecated/gtkstock.h',
+  'deprecated/gtkstyle.h',
+  'deprecated/gtkstyleproperties.h',
+  'deprecated/gtksymboliccolor.h',
+  'deprecated/gtktable.h',
+  'deprecated/gtktearoffmenuitem.h',
+  'deprecated/gtkthemingengine.h',
+  'deprecated/gtktoggleaction.h',
+  'deprecated/gtkuimanager.h',
+  'deprecated/gtkvbbox.h',
+  'deprecated/gtkvbox.h',
+  'deprecated/gtkvscale.h',
+  'deprecated/gtkvscrollbar.h',
+  'deprecated/gtkvseparator.h',
+  'deprecated/gtkvpaned.h',
+])
+
 gtk_unix_sources = [
   'gtkcustompaperunixdialog.c',
   'gtkpagesetupunixdialog.c',
@@ -389,7 +666,6 @@ gtkresources = gnome.compile_resources(
   extra_args: '--manual-register'
 )
 
-
 gtk_x11_sources = [
   'gtkplug.c',
   'gtksocket.c',
@@ -414,18 +690,78 @@ gtk_dbus_src = gnome.gdbus_codegen('gtkdbusgenerated', 'gtkdbusinterfaces.xml',
                                    interface_prefix: 'org.Gtk.',
                                    namespace: '_Gtk')
 
-gtkmarshal_h = custom_target('gtkmarshal_h',
+gtkmarshal_h = custom_target(
+  'gtkmarshal_h',
   output  : 'gtkmarshalers.h',
   input   : 'gtkmarshalers.list',
   command : [mkmarshal, glib_marshal, '_gtk_marshal', '@INPUT@', '@OUTPUT@']
 )
 
-gtkmarshal_c = custom_target('gtkmarshal_c',
+gtkmarshal_c = custom_target(
+  'gtkmarshal_c',
   output  : 'gtkmarshalers.c',
   input   : 'gtkmarshalers.list',
   command : [mkmarshal, glib_marshal, '_gtk_marshal', '@INPUT@', '@OUTPUT@']
 )
 
+
+
+gtktypebuiltins_h = custom_target(
+  'gtkypebuiltins_h',
+  output  : 'gtktypebuiltins.h',
+  input   : gtk_public_h_sources + gtk_deprecated_type_headers,
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtktypebuiltins.h.template', 
'@OUTPUT@', '@INPUT@']
+)
+
+gtktypebuiltins_c = custom_target(
+  'gtkypebuiltins_c',
+  output  : 'gtktypebuiltins.c',
+  input   : gtk_public_h_sources +  gtk_deprecated_type_headers,
+  depends : gtktypebuiltins_h,
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtktypebuiltins.c.template', 
'@OUTPUT@', '@INPUT@']
+)
+
+gtkprivatetypebuiltins_h = custom_target(
+  'gtkprivateypebuiltins_h',
+  output  : 'gtkprivatetypebuiltins.h',
+  input   : gtk_private_type_headers,
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtkprivatetypebuiltins.h.template', 
'@OUTPUT@', '@INPUT@']
+)
+
+gtkprivatetypebuiltins_c = custom_target(
+  'gtkprivateypebuiltins_c',
+  output  : 'gtkprivatetypebuiltins.c',
+  input   : gtk_private_type_headers,
+  depends : [gtkprivatetypebuiltins_h, gtktypebuiltins_h],
+  command : [mkenum, perl, glib_mkenums, meson.current_source_dir() + '/gtkprivatetypebuiltins.c.template', 
'@OUTPUT@', '@INPUT@']
+)
+
+d_compiler = find_program('dmd')
+gentypefuncs_prog = find_program('gentypefuncs.d')
+# Generate gtktypefuncs.c
+typefuncs = custom_target(
+  'typefuncs',
+  depends: gdkenum_h,
+  output : 'gtktypefuncs.c',
+  input  : gdk_headers + gtk_public_h_sources + gtk_deprecated_type_headers + gtk_private_h_sources + 
[gtktypebuiltins_h] + [gdkenum_h],
+  command: [gentypefuncs_prog, '@OUTPUT@', '@INPUT@'],
+  install: true,
+  install_dir: '.'
+)
+
+cdata = configuration_data()
+cdata.set('GTK_MAJOR_VERSION', gtk_major_version)
+cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
+cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
+cdata.set('GTK_BINARY_AGE', gtk_binary_age)
+cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
+
+gtkversion = configure_file(
+  input  : 'gtkversion.h.in',
+  output : 'gtkversion.h',
+  configuration: cdata
+)
+
 gtk_sources = [
   gtk_sources,
   gtk_dbus_src,
@@ -437,6 +773,10 @@ gtk_sources = [
   gtkresources,
   gtkmarshal_c,
   gtkmarshal_h,
+  gtkprivatetypebuiltins_c,
+  gtkprivatetypebuiltins_h,
+  gtktypebuiltins_c,
+  gtktypebuiltins_h,
 ]
 
 gtk_deps = [
@@ -457,7 +797,7 @@ gtk_deps = [
     libgdk_dep
 ]
 
-if x11_enabled
+# if x11_enabled
   gtk_sources += [
     gtk_x11_sources,
     gtk_use_wayland_or_x11_c_sources
@@ -466,7 +806,7 @@ if x11_enabled
     xi_dep,
     x11_dep,
   ]
-endif
+# endif
 
 if wayland_enabled
   gtk_sources += [
@@ -483,20 +823,23 @@ libgtk = shared_library('gtk',
     '-DGTK_SYSCONFDIR="sysconfdir"',
     '-DGTK_DATA_PREFIX="dataprefix"',
     '-DGTK_PRINT_BACKENDS="null"', '-DGTK_VERSION="3"',
-    '-DX11_DATA_PREFIX="/share/x11/locale"'
+    '-DX11_DATA_PREFIX="/usr"'
   ],
-  include_directories: [ confinc, gdkinc ],
+  include_directories: [ confinc, gdkinc, gtkinc ],
   dependencies: [gtk_deps, libgdk_dep],
   link_with: libgdk
 )
 
 libgtk_dep = declare_dependency(
   sources: [
-    'gtk.h'
+    'gtk.h',
+    gtkversion,
+    gtktypebuiltins_c,
+    gtktypebuiltins_h,
   ],
   dependencies: gtk_deps,
-  link_with: [libgdk, libgtk],
-  include_directories: confinc
+  link_with: [libgtk, libgdk],
+  include_directories: [confinc, gtkinc]
 )
 
 
diff --git a/meson.build b/meson.build
index d70de78..c39acc8 100644
--- a/meson.build
+++ b/meson.build
@@ -10,11 +10,14 @@ project('gtk+-3.0', 'c',
 gnome = import('gnome')
 
 add_global_arguments('-DG_LOG_USE_STRUCTURED=1', language: 'c')
+add_global_arguments('-DG_ENABLE_DEBUG', language: 'c')
+add_global_arguments('-DG_ENABLE_CONSISTENCY_CHECKS', language: 'c')
 
 gtk_version = meson.project_version().split('.')
 gtk_major_version = gtk_version[0]
 gtk_minor_version = gtk_version[1]
 gtk_micro_version = gtk_version[2]
+gtk_interface_age = 0
 
 gtk_binary_age = 100 * gtk_minor_version.to_int() + gtk_micro_version.to_int()
 gtk_api_version = '@0@.0'.format(gtk_major_version)
@@ -26,6 +29,10 @@ broadway_enabled = get_option('enable-broadway-backend')
 
 mkmarshal = find_program('build_marshal.py')
 glib_marshal = find_program('glib-genmarshal')
+mkenum = find_program('build_enum.py')
+perl = find_program('perl')
+glib_mkenums = find_program('glib-mkenums')
+
 
 cc = meson.get_compiler('c')
 cdata = configuration_data()
@@ -33,6 +40,11 @@ cdata.set('PACKAGE_VERSION', '"'+meson.project_version()+'"')
 cdata.set('GTK_LOCALEDIR', '"'+get_option('localedir')+'"')
 cdata.set('GTK_DATADIR', '"'+get_option('datadir')+'"')
 cdata.set('GTK_LIBDIR', '"'+get_option('libdir')+'"')
+cdata.set('GTK_MAJOR_VERSION', 'aaa')
+cdata.set('GTK_MINOR_VERSION', gtk_minor_version)
+cdata.set('GTK_MICRO_VERSION', gtk_micro_version)
+cdata.set('GTK_BINARY_AGE', gtk_binary_age)
+cdata.set('GTK_INTERFACE_AGE', gtk_interface_age)
 check_headers = [
   ['HAVE_CRT_EXTERNS_H', 'crt/externs.h'],
   ['HAVE_DLFCN_H', 'dlfcn.h'],
@@ -121,43 +133,56 @@ cdata.set('GETTEXT_PACKAGE', '"gtk-3.0"')
 cdata.set('HAVE_XSYNC', 1)
 cdata.set('XINPUT_2', 1)
 cdata.set('XINPUT_2_2', 1)
+cdata.set('HAVE_XKB', 1)
+cdata.set('HAVE_XDAMAGE', 1)
+cdata.set('HAVE_XCURSOR', 1)
+cdata.set('HAVE_XGENERICEVENTS', 1)
 
 confinc = include_directories('.')
 gdkinc = include_directories('gdk')
-
-x11_dep = dependency('x11')
-xrender_dep = dependency('xrender')
-xi_dep =  dependency('xi')
-xext_dep = dependency('xext')
-glib_dep = dependency('glib-2.0')
-giounix_dep = dependency('gio-unix-2.0', required : false)
-pango_dep = dependency('pango')
-pangoft_dep = dependency('pangoft2')
-cairo_dep = dependency('cairo')
+gtkinc = include_directories('gtk')
+
+x11_dep        = dependency('x11')
+xrender_dep    = dependency('xrender')
+xi_dep         = dependency('xi')
+xext_dep       = dependency('xext')
+xcursor_dep    = dependency('xcursor')
+xdamage_dep    = dependency('xdamage')
+xfixes_dep     = dependency('xfixes')
+xcomposite_dep = dependency('xcomposite')
+glib_dep       = dependency('glib-2.0', version: '>= 2.49.4')
+giounix_dep    = dependency('gio-unix-2.0', required : false)
+pango_dep      = dependency('pango', version: '>=1.37.3')
+pangoft_dep    = dependency('pangoft2')
+cairo_dep      = dependency('cairo')
 pangocairo_dep = dependency('pangocairo')
-cairogobj_dep = dependency('cairo-gobject')
-pixbuf_dep = dependency('gdk-pixbuf-2.0')
-epoxy_dep = dependency('epoxy')
-atk_dep = dependency('atk')
-atkbridge_dep = dependency('atk-bridge-2.0')
-gmodule_dep = dependency('gmodule-2.0')
-mlib = cc.find_library('m')
-shmlib = cc.find_library('rt')
+cairogobj_dep  = dependency('cairo-gobject')
+pixbuf_dep     = dependency('gdk-pixbuf-2.0', version: '>= 2.30.0')
+epoxy_dep      = dependency('epoxy')
+atk_dep        = dependency('atk', version: '>= 2.15.1')
+atkbridge_dep  = dependency('atk-bridge-2.0')
+gmodule_dep    = dependency('gmodule-2.0')
+mlib           = cc.find_library('m')
+shmlib         = cc.find_library('rt')
 fontconfig_dep = dependency('fontconfig')
-xkbdep = dependency('xkbcommon')
-wlclientdep = dependency('wayland-client')
-wlprotocolsdep = dependency('wayland-protocols')
-wlcursordep = dependency('wayland-cursor')
-wlegldep = dependency('wayland-egl')
+xkbdep         = dependency('xkbcommon')
+wlclientdep    = dependency('wayland-client')
+wlprotocolsdep = dependency('wayland-protocols', version: '>= 1.7')
+wlcursordep    = dependency('wayland-cursor')
+wlegldep       = dependency('wayland-egl')
 
 if giounix_dep.found()
   cdata.set('HAVE_GIO_UNIX', 1)
 endif
 
-configure_file(input: 'config.h.meson', output: 'config.h', configuration: cdata)
+configure_file(
+  input : 'config.h.meson',
+  output: 'config.h',
+  configuration: cdata
+)
 
 subdir('gdk')
 subdir('gtk')
 subdir('demos')
-subdir('tests')
-subdir('testsuite')
+# subdir('tests')
+# subdir('testsuite')


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]