[gegl] gegl/buffer: shuffle types between gegl and buffer headers



commit 0fc355ef195626f1074f8921bdacc312c2970c7f
Author: Øyvind Kolås <pippin gimp org>
Date:   Thu Sep 27 13:42:51 2018 +0200

    gegl/buffer: shuffle types between gegl and buffer headers

 gegl/buffer/gegl-buffer-types.h        |  2 --
 gegl/buffer/gegl-buffer.c              |  2 +-
 gegl/buffer/gegl-buffer.h              | 17 +++++++++++++++++
 gegl/buffer/gegl-tile-backend-buffer.c |  1 +
 gegl/buffer/gegl-tile-backend-ram.c    |  1 +
 gegl/buffer/gegl-tile-backend.c        |  1 +
 gegl/buffer/gegl-tile-handler-chain.c  |  1 +
 gegl/buffer/gegl-tile-handler-empty.c  |  1 +
 gegl/buffer/gegl-tile-handler-log.c    |  1 +
 gegl/buffer/gegl-tile-handler-zoom.c   |  1 +
 gegl/buffer/gegl-tile-handler.c        |  1 +
 gegl/buffer/gegl-tile-source.c         |  1 +
 gegl/buffer/gegl-tile-storage.c        |  1 +
 gegl/buffer/gegl-tile-storage.h        |  1 +
 gegl/buffer/gegl-tile.c                |  1 +
 gegl/gegl-types-internal.h             |  3 ++-
 gegl/gegl-types.h                      | 12 ++----------
 gegl/graph/gegl-region.h               |  2 +-
 18 files changed, 35 insertions(+), 15 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-types.h b/gegl/buffer/gegl-buffer-types.h
index 8d3257658..7bed29a52 100644
--- a/gegl/buffer/gegl-buffer-types.h
+++ b/gegl/buffer/gegl-buffer-types.h
@@ -51,6 +51,4 @@ typedef struct _GeglTileHandlerChain      GeglTileHandlerChain;
 typedef struct _GeglTileStorage           GeglTileStorage;
 
 
-typedef struct _GeglRegion                GeglRegion;
-
 #endif
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index 2e722b2ad..f8a851c30 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -36,8 +36,8 @@
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
-#include "gegl-buffer-types.h"
 #include "gegl-buffer.h"
+#include "gegl-buffer-types.h"
 #include "gegl-buffer-config.h"
 #include "gegl-buffer-private.h"
 #include "gegl-debug.h"
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index ff67b6737..a830cb495 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -24,7 +24,15 @@
 #include <gegl-matrix.h>
 #include <gegl-types.h>
 
+#define GEGL_AUTO_ROWSTRIDE 0
+
 G_BEGIN_DECLS
