[gtk: 3/4] build-sys: generate GdkWin32.gir




commit 8ab57fc8ef47564b9d9757bdb1cf4d36eb6346c9
Author: Marc-André Lureau <marcandre lureau redhat com>
Date:   Thu Aug 18 19:57:17 2022 +0400

    build-sys: generate GdkWin32.gir
    
    Signed-off-by: Marc-André Lureau <marcandre lureau redhat com>

 gdk/win32/meson.build | 27 +++++++++++++++------------
 gtk/meson.build       | 18 ++++++++++++++++++
 2 files changed, 33 insertions(+), 12 deletions(-)
---
diff --git a/gdk/win32/meson.build b/gdk/win32/meson.build
index 66442bd9f4..bcf7d7c78f 100644
--- a/gdk/win32/meson.build
+++ b/gdk/win32/meson.build
@@ -1,6 +1,19 @@
-gdk_win32_sources = files([
-  'gdkcairocontext-win32.c',
+gdk_win32_public_sources = files([
   'gdkcursor-win32.c',
+  'gdkdisplay-win32.c',
+  'gdkdisplaymanager-win32.c',
+  'gdkdrag-win32.c',
+  'gdkglcontext-win32.c',
+  'gdkglcontext-win32-wgl.c',
+  'gdkwin32id.c',
+  'gdksurface-win32.c',
+  'gdkevents-win32.c',
+  'gdkmonitor-win32.c',
+  'gdkscreen-win32.c',
+])
+
+gdk_win32_sources = gdk_win32_public_sources + files([
+  'gdkcairocontext-win32.c',
   'gdkclipboard-win32.c',
   'gdkclipdrop-win32.c',
   'gdkdevicemanager-win32.c',
@@ -8,13 +21,7 @@ gdk_win32_sources = files([
   'gdkdevice-win32.c',
   'gdkdevice-winpointer.c',
   'gdkdevice-wintab.c',
-  'gdkdisplay-win32.c',
-  'gdkdisplaymanager-win32.c',
-  'gdkdrag-win32.c',
   'gdkdrop-win32.c',
-  'gdkevents-win32.c',
-  'gdkglcontext-win32.c',
-  'gdkglcontext-win32-wgl.c',
   'gdkglobals-win32.c',
   'gdkhdataoutputstream-win32.c',
   'gdkinput-dmanipulation.c',
@@ -24,15 +31,11 @@ gdk_win32_sources = files([
   'gdkkeys-win32-impl-wow64.c',
   'gdkwin32langnotification.c',
   'gdkmain-win32.c',
-  'gdkmonitor-win32.c',
   'gdkproperty-win32.c',
-  'gdkscreen-win32.c',
   'gdkvulkancontext-win32.c',
   'gdkwin32cursor.h',
   'gdkwin32display.h',
-  'gdkwin32id.c',
   'gdkwin32keys.h',
-  'gdksurface-win32.c',
 ])
 
 gdk_win32_public_headers = files([
diff --git a/gtk/meson.build b/gtk/meson.build
index 2e404f2ac4..5a76290dad 100644
--- a/gtk/meson.build
+++ b/gtk/meson.build
@@ -1309,6 +1309,24 @@ if build_gir
     gtk_dep_sources += gdk_wayland_gir
   endif
 
+  if win32_enabled
+    gdk_win32_gir = gnome.generate_gir(libgtk,
+      sources: gdk_win32_public_headers + gdk_win32_public_sources,
+      namespace: 'GdkWin32',
+      nsversion: gtk_api_version,
+      identifier_prefix: 'Gdk',
+      symbol_prefix: 'gdk',
+      export_packages: 'gtk4-win32',
+      includes: [ gdk_gir[0], 'win32-1.0', ],
+      install: true,
+      dependencies: libgdk_dep,
+      header: 'gdk/win32/gdkwin32.h',
+      extra_args: gir_args,
+      fatal_warnings: get_option('werror'),
+    )
+    gtk_dep_sources += gdk_win32_gir
+  endif
+
   gsk_gir_inc = [ gdk_gir[0], 'Graphene-1.0' ]
 
   gsk_gir = gnome.generate_gir(libgtk,


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