Commit 8d088ff8 authored by Martin Nordholts's avatar Martin Nordholts

Remove the GEGL_INTERNAL define

Remove the GEGL_INTERNAL define and instead of having incompatible
public and internal APIs kept under control through preprocessing,
make the internals depend on the public API and use the strategy of
having a public API that is a subset of the internal API.

svn path=/trunk/; revision=2929
parent c5dc65c5
2009-02-21 Martin Nordholts <martinn@svn.gnome.org>
Remove the GEGL_INTERNAL define and instead of having incompatible
public and internal APIs kept under control through preprocessing,
make the internals depend on the public API and use the strategy
of having a public API that is a subset of the internal API.
* lots_of_files.[ch]
2009-02-21 Martin Nordholts <martinn@svn.gnome.org>
Move types in gegl.h to a new installed header file gegl-types.h
......
......@@ -74,8 +74,9 @@ BUFFER_headers = \
libbuffer_la_SOURCES = $(BUFFER_sources) $(BUFFER_headers)
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/property-types \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
......@@ -26,6 +26,7 @@
#include <gio/gio.h>
#endif
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
......
......@@ -24,6 +24,7 @@
#include <glib-object.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer-iterator.h"
......
......@@ -5,6 +5,7 @@
#include <glib-object.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer-private.h"
......
......@@ -31,6 +31,7 @@
#endif
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
......
......@@ -33,6 +33,7 @@
#include "gegl-types-internal.h"
#include "gegl.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
#include "gegl-buffer-private.h"
......
......@@ -22,6 +22,7 @@
#include <glib-object.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
......
......@@ -45,8 +45,8 @@
#include <gio/gio.h>
#endif
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-buffer.h"
#include "gegl-buffer-private.h"
......
......@@ -24,6 +24,7 @@
#include <babl/babl.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-utils.h"
......
......@@ -74,7 +74,9 @@
#include <glib.h>
#include <glib-object.h>
#include <gegl-region.h>
#include "gegl.h"
#include "gegl-region.h"
#include "gegl-region-generic.h"
typedef void (* overlapFunc) (GeglRegion *pReg,
......
......@@ -14,14 +14,17 @@
* License along with GEGL; if not, see <http://www.gnu.org/licenses/>.
*/
#include <string.h>
#include <math.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-cubic.h"
#include <string.h>
#include <math.h>
enum
{
......
......@@ -19,14 +19,17 @@
* currently not used by the rest of GeglBuffer */
#include <string.h>
#include <math.h>
#include <glib-object.h>
#include <glib/gstdio.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-lanczos.h"
#include <string.h>
#include <math.h>
enum
......
......@@ -61,6 +61,8 @@
#include <glib-object.h>
#include <glib/gstdio.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-linear.h"
......
......@@ -15,11 +15,15 @@
*
*/
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-nearest.h"
#include <string.h>
enum
{
......
......@@ -174,6 +174,8 @@
*/
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-sharp.h"
......
......@@ -23,6 +23,8 @@
*/
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-private.h"
#include "gegl-sampler-yafr.h"
......
......@@ -21,6 +21,7 @@
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer.h"
#include "gegl-utils.h"
......
......@@ -32,6 +32,7 @@
#include <glib-object.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-tile-backend.h"
#include "gegl-tile-backend-file.h"
#include "gegl-buffer-index.h"
......
......@@ -21,7 +21,8 @@
#include <glib.h>
#include <glib-object.h>
#include "../gegl-types-internal.h"
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-config.h"
#include "gegl-buffer.h"
#include "gegl-buffer-private.h"
......
......@@ -20,6 +20,7 @@
#include <glib-object.h>
#include "gegl.h"
#include "gegl-tile-storage.h"
#include "gegl-tile.h"
#include "gegl-tile-backend-file.h"
......
......@@ -28,6 +28,7 @@
#include "gegl-types-internal.h"
#include "gegl.h"
#include "gegl-buffer.h"
#include "gegl-buffer-private.h"
#include "gegl-tile.h"
......
......@@ -20,6 +20,7 @@
#include <string.h>
#include <glib/gprintf.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-config.h"
......
......@@ -21,7 +21,8 @@
#include <stdio.h>
#include <string.h>
#include <glib-object.h>
#define GEGL_INTERNAL
#include "gegl.h"
#include "gegl-types-internal.h"
#include "graph/gegl-node.h"
#include "graph/gegl-pad.h"
......
......@@ -22,30 +22,6 @@
G_BEGIN_DECLS
#ifndef __GEGL_H__
typedef struct _GeglColor GeglColor;
typedef struct _GeglConfig GeglConfig;
typedef struct _GeglCurve GeglCurve;
typedef struct _GeglNode GeglNode;
typedef struct _GeglPath GeglPath;
typedef struct _GeglProcessor GeglProcessor;
typedef struct _GeglRectangle GeglRectangle;
struct _GeglRectangle
{
gint x;
gint y;
gint width;
gint height;
};
typedef enum
{
GEGL_PARAM_PAD_OUTPUT = 1 << G_PARAM_USER_SHIFT,
GEGL_PARAM_PAD_INPUT = 1 << (G_PARAM_USER_SHIFT + 1)
} GeglPadType;
#endif
typedef struct _GeglCRVisitor GeglCRVisitor;
typedef struct _GeglDebugRectVisitor GeglDebugRectVisitor;
typedef struct _GeglEvalMgr GeglEvalMgr;
......
......@@ -22,8 +22,6 @@
G_BEGIN_DECLS
#ifndef GEGL_INTERNAL /* These declarations duplicate internal ones in GEGL */
#ifndef GEGL_TYPE_NODE
typedef struct _GeglNode GeglNode;
GType gegl_node_get_type (void) G_GNUC_CONST;
......@@ -35,7 +33,6 @@ GType gegl_node_get_type (void) G_GNUC_CONST;
typedef struct _GeglRectangle GeglRectangle;
GType gegl_rectangle_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_RECTANGLE (gegl_rectangle_get_type())
#endif
#ifndef GEGL_BLIT_FLAGS
#define GEGL_BLIT_FLAGS
......@@ -51,19 +48,14 @@ typedef enum
#define GEGL_AUTO_ROWSTRIDE 0
#endif
#ifndef GEGL_INTERNAL
typedef struct _GeglProcessor GeglProcessor;
GType gegl_processor_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_PROCESSOR (gegl_processor_get_type())
#define GEGL_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_PROCESSOR, GeglProcessor))
#define GEGL_IS_PROCESSOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_PROCESSOR))
#endif
#ifndef GEGL_INTERNAL
typedef struct _GeglConfig GeglConfig;
#endif
#ifndef GEGL_INTERNAL
struct _GeglRectangle
{
......@@ -84,7 +76,6 @@ typedef enum
typedef struct _GeglCurve GeglCurve;
typedef struct _GeglPath GeglPath;
typedef struct _GeglColor GeglColor;
#endif
G_END_DECLS
......
......@@ -20,8 +20,8 @@
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-utils.h"
#include "gegl-types-internal.h"
......
......@@ -21,8 +21,9 @@ libgraph_la_SOURCES = $(GRAPH_sources) $(GRAPH_headers)
#libgraphincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)/gegl/graph
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/property-types \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
......@@ -18,6 +18,8 @@
#include "config.h"
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-connection.h"
......
......@@ -17,8 +17,6 @@
* 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <string.h>
......@@ -28,6 +26,7 @@
#include "gegl-types-internal.h"
#include "gegl.h"
#include "gegl-node.h"
#include "gegl-connection.h"
#include "gegl-pad.h"
......
......@@ -21,8 +21,9 @@
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-buffer-types.h"
#include "gegl-node.h"
#include "gegl-pad.h"
#include "gegl-visitor.h"
......
......@@ -22,6 +22,7 @@
#include "gegl-types-internal.h"
#include "gegl.h"
#include "graph/gegl-node.h"
#include "graph/gegl-pad.h"
#include "gegl-visitor.h"
......
......@@ -58,8 +58,9 @@ liboperationinclude_HEADERS = $(public_headers)
liboperationincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)/operation
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/property-types \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
......@@ -16,15 +16,15 @@
* Copyright 2007 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <math.h>
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-area-filter.h"
#include <math.h>
#include "gegl-utils.h"
#include "graph/gegl-node.h"
#include "graph/gegl-connection.h"
......
......@@ -16,12 +16,12 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-composer.h"
#include "gegl-utils.h"
......
......@@ -16,12 +16,12 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-composer3.h"
#include "gegl-utils.h"
......
......@@ -19,14 +19,12 @@
#include "config.h"
#define GEGL_INTERNAL
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-context.h"
#include "gegl/graph/gegl-node.h"
#include "gegl-config.h"
......
......@@ -16,12 +16,12 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-filter.h"
#include "gegl-utils.h"
......
......@@ -16,10 +16,11 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-meta.h"
#include "graph/gegl-node.h"
......
......@@ -17,10 +17,11 @@
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-point-composer.h"
#include "gegl-utils.h"
......
......@@ -17,10 +17,11 @@
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-point-composer3.h"
#include "gegl-utils.h"
......
......@@ -17,10 +17,11 @@
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-point-filter.h"
#include "graph/gegl-pad.h"
......
......@@ -17,17 +17,18 @@
*/
#define GEGL_INTERNAL
#include "config.h"
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-point-render.h"
#include "graph/gegl-pad.h"
#include "graph/gegl-node.h"
#include "gegl-utils.h"
#include <string.h>
#include "gegl-buffer-private.h"
#include "gegl-tile-storage.h"
......
......@@ -17,15 +17,14 @@
* 2005-2008 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-config.h"
#include "gegl-config.h"
#include "gegl-operation.h"
#include "gegl-utils.h"
#include "gegl-cpuaccel.h"
......
......@@ -16,15 +16,17 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-sink.h"
#include "graph/gegl-node.h"
#include "graph/gegl-pad.h"
#include <string.h>
enum
......
......@@ -16,15 +16,17 @@
* Copyright 2006 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <string.h>
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-source.h"
#include "graph/gegl-node.h"
#include "graph/gegl-pad.h"
#include <string.h>
enum
{
......
......@@ -16,12 +16,12 @@
* Copyright 2008 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation-temporal.h"
#include "gegl-utils.h"
......
......@@ -17,13 +17,12 @@
* 2005-2008 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-operation.h"
#include "gegl-utils.h"
......
......@@ -17,13 +17,12 @@
* 2005-2008 Øyvind Kolås
*/
#define GEGL_INTERNAL
#include "config.h"
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-utils.h"
#include "gegl-operation.h"
......
......@@ -28,7 +28,8 @@ libprocess_la_SOURCES = $(PROCESS_sources) $(PROCESS_headers)
#libprocessincludedir = $(includedir)/gegl-$(GEGL_API_VERSION)/gegl/process
INCLUDES = \
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
-I$(top_srcdir) \
-I$(top_srcdir)/gegl \
-I$(top_srcdir)/gegl/property-types \
-I$(top_srcdir)/gegl/buffer \
@DEP_CFLAGS@ @BABL_CFLAGS@
......@@ -21,8 +21,8 @@
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-cr-visitor.h"
#include "operation/gegl-operation.h"
#include "operation/gegl-operation-context.h"
......
......@@ -23,8 +23,8 @@
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-debug-rect-visitor.h"
#include "operation/gegl-operation.h"
#include "operation/gegl-operation-context.h"
......
......@@ -21,8 +21,8 @@
#include <glib-object.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-eval-mgr.h"
#include "gegl-eval-visitor.h"
#include "gegl-debug-rect-visitor.h"
......
......@@ -21,8 +21,8 @@
#include <glib-object.h>
#include <string.h>
#include "gegl.h"
#include "gegl-types-internal.h"
#include "gegl-eval-visitor.h"
#include "graph/gegl-node.h"
#include "operation/gegl-operation.h"
......