[gegl] Move duplicate definitions to gegl-types.h
- From: Daniel Sabo <daniels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] Move duplicate definitions to gegl-types.h
- Date: Sun, 19 Jan 2014 14:28:25 +0000 (UTC)
commit 1e8a46a215caeb3c17bb76748681da1fb78422f0
Author: Daniel Sabo <DanielSabo gmail com>
Date: Sat Jan 18 15:51:15 2014 -0800
Move duplicate definitions to gegl-types.h
gegl/buffer/gegl-buffer-backend.h | 6 ++----
gegl/buffer/gegl-buffer-types.h | 5 -----
gegl/buffer/gegl-buffer.h | 18 +-----------------
gegl/gegl-types.h | 15 ++++++++++++---
4 files changed, 15 insertions(+), 29 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-backend.h b/gegl/buffer/gegl-buffer-backend.h
index 1601bd6..b544f4d 100644
--- a/gegl/buffer/gegl-buffer-backend.h
+++ b/gegl/buffer/gegl-buffer-backend.h
@@ -19,13 +19,12 @@
#ifndef __GEGL_BUFFER_BACKEND_H__
#define __GEGL_BUFFER_BACKEND_H__
+#include "gegl-types.h"
+
G_BEGIN_DECLS
typedef struct _GeglTile GeglTile;
typedef struct _GeglTileSource GeglTileSource;
-#ifndef __GEGL_BUFFER_H__
-typedef struct _GeglTileBackend GeglTileBackend;
-#endif
typedef struct _GeglTileHandler GeglTileHandler;
@@ -52,7 +51,6 @@ typedef enum
G_END_DECLS
-#include "gegl-types.h"
#include "gegl-tile-backend.h"
#include "gegl-tile-source.h"
#include "gegl-tile-handler.h"
diff --git a/gegl/buffer/gegl-buffer-types.h b/gegl/buffer/gegl-buffer-types.h
index 6b8d3c3..4289eed 100644
--- a/gegl/buffer/gegl-buffer-types.h
+++ b/gegl/buffer/gegl-buffer-types.h
@@ -47,11 +47,6 @@ typedef struct _GeglTileHandlerChain GeglTileHandlerChain;
typedef struct _GeglTileStorage GeglTileStorage;
-#ifndef __GEGL_BUFFER_H__
-typedef struct _GeglBuffer GeglBuffer;
-typedef struct _GeglSampler GeglSampler;
-#endif
-
typedef struct _GeglCache GeglCache;
typedef struct _GeglRegion GeglRegion;
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index 98029b5..85d5521 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -22,21 +22,10 @@
#include <glib-object.h>
#include <babl/babl.h>
#include <gegl-matrix.h>
-#include <gegl-enums.h>
+#include <gegl-types.h>
G_BEGIN_DECLS
-#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))
-#ifndef __GEGL_BUFFER_TYPES_H__
-typedef struct _GeglBuffer GeglBuffer;
-typedef struct _GeglSampler GeglSampler;
-#endif
-#ifndef __GEGL_BUFFER_BACKEND_H__
-typedef struct _GeglTileBackend GeglTileBackend;
-#endif
-
/***
* GeglBuffer:
*
@@ -48,7 +37,6 @@ typedef struct _GeglTileBackend GeglTileBackend;
* can be swapped to disk. In the future GeglBuffer might also support a linear
* backend, a GPU memory backend and a network backend for buffers.
*/
-GType gegl_buffer_get_type (void) G_GNUC_CONST;
/**
* gegl_buffer_new: (skip)
@@ -236,10 +224,6 @@ gboolean gegl_buffer_set_abyss (GeglBuffer *buffer,
*/
#define gegl_buffer_get_pixel_count(buffer) (gegl_buffer_get_width(buffer) * gegl_buffer_get_height(buffer))
-#ifndef GEGL_AUTO_ROWSTRIDE
-#define GEGL_AUTO_ROWSTRIDE 0
-#endif
-
/**
* gegl_buffer_get: (skip)
* @buffer: the buffer to retrieve data from.
diff --git a/gegl/gegl-types.h b/gegl/gegl-types.h
index e772d11..714bdd3 100644
--- a/gegl/gegl-types.h
+++ b/gegl/gegl-types.h
@@ -46,9 +46,10 @@ GType gegl_config_get_type (void) G_GNUC_CONST;
#define GEGL_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEGL_TYPE_CONFIG, GeglConfig))
#define GEGL_IS_CONFIG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEGL_TYPE_CONFIG))
-typedef struct _GeglCurve GeglCurve;
-typedef struct _GeglPath GeglPath;
-typedef struct _GeglColor GeglColor;
+typedef struct _GeglSampler GeglSampler;
+typedef struct _GeglCurve GeglCurve;
+typedef struct _GeglPath GeglPath;
+typedef struct _GeglColor GeglColor;
typedef struct _GeglRectangle GeglRectangle;
@@ -64,8 +65,16 @@ GType gegl_rectangle_get_type (void) G_GNUC_CONST;
#define GEGL_RECTANGLE(x,y,w,h) (&((GeglRectangle){(x), (y), (w), (h)}))
+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))
+
typedef struct _GeglOperation GeglOperation;
GType gegl_operation_get_type (void) G_GNUC_CONST;
#define GEGL_TYPE_OPERATION (gegl_operation_get_type ())
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]