[gimp] libgimp*: add guards that #error out if individual files are included



commit 844df2b4dfe16395bfbfc2f83f653644783fbf96
Author: Michael Natterer <mitch gimp org>
Date:   Thu Apr 28 14:30:41 2011 +0200

    libgimp*: add guards that #error out if individual files are included
    
    This only helps to maintain proper includes in app/ and shouldn't
    affect plug-ins at all, because these are supposed to only include the
    main headers from libgimp/ since the beginning of time.
    
    The gimpfootypes.h files do not have these guards, so we can continue
    to maintain app/'s include policy that is very likely to error out if
    wrong things are included.

 configure.ac                              |    4 ++++
 libgimpbase/Makefile.am                   |    3 ++-
 libgimpbase/gimpbase.h                    |    2 ++
 libgimpbase/gimpchecks.h                  |    4 ++++
 libgimpbase/gimpcpuaccel.h                |    4 ++++
 libgimpbase/gimpdatafiles.h               |    4 ++++
 libgimpbase/gimpenv.h                     |    4 ++++
 libgimpbase/gimplimits.h                  |    4 ++++
 libgimpbase/gimpmemsize.h                 |    4 ++++
 libgimpbase/gimpparasite.h                |    4 ++++
 libgimpbase/gimprectangle.h               |    4 ++++
 libgimpbase/gimpunit.h                    |    4 ++++
 libgimpbase/gimputils.h                   |    4 ++++
 libgimpcolor/Makefile.am                  |    3 ++-
 libgimpcolor/gimpadaptivesupersample.h    |    4 ++++
 libgimpcolor/gimpbilinear.h               |    4 ++++
 libgimpcolor/gimpcmyk.h                   |    4 ++++
 libgimpcolor/gimpcolor.h                  |    2 ++
 libgimpcolor/gimpcolormanaged.h           |    4 ++++
 libgimpcolor/gimpcolorspace.h             |    4 ++++
 libgimpcolor/gimphsl.h                    |    4 ++++
 libgimpcolor/gimphsv.h                    |    4 ++++
 libgimpcolor/gimprgb.h                    |    4 ++++
 libgimpconfig/Makefile.am                 |    5 +++--
 libgimpconfig/gimpcolorconfig-enums.c     |    2 +-
 libgimpconfig/gimpcolorconfig.c           |    1 +
 libgimpconfig/gimpcolorconfig.h           |    4 ++++
 libgimpconfig/gimpconfig-deserialize.h    |    4 ++++
 libgimpconfig/gimpconfig-error.h          |    4 ++++
 libgimpconfig/gimpconfig-iface.h          |    4 ++++
 libgimpconfig/gimpconfig-params.h         |    4 ++++
 libgimpconfig/gimpconfig-path.h           |    5 ++++-
 libgimpconfig/gimpconfig-serialize.h      |    4 ++++
 libgimpconfig/gimpconfig-utils.h          |    4 ++++
 libgimpconfig/gimpconfig.h                |    2 ++
 libgimpconfig/gimpconfigwriter.h          |    4 ++++
 libgimpconfig/gimpscanner.h               |    4 ++++
 libgimpmath/Makefile.am                   |    3 ++-
 libgimpmath/gimpmath.h                    |    6 ++++++
 libgimpmath/gimpmatrix.h                  |    4 ++++
 libgimpmath/gimpmd5.h                     |    4 ++++
 libgimpmath/gimpvector.h                  |    4 ++++
 libgimpmodule/Makefile.am                 |    3 ++-
 libgimpmodule/gimpmodule.h                |    4 ++++
 libgimpmodule/gimpmoduledb.h              |    4 ++++
 libgimpthumb/Makefile.am                  |    3 ++-
 libgimpthumb/gimpthumb-error.h            |    4 ++++
 libgimpthumb/gimpthumb-utils.h            |    4 ++++
 libgimpthumb/gimpthumb.h                  |    5 ++++-
 libgimpthumb/gimpthumbnail.h              |    4 ++++
 libgimpwidgets/Makefile.am                |    3 ++-
 libgimpwidgets/gimpbrowser.h              |    4 ++++
 libgimpwidgets/gimpbutton.h               |    4 ++++
 libgimpwidgets/gimpcairo-utils.h          |    4 ++++
 libgimpwidgets/gimpcellrenderercolor.h    |    4 ++++
 libgimpwidgets/gimpcellrenderertoggle.h   |    4 ++++
 libgimpwidgets/gimpchainbutton.h          |    4 ++++
 libgimpwidgets/gimpcolorarea.h            |    4 ++++
 libgimpwidgets/gimpcolorbutton.h          |    4 ++++
 libgimpwidgets/gimpcolordisplay.h         |    4 ++++
 libgimpwidgets/gimpcolordisplaystack.h    |    4 ++++
 libgimpwidgets/gimpcolorhexentry.h        |    4 ++++
 libgimpwidgets/gimpcolornotebook.h        |    4 ++++
 libgimpwidgets/gimpcolorprofilecombobox.h |    4 ++++
 libgimpwidgets/gimpcolorprofilestore.h    |    4 ++++
 libgimpwidgets/gimpcolorscale.h           |    7 +++----
 libgimpwidgets/gimpcolorscales.h          |    4 ++++
 libgimpwidgets/gimpcolorselection.h       |    4 ++++
 libgimpwidgets/gimpcolorselector.h        |    4 ++++
 libgimpwidgets/gimpdialog.h               |    4 ++++
 libgimpwidgets/gimpenumcombobox.h         |    4 ++++
 libgimpwidgets/gimpenumlabel.h            |    6 ++++++
 libgimpwidgets/gimpenumstore.h            |    5 +++++
 libgimpwidgets/gimpenumwidgets.h          |    6 ++++++
 libgimpwidgets/gimpfileentry.h            |    4 ++++
 libgimpwidgets/gimpframe.h                |    4 ++++
 libgimpwidgets/gimphelpui.h               |    4 ++++
 libgimpwidgets/gimphintbox.h              |    4 ++++
 libgimpwidgets/gimpintcombobox.h          |    4 ++++
 libgimpwidgets/gimpintstore.h             |    4 ++++
 libgimpwidgets/gimpmemsizeentry.h         |    4 ++++
 libgimpwidgets/gimpnumberpairentry.h      |    4 ++++
 libgimpwidgets/gimpoffsetarea.h           |    4 ++++
 libgimpwidgets/gimpoldwidgets.h           |   14 +++++++++-----
 libgimpwidgets/gimppageselector.h         |    4 ++++
 libgimpwidgets/gimppatheditor.h           |    4 ++++
 libgimpwidgets/gimppickbutton.h           |    4 ++++
 libgimpwidgets/gimppixmap.h               |    4 ++++
 libgimpwidgets/gimppreview.h              |    4 ++++
 libgimpwidgets/gimppreviewarea.h          |    4 ++++
 libgimpwidgets/gimppropwidgets.h          |    4 ++++
 libgimpwidgets/gimpquerybox.h             |    4 ++++
 libgimpwidgets/gimpruler.h                |    4 ++++
 libgimpwidgets/gimpscaleentry.h           |    4 ++++
 libgimpwidgets/gimpscrolledpreview.h      |    4 ++++
 libgimpwidgets/gimpsizeentry.h            |    4 ++++
 libgimpwidgets/gimpstock.h                |    4 ++++
 libgimpwidgets/gimpstringcombobox.h       |    4 ++++
 libgimpwidgets/gimpunitcombobox.h         |    8 ++++++++
 libgimpwidgets/gimpunitmenu.h             |    4 ++++
 libgimpwidgets/gimpunitstore.h            |    8 ++++++++
 libgimpwidgets/gimpwidgets-error.h        |    4 ++++
 libgimpwidgets/gimpwidgets.h              |    2 ++
 libgimpwidgets/gimpzoommodel.h            |    4 ++++
 104 files changed, 408 insertions(+), 20 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e4c7a1a..1435000 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2005,6 +2005,10 @@ AC_CONFIG_COMMANDS([libgimpbase/gimpversion.h], [
  * This is a generated file.  Please modify 'configure.ac'
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_VERSION_H__
 #define __GIMP_VERSION_H__
 
diff --git a/libgimpbase/Makefile.am b/libgimpbase/Makefile.am
index 473fa7c..100b39c 100644
--- a/libgimpbase/Makefile.am
+++ b/libgimpbase/Makefile.am
@@ -51,7 +51,8 @@ AM_CPPFLAGS = \
 	-DGIMP_DATA_VERSION=\"$(GIMP_DATA_VERSION)\"		\
 	-DGIMP_SYSCONF_VERSION=\"$(GIMP_SYSCONF_VERSION)\"	\
 	-DGIMP_PLUGIN_VERSION=\"$(GIMP_PLUGIN_VERSION)\"	\
-	-DG_LOG_DOMAIN=\"LibGimpBase\"
+	-DG_LOG_DOMAIN=\"LibGimpBase\"				\
+	-DGIMP_BASE_COMPILATION
 
 AM_CCASFLAGS = \
 	-I$(top_builddir)	\
diff --git a/libgimpbase/gimpbase.h b/libgimpbase/gimpbase.h
index 37a64fa..0957dbc 100644
--- a/libgimpbase/gimpbase.h
+++ b/libgimpbase/gimpbase.h
@@ -19,6 +19,7 @@
 #ifndef __GIMP_BASE_H__
 #define __GIMP_BASE_H__
 
+#define __GIMP_BASE_H_INSIDE__
 
 #include <libgimpbase/gimpbasetypes.h>
 
@@ -38,5 +39,6 @@
 #include <libgimpbase/gimpsignal.h>
 #endif
 
+#undef __GIMP_BASE_H_INSIDE__
 
 #endif  /* __GIMP_BASE_H__ */
diff --git a/libgimpbase/gimpchecks.h b/libgimpbase/gimpchecks.h
index 163f69d..da29167 100644
--- a/libgimpbase/gimpchecks.h
+++ b/libgimpbase/gimpchecks.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CHECKS_H__
 #define __GIMP_CHECKS_H__
 
diff --git a/libgimpbase/gimpcpuaccel.h b/libgimpbase/gimpcpuaccel.h
index a68f19a..2bafa19 100644
--- a/libgimpbase/gimpcpuaccel.h
+++ b/libgimpbase/gimpcpuaccel.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CPU_ACCEL_H__
 #define __GIMP_CPU_ACCEL_H__
 
diff --git a/libgimpbase/gimpdatafiles.h b/libgimpbase/gimpdatafiles.h
index 9a03dac..b35cacf 100644
--- a/libgimpbase/gimpdatafiles.h
+++ b/libgimpbase/gimpdatafiles.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_DATAFILES_H__
 #define __GIMP_DATAFILES_H__
 
diff --git a/libgimpbase/gimpenv.h b/libgimpbase/gimpenv.h
index 114ed57..d9e1e2a 100644
--- a/libgimpbase/gimpenv.h
+++ b/libgimpbase/gimpenv.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMPENV_H__
 #define __GIMPENV_H__
 
diff --git a/libgimpbase/gimplimits.h b/libgimpbase/gimplimits.h
index 1bfd43d..fdc40ad 100644
--- a/libgimpbase/gimplimits.h
+++ b/libgimpbase/gimplimits.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_LIMITS_H__
 #define __GIMP_LIMITS_H__
 
diff --git a/libgimpbase/gimpmemsize.h b/libgimpbase/gimpmemsize.h
index c614543..1fe0d70 100644
--- a/libgimpbase/gimpmemsize.h
+++ b/libgimpbase/gimpmemsize.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_MEMSIZE_H__
 #define __GIMP_MEMSIZE_H__
 
diff --git a/libgimpbase/gimpparasite.h b/libgimpbase/gimpparasite.h
index 48277ab..14cd509 100644
--- a/libgimpbase/gimpparasite.h
+++ b/libgimpbase/gimpparasite.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PARASITE_H__
 #define __GIMP_PARASITE_H__
 
diff --git a/libgimpbase/gimprectangle.h b/libgimpbase/gimprectangle.h
index 715f9a2..c6f34d9 100644
--- a/libgimpbase/gimprectangle.h
+++ b/libgimpbase/gimprectangle.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_RECTANGLE_H__
 #define __GIMP_RECTANGLE_H__
 
diff --git a/libgimpbase/gimpunit.h b/libgimpbase/gimpunit.h
index 1b4db69..2d1860e 100644
--- a/libgimpbase/gimpunit.h
+++ b/libgimpbase/gimpunit.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_UNIT_H__
 #define __GIMP_UNIT_H__
 
diff --git a/libgimpbase/gimputils.h b/libgimpbase/gimputils.h
index f031faf..06e8add 100644
--- a/libgimpbase/gimputils.h
+++ b/libgimpbase/gimputils.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_BASE_H_INSIDE__) && !defined (GIMP_BASE_COMPILATION)
+#error "Only <libgimpbase/gimpbase.h> can be included directly."
+#endif
+
 #ifndef __GIMP_UTILS_H__
 #define __GIMP_UTILS_H__
 
diff --git a/libgimpcolor/Makefile.am b/libgimpcolor/Makefile.am
index ad7b064..eed43a6 100644
--- a/libgimpcolor/Makefile.am
+++ b/libgimpcolor/Makefile.am
@@ -47,7 +47,8 @@ endif
 libgimpcolorincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpcolor
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpColor\"
+	-DG_LOG_DOMAIN=\"LibGimpColor\"	\
+	-DGIMP_COLOR_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)	\
diff --git a/libgimpcolor/gimpadaptivesupersample.h b/libgimpcolor/gimpadaptivesupersample.h
index 893bb0e..ea51495 100644
--- a/libgimpcolor/gimpadaptivesupersample.h
+++ b/libgimpcolor/gimpadaptivesupersample.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ADAPTIVE_SUPERSAMPLE_H__
 #define __GIMP_ADAPTIVE_SUPERSAMPLE_H__
 
diff --git a/libgimpcolor/gimpbilinear.h b/libgimpcolor/gimpbilinear.h
index ecf5830..dea7e7f 100644
--- a/libgimpcolor/gimpbilinear.h
+++ b/libgimpcolor/gimpbilinear.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_BILINEAR_H__
 #define __GIMP_BILINEAR_H__
 
diff --git a/libgimpcolor/gimpcmyk.h b/libgimpcolor/gimpcmyk.h
index b4edc62..2a44c51 100644
--- a/libgimpcolor/gimpcmyk.h
+++ b/libgimpcolor/gimpcmyk.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CMYK_H__
 #define __GIMP_CMYK_H__
 
diff --git a/libgimpcolor/gimpcolor.h b/libgimpcolor/gimpcolor.h
index 61aea7e..a5f339f 100644
--- a/libgimpcolor/gimpcolor.h
+++ b/libgimpcolor/gimpcolor.h
@@ -19,6 +19,7 @@
 #ifndef __GIMP_COLOR_H__
 #define __GIMP_COLOR_H__
 
+#define __GIMP_COLOR_H_INSIDE__
 
 #include <libgimpcolor/gimpcolortypes.h>
 
@@ -31,5 +32,6 @@
 #include <libgimpcolor/gimphsv.h>
 #include <libgimpcolor/gimprgb.h>
 
+#undef __GIMP_COLOR_H_INSIDE__
 
 #endif  /* __GIMP_COLOR_H__ */
diff --git a/libgimpcolor/gimpcolormanaged.h b/libgimpcolor/gimpcolormanaged.h
index 9675501..67b3041 100644
--- a/libgimpcolor/gimpcolormanaged.h
+++ b/libgimpcolor/gimpcolormanaged.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_MANAGED_H__
 #define __GIMP_COLOR_MANAGED_H__
 
diff --git a/libgimpcolor/gimpcolorspace.h b/libgimpcolor/gimpcolorspace.h
index c6fe294..0df630c 100644
--- a/libgimpcolor/gimpcolorspace.h
+++ b/libgimpcolor/gimpcolorspace.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_SPACE_H__
 #define __GIMP_COLOR_SPACE_H__
 
diff --git a/libgimpcolor/gimphsl.h b/libgimpcolor/gimphsl.h
index a302095..81d2e46 100644
--- a/libgimpcolor/gimphsl.h
+++ b/libgimpcolor/gimphsl.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_HSL_H__
 #define __GIMP_HSL_H__
 
diff --git a/libgimpcolor/gimphsv.h b/libgimpcolor/gimphsv.h
index 3c21be9..6e377cf 100644
--- a/libgimpcolor/gimphsv.h
+++ b/libgimpcolor/gimphsv.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_HSV_H__
 #define __GIMP_HSV_H__
 
diff --git a/libgimpcolor/gimprgb.h b/libgimpcolor/gimprgb.h
index 376157f..d618b53 100644
--- a/libgimpcolor/gimprgb.h
+++ b/libgimpcolor/gimprgb.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_COLOR_H_INSIDE__) && !defined (GIMP_COLOR_COMPILATION)
+#error "Only <libgimpcolor/gimpcolor.h> can be included directly."
+#endif
+
 #ifndef __GIMP_RGB_H__
 #define __GIMP_RGB_H__
 
