[gimp/goat-invasion: 479/526] app: move gimp_gegl_buffer_get_temp_buf() to gimptempbuf.[ch]



commit 04c0850594ec92acae001d77863df475bcf0226b
Author: Michael Natterer <mitch gimp org>
Date:   Tue Apr 10 18:47:44 2012 +0200

    app: move gimp_gegl_buffer_get_temp_buf() to gimptempbuf.[ch]

 app/core/gimptempbuf.c     |    8 ++++++++
 app/core/gimptempbuf.h     |   30 ++++++++++++++++--------------
 app/gegl/gimp-gegl-utils.c |    8 --------
 app/gegl/gimp-gegl-utils.h |    2 --
 app/paint/gimppaintcore.c  |    1 +
 5 files changed, 25 insertions(+), 24 deletions(-)
---
diff --git a/app/core/gimptempbuf.c b/app/core/gimptempbuf.c
index f014d78..91a00de 100644
--- a/app/core/gimptempbuf.c
+++ b/app/core/gimptempbuf.c
@@ -200,3 +200,11 @@ gimp_temp_buf_create_buffer (GimpTempBuf *temp_buf)
 
   return buffer;
 }
+
+GimpTempBuf *
+gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer)
+{
+  g_return_val_if_fail (GEGL_IS_BUFFER (buffer), NULL);
+
+  return g_object_get_data (G_OBJECT (buffer), "gimp-temp-buf");
+}
diff --git a/app/core/gimptempbuf.h b/app/core/gimptempbuf.h
index 404fa17..f05cb09 100644
--- a/app/core/gimptempbuf.h
+++ b/app/core/gimptempbuf.h
@@ -29,25 +29,27 @@ struct _GimpTempBuf
 };
 
 
-GimpTempBuf * gimp_temp_buf_new           (gint               width,
-                                           gint               height,
-                                           const Babl        *fomat) G_GNUC_WARN_UNUSED_RESULT;
-GimpTempBuf * gimp_temp_buf_copy          (const GimpTempBuf *src) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_temp_buf_new             (gint               width,
+                                             gint               height,
+                                             const Babl        *fomat) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_temp_buf_copy            (const GimpTempBuf *src) G_GNUC_WARN_UNUSED_RESULT;
 
-GimpTempBuf * gimp_temp_buf_ref           (GimpTempBuf       *buf);
-void          gimp_temp_buf_unref         (GimpTempBuf       *buf);
+GimpTempBuf * gimp_temp_buf_ref             (GimpTempBuf       *buf);
+void          gimp_temp_buf_unref           (GimpTempBuf       *buf);
 
-GimpTempBuf * gimp_temp_buf_scale         (const GimpTempBuf *buf,
-                                           gint               width,
-                                           gint               height) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_temp_buf_scale           (const GimpTempBuf *buf,
+                                             gint               width,
+                                             gint               height) G_GNUC_WARN_UNUSED_RESULT;
 
-guchar      * gimp_temp_buf_get_data      (const GimpTempBuf *buf);
-gsize         gimp_temp_buf_get_data_size (const GimpTempBuf *buf);
-guchar      * gimp_temp_buf_data_clear    (GimpTempBuf       *buf);
+guchar      * gimp_temp_buf_get_data        (const GimpTempBuf *buf);
+gsize         gimp_temp_buf_get_data_size   (const GimpTempBuf *buf);
+guchar      * gimp_temp_buf_data_clear      (GimpTempBuf       *buf);
 
-gsize         gimp_temp_buf_get_memsize   (const GimpTempBuf *buf);
+gsize         gimp_temp_buf_get_memsize     (const GimpTempBuf *buf);
+
+GeglBuffer  * gimp_temp_buf_create_buffer   (GimpTempBuf       *temp_buf) G_GNUC_WARN_UNUSED_RESULT;
+GimpTempBuf * gimp_gegl_buffer_get_temp_buf (GeglBuffer        *buffer);
 
-GeglBuffer  * gimp_temp_buf_create_buffer (GimpTempBuf       *temp_buf) G_GNUC_WARN_UNUSED_RESULT;
 
 
 #endif  /*  __GIMP_TEMP_BUF_H__  */
diff --git a/app/gegl/gimp-gegl-utils.c b/app/gegl/gimp-gegl-utils.c
index 58599c2..d65620b 100644
--- a/app/gegl/gimp-gegl-utils.c
+++ b/app/gegl/gimp-gegl-utils.c
@@ -244,14 +244,6 @@ gimp_gegl_buffer_get_tiles (GeglBuffer *buffer)
   return gimp_tile_backend_tile_manager_get_tiles (backend);
 }
 
-GimpTempBuf *
-gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer)
-{
-  g_return_val_if_fail (GEGL_IS_BUFFER (buffer), NULL);
-
-  return g_object_get_data (G_OBJECT (buffer), "gimp-temp-buf");
-}
-
 void
 gimp_gegl_buffer_refetch_tiles (GeglBuffer *buffer)
 {
diff --git a/app/gegl/gimp-gegl-utils.h b/app/gegl/gimp-gegl-utils.h
index 0b2bf67..c7e54b5 100644
--- a/app/gegl/gimp-gegl-utils.h
+++ b/app/gegl/gimp-gegl-utils.h
@@ -41,8 +41,6 @@ GeglBuffer  * gimp_tile_manager_create_buffer    (TileManager           *tm,
                                                   const Babl            *format);
 TileManager * gimp_gegl_buffer_get_tiles         (GeglBuffer            *buffer);
 
-GimpTempBuf * gimp_gegl_buffer_get_temp_buf      (GeglBuffer            *buffer);
-
 GeglBuffer  * gimp_pixbuf_create_buffer          (GdkPixbuf             *pixbuf);
 
 void          gimp_gegl_buffer_refetch_tiles     (GeglBuffer            *buffer);
diff --git a/app/paint/gimppaintcore.c b/app/paint/gimppaintcore.c
index 49f1d99..b1d0927 100644
--- a/app/paint/gimppaintcore.c
+++ b/app/paint/gimppaintcore.c
@@ -39,6 +39,7 @@
 #include "core/gimpimage-undo.h"
 #include "core/gimppickable.h"
 #include "core/gimpprojection.h"
+#include "core/gimptempbuf.h"
 
 #include "gimppaintcore.h"
 #include "gimppaintcoreundo.h"



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