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

This commit is contained in:
Michael Natterer 2012-04-10 18:47:44 +02:00
parent 324f594fa9
commit 685a48d59a
5 changed files with 25 additions and 24 deletions

View File

@ -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");
}

View File

@ -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__ */

View File

@ -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)
{

View File

@ -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);

View File

@ -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"