diff --git a/libgimpconfig/Makefile.am b/libgimpconfig/Makefile.am
index c5992f4..f517c04 100644
--- a/libgimpconfig/Makefile.am
+++ b/libgimpconfig/Makefile.am
@@ -44,7 +44,8 @@ endif
 libgimpconfigincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpconfig
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpConfig\"
+	-DG_LOG_DOMAIN=\"LibGimpConfig\"	\
+	-DGIMP_CONFIG_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)	\
@@ -132,7 +133,7 @@ CLEANFILES = $(gen_sources)
 
 $(srcdir)/gimpcolorconfig-enums.c: $(srcdir)/gimpcolorconfig-enums.h $(GIMP_MKENUMS)
 	$(GIMP_MKENUMS) \
-		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"libgimpbase/gimpbasetypes.h\"\n#include \"gimpcolorconfig-enums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
+		--fhead "#include \"config.h\"\n#include <glib-object.h>\n#include \"libgimpbase/gimpbase.h\"\n#include \"gimpcolorconfig-enums.h\"\n#include \"libgimp/libgimp-intl.h\"" \
 		--fprod "\n/* enumerations from \"@filename \" */" \
 		--vhead "GType\n enum_name@_get_type (void)\n{\n  static const G Type@Value values[] =\n  {" \
 		--vprod "    { @VALUENAME@, \"@VALUENAME \", \"@valuenick \" }," \
