/usr/include/vips/private.h is in libvips-dev 7.26.3-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | /* Declarations which are public-facing, but private. See internal.h for
* declarations which are only used internally by vips and which are not
* externally visible.
*
* 6/7/09
* - from vips.h
*/
/*
This file is part of VIPS.
VIPS is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(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 Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
/*
These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk
*/
#ifndef VIPS_PRIVATE_H
#define VIPS_PRIVATE_H
#ifdef __cplusplus
extern "C" {
#endif /*__cplusplus*/
#define VIPS_SPARE (8)
/* Private to iofuncs: the minimum number of scanlines we add above and below
* the window as a margin for slop.
*/
#define VIPS__WINDOW_MARGIN_PIXELS (128)
/* Private to iofuncs: add at least this many bytes above and below the window.
* There's no point mapping just a few KB of a small image.
*/
#define VIPS__WINDOW_MARGIN_BYTES (1024 * 1024 * 10)
/* sizeof() a VIPS header on disc.
*/
#define VIPS_SIZEOF_HEADER (64)
typedef unsigned char PEL; /* useful datum */
/* What we track for each mmap window. Have a list of these on an openin
* VipsImage.
*/
typedef struct {
int ref_count; /* # of regions referencing us */
struct _VipsImage *im; /* VipsImage we are attached to */
int top; /* Area of image we have mapped, in pixels */
int height;
char *data; /* First pixel of line 'top' */
PEL *baseaddr; /* Base of window */
size_t length; /* Size of window */
} VipsWindow;
/* window manager.
*/
VipsWindow *vips_window_ref( struct _VipsImage *im, int top, int height );
int vips_window_unref( VipsWindow *window );
void vips_window_print( VipsWindow *window );
/* Per-thread buffer cache. Held in a GPrivate.
*/
typedef struct {
GHashTable *hash; /* Hash to VipsBufferCacheList* */
GThread *thread; /* Just for sanity checking */
} VipsBufferCache;
/* Per-image buffer cache. Hash to this from VipsBufferCache.
* We can't store the GSList directly in the hash table, as GHashTable lacks an
* update operation and we'd need to _remove() and _insert() on every list
* operation.
*/
typedef struct {
GSList *buffers; /* GSList of VipsBuffer* */
GThread *thread; /* Just for sanity checking */
struct _VipsImage *im;
VipsBufferCache *cache;
} VipsBufferCacheList;
/* What we track for each pixel buffer.
*/
typedef struct {
int ref_count; /* # of regions referencing us */
struct _VipsImage *im; /* VipsImage we are attached to */
VipsRect area; /* Area this pixel buffer covers */
gboolean done; /* Calculated and in cache */
VipsBufferCache *cache;
char *buf; /* Private malloc() area */
size_t bsize; /* Size of private malloc() */
} VipsBuffer;
void vips_buffer_done( VipsBuffer *buffer );
void vips_buffer_undone( VipsBuffer *buffer );
void vips_buffer_unref( VipsBuffer *buffer );
VipsBuffer *vips_buffer_new( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_ref( struct _VipsImage *im, VipsRect *area );
VipsBuffer *vips_buffer_unref_ref( VipsBuffer *buffer,
struct _VipsImage *im, VipsRect *area );
void vips_buffer_print( VipsBuffer *buffer );
/* Sections of region.h that are private to VIPS.
*/
/* Region types.
*/
typedef enum region_type {
VIPS_REGION_NONE,
VIPS_REGION_BUFFER, /* a pixel buffer */
VIPS_REGION_OTHER_REGION, /* memory on another region */
VIPS_REGION_OTHER_IMAGE,/* memory on another image */
VIPS_REGION_WINDOW /* mmap() buffer on fd on another image */
} RegionType;
/* Private to iofuncs: the size of the `tiles' requested by
* vips_image_generate()
* when acting as a data sink.
*/
#define VIPS__TILE_WIDTH (512)
#define VIPS__TILE_HEIGHT (512)
/* The height of the strips for the other two request styles.
*/
#define VIPS__THINSTRIP_HEIGHT (1)
#define VIPS__FATSTRIP_HEIGHT (16)
/* Functions on regions.
*/
struct _VipsRegion;
void vips__region_take_ownership( struct _VipsRegion *reg );
void vips__region_check_ownership( struct _VipsRegion *reg );
void vips__region_no_ownership( struct _VipsRegion *reg );
int vips__region_start( struct _VipsRegion *reg );
void vips__region_stop( struct _VipsRegion *reg );
typedef int (*VipsRegionFillFn)( struct _VipsRegion *, void * );
int vips_region_fill( struct _VipsRegion *reg,
VipsRect *r, VipsRegionFillFn fn, void *a );
/* The new name for im_setupout(), still used by some old code.
*/
int vips__image_write_prepare( struct _VipsImage *image );
/* Start up various packages.
*/
void vips_arithmetic_operation_init( void );
#ifdef __cplusplus
}
#endif /*__cplusplus*/
#endif /*VIPS_PRIVATE_H*/
|