2006-12-09 13:33:38 -08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-24 14:05:25 -08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
2009-01-17 14:28:01 -08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-24 14:05:25 -08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 14:28:01 -08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-24 14:05:25 -08:00
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-11 14:47:19 -07:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-11-24 14:05:25 -08:00
|
|
|
*/
|
2000-12-29 07:22:01 -08:00
|
|
|
|
2012-04-08 14:56:52 -07:00
|
|
|
#ifndef __GIMP_TEMP_BUF_H__
|
|
|
|
|
#define __GIMP_TEMP_BUF_H__
|
1997-11-24 14:05:25 -08:00
|
|
|
|
|
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
GimpTempBuf * gimp_temp_buf_new (gint width,
|
|
|
|
|
gint height,
|
|
|
|
|
const Babl *format) G_GNUC_WARN_UNUSED_RESULT;
|
|
|
|
|
GimpTempBuf * gimp_temp_buf_new_from_pixbuf (GdkPixbuf *pixbuf,
|
|
|
|
|
const Babl *f_or_null) G_GNUC_WARN_UNUSED_RESULT;
|
|
|
|
|
GimpTempBuf * gimp_temp_buf_copy (const GimpTempBuf *src) G_GNUC_WARN_UNUSED_RESULT;
|
2012-04-08 15:16:46 -07:00
|
|
|
|
2019-02-24 09:46:34 -08:00
|
|
|
GimpTempBuf * gimp_temp_buf_ref (const GimpTempBuf *buf);
|
|
|
|
|
void gimp_temp_buf_unref (const GimpTempBuf *buf);
|
2007-12-13 09:27:07 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
GimpTempBuf * gimp_temp_buf_scale (const GimpTempBuf *buf,
|
|
|
|
|
gint width,
|
|
|
|
|
gint height) G_GNUC_WARN_UNUSED_RESULT;
|
2007-12-13 09:27:07 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
gint gimp_temp_buf_get_width (const GimpTempBuf *buf);
|
|
|
|
|
gint gimp_temp_buf_get_height (const GimpTempBuf *buf);
|
2012-04-23 00:40:56 -07:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
const Babl * gimp_temp_buf_get_format (const GimpTempBuf *buf);
|
|
|
|
|
void gimp_temp_buf_set_format (GimpTempBuf *buf,
|
|
|
|
|
const Babl *format);
|
2012-04-23 00:40:56 -07:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
guchar * gimp_temp_buf_get_data (const GimpTempBuf *buf);
|
|
|
|
|
gsize gimp_temp_buf_get_data_size (const GimpTempBuf *buf);
|
2012-04-23 00:40:56 -07:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
guchar * gimp_temp_buf_data_clear (GimpTempBuf *buf);
|
2002-01-30 08:14:26 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
gpointer gimp_temp_buf_lock (const GimpTempBuf *buf,
|
|
|
|
|
const Babl *format,
|
|
|
|
|
GeglAccessMode access_mode) G_GNUC_WARN_UNUSED_RESULT;
|
|
|
|
|
void gimp_temp_buf_unlock (const GimpTempBuf *buf,
|
|
|
|
|
gconstpointer data);
|
2019-02-06 11:10:05 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
gsize gimp_temp_buf_get_memsize (const GimpTempBuf *buf);
|
2012-04-10 09:47:44 -07:00
|
|
|
|
2019-02-24 09:46:34 -08:00
|
|
|
GeglBuffer * gimp_temp_buf_create_buffer (const GimpTempBuf *temp_buf) G_GNUC_WARN_UNUSED_RESULT;
|
|
|
|
|
GdkPixbuf * gimp_temp_buf_create_pixbuf (const GimpTempBuf *temp_buf) G_GNUC_WARN_UNUSED_RESULT;
|
2014-02-20 09:20:17 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
GimpTempBuf * gimp_gegl_buffer_get_temp_buf (GeglBuffer *buffer);
|
2012-04-08 10:06:06 -07:00
|
|
|
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2019-02-22 05:38:05 -08:00
|
|
|
/* stats */
|
|
|
|
|
|
|
|
|
|
guint64 gimp_temp_buf_get_total_memsize (void);
|
|
|
|
|
|
2012-04-08 14:56:52 -07:00
|
|
|
|
|
|
|
|
#endif /* __GIMP_TEMP_BUF_H__ */
|