diff --git a/libgimpconfig/gimpcolorconfig-enums.c b/libgimpconfig/gimpcolorconfig-enums.c
index 49cca78..8fbe9da 100644
--- a/libgimpconfig/gimpcolorconfig-enums.c
+++ b/libgimpconfig/gimpcolorconfig-enums.c
@@ -3,7 +3,7 @@
 
 #include "config.h"
 #include <glib-object.h>
-#include "libgimpbase/gimpbasetypes.h"
+#include "libgimpbase/gimpbase.h"
 #include "gimpcolorconfig-enums.h"
 #include "libgimp/libgimp-intl.h"
 
diff --git a/libgimpconfig/gimpcolorconfig.c b/libgimpconfig/gimpcolorconfig.c
index db53832..eb50a3f 100644
--- a/libgimpconfig/gimpcolorconfig.c
+++ b/libgimpconfig/gimpcolorconfig.c
@@ -23,6 +23,7 @@
 
 #include <glib-object.h>
 
+#include "libgimpbase/gimpbase.h"
 #include "libgimpcolor/gimpcolor.h"
 
 #include "gimpconfigtypes.h"
diff --git a/libgimpconfig/gimpcolorconfig.h b/libgimpconfig/gimpcolorconfig.h
index defd17a..22cf17b 100644
--- a/libgimpconfig/gimpcolorconfig.h
+++ b/libgimpconfig/gimpcolorconfig.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_CONFIG_H__
 #define __GIMP_COLOR_CONFIG_H__
 
diff --git a/libgimpconfig/gimpconfig-deserialize.h b/libgimpconfig/gimpconfig-deserialize.h
index e75135d..51a7f2b 100644
--- a/libgimpconfig/gimpconfig-deserialize.h
+++ b/libgimpconfig/gimpconfig-deserialize.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_DESERIALIZE_H__
 #define __GIMP_CONFIG_DESERIALIZE_H__
 
diff --git a/libgimpconfig/gimpconfig-error.h b/libgimpconfig/gimpconfig-error.h
index aa6dcd1..0b38872 100644
--- a/libgimpconfig/gimpconfig-error.h
+++ b/libgimpconfig/gimpconfig-error.h
@@ -18,6 +18,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_ERROR_H__
 #define __GIMP_CONFIG_ERROR_H__
 
diff --git a/libgimpconfig/gimpconfig-iface.h b/libgimpconfig/gimpconfig-iface.h
index f2cb013..e9ccf0b 100644
--- a/libgimpconfig/gimpconfig-iface.h
+++ b/libgimpconfig/gimpconfig-iface.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_IFACE_H__
 #define __GIMP_CONFIG_IFACE_H__
 
diff --git a/libgimpconfig/gimpconfig-params.h b/libgimpconfig/gimpconfig-params.h
index e1ed04d..c88b393 100644
--- a/libgimpconfig/gimpconfig-params.h
+++ b/libgimpconfig/gimpconfig-params.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_PARAMS_H__
 #define __GIMP_CONFIG_PARAMS_H__
 
