[gtksourceview] Warn when a secondary public header is #included in external code



commit 5f5478991938ff2373aaeeb078764a54a9b959f1
Author: Sébastien Wilmet <swilmet gnome org>
Date:   Fri Jun 24 22:00:56 2016 +0200

    Warn when a secondary public header is #included in external code
    
    https://bugzilla.gnome.org/show_bug.cgi?id=755700

 gtksourceview/Makefile.am                          |    1 +
 .../completion-providers/words/Makefile.am         |    1 +
 .../words/gtksourcecompletionwords.h               |    4 ++++
 gtksourceview/gtksource.h                          |    4 ++++
 gtksourceview/gtksourceautocleanups.h              |    4 ++++
 gtksourceview/gtksourcebuffer.h                    |    4 ++++
 gtksourceview/gtksourcecompletion.h                |    4 ++++
 gtksourceview/gtksourcecompletioncontext.h         |    4 ++++
 gtksourceview/gtksourcecompletioninfo.h            |    4 ++++
 gtksourceview/gtksourcecompletionitem.h            |    4 ++++
 gtksourceview/gtksourcecompletionproposal.h        |    4 ++++
 gtksourceview/gtksourcecompletionprovider.h        |    4 ++++
 gtksourceview/gtksourceencoding.h                  |    4 ++++
 gtksourceview/gtksourcefile.h                      |    4 ++++
 gtksourceview/gtksourcefileloader.h                |    4 ++++
 gtksourceview/gtksourcefilesaver.h                 |    4 ++++
 gtksourceview/gtksourcegutter.h                    |    4 ++++
 gtksourceview/gtksourcegutterrenderer.h            |    4 ++++
 gtksourceview/gtksourcegutterrendererpixbuf.h      |    4 ++++
 gtksourceview/gtksourcegutterrenderertext.h        |    4 ++++
 gtksourceview/gtksourcelanguage.h                  |    4 ++++
 gtksourceview/gtksourcelanguagemanager.h           |    4 ++++
 gtksourceview/gtksourcemap.h                       |    4 ++++
 gtksourceview/gtksourcemark.h                      |    4 ++++
 gtksourceview/gtksourcemarkattributes.h            |    4 ++++
 gtksourceview/gtksourceprintcompositor.h           |    4 ++++
 gtksourceview/gtksourceregion.h                    |    4 ++++
 gtksourceview/gtksourcesearchcontext.h             |    4 ++++
 gtksourceview/gtksourcesearchsettings.h            |    4 ++++
 gtksourceview/gtksourcestyle.h                     |    4 ++++
 gtksourceview/gtksourcestylescheme.h               |    4 ++++
 gtksourceview/gtksourcestyleschemechooser.h        |    4 ++++
 gtksourceview/gtksourcestyleschemechooserbutton.h  |    4 ++++
 gtksourceview/gtksourcestyleschemechooserwidget.h  |    4 ++++
 gtksourceview/gtksourcestyleschememanager.h        |    4 ++++
 gtksourceview/gtksourcetag.h                       |    4 ++++
 gtksourceview/gtksourcetypes.h                     |    4 ++++
 gtksourceview/gtksourceundomanager.h               |    4 ++++
 gtksourceview/gtksourceutils.h                     |    4 ++++
 gtksourceview/gtksourceview.h                      |    4 ++++
 40 files changed, 154 insertions(+), 0 deletions(-)
