1 module dmagick.c.cache;
2 
3 import dmagick.c.image;
4 import dmagick.c.pixel;
5 import dmagick.c.exception;
6 import dmagick.c.magickType;
7 import dmagick.c.magickVersion;
8 import dmagick.c.cacheView;
9 
10 alias ptrdiff_t ssize_t;
11 
12 extern(C)
13 {
14 	enum CacheType
15 	{
16 		UndefinedCache,
17 		MemoryCache,
18 		MapCache,
19 		DiskCache,
20 		PingCache,
21 		DistributedCache
22 	}
23 
24 	static if ( MagickLibVersion >= 0x677 )
25 	{
26 		CacheType GetImagePixelCacheType(const(Image)*);
27 	}
28 
29 	const(IndexPacket)* GetVirtualIndexQueue(const(Image)*);
30 
31 	const(PixelPacket)* GetVirtualPixels(const(Image)*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
32 	const(PixelPacket)* GetVirtualPixelQueue(const(Image)*);
33 
34 	const(void)* AcquirePixelCachePixels(const(Image)*, MagickSizeType*, ExceptionInfo*);
35 
36 	IndexPacket* GetAuthenticIndexQueue(const(Image)*);
37 
38 	MagickBooleanType CacheComponentGenesis();
39 	MagickBooleanType GetOneVirtualMagickPixel(const(Image)*, const ssize_t, const ssize_t, MagickPixelPacket*, ExceptionInfo*);
40 	MagickBooleanType GetOneVirtualPixel(const(Image)*, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
41 	MagickBooleanType GetOneVirtualMethodPixel(const(Image)*, const VirtualPixelMethod, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
42 	MagickBooleanType GetOneAuthenticPixel(Image*, const ssize_t, const ssize_t, PixelPacket*, ExceptionInfo*);
43 	MagickBooleanType PersistPixelCache(Image*, const(char)*, const MagickBooleanType, MagickOffsetType*, ExceptionInfo*);
44 	MagickBooleanType SyncAuthenticPixels(Image*, ExceptionInfo*);
45 
46 	MagickSizeType GetImageExtent(const(Image)*);
47 
48 	PixelPacket* GetAuthenticPixels(Image*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
49 	PixelPacket* GetAuthenticPixelQueue(const(Image)*);
50 	PixelPacket* QueueAuthenticPixels(Image*, const ssize_t, const ssize_t, const size_t, const size_t, ExceptionInfo*);
51 
52 	VirtualPixelMethod GetPixelCacheVirtualMethod(const(Image)*);
53 	VirtualPixelMethod SetPixelCacheVirtualMethod(const(Image)*, const VirtualPixelMethod);
54 
55 	void  CacheComponentTerminus();
56 	void* GetPixelCachePixels(Image*, MagickSizeType*, ExceptionInfo*);
57 }