diff --git a/libgimpconfig/gimpconfig-path.h b/libgimpconfig/gimpconfig-path.h
index ecc7767..4512e2c 100644
--- a/libgimpconfig/gimpconfig-path.h
+++ b/libgimpconfig/gimpconfig-path.h
@@ -19,10 +19,13 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_PATH_H__
 #define __GIMP_CONFIG_PATH_H__
 
-
 G_BEGIN_DECLS
 
 /* For information look into the C source or the html documentation */
diff --git a/libgimpconfig/gimpconfig-serialize.h b/libgimpconfig/gimpconfig-serialize.h
index 2d0ee62..051328b 100644
--- a/libgimpconfig/gimpconfig-serialize.h
+++ b/libgimpconfig/gimpconfig-serialize.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_SERIALIZE_H__
 #define __GIMP_CONFIG_SERIALIZE_H__
 
diff --git a/libgimpconfig/gimpconfig-utils.h b/libgimpconfig/gimpconfig-utils.h
index 7e1b062..7f5bec8 100644
--- a/libgimpconfig/gimpconfig-utils.h
+++ b/libgimpconfig/gimpconfig-utils.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_UTILS_H__
 #define __GIMP_CONFIG_UTILS_H__
 
diff --git a/libgimpconfig/gimpconfig.h b/libgimpconfig/gimpconfig.h
index 1c0e7c9..d7d91ac 100644
--- a/libgimpconfig/gimpconfig.h
+++ b/libgimpconfig/gimpconfig.h
@@ -19,6 +19,7 @@
 #ifndef __GIMP_CONFIG_H__
 #define __GIMP_CONFIG_H__
 
+#define __GIMP_CONFIG_H_INSIDE__
 
 #include <libgimpconfig/gimpconfigtypes.h>
 
@@ -34,5 +35,6 @@
 
 #include <libgimpconfig/gimpcolorconfig.h>
 
+#undef __GIMP_CONFIG_H_INSIDE__
 
 #endif  /* __GIMP_CONFIG_H__ */
diff --git a/libgimpconfig/gimpconfigwriter.h b/libgimpconfig/gimpconfigwriter.h
index ba34787..801ec52 100644
--- a/libgimpconfig/gimpconfigwriter.h
+++ b/libgimpconfig/gimpconfigwriter.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CONFIG_WRITER_H__
 #define __GIMP_CONFIG_WRITER_H__
 
diff --git a/libgimpconfig/gimpscanner.h b/libgimpconfig/gimpscanner.h
index 6f7511e..8dc2690 100644
--- a/libgimpconfig/gimpscanner.h
+++ b/libgimpconfig/gimpscanner.h
@@ -20,6 +20,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_CONFIG_H_INSIDE__) && !defined (GIMP_CONFIG_COMPILATION)
+#error "Only <libgimpconfig/gimpconfig.h> can be included directly."
+#endif
+
 #ifndef __GIMP_SCANNER_H__
 #define __GIMP_SCANNER_H__
 
diff --git a/libgimpmath/Makefile.am b/libgimpmath/Makefile.am
index 92e123d..c97127a 100644
--- a/libgimpmath/Makefile.am
+++ b/libgimpmath/Makefile.am
@@ -47,7 +47,8 @@ endif
 libgimpmathincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpmath
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpMath\"
+	-DG_LOG_DOMAIN=\"LibGimpMath\"	\
+	-DGIMP_MATH_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)	\
diff --git a/libgimpmath/gimpmath.h b/libgimpmath/gimpmath.h
index f96a142..843f580 100644
--- a/libgimpmath/gimpmath.h
+++ b/libgimpmath/gimpmath.h
@@ -21,6 +21,7 @@
 #ifndef __GIMP_MATH_H__
 #define __GIMP_MATH_H__
 
+
 #include <math.h>
 
 #ifdef HAVE_IEEEFP_H
@@ -31,12 +32,17 @@
 #include <float.h>
 #endif
 
+#define __GIMP_MATH_H_INSIDE__
+
 #include <libgimpmath/gimpmathtypes.h>
 
 #include <libgimpmath/gimpmatrix.h>
 #include <libgimpmath/gimpmd5.h>
 #include <libgimpmath/gimpvector.h>
 
+#undef __GIMP_MATH_H_INSIDE__
+
+
 G_BEGIN_DECLS
 
 
diff --git a/libgimpmath/gimpmatrix.h b/libgimpmath/gimpmatrix.h
index a2c0e41..1d18b7f 100644
--- a/libgimpmath/gimpmatrix.h
+++ b/libgimpmath/gimpmatrix.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_MATH_H_INSIDE__) && !defined (GIMP_MATH_COMPILATION)
+#error "Only <libgimpmath/gimpmath.h> can be included directly."
+#endif
+
 #ifndef __GIMP_MATRIX_H__
 #define __GIMP_MATRIX_H__
 
diff --git a/libgimpmath/gimpmd5.h b/libgimpmath/gimpmd5.h
index 389c670..0c22d63 100644
--- a/libgimpmath/gimpmd5.h
+++ b/libgimpmath/gimpmd5.h
@@ -5,6 +5,10 @@
  * Use of this code is deprecated! Use %GChecksum from GLib instead.
  */
 
+#if !defined (__GIMP_MATH_H_INSIDE__) && !defined (GIMP_MATH_COMPILATION)
+#error "Only <libgimpmath/gimpmath.h> can be included directly."
+#endif
+
 #ifndef __GIMP_MD5_H__
 #define __GIMP_MD5_H__
 
diff --git a/libgimpmath/gimpvector.h b/libgimpmath/gimpvector.h
index 3a719a6..c950576 100644
--- a/libgimpmath/gimpvector.h
+++ b/libgimpmath/gimpvector.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_MATH_H_INSIDE__) && !defined (GIMP_MATH_COMPILATION)
+#error "Only <libgimpmath/gimpmath.h> can be included directly."
+#endif
+
 #ifndef __GIMP_VECTOR_H__
 #define __GIMP_VECTOR_H__
 
diff --git a/libgimpmodule/Makefile.am b/libgimpmodule/Makefile.am
index 12560bf..cdee2c4 100644
--- a/libgimpmodule/Makefile.am
+++ b/libgimpmodule/Makefile.am
@@ -42,7 +42,8 @@ endif
 libgimpmoduleincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpmodule
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpModule\"
+	-DG_LOG_DOMAIN=\"LibGimpModule\"	\
+	-DGIMP_MODULE_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)			\
diff --git a/libgimpmodule/gimpmodule.h b/libgimpmodule/gimpmodule.h
index bf6b9b9..ed8cddb 100644
--- a/libgimpmodule/gimpmodule.h
+++ b/libgimpmodule/gimpmodule.h
@@ -24,10 +24,14 @@
 
 #include <gmodule.h>
 
+#define __GIMP_MODULE_H_INSIDE__
+
 #include <libgimpmodule/gimpmoduletypes.h>
 
 #include <libgimpmodule/gimpmoduledb.h>
 
+#undef __GIMP_MODULE_H_INSIDE__
+
 G_BEGIN_DECLS
 
 
