Commit 844df2b4 authored by Michael Natterer's avatar Michael Natterer

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.
parent ee03177b
......@@ -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__
......
......@@ -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) \
......
......@@ -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__ */
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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) \
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__ */
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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@\" }," \
......
......@@ -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"
......
......@@ -23,6 +23,7 @@
#include <glib-object.h>
#include "libgimpbase/gimpbase.h"
#include "libgimpcolor/gimpcolor.h"
#include "gimpconfigtypes.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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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 */
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__ */
......@@ -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__
......
......@@ -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__
......
......@@ -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) \
......
......@@ -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
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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) \
......
......@@ -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
......
......@@ -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__
......
......@@ -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) \
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__ */
......@@ -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__
......
......@@ -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) \
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__
......
......@@ -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__