1 /* LIBGIMP - The GIMP Library
2  * Copyright (C) 1995-1997 Peter Mattis and Spencer Kimball
3  *
4  * gimptile.h
5  *
6  * This library is free software: you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 3 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library.  If not, see
18  * <https://www.gnu.org/licenses/>.
19  */
20 
21 #if !defined (__GIMP_H_INSIDE__) && !defined (GIMP_COMPILATION)
22 #error "Only <libgimp/gimp.h> can be included directly."
23 #endif
24 
25 #ifndef __GIMP_TILE_H__
26 #define __GIMP_TILE_H__
27 
28 G_BEGIN_DECLS
29 
30 /* For information look into the C source or the html documentation */
31 
32 
33 struct _GimpTile
34 {
35   guint         ewidth;     /* the effective width of the tile */
36   guint         eheight;    /* the effective height of the tile */
37   guint         bpp;        /* the bytes per pixel (1, 2, 3 or 4 ) */
38   guint         tile_num;   /* the number of this tile within the drawable */
39   guint16       ref_count;  /* reference count for the tile */
40   guint         dirty : 1;  /* is the tile dirty? has it been modified? */
41   guint         shadow: 1;  /* is this a shadow tile */
42   guchar       *data;       /* the pixel data for the tile */
43   GimpDrawable *drawable;   /* the drawable this tile came from */
44 };
45 
46 
47 GIMP_DEPRECATED
48 void    gimp_tile_ref          (GimpTile  *tile);
49 GIMP_DEPRECATED
50 void    gimp_tile_ref_zero     (GimpTile  *tile);
51 GIMP_DEPRECATED
52 void    gimp_tile_unref        (GimpTile  *tile,
53                                 gboolean   dirty);
54 GIMP_DEPRECATED
55 void    gimp_tile_flush        (GimpTile  *tile);
56 
57 GIMP_DEPRECATED
58 void    gimp_tile_cache_size   (gulong     kilobytes);
59 GIMP_DEPRECATED
60 void    gimp_tile_cache_ntiles (gulong     ntiles);
61 
62 
63 /*  private function  */
64 
65 G_GNUC_INTERNAL void _gimp_tile_ref_nocache          (GimpTile     *tile,
66                                                       gboolean      init);
67 
68 G_GNUC_INTERNAL void _gimp_tile_cache_flush_drawable (GimpDrawable *drawable);
69 
70 
71 G_END_DECLS
72 
73 #endif /* __GIMP_TILE_H__ */
74