diff --git a/libgimpmodule/gimpmoduledb.h b/libgimpmodule/gimpmoduledb.h
index aa75d7d..ac9dc8a 100644
--- a/libgimpmodule/gimpmoduledb.h
+++ b/libgimpmodule/gimpmoduledb.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_MODULE_H_INSIDE__) && !defined (GIMP_MODULE_COMPILATION)
+#error "Only <libgimpmodule/gimpmodule.h> can be included directly."
+#endif
+
 #ifndef __GIMP_MODULE_DB_H__
 #define __GIMP_MODULE_DB_H__
 
diff --git a/libgimpthumb/Makefile.am b/libgimpthumb/Makefile.am
index 98acd24..2b07c0b 100644
--- a/libgimpthumb/Makefile.am
+++ b/libgimpthumb/Makefile.am
@@ -40,7 +40,8 @@ endif
 libgimpthumbincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpthumb
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpThumb\"
+	-DG_LOG_DOMAIN=\"LibGimpThumb\"	\
+	-DGIMP_THUMB_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)		\
diff --git a/libgimpthumb/gimpthumb-error.h b/libgimpthumb/gimpthumb-error.h
index 69e718e..2d873ef 100644
--- a/libgimpthumb/gimpthumb-error.h
+++ b/libgimpthumb/gimpthumb-error.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION)
+#error "Only <libgimpthumb/gimpthumb.h> can be included directly."
+#endif
+
 #ifndef __GIMP_THUMB_ERROR_H__
 #define __GIMP_THUMB_ERROR_H__
 
diff --git a/libgimpthumb/gimpthumb-utils.h b/libgimpthumb/gimpthumb-utils.h
index 810fe59..300ef9e 100644
--- a/libgimpthumb/gimpthumb-utils.h
+++ b/libgimpthumb/gimpthumb-utils.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION)
+#error "Only <libgimpthumb/gimpthumb.h> can be included directly."
+#endif
+
 #ifndef __GIMP_THUMB_UTILS_H__
 #define __GIMP_THUMB_UTILS_H__
 
diff --git a/libgimpthumb/gimpthumb.h b/libgimpthumb/gimpthumb.h
index c91ab04..9eb804c 100644
--- a/libgimpthumb/gimpthumb.h
+++ b/libgimpthumb/gimpthumb.h
@@ -25,11 +25,14 @@
 #ifndef __GIMP_THUMB_H__
 #define __GIMP_THUMB_H__
 
+#define __GIMP_THUMB_H_INSIDE__
 
-#include <libgimpthumb/gimpthumb-error.h>
 #include <libgimpthumb/gimpthumb-types.h>
+
+#include <libgimpthumb/gimpthumb-error.h>
 #include <libgimpthumb/gimpthumb-utils.h>
 #include <libgimpthumb/gimpthumbnail.h>
 
+#undef __GIMP_THUMB_H_INSIDE__
 
 #endif /* __GIMP_THUMB_H__ */
diff --git a/libgimpthumb/gimpthumbnail.h b/libgimpthumb/gimpthumbnail.h
index cc957a1..c3fecc0 100644
--- a/libgimpthumb/gimpthumbnail.h
+++ b/libgimpthumb/gimpthumbnail.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_THUMB_H_INSIDE__) && !defined (GIMP_THUMB_COMPILATION)
+#error "Only <libgimpthumb/gimpthumb.h> can be included directly."
+#endif
+
 #ifndef __GIMP_THUMBNAIL_H__
 #define __GIMP_THUMBNAIL_H__
 
diff --git a/libgimpwidgets/Makefile.am b/libgimpwidgets/Makefile.am
index 8b013e3..a1aac9e 100644
--- a/libgimpwidgets/Makefile.am
+++ b/libgimpwidgets/Makefile.am
@@ -49,7 +49,8 @@ endif
 libgimpwidgetsincludedir = $(includedir)/gimp-$(GIMP_API_VERSION)/libgimpwidgets
 
 AM_CPPFLAGS = \
-	-DG_LOG_DOMAIN=\"LibGimpWidgets\"
+	-DG_LOG_DOMAIN=\"LibGimpWidgets\"	\
+	-DGIMP_WIDGETS_COMPILATION
 
 INCLUDES = \
 	-I$(top_srcdir)	\
diff --git a/libgimpwidgets/gimpbrowser.h b/libgimpwidgets/gimpbrowser.h
index 1ca5576..0837aa6 100644
--- a/libgimpwidgets/gimpbrowser.h
+++ b/libgimpwidgets/gimpbrowser.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_BROWSER_H__
 #define __GIMP_BROWSER_H__
 
diff --git a/libgimpwidgets/gimpbutton.h b/libgimpwidgets/gimpbutton.h
index 4df78b1..933eeba 100644
--- a/libgimpwidgets/gimpbutton.h
+++ b/libgimpwidgets/gimpbutton.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_BUTTON_H__
 #define __GIMP_BUTTON_H__
 
diff --git a/libgimpwidgets/gimpcairo-utils.h b/libgimpwidgets/gimpcairo-utils.h
index b538c2d..1b896a4 100644
--- a/libgimpwidgets/gimpcairo-utils.h
+++ b/libgimpwidgets/gimpcairo-utils.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CAIRO_UTILS_H__
 #define __GIMP_CAIRO_UTILS_H__
 
diff --git a/libgimpwidgets/gimpcellrenderercolor.h b/libgimpwidgets/gimpcellrenderercolor.h
index f8b13ea..a8820ae 100644
--- a/libgimpwidgets/gimpcellrenderercolor.h
+++ b/libgimpwidgets/gimpcellrenderercolor.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CELL_RENDERER_COLOR_H__
 #define __GIMP_CELL_RENDERER_COLOR_H__
 
diff --git a/libgimpwidgets/gimpcellrenderertoggle.h b/libgimpwidgets/gimpcellrenderertoggle.h
index c337922..333be20 100644
--- a/libgimpwidgets/gimpcellrenderertoggle.h
+++ b/libgimpwidgets/gimpcellrenderertoggle.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CELL_RENDERER_TOGGLE_H__
 #define __GIMP_CELL_RENDERER_TOGGLE_H__
 
diff --git a/libgimpwidgets/gimpchainbutton.h b/libgimpwidgets/gimpchainbutton.h
index 6976e94..a74a40a 100644
--- a/libgimpwidgets/gimpchainbutton.h
+++ b/libgimpwidgets/gimpchainbutton.h
@@ -27,6 +27,10 @@
  * provides.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_CHAIN_BUTTON_H__
 #define __GIMP_CHAIN_BUTTON_H__
 
diff --git a/libgimpwidgets/gimpcolorarea.h b/libgimpwidgets/gimpcolorarea.h
index 1e240c2..beaf101 100644
--- a/libgimpwidgets/gimpcolorarea.h
+++ b/libgimpwidgets/gimpcolorarea.h
@@ -24,6 +24,10 @@
  * handles drag'n'drop.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_AREA_H__
 #define __GIMP_COLOR_AREA_H__
 
