diff --git a/ChangeLog b/ChangeLog index 70687d7001..372958790e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2008-01-16 Michael Natterer + + Fix gegl types and includes so we can include operations from + app/gegl in other gimp files (needed soon): + + * app/gegl/gegl/gegl-types.h: not copied from gegl any longer. + Now contains only two typedefs needed by the copied operation + headers. + + * app/gegl/gegl-types.h: include above types file. + + * app/gegl/gimp-gegl.c + * app/gegl/gimpoperationcolorbalance.c + * app/gegl/gimpoperationcolorize.c + * app/gegl/gimpoperationdesaturate.c + * app/gegl/gimpoperationhuesaturation.c + * app/gegl/gimpoperationlevels.c + * app/gegl/gimpoperationposterize.c + * app/gegl/gimpoperationthreshold.c + * app/gegl/gimpoperationtilesink.c + * app/gegl/gimpoperationtilesource.c: include only and + "gegl-types.h" from this directory, which is much more gimpish + now. Include "gegl/buffer/gegl-buffer.h" in the source and sink + operations. + + * app/tools/gimpimagemaptool.h: warn about inclusion of + only if it hasn't been included before, so it only warns in the + files where we still have to address this issue. + 2008-01-16 Sven Neumann * app/display/gimpdisplayshell-callbacks.c diff --git a/app/gegl/gegl-types.h b/app/gegl/gegl-types.h index 30b3212328..6b36a78d93 100644 --- a/app/gegl/gegl-types.h +++ b/app/gegl/gegl-types.h @@ -18,11 +18,12 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __OUR_GEGL_TYPES_H__ -#define __OUR_GEGL_TYPES_H__ +#ifndef __GEGL_TYPES_H__ +#define __GEGL_TYPES_H__ #include "base/base-types.h" +#include "gegl/gegl-types.h" typedef struct _GimpOperationColorBalance GimpOperationColorBalance; @@ -36,4 +37,4 @@ typedef struct _GimpOperationTileSink GimpOperationTileSink; typedef struct _GimpOperationTileSource GimpOperationTileSource; -#endif /* __OUR_GEGL_TYPES_H__ */ +#endif /* __GEGL_TYPES_H__ */ diff --git a/app/gegl/gegl/gegl-types.h b/app/gegl/gegl/gegl-types.h index 42665020b4..ad0e1ecdfa 100644 --- a/app/gegl/gegl/gegl-types.h +++ b/app/gegl/gegl/gegl-types.h @@ -1,72 +1,30 @@ -/* This file is part of GEGL +/* GIMP - The GNU Image Manipulation Program + * Copyright (C) 1995 Spencer Kimball and Peter Mattis * - * GEGL is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. * - * GEGL is distributed in the hope that it will be useful, + * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. * - * You should have received a copy of the GNU Lesser General Public - * License along with GEGL; if not, see . - * - * Copyright 2003 Calvin Williamson - * 2006 Øyvind Kolås + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -#ifndef __GEGL_TYPES_H__ -#define __GEGL_TYPES_H__ +#ifndef __UGLY_GEGL_TYPES_H__ +#define __UGLY_GEGL_TYPES_H__ -G_BEGIN_DECLS -typedef struct _GeglConnection GeglConnection; -typedef struct _GeglColor GeglColor; -typedef struct _GeglCurve GeglCurve; -typedef struct _GeglCRVisitor GeglCRVisitor; -typedef struct _GeglDebugRectVisitor GeglDebugRectVisitor; -typedef struct _GeglEvalMgr GeglEvalMgr; -typedef struct _GeglEvalVisitor GeglEvalVisitor; -typedef struct _GeglFinishVisitor GeglFinishVisitor; -typedef struct _GeglGraph GeglGraph; -typedef struct _GeglHaveVisitor GeglHaveVisitor; -typedef struct _GeglNeedVisitor GeglNeedVisitor; -typedef struct _GeglNode GeglNode; -typedef struct _GeglNodeContext GeglNodeContext; -typedef struct _GeglOperation GeglOperation; -typedef struct _GeglPad GeglPad; -typedef struct _GeglVector GeglVector; -typedef struct _GeglProcessor GeglProcessor; -typedef struct _GeglPrepareVisitor GeglPrepareVisitor; -typedef struct _GeglVisitable GeglVisitable; /* dummy typedef */ -typedef struct _GeglVisitor GeglVisitor; +/* FIXME: typedefs needed by the headers copied here. + * They are supposed to be removed at some point. + */ +typedef struct _GeglOperation GeglOperation; +typedef struct _GeglNodeContext GeglNodeContext; -typedef struct _GeglRectangle GeglRectangle; -typedef struct _GeglPoint GeglPoint; -typedef struct _GeglDimension GeglDimension; -struct _GeglRectangle -{ - gint x; - gint y; - gint width; - gint height; -}; - -struct _GeglPoint -{ - gint x; - gint y; -}; - -struct _GeglDimension -{ - gint width; - gint height; -}; - -G_END_DECLS - -#endif /* __GEGL_TYPES_H__ */ +#endif /* __UGLY_GEGL_TYPES_H__ */ diff --git a/app/gegl/gimp-gegl.c b/app/gegl/gimp-gegl.c index 7fcb0651c7..63621ee0bf 100644 --- a/app/gegl/gimp-gegl.c +++ b/app/gegl/gimp-gegl.c @@ -21,8 +21,7 @@ #include "config.h" -#include -#include "gegl/gegl-types.h" +#include #include "gegl-types.h" diff --git a/app/gegl/gimpoperationcolorbalance.c b/app/gegl/gimpoperationcolorbalance.c index 4c7139dbb2..0ec88bc4b4 100644 --- a/app/gegl/gimpoperationcolorbalance.c +++ b/app/gegl/gimpoperationcolorbalance.c @@ -21,7 +21,7 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" diff --git a/app/gegl/gimpoperationcolorize.c b/app/gegl/gimpoperationcolorize.c index 80bf11eb9d..0c8740f032 100644 --- a/app/gegl/gimpoperationcolorize.c +++ b/app/gegl/gimpoperationcolorize.c @@ -21,13 +21,10 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" -#include "gegl/gegl-types.h" -#include - #include "gegl-types.h" #include "gimpoperationcolorize.h" diff --git a/app/gegl/gimpoperationdesaturate.c b/app/gegl/gimpoperationdesaturate.c index c484e5d83a..e9719fd263 100644 --- a/app/gegl/gimpoperationdesaturate.c +++ b/app/gegl/gimpoperationdesaturate.c @@ -21,13 +21,10 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" -#include "gegl/gegl-types.h" -#include - #include "gegl-types.h" #include "gimpoperationdesaturate.h" diff --git a/app/gegl/gimpoperationhuesaturation.c b/app/gegl/gimpoperationhuesaturation.c index e58bfbcee5..877dab7d83 100644 --- a/app/gegl/gimpoperationhuesaturation.c +++ b/app/gegl/gimpoperationhuesaturation.c @@ -21,7 +21,7 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" diff --git a/app/gegl/gimpoperationlevels.c b/app/gegl/gimpoperationlevels.c index 2f08f0dbd4..449600c11e 100644 --- a/app/gegl/gimpoperationlevels.c +++ b/app/gegl/gimpoperationlevels.c @@ -21,14 +21,11 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" -#include "gegl/gegl-types.h" -#include - #include "gegl-types.h" #include "gimpoperationlevels.h" diff --git a/app/gegl/gimpoperationposterize.c b/app/gegl/gimpoperationposterize.c index ef69871e21..82b2aa9227 100644 --- a/app/gegl/gimpoperationposterize.c +++ b/app/gegl/gimpoperationposterize.c @@ -21,14 +21,11 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" #include "libgimpmath/gimpmath.h" -#include "gegl/gegl-types.h" -#include - #include "gegl-types.h" #include "gimpoperationposterize.h" diff --git a/app/gegl/gimpoperationthreshold.c b/app/gegl/gimpoperationthreshold.c index 3924d55f79..18123b7d5b 100644 --- a/app/gegl/gimpoperationthreshold.c +++ b/app/gegl/gimpoperationthreshold.c @@ -21,13 +21,10 @@ #include "config.h" -#include +#include #include "libgimpcolor/gimpcolor.h" -#include "gegl/gegl-types.h" -#include - #include "gegl-types.h" #include "gimpoperationthreshold.h" diff --git a/app/gegl/gimpoperationtilesink.c b/app/gegl/gimpoperationtilesink.c index 24cb347bf7..bb8803e64f 100644 --- a/app/gegl/gimpoperationtilesink.c +++ b/app/gegl/gimpoperationtilesink.c @@ -23,11 +23,8 @@ #include -#include - -#include "gegl/gegl-types.h" -#include "gegl/graph/gegl-node-context.h" -#include +#include +#include "gegl/buffer/gegl-buffer.h" #include "gegl-types.h" diff --git a/app/gegl/gimpoperationtilesource.c b/app/gegl/gimpoperationtilesource.c index 4018e15835..a25703301c 100644 --- a/app/gegl/gimpoperationtilesource.c +++ b/app/gegl/gimpoperationtilesource.c @@ -23,10 +23,8 @@ #include -#include - -#include "gegl/gegl-types.h" -#include +#include +#include "gegl/buffer/gegl-buffer.h" #include "gegl-types.h" @@ -34,7 +32,6 @@ #include "base/pixel-region.h" #include "gimp-gegl-utils.h" -#include "gegl/graph/gegl-node-context.h" #include "gimpoperationtilesource.h" diff --git a/app/tools/gimpimagemaptool.h b/app/tools/gimpimagemaptool.h index 23c700ff12..1dc9d1cfcb 100644 --- a/app/tools/gimpimagemaptool.h +++ b/app/tools/gimpimagemaptool.h @@ -19,10 +19,12 @@ #ifndef __GIMP_IMAGE_MAP_TOOL_H__ #define __GIMP_IMAGE_MAP_TOOL_H__ +#ifndef __GEGL_H__ #ifdef __GNUC__ #warning FIXME: dont include gegl.h here #endif #include +#endif /* __GEGL_H__ */ #include "gimpcolortool.h"