---
diff --git a/gtksourceview/Makefile.am b/gtksourceview/Makefile.am
index 90f6b0a..eb59658 100644
--- a/gtksourceview/Makefile.am
+++ b/gtksourceview/Makefile.am
@@ -7,6 +7,7 @@ endif
 AM_CPPFLAGS =                          \
        -DDATADIR=\""$(datadir)"\"      \
        -DG_LOG_DOMAIN=\"GtkSourceView\"\
+       -DGTK_SOURCE_COMPILATION        \
        -I$(top_builddir)               \
        -I$(top_srcdir) -I$(srcdir)     \
        $(DISABLE_DEPRECATED_CFLAGS)    \
diff --git a/gtksourceview/completion-providers/words/Makefile.am 
b/gtksourceview/completion-providers/words/Makefile.am
index f0b23b1..97bf31e 100644
--- a/gtksourceview/completion-providers/words/Makefile.am
+++ b/gtksourceview/completion-providers/words/Makefile.am
@@ -3,6 +3,7 @@
 AM_CPPFLAGS =                          \
        -DDATADIR=\""$(datadir)"\"      \
        -DG_LOG_DOMAIN=\"GtkSourceView\"\
+       -DGTK_SOURCE_COMPILATION        \
        -I$(top_srcdir) -I$(srcdir)     \
        $(DISABLE_DEPRECATED_CFLAGS)    \
        $(WARN_CFLAGS)                  \
diff --git a/gtksourceview/completion-providers/words/gtksourcecompletionwords.h 
b/gtksourceview/completion-providers/words/gtksourcecompletionwords.h
index e803099..f28fd6a 100644
--- a/gtksourceview/completion-providers/words/gtksourcecompletionwords.h
+++ b/gtksourceview/completion-providers/words/gtksourcecompletionwords.h
@@ -22,9 +22,13 @@
 #ifndef GTK_SOURCE_COMPLETION_WORDS_H
 #define GTK_SOURCE_COMPLETION_WORDS_H
 
+#define GTK_SOURCE_H_INSIDE
+
 #include <gtksourceview/gtksourcecompletionprovider.h>
 #include <gtk/gtk.h>
 
+#undef GTK_SOURCE_H_INSIDE
+
 G_BEGIN_DECLS
 
 #define GTK_SOURCE_TYPE_COMPLETION_WORDS               (gtk_source_completion_words_get_type ())
diff --git a/gtksourceview/gtksource.h b/gtksourceview/gtksource.h
index 7d4fffe..3d330d6 100644
--- a/gtksourceview/gtksource.h
+++ b/gtksourceview/gtksource.h
@@ -20,6 +20,8 @@
 #ifndef GTK_SOURCE_H
 #define GTK_SOURCE_H
 
+#define GTK_SOURCE_H_INSIDE
+
 #include <gtksourceview/gtksourcetypes.h>
 #include <gtksourceview/gtksourcebuffer.h>
 #include <gtksourceview/gtksourcecompletioncontext.h>
@@ -59,4 +61,6 @@
 #include <gtksourceview/gtksourceview-enumtypes.h>
 #include <gtksourceview/gtksourceautocleanups.h>
 
+#undef GTK_SOURCE_H_INSIDE
+
 #endif /* GTK_SOURCE_H */
diff --git a/gtksourceview/gtksourceautocleanups.h b/gtksourceview/gtksourceautocleanups.h
index d44857f..0550083 100644
--- a/gtksourceview/gtksourceautocleanups.h
+++ b/gtksourceview/gtksourceautocleanups.h
@@ -19,6 +19,10 @@
 #ifndef GTK_SOURCE_AUTOCLEANUPS_H
 #define GTK_SOURCE_AUTOCLEANUPS_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #ifndef __GI_SCANNER__
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkSourceBuffer, g_object_unref)
diff --git a/gtksourceview/gtksourcebuffer.h b/gtksourceview/gtksourcebuffer.h
index 311662d..2ca0ab4 100644
--- a/gtksourceview/gtksourcebuffer.h
+++ b/gtksourceview/gtksourcebuffer.h
@@ -26,6 +26,10 @@
 #ifndef GTK_SOURCE_BUFFER_H
 #define GTK_SOURCE_BUFFER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcecompletion.h b/gtksourceview/gtksourcecompletion.h
index 7717ab9..923f79a 100644
--- a/gtksourceview/gtksourcecompletion.h
+++ b/gtksourceview/gtksourcecompletion.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_COMPLETION_H
 #define GTK_SOURCE_COMPLETION_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcecompletioncontext.h b/gtksourceview/gtksourcecompletioncontext.h
index 90d064b..bea7bf2 100644
--- a/gtksourceview/gtksourcecompletioncontext.h
+++ b/gtksourceview/gtksourcecompletioncontext.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_COMPLETION_CONTEXT_H
 #define GTK_SOURCE_COMPLETION_CONTEXT_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcecompletioninfo.h b/gtksourceview/gtksourcecompletioninfo.h
index 9b2abae..adb0be3 100644
--- a/gtksourceview/gtksourcecompletioninfo.h
+++ b/gtksourceview/gtksourcecompletioninfo.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_COMPLETION_INFO_H
 #define GTK_SOURCE_COMPLETION_INFO_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcecompletionitem.h b/gtksourceview/gtksourcecompletionitem.h