diff --git a/libgimpwidgets/gimpcolorbutton.h b/libgimpwidgets/gimpcolorbutton.h
index 3db5c04..10fe9d7 100644
--- a/libgimpwidgets/gimpcolorbutton.h
+++ b/libgimpwidgets/gimpcolorbutton.h
@@ -25,6 +25,10 @@
  * fully functional wired to the preview button.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_BUTTON_H__
 #define __GIMP_COLOR_BUTTON_H__
 
diff --git a/libgimpwidgets/gimpcolordisplay.h b/libgimpwidgets/gimpcolordisplay.h
index 9b6a806..4282391 100644
--- a/libgimpwidgets/gimpcolordisplay.h
+++ b/libgimpwidgets/gimpcolordisplay.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_DISPLAY_H__
 #define __GIMP_COLOR_DISPLAY_H__
 
diff --git a/libgimpwidgets/gimpcolordisplaystack.h b/libgimpwidgets/gimpcolordisplaystack.h
index d561cdd..6bd1a9a 100644
--- a/libgimpwidgets/gimpcolordisplaystack.h
+++ b/libgimpwidgets/gimpcolordisplaystack.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_DISPLAY_STACK_H__
 #define __GIMP_COLOR_DISPLAY_STACK_H__
 
diff --git a/libgimpwidgets/gimpcolorhexentry.h b/libgimpwidgets/gimpcolorhexentry.h
index 8d5a5a6..9f6ff1d 100644
--- a/libgimpwidgets/gimpcolorhexentry.h
+++ b/libgimpwidgets/gimpcolorhexentry.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_HEX_ENTRY_H__
 #define __GIMP_COLOR_HEX_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpcolornotebook.h b/libgimpwidgets/gimpcolornotebook.h
index a48fa22..97c247b 100644
--- a/libgimpwidgets/gimpcolornotebook.h
+++ b/libgimpwidgets/gimpcolornotebook.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_NOTEBOOK_H__
 #define __GIMP_COLOR_NOTEBOOK_H__
 
diff --git a/libgimpwidgets/gimpcolorprofilecombobox.h b/libgimpwidgets/gimpcolorprofilecombobox.h
index 9e27db6..aaa448f 100644
--- a/libgimpwidgets/gimpcolorprofilecombobox.h
+++ b/libgimpwidgets/gimpcolorprofilecombobox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_PROFILE_COMBO_BOX_H__
 #define __GIMP_COLOR_PROFILE_COMBO_BOX_H__
 
diff --git a/libgimpwidgets/gimpcolorprofilestore.h b/libgimpwidgets/gimpcolorprofilestore.h
index c15e6f4..ce39a8d 100644
--- a/libgimpwidgets/gimpcolorprofilestore.h
+++ b/libgimpwidgets/gimpcolorprofilestore.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_PROFILE_STORE_H__
 #define __GIMP_COLOR_PROFILE_STORE_H__
 
diff --git a/libgimpwidgets/gimpcolorscale.h b/libgimpwidgets/gimpcolorscale.h
index 7358480..7c85dc5 100644
--- a/libgimpwidgets/gimpcolorscale.h
+++ b/libgimpwidgets/gimpcolorscale.h
@@ -20,10 +20,9 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-/* This provides a color preview area. The preview
- * can handle transparency by showing the checkerboard and
- * handles drag'n'drop.
- */
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
 
 #ifndef __GIMP_COLOR_SCALE_H__
 #define __GIMP_COLOR_SCALE_H__
diff --git a/libgimpwidgets/gimpcolorscales.h b/libgimpwidgets/gimpcolorscales.h
index cc1a13d..a40cbc4 100644
--- a/libgimpwidgets/gimpcolorscales.h
+++ b/libgimpwidgets/gimpcolorscales.h
@@ -22,6 +22,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_SCALES_H__
 #define __GIMP_COLOR_SCALES_H__
 
diff --git a/libgimpwidgets/gimpcolorselection.h b/libgimpwidgets/gimpcolorselection.h
index 5349241..045a990 100644
--- a/libgimpwidgets/gimpcolorselection.h
+++ b/libgimpwidgets/gimpcolorselection.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_SELECTION_H__
 #define __GIMP_COLOR_SELECTION_H__
 
diff --git a/libgimpwidgets/gimpcolorselector.h b/libgimpwidgets/gimpcolorselector.h
index 338a549..2490d23 100644
--- a/libgimpwidgets/gimpcolorselector.h
+++ b/libgimpwidgets/gimpcolorselector.h
@@ -23,6 +23,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_COLOR_SELECTOR_H__
 #define __GIMP_COLOR_SELECTOR_H__
 
diff --git a/libgimpwidgets/gimpdialog.h b/libgimpwidgets/gimpdialog.h
index a5573ff..8183f47 100644
--- a/libgimpwidgets/gimpdialog.h
+++ b/libgimpwidgets/gimpdialog.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_DIALOG_H__
 #define __GIMP_DIALOG_H__
 
diff --git a/libgimpwidgets/gimpenumcombobox.h b/libgimpwidgets/gimpenumcombobox.h
index 33b5a80..62379b8 100644
--- a/libgimpwidgets/gimpenumcombobox.h
+++ b/libgimpwidgets/gimpenumcombobox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ENUM_COMBO_BOX_H__
 #define __GIMP_ENUM_COMBO_BOX_H__
 
diff --git a/libgimpwidgets/gimpenumlabel.h b/libgimpwidgets/gimpenumlabel.h
index 01b2b34..9469017 100644
--- a/libgimpwidgets/gimpenumlabel.h
+++ b/libgimpwidgets/gimpenumlabel.h
@@ -19,11 +19,16 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ENUM__LABEL_H__
 #define __GIMP_ENUM__LABEL_H__
 
 G_BEGIN_DECLS
 
+
 #define GIMP_TYPE_ENUM_LABEL            (gimp_enum_label_get_type ())
 #define GIMP_ENUM_LABEL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_ENUM_LABEL, GimpEnumLabel))
 #define GIMP_ENUM_LABEL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_ENUM_LABEL, GimpEnumLabelClass))
