home *** CD-ROM | disk | FTP | other *** search
/ PC Pro 2002 April / pcpro0402.iso / essentials / graphics / Gimp / gimp-src-20001226.exe / src / gimp / app / temp_buf.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-01  |  2.2 KB  |  66 lines

  1. /* The GIMP -- an image manipulation program
  2.  * Copyright (C) 1995 Spencer Kimball and Peter Mattis
  3.  *
  4.  * This program is free software; you can redistribute it and/or modify
  5.  * it under the terms of the GNU General Public License as published by
  6.  * the Free Software Foundation; either version 2 of the License, or
  7.  * (at your option) any later version.
  8.  *
  9.  * This program is distributed in the hope that it will be useful,
  10.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12.  * GNU General Public License for more details.
  13.  *
  14.  * You should have received a copy of the GNU General Public License
  15.  * along with this program; if not, write to the Free Software
  16.  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  17.  */
  18. #ifndef __TEMP_BUF_H__
  19. #define __TEMP_BUF_H__
  20.  
  21. typedef struct _TempBuf TempBuf;
  22. typedef struct _TempBuf MaskBuf;
  23.  
  24. struct _TempBuf
  25. {
  26.   gint      bytes;      /*  The necessary info  */
  27.   gint      width;
  28.   gint      height;
  29.   gint      x, y;       /*  origin of data source  */
  30.  
  31.   gboolean  swapped;    /*  flag indicating whether buf is cached to disk  */
  32.   gchar    *filename;   /*  filename of cached information  */
  33.  
  34.   guchar   *data;       /*  The data buffer     */
  35. };
  36.  
  37.  
  38. /*  The temp buffer functions  */
  39.  
  40. TempBuf * temp_buf_new        (gint, gint, gint, gint, gint, guchar *);
  41. TempBuf * temp_buf_copy       (TempBuf *, TempBuf *);
  42. TempBuf * temp_buf_resize     (TempBuf *, gint, gint, gint, gint, gint);
  43. TempBuf * temp_buf_copy_area  (TempBuf *, TempBuf *,
  44.                    gint, gint, gint, gint, gint);
  45. void      temp_buf_free       (TempBuf *);
  46. guchar  * temp_buf_data       (TempBuf *);
  47.  
  48. /* The mask buffer functions  */
  49.  
  50. MaskBuf * mask_buf_new        (gint, gint);
  51. void      mask_buf_free       (MaskBuf *);
  52. guchar  * mask_buf_data       (MaskBuf *);
  53.  
  54. /*  The disk caching functions  */
  55.  
  56. void      temp_buf_swap       (TempBuf *);
  57. void      temp_buf_unswap     (TempBuf *);
  58. void      temp_buf_swap_free  (TempBuf *);
  59.  
  60.  
  61. /*  Called by app_procs:exit() to free up the cached undo buffer  */
  62.  
  63. void      swapping_free       (void);
  64.  
  65. #endif  /*  __TEMP_BUF_H__  */
  66.