Include C headers in introspection file.
authorTomasz Miąsko <tomasz.miasko@gmail.com>
Sun, 4 Mar 2018 00:00:00 +0000 (00:00 +0000)
committerTomasz Miąsko <tomasz.miasko@gmail.com>
Sun, 4 Mar 2018 14:36:24 +0000 (15:36 +0100)
Include gtk/gtk.h and gtk/gtk-a11y.h unconditionally,
and gtk/gtkx.h when building with X11. Ensures that
introspection data contains complete set required
headers, which is useful when generating C code based
on introspection data.

Diff for generated gir (when using X11):

```diff
   <include name="xlib" version="2.0"/>
   <package name="gtk+-3.0"/>
+  <c:include name="gtk/gtk-a11y.h"/>
+  <c:include name="gtk/gtk.h"/>
+  <c:include name="gtk/gtkx.h"/>
   <namespace name="Gtk"
              version="3.0"
```

Fixes issue #56.

gtk/Makefile.am

index 63f88e9476d45ce837aedb1917520bd6c654f481..92f6ec734f60070db3d72022264ba5dc76d38349 100644 (file)
@@ -1594,9 +1594,11 @@ Gtk_3_0_gir_SCANNERFLAGS =                       \
        --add-include-path=$(top_builddir)/gdk  \
        --include-uninstalled=$(top_builddir)/gdk/Gdk-3.0.gir
 Gtk_3_0_gir_INCLUDES = Atk-1.0
+Gtk_3_0_gir_C_INCLUDES = gtk/gtk.h gtk/gtk-a11y.h
 if USE_X11
 Gtk_3_0_gir_SCANNERFLAGS += --add-include-path=$(top_builddir)/gdk/x11
 Gtk_3_0_gir_INCLUDES += xlib-2.0
+Gtk_3_0_gir_C_INCLUDES += gtk/gtkx.h
 endif
 Gtk_3_0_gir_CFLAGS = \
                $(AM_CPPFLAGS) \