@@ -55,6 +60,7 @@ GtkWidget * gimp_enum_label_new              (GType          enum_type,
 void        gimp_enum_label_set_value        (GimpEnumLabel *label,
                                               gint           value);
 
+
 G_END_DECLS
 
 #endif  /* __GIMP_ENUM_LABEL_H__ */
diff --git a/libgimpwidgets/gimpenumstore.h b/libgimpwidgets/gimpenumstore.h
index e6674c0..bd7dfe0 100644
--- a/libgimpwidgets/gimpenumstore.h
+++ b/libgimpwidgets/gimpenumstore.h
@@ -19,11 +19,16 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ENUM_STORE_H__
 #define __GIMP_ENUM_STORE_H__
 
 #include <libgimpwidgets/gimpintstore.h>
 
+
 G_BEGIN_DECLS
 
 #define GIMP_TYPE_ENUM_STORE            (gimp_enum_store_get_type ())
diff --git a/libgimpwidgets/gimpenumwidgets.h b/libgimpwidgets/gimpenumwidgets.h
index 4a4bf4e..962c696 100644
--- a/libgimpwidgets/gimpenumwidgets.h
+++ b/libgimpwidgets/gimpenumwidgets.h
@@ -19,11 +19,16 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ENUM_WIDGETS_H__
 #define __GIMP_ENUM_WIDGETS_H__
 
 G_BEGIN_DECLS
 
+
 GtkWidget * gimp_enum_radio_box_new               (GType         enum_type,
                                                    GCallback     callback,
                                                    gpointer      callback_data,
@@ -67,6 +72,7 @@ void        gimp_enum_stock_box_set_child_padding (GtkWidget    *stock_box,
                                                    gint          xpad,
                                                    gint          ypad);
 
+
 G_END_DECLS
 
 #endif  /* __GIMP_ENUM_WIDGETS_H__ */
diff --git a/libgimpwidgets/gimpfileentry.h b/libgimpwidgets/gimpfileentry.h
index 589f9c6..04ac920 100644
--- a/libgimpwidgets/gimpfileentry.h
+++ b/libgimpwidgets/gimpfileentry.h
@@ -21,6 +21,10 @@
 
 #ifndef GIMP_DISABLE_DEPRECATED
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_FILE_ENTRY_H__
 #define __GIMP_FILE_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpframe.h b/libgimpwidgets/gimpframe.h
index ea701f5..61cb59b 100644
--- a/libgimpwidgets/gimpframe.h
+++ b/libgimpwidgets/gimpframe.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_FRAME_H__
 #define __GIMP_FRAME_H__
 
diff --git a/libgimpwidgets/gimphelpui.h b/libgimpwidgets/gimphelpui.h
index f01f272..c77096f 100644
--- a/libgimpwidgets/gimphelpui.h
+++ b/libgimpwidgets/gimphelpui.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_HELP_UI_H__
 #define __GIMP_HELP_UI_H__
 
diff --git a/libgimpwidgets/gimphintbox.h b/libgimpwidgets/gimphintbox.h
index 601d4c2..d6978cb 100644
--- a/libgimpwidgets/gimphintbox.h
+++ b/libgimpwidgets/gimphintbox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_HINT_BOX_H__
 #define __GIMP_HINT_BOX_H__
 
diff --git a/libgimpwidgets/gimpintcombobox.h b/libgimpwidgets/gimpintcombobox.h
index f3a3be2..c338ffa 100644
--- a/libgimpwidgets/gimpintcombobox.h
+++ b/libgimpwidgets/gimpintcombobox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_INT_COMBO_BOX_H__
 #define __GIMP_INT_COMBO_BOX_H__
 
diff --git a/libgimpwidgets/gimpintstore.h b/libgimpwidgets/gimpintstore.h
index 567fb72..9cdec4c 100644
--- a/libgimpwidgets/gimpintstore.h
+++ b/libgimpwidgets/gimpintstore.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_INT_STORE_H__
 #define __GIMP_INT_STORE_H__
 
diff --git a/libgimpwidgets/gimpmemsizeentry.h b/libgimpwidgets/gimpmemsizeentry.h
index 6475724..25a681d 100644
--- a/libgimpwidgets/gimpmemsizeentry.h
+++ b/libgimpwidgets/gimpmemsizeentry.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_MEMSIZE_ENTRY_H__
 #define __GIMP_MEMSIZE_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpnumberpairentry.h b/libgimpwidgets/gimpnumberpairentry.h
index d20c8be..caa070d 100644
--- a/libgimpwidgets/gimpnumberpairentry.h
+++ b/libgimpwidgets/gimpnumberpairentry.h
@@ -21,6 +21,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_NUMBER_PAIR_ENTRY_H__
 #define __GIMP_NUMBER_PAIR_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpoffsetarea.h b/libgimpwidgets/gimpoffsetarea.h
index 561d23d..a33960c 100644
--- a/libgimpwidgets/gimpoffsetarea.h
+++ b/libgimpwidgets/gimpoffsetarea.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_OFFSET_AREA_H__
 #define __GIMP_OFFSET_AREA_H__
 
diff --git a/libgimpwidgets/gimpoldwidgets.h b/libgimpwidgets/gimpoldwidgets.h
index 8ac805a..83c2ea5 100644
--- a/libgimpwidgets/gimpoldwidgets.h
+++ b/libgimpwidgets/gimpoldwidgets.h
@@ -19,18 +19,22 @@
  * <http://www.gnu.org/licenses/>.
  */
 
-#ifndef __GIMP_OLD_WIDGETS_H__
-#define __GIMP_OLD_WIDGETS_H__
-
 /*  These functions are deprecated and should not be used in newly
  *  written code.
  */
 
 #ifndef GIMP_DISABLE_DEPRECATED
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
+#ifndef __GIMP_OLD_WIDGETS_H__
+#define __GIMP_OLD_WIDGETS_H__
 
 G_BEGIN_DECLS
 
+
 /*
  *  Widget Constructors
  */
@@ -96,9 +100,9 @@ void  gimp_option_menu_set_sensitive (GtkOptionMenu    *option_menu,
 void gimp_menu_item_update           (GtkWidget        *widget,
                                       gpointer          data);
 
+
 G_END_DECLS
 
+#endif /* __GIMP_OLD_WIDGETS_H__ */
 
 #endif /*  GIMP_DISABLE_DEPRECATED  */
-
-#endif /* __GIMP_OLD_WIDGETS_H__ */
diff --git a/libgimpwidgets/gimppageselector.h b/libgimpwidgets/gimppageselector.h
index 6fc9c93..66f87d6 100644
--- a/libgimpwidgets/gimppageselector.h
+++ b/libgimpwidgets/gimppageselector.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PAGE_SELECTOR_H__
 #define __GIMP_PAGE_SELECTOR_H__
 
diff --git a/libgimpwidgets/gimppatheditor.h b/libgimpwidgets/gimppatheditor.h
index ee14774..2bff48f 100644
--- a/libgimpwidgets/gimppatheditor.h
+++ b/libgimpwidgets/gimppatheditor.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PATH_EDITOR_H__
 #define __GIMP_PATH_EDITOR_H__
 
diff --git a/libgimpwidgets/gimppickbutton.h b/libgimpwidgets/gimppickbutton.h
index 4743d5b..45b3035 100644
--- a/libgimpwidgets/gimppickbutton.h
+++ b/libgimpwidgets/gimppickbutton.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PICK_BUTTON_H__
 #define __GIMP_PICK_BUTTON_H__
 
diff --git a/libgimpwidgets/gimppixmap.h b/libgimpwidgets/gimppixmap.h
index 13b96f3..4db78ed 100644
--- a/libgimpwidgets/gimppixmap.h
+++ b/libgimpwidgets/gimppixmap.h
@@ -21,6 +21,10 @@
 
 #ifndef GIMP_DISABLE_DEPRECATED
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PIXMAP_H__
 #define __GIMP_PIXMAP_H__
 
diff --git a/libgimpwidgets/gimppreview.h b/libgimpwidgets/gimppreview.h
index 0d10fe6..031b592 100644
--- a/libgimpwidgets/gimppreview.h
+++ b/libgimpwidgets/gimppreview.h
@@ -18,6 +18,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PREVIEW_H__
 #define __GIMP_PREVIEW_H__
 
diff --git a/libgimpwidgets/gimppreviewarea.h b/libgimpwidgets/gimppreviewarea.h
index 8b2873e..4d6b440 100644
--- a/libgimpwidgets/gimppreviewarea.h
+++ b/libgimpwidgets/gimppreviewarea.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PREVIEW_AREA_H__
 #define __GIMP_PREVIEW_AREA_H__
 
diff --git a/libgimpwidgets/gimppropwidgets.h b/libgimpwidgets/gimppropwidgets.h
index 50cfd75..18b7d30 100644
--- a/libgimpwidgets/gimppropwidgets.h
+++ b/libgimpwidgets/gimppropwidgets.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_PROP_WIDGETS_H__
 #define __GIMP_PROP_WIDGETS_H__
 
diff --git a/libgimpwidgets/gimpquerybox.h b/libgimpwidgets/gimpquerybox.h
index f5bda6d..a62a241 100644
--- a/libgimpwidgets/gimpquerybox.h
+++ b/libgimpwidgets/gimpquerybox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_QUERY_BOX_H__
 #define __GIMP_QUERY_BOX_H__
 
diff --git a/libgimpwidgets/gimpruler.h b/libgimpwidgets/gimpruler.h
index 05f8db6..6ae8355 100644
--- a/libgimpwidgets/gimpruler.h
+++ b/libgimpwidgets/gimpruler.h
@@ -16,6 +16,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_RULER_H__
 #define __GIMP_RULER_H__
 
diff --git a/libgimpwidgets/gimpscaleentry.h b/libgimpwidgets/gimpscaleentry.h
index 3ef65f6..18ef244 100644
--- a/libgimpwidgets/gimpscaleentry.h
+++ b/libgimpwidgets/gimpscaleentry.h
@@ -20,6 +20,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_SCALE_ENTRY_H__
 #define __GIMP_SCALE_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpscrolledpreview.h b/libgimpwidgets/gimpscrolledpreview.h
index 3c69e87..a184a92 100644
--- a/libgimpwidgets/gimpscrolledpreview.h
+++ b/libgimpwidgets/gimpscrolledpreview.h
@@ -18,6 +18,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_SCROLLED_PREVIEW_H__
 #define __GIMP_SCROLLED_PREVIEW_H__
 
diff --git a/libgimpwidgets/gimpsizeentry.h b/libgimpwidgets/gimpsizeentry.h
index 8b687e5..1636834 100644
--- a/libgimpwidgets/gimpsizeentry.h
+++ b/libgimpwidgets/gimpsizeentry.h
@@ -20,6 +20,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_SIZE_ENTRY_H__
 #define __GIMP_SIZE_ENTRY_H__
 
diff --git a/libgimpwidgets/gimpstock.h b/libgimpwidgets/gimpstock.h
index deb9499..cdb4423 100644
--- a/libgimpwidgets/gimpstock.h
+++ b/libgimpwidgets/gimpstock.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_STOCK_H__
 #define __GIMP_STOCK_H__
 
diff --git a/libgimpwidgets/gimpstringcombobox.h b/libgimpwidgets/gimpstringcombobox.h
index 9d5dc5d..298f10e 100644
--- a/libgimpwidgets/gimpstringcombobox.h
+++ b/libgimpwidgets/gimpstringcombobox.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_STRING_COMBO_BOX_H__
 #define __GIMP_STRING_COMBO_BOX_H__
 
diff --git a/libgimpwidgets/gimpunitcombobox.h b/libgimpwidgets/gimpunitcombobox.h
index bafdfe3..29c064d 100644
--- a/libgimpwidgets/gimpunitcombobox.h
+++ b/libgimpwidgets/gimpunitcombobox.h
@@ -19,9 +19,15 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_UNIT_COMBO_BOX_H__
 #define __GIMP_UNIT_COMBO_BOX_H__
 
+G_BEGIN_DECLS
+
 
 #define GIMP_TYPE_UNIT_COMBO_BOX            (gimp_unit_combo_box_get_type ())
 #define GIMP_UNIT_COMBO_BOX(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_UNIT_COMBO_BOX, GimpUnitComboBox))
@@ -60,4 +66,6 @@ void        gimp_unit_combo_box_set_active     (GimpUnitComboBox *combo,
                                                 GimpUnit          unit);
 
 
+G_END_DECLS
+
 #endif  /* __GIMP_UNIT_COMBO_BOX_H__ */
diff --git a/libgimpwidgets/gimpunitmenu.h b/libgimpwidgets/gimpunitmenu.h
index 14ae7cd..cb33f79 100644
--- a/libgimpwidgets/gimpunitmenu.h
+++ b/libgimpwidgets/gimpunitmenu.h
@@ -21,6 +21,10 @@
 
 #ifndef GIMP_DISABLE_DEPRECATED
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_UNIT_MENU_H__
 #define __GIMP_UNIT_MENU_H__
 
diff --git a/libgimpwidgets/gimpunitstore.h b/libgimpwidgets/gimpunitstore.h
index 73f89a0..f02f188 100644
--- a/libgimpwidgets/gimpunitstore.h
+++ b/libgimpwidgets/gimpunitstore.h
@@ -19,9 +19,15 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_UNIT_STORE_H__
 #define __GIMP_UNIT_STORE_H__
 
+G_BEGIN_DECLS
+
 
 enum
 {
@@ -100,4 +106,6 @@ void            gimp_unit_store_get_values       (GimpUnitStore *store,
                                                   ...);
 
 
+G_END_DECLS
+
 #endif  /* __GIMP_UNIT_STORE_H__ */
diff --git a/libgimpwidgets/gimpwidgets-error.h b/libgimpwidgets/gimpwidgets-error.h
index 27a22a3..5322f7e 100644
--- a/libgimpwidgets/gimpwidgets-error.h
+++ b/libgimpwidgets/gimpwidgets-error.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_WIDGETS_ERROR_H__
 #define __GIMP_WIDGETS_ERROR_H__
 
diff --git a/libgimpwidgets/gimpwidgets.h b/libgimpwidgets/gimpwidgets.h
index 396ed19..f1059b3 100644
--- a/libgimpwidgets/gimpwidgets.h
+++ b/libgimpwidgets/gimpwidgets.h
@@ -22,6 +22,7 @@
 #ifndef __GIMP_WIDGETS_H__
 #define __GIMP_WIDGETS_H__
 
+#define __GIMP_WIDGETS_H_INSIDE__
 
 #include <libgimpwidgets/gimpwidgetstypes.h>
 
@@ -80,6 +81,7 @@
 
 #include <libgimpwidgets/gimpoldwidgets.h>
 
+#undef __GIMP_WIDGETS_H_INSIDE__
 
 G_BEGIN_DECLS
 
diff --git a/libgimpwidgets/gimpzoommodel.h b/libgimpwidgets/gimpzoommodel.h
index 85b253f..2a8577b 100644
--- a/libgimpwidgets/gimpzoommodel.h
+++ b/libgimpwidgets/gimpzoommodel.h
@@ -19,6 +19,10 @@
  * <http://www.gnu.org/licenses/>.
  */
 
+#if !defined (__GIMP_WIDGETS_H_INSIDE__) && !defined (GIMP_WIDGETS_COMPILATION)
+#error "Only <libgimpwidgets/gimpwidgets.h> can be included directly."
+#endif
+
 #ifndef __GIMP_ZOOM_MODEL_H__
 #define __GIMP_ZOOM_MODEL_H__
 



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