+typedef struct _GeglTileBackend GeglTileBackend;
+typedef struct _GeglBuffer  GeglBuffer;
+typedef struct _GeglSampler       GeglSampler;
+
+
+
 
 /***
  * GeglBuffer:
@@ -715,5 +723,14 @@ gegl_buffer_flush_ext (GeglBuffer *buffer, const GeglRectangle *rect);
 
 #include <gegl-buffer-iterator.h>
 
+
+
+GType gegl_buffer_get_type  (void) G_GNUC_CONST;
+#define GEGL_TYPE_BUFFER    (gegl_buffer_get_type ())
+#define GEGL_BUFFER(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_BUFFER, GeglBuffer))
+#define GEGL_IS_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_BUFFER))
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglBuffer, g_object_unref)
+
+
 G_END_DECLS
 #endif
diff --git a/gegl/buffer/gegl-tile-backend-buffer.c b/gegl/buffer/gegl-tile-backend-buffer.c
index 2711b4cb5..2a8f67e43 100644
--- a/gegl/buffer/gegl-tile-backend-buffer.c
+++ b/gegl/buffer/gegl-tile-backend-buffer.c
@@ -20,6 +20,7 @@
 
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 
 #include "gegl-buffer-backend.h"
diff --git a/gegl/buffer/gegl-tile-backend-ram.c b/gegl/buffer/gegl-tile-backend-ram.c
index 634508bc0..a6020333e 100644
--- a/gegl/buffer/gegl-tile-backend-ram.c
+++ b/gegl/buffer/gegl-tile-backend-ram.c
@@ -21,6 +21,7 @@
 
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-backend.h"
 #include "gegl-tile-backend.h"
 #include "gegl-tile-backend-ram.h"
diff --git a/gegl/buffer/gegl-tile-backend.c b/gegl/buffer/gegl-tile-backend.c
index fc8b0554e..03e5021a8 100644
--- a/gegl/buffer/gegl-tile-backend.c
+++ b/gegl/buffer/gegl-tile-backend.c
@@ -22,6 +22,7 @@
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-buffer-private.h"
 #include "gegl-tile-source.h"
diff --git a/gegl/buffer/gegl-tile-handler-chain.c b/gegl/buffer/gegl-tile-handler-chain.c
index 076e16c80..6243eb9b7 100644
--- a/gegl/buffer/gegl-tile-handler-chain.c
+++ b/gegl/buffer/gegl-tile-handler-chain.c
@@ -20,6 +20,7 @@
 
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-handler-chain.h"
 #include "gegl-tile-handler-cache.h"
diff --git a/gegl/buffer/gegl-tile-handler-empty.c b/gegl/buffer/gegl-tile-handler-empty.c
index d4d481ed2..9c2d0a860 100644
--- a/gegl/buffer/gegl-tile-handler-empty.c
+++ b/gegl/buffer/gegl-tile-handler-empty.c
@@ -20,6 +20,7 @@
 #include <glib-object.h>
 #include <string.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-private.h"
 #include "gegl-tile-handler-empty.h"
 
diff --git a/gegl/buffer/gegl-tile-handler-log.c b/gegl/buffer/gegl-tile-handler-log.c
index 55cdfef0d..5f73fe1a9 100644
--- a/gegl/buffer/gegl-tile-handler-log.c
+++ b/gegl/buffer/gegl-tile-handler-log.c
@@ -20,6 +20,7 @@
 #include <glib-object.h>
 #include <string.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-handler-log.h"
 
diff --git a/gegl/buffer/gegl-tile-handler-zoom.c b/gegl/buffer/gegl-tile-handler-zoom.c
index 8a386a7ca..1b82a0716 100644
--- a/gegl/buffer/gegl-tile-handler-zoom.c
+++ b/gegl/buffer/gegl-tile-handler-zoom.c
@@ -23,6 +23,7 @@
 #include <babl/babl.h>
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-handler.h"
 #include "gegl-tile-handler-cache.h"
diff --git a/gegl/buffer/gegl-tile-handler.c b/gegl/buffer/gegl-tile-handler.c
index bc87a6138..86318b869 100644
--- a/gegl/buffer/gegl-tile-handler.c
+++ b/gegl/buffer/gegl-tile-handler.c
@@ -23,6 +23,7 @@
 
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-handler-cache.h"
 #include "gegl-tile-handler-private.h"
diff --git a/gegl/buffer/gegl-tile-source.c b/gegl/buffer/gegl-tile-source.c
index 16ecfe836..706ca1df3 100644
--- a/gegl/buffer/gegl-tile-source.c
+++ b/gegl/buffer/gegl-tile-source.c
@@ -18,6 +18,7 @@
 #include "config.h"
 #include <glib.h>
 #include <glib-object.h>
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-source.h"
 
diff --git a/gegl/buffer/gegl-tile-storage.c b/gegl/buffer/gegl-tile-storage.c
index 6ec87c661..5c1fd89b0 100644
--- a/gegl/buffer/gegl-tile-storage.c
+++ b/gegl/buffer/gegl-tile-storage.c
@@ -21,6 +21,7 @@
 #include <glib-object.h>
 #include <glib/gstdio.h>
 
+#include "gegl-buffer.h"
 #include "gegl-buffer-types.h"
 #include "gegl-tile-storage.h"
 #include "gegl-tile-handler-empty.h"
diff --git a/gegl/buffer/gegl-tile-storage.h b/gegl/buffer/gegl-tile-storage.h
index 47c0164f9..d707cfbc9 100644
--- a/gegl/buffer/gegl-tile-storage.h
+++ b/gegl/buffer/gegl-tile-storage.h
@@ -19,6 +19,7 @@
 #ifndef __GEGL_TILE_STORAGE_H__
 #define __GEGL_TILE_STORAGE_H__
 
+#include "gegl-buffer.h"
 #include "gegl-tile-handler-chain.h"
 #include "gegl-tile-handler-cache.h"
 
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index fd88e4eb6..5d9cd0852 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -26,6 +26,7 @@
 
 #include <glib-object.h>
 
+#include "gegl-buffer.h"
 #include "gegl-tile.h"
 #include "gegl-buffer-private.h"
 #include "gegl-tile-storage.h"
diff --git a/gegl/gegl-types-internal.h b/gegl/gegl-types-internal.h
index a0ffeac19..c85df9ea4 100644
--- a/gegl/gegl-types-internal.h
+++ b/gegl/gegl-types-internal.h
@@ -14,7 +14,7 @@
  * License along with GEGL; if not, see <https://www.gnu.org/licenses/>.
  *
  * Copyright 2003 Calvin Williamson
- *           2006 Øyvind Kolås
+ *      2006,2018 Øyvind Kolås
  */
 
 #ifndef __GEGL_TYPES_INTERNAL_H__