index b24001a..691bb8b 100644
--- a/gtksourceview/gtksourcecompletionitem.h
+++ b/gtksourceview/gtksourcecompletionitem.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_COMPLETION_ITEM_H
 #define GTK_SOURCE_COMPLETION_ITEM_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcecompletionproposal.h b/gtksourceview/gtksourcecompletionproposal.h
index ee40520..f35497e 100644
--- a/gtksourceview/gtksourcecompletionproposal.h
+++ b/gtksourceview/gtksourcecompletionproposal.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_COMPLETION_PROPOSAL_H
 #define GTK_SOURCE_COMPLETION_PROPOSAL_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <glib-object.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 #include <gtksourceview/gtksourcetypes.h>
diff --git a/gtksourceview/gtksourcecompletionprovider.h b/gtksourceview/gtksourcecompletionprovider.h
index a2e79a3..a777217 100644
--- a/gtksourceview/gtksourcecompletionprovider.h
+++ b/gtksourceview/gtksourcecompletionprovider.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_COMPLETION_PROVIDER_H
 #define GTK_SOURCE_COMPLETION_PROVIDER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcecompletioncontext.h>
 #include <gtksourceview/gtksourcetypes.h>
diff --git a/gtksourceview/gtksourceencoding.h b/gtksourceview/gtksourceencoding.h
index 73d8b1a..c0b985d 100644
--- a/gtksourceview/gtksourceencoding.h
+++ b/gtksourceview/gtksourceencoding.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_ENCODING_H
 #define GTK_SOURCE_ENCODING_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <glib.h>
 #include <glib-object.h>
 #include <gtksourceview/gtksourcetypes.h>
diff --git a/gtksourceview/gtksourcefile.h b/gtksourceview/gtksourcefile.h
index 9be712f..95b2357 100644
--- a/gtksourceview/gtksourcefile.h
+++ b/gtksourceview/gtksourcefile.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_FILE_H
 #define GTK_SOURCE_FILE_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcefileloader.h b/gtksourceview/gtksourcefileloader.h
index 3ff4851..097f529 100644
--- a/gtksourceview/gtksourcefileloader.h
+++ b/gtksourceview/gtksourcefileloader.h
@@ -25,6 +25,10 @@
 #ifndef GTK_SOURCE_FILE_LOADER_H
 #define GTK_SOURCE_FILE_LOADER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcefilesaver.h b/gtksourceview/gtksourcefilesaver.h
index c376c03..e788bd7 100644
--- a/gtksourceview/gtksourcefilesaver.h
+++ b/gtksourceview/gtksourcefilesaver.h
@@ -25,6 +25,10 @@
 #ifndef GTK_SOURCE_FILE_SAVER_H
 #define GTK_SOURCE_FILE_SAVER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcegutter.h b/gtksourceview/gtksourcegutter.h
index ce066bc..1d6d675 100644
--- a/gtksourceview/gtksourcegutter.h
+++ b/gtksourceview/gtksourcegutter.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_GUTTER_H
 #define GTK_SOURCE_GUTTER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcegutterrenderer.h b/gtksourceview/gtksourcegutterrenderer.h
index 5f7f517..b6a0a5b 100644
--- a/gtksourceview/gtksourcegutterrenderer.h
+++ b/gtksourceview/gtksourcegutterrenderer.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_GUTTER_RENDERER_H
 #define GTK_SOURCE_GUTTER_RENDERER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcegutterrendererpixbuf.h b/gtksourceview/gtksourcegutterrendererpixbuf.h
index 5ee0f9c..bffee65 100644
--- a/gtksourceview/gtksourcegutterrendererpixbuf.h
+++ b/gtksourceview/gtksourcegutterrendererpixbuf.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_GUTTER_RENDERER_PIXBUF_H
 #define GTK_SOURCE_GUTTER_RENDERER_PIXBUF_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtksourceview/gtksourcetypes.h>
 #include <gtksourceview/gtksourcegutterrenderer.h>
 