@@ -24,6 +24,7 @@
 
 G_BEGIN_DECLS
 
+typedef struct _GeglRegion           GeglRegion;
 typedef struct _GeglCache            GeglCache;
 typedef struct _GeglPad              GeglPad;
 typedef struct _GeglConnection       GeglConnection;
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index 8e026c730..7315d4cdc 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -61,7 +61,6 @@ GType gegl_stats_get_type (void) G_GNUC_CONST;
 #define GEGL_STATS(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_STATS, GeglStats))
 #define GEGL_IS_STATS(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_STATS))
 
-typedef struct _GeglSampler       GeglSampler;
 typedef struct _GeglCurve         GeglCurve;
 typedef struct _GeglPath          GeglPath;
 typedef struct _GeglColor         GeglColor;
@@ -101,17 +100,8 @@ _gegl_rectangle_helper (gint x,
 
 #endif /* __cplusplus */
 
-typedef struct _GeglTileBackend GeglTileBackend;
-
 typedef struct _GeglOperationContext GeglOperationContext;
 
-typedef struct _GeglBuffer  GeglBuffer;
-GType gegl_buffer_get_type  (void) G_GNUC_CONST;
-#define GEGL_TYPE_BUFFER    (gegl_buffer_get_type ())
-#define GEGL_BUFFER(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_BUFFER, GeglBuffer))
-#define GEGL_IS_BUFFER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_BUFFER))
-G_DEFINE_AUTOPTR_CLEANUP_FUNC (GeglBuffer, g_object_unref)
-
 typedef struct _GeglOperation  GeglOperation;
 GType gegl_operation_get_type  (void) G_GNUC_CONST;
 #define GEGL_TYPE_OPERATION    (gegl_operation_get_type ())
@@ -137,6 +127,8 @@ typedef struct _GeglRandom  GeglRandom;
 GType gegl_random_get_type  (void) G_GNUC_CONST;
 #define GEGL_TYPE_RANDOM    (gegl_random_get_type())
 
+#include <gegl-buffer.h>
+
 G_END_DECLS
 
 #endif /* __GEGL_TYPES_H__ */
diff --git a/gegl/graph/gegl-region.h b/gegl/graph/gegl-region.h
index 760ca02be..f0634ccb5 100644
--- a/gegl/graph/gegl-region.h
+++ b/gegl/graph/gegl-region.h
@@ -25,8 +25,8 @@
 #ifndef __GEGL_REGION_H__
 #define __GEGL_REGION_H__
 
+#include <gegl/gegl-types.h>
 #include <gegl/gegl-types-internal.h>
-#include "gegl-buffer-types.h"
 
 G_BEGIN_DECLS
 


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