diff --git a/gtksourceview/gtksourcegutterrenderertext.h b/gtksourceview/gtksourcegutterrenderertext.h
index ff53bdd..c291a29 100644
--- a/gtksourceview/gtksourcegutterrenderertext.h
+++ b/gtksourceview/gtksourcegutterrenderertext.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_GUTTER_RENDERER_TEXT_H
 #define GTK_SOURCE_GUTTER_RENDERER_TEXT_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtksourceview/gtksourcetypes.h>
 #include <gtksourceview/gtksourcegutterrenderer.h>
 
diff --git a/gtksourceview/gtksourcelanguage.h b/gtksourceview/gtksourcelanguage.h
index 8b0d4b3..c259398 100644
--- a/gtksourceview/gtksourcelanguage.h
+++ b/gtksourceview/gtksourcelanguage.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_LANGUAGE_H
 #define GTK_SOURCE_LANGUAGE_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcelanguagemanager.h b/gtksourceview/gtksourcelanguagemanager.h
index a60c685..c5337ad 100644
--- a/gtksourceview/gtksourcelanguagemanager.h
+++ b/gtksourceview/gtksourcelanguagemanager.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_LANGUAGE_MANAGER_H
 #define GTK_SOURCE_LANGUAGE_MANAGER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtksourceview/gtksourcetypes.h>
 
 G_BEGIN_DECLS
diff --git a/gtksourceview/gtksourcemap.h b/gtksourceview/gtksourcemap.h
index 986479d..6c09c18 100644
--- a/gtksourceview/gtksourcemap.h
+++ b/gtksourceview/gtksourcemap.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_MAP_H
 #define GTK_SOURCE_MAP_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourceview.h>
 
diff --git a/gtksourceview/gtksourcemark.h b/gtksourceview/gtksourcemark.h
index 1ef5a1c..5ea1f30 100644
--- a/gtksourceview/gtksourcemark.h
+++ b/gtksourceview/gtksourcemark.h
@@ -22,6 +22,10 @@
 #ifndef GTKSOURCEMARK_H
 #define GTKSOURCEMARK_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcemarkattributes.h b/gtksourceview/gtksourcemarkattributes.h
index 1783f64..872fe55 100644
--- a/gtksourceview/gtksourcemarkattributes.h
+++ b/gtksourceview/gtksourcemarkattributes.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_MARK_ATTRIBUTES_H
 #define GTK_SOURCE_MARK_ATTRIBUTES_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourceprintcompositor.h b/gtksourceview/gtksourceprintcompositor.h
index 2b475d0..41870eb 100644
--- a/gtksourceview/gtksourceprintcompositor.h
+++ b/gtksourceview/gtksourceprintcompositor.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_PRINT_COMPOSITOR_H
 #define GTK_SOURCE_PRINT_COMPOSITOR_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourceregion.h b/gtksourceview/gtksourceregion.h
index d401c81..6ec9f3a 100644
--- a/gtksourceview/gtksourceregion.h
+++ b/gtksourceview/gtksourceregion.h
@@ -23,6 +23,10 @@
 #ifndef GTK_SOURCE_REGION_H
 #define GTK_SOURCE_REGION_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourceversion.h>
 
diff --git a/gtksourceview/gtksourcesearchcontext.h b/gtksourceview/gtksourcesearchcontext.h
index b17e700..873fc3f 100644
--- a/gtksourceview/gtksourcesearchcontext.h
+++ b/gtksourceview/gtksourcesearchcontext.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_SEARCH_CONTEXT_H
 #define GTK_SOURCE_SEARCH_CONTEXT_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcesearchsettings.h b/gtksourceview/gtksourcesearchsettings.h
index f026a2c..a0e9012 100644
--- a/gtksourceview/gtksourcesearchsettings.h
+++ b/gtksourceview/gtksourcesearchsettings.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_SEARCH_SETTINGS_H
 #define GTK_SOURCE_SEARCH_SETTINGS_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <glib-object.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcestyle.h b/gtksourceview/gtksourcestyle.h
index 9ffa47e..3a952a8 100644
--- a/gtksourceview/gtksourcestyle.h
+++ b/gtksourceview/gtksourcestyle.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_STYLE_H
 #define GTK_SOURCE_STYLE_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcestylescheme.h b/gtksourceview/gtksourcestylescheme.h
index 193343a..18134df 100644
--- a/gtksourceview/gtksourcestylescheme.h
+++ b/gtksourceview/gtksourcestylescheme.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_STYLE_SCHEME_H
 #define GTK_SOURCE_STYLE_SCHEME_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcestyleschemechooser.h b/gtksourceview/gtksourcestyleschemechooser.h
index 092f1dc..d757c13 100644
--- a/gtksourceview/gtksourcestyleschemechooser.h
+++ b/gtksourceview/gtksourcestyleschemechooser.h
@@ -21,6 +21,10 @@
 #ifndef GTK_SOURCE_STYLE_SCHEME_CHOOSER_H
 #define GTK_SOURCE_STYLE_SCHEME_CHOOSER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtksourceview/gtksourcetypes.h>
 
 G_BEGIN_DECLS
diff --git a/gtksourceview/gtksourcestyleschemechooserbutton.h 
b/gtksourceview/gtksourcestyleschemechooserbutton.h
index 5fad24a..3f106df 100644
--- a/gtksourceview/gtksourcestyleschemechooserbutton.h
+++ b/gtksourceview/gtksourcestyleschemechooserbutton.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_STYLE_SCHEME_CHOOSER_BUTTON_H
 #define GTK_SOURCE_STYLE_SCHEME_CHOOSER_BUTTON_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcestyleschemechooserwidget.h 
b/gtksourceview/gtksourcestyleschemechooserwidget.h
index 6b8cba5..e6f97b4 100644
--- a/gtksourceview/gtksourcestyleschemechooserwidget.h
+++ b/gtksourceview/gtksourcestyleschemechooserwidget.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_STYLE_SCHEME_CHOOSER_WIDGET_H
 #define GTK_SOURCE_STYLE_SCHEME_CHOOSER_WIDGET_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcestyleschememanager.h b/gtksourceview/gtksourcestyleschememanager.h
index 6b24709..a67f067 100644
--- a/gtksourceview/gtksourcestyleschememanager.h
+++ b/gtksourceview/gtksourcestyleschememanager.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_STYLE_SCHEME_MANAGER_H
 #define GTK_SOURCE_STYLE_SCHEME_MANAGER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <glib-object.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcetag.h b/gtksourceview/gtksourcetag.h
index 2070894..0678bb7 100644
--- a/gtksourceview/gtksourcetag.h
+++ b/gtksourceview/gtksourcetag.h
@@ -24,6 +24,10 @@
 #ifndef GTK_SOURCE_TAG_H
 #define GTK_SOURCE_TAG_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourcetypes.h b/gtksourceview/gtksourcetypes.h
index 3038900..7c1ff8d 100644
--- a/gtksourceview/gtksourcetypes.h
+++ b/gtksourceview/gtksourcetypes.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_TYPES_H
 #define GTK_SOURCE_TYPES_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gio/gio.h>
 #include <gtksourceview/gtksourceversion.h>
 
diff --git a/gtksourceview/gtksourceundomanager.h b/gtksourceview/gtksourceundomanager.h
index e04d2b1..c335793 100644
--- a/gtksourceview/gtksourceundomanager.h
+++ b/gtksourceview/gtksourceundomanager.h
@@ -25,6 +25,10 @@
 #ifndef GTK_SOURCE_UNDO_MANAGER_H
 #define GTK_SOURCE_UNDO_MANAGER_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 
diff --git a/gtksourceview/gtksourceutils.h b/gtksourceview/gtksourceutils.h
index 562e42f..57817e8 100644
--- a/gtksourceview/gtksourceutils.h
+++ b/gtksourceview/gtksourceutils.h
@@ -22,6 +22,10 @@
 #ifndef GTK_SOURCE_UTILS_H
 #define GTK_SOURCE_UTILS_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <glib-object.h>
 #include <gtksourceview/gtksourceversion.h>
 
diff --git a/gtksourceview/gtksourceview.h b/gtksourceview/gtksourceview.h
index 6d1fb38..7209d59 100644
--- a/gtksourceview/gtksourceview.h
+++ b/gtksourceview/gtksourceview.h
@@ -24,6 +24,10 @@
 #ifndef GTK_SOURCE_VIEW_H
 #define GTK_SOURCE_VIEW_H
 
+#if !defined (GTK_SOURCE_H_INSIDE) && !defined (GTK_SOURCE_COMPILATION)
+#warning "Only <gtksourceview/gtksource.h> can be included directly."
+#endif
+
 #include <gtk/gtk.h>
 #include <gtksourceview/gtksourcetypes.h>
 


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