summaryrefslogtreecommitdiff
path: root/dmagick/c/utility.d
blob: b83d5ee822dc11ce4d7467ea9a085028a85e6290 (plain)
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
module dmagick.c.utility;

import core.stdc.stdio;

import dmagick.c.exception;
import dmagick.c.magickType;
import dmagick.c.magickVersion;

alias ptrdiff_t ssize_t;

extern(C)
{
	enum PathType
	{
		UndefinedPath,
		MagickPath,
		RootPath,
		HeadPath,
		TailPath,
		BasePath,
		ExtensionPath,
		SubimagePath,
		CanonicalPath
	}

	char*  Base64Encode(const(ubyte)*, const size_t, size_t*);
	char** GetPathComponents(const(char)*, size_t*);
	char** ListFiles(const(char)*, const(char)*, size_t*);

	static if ( MagickLibVersion < 0x673 )
	{
		FILE* OpenMagickStream(const(char)*, const(char)*);
	}

	int SystemCommand(const MagickBooleanType, const MagickBooleanType, const(char)*, ExceptionInfo*);

	MagickBooleanType AcquireUniqueFilename(char*);
	MagickBooleanType AcquireUniqueSymbolicLink(const(char)*, char*);
	MagickBooleanType ExpandFilenames(int*, char***);
	MagickBooleanType GetPathAttributes(const(char)*, void*);
	MagickBooleanType GetExecutionPath(char*, const size_t);
	MagickBooleanType IsPathAccessible(const(char)*);

	size_t MultilineCensus(const(char)*);

	ssize_t GetMagickPageSize();

	ubyte* Base64Decode(const(char)*, size_t*);

	void AppendImageFormat(const(char)*, char*);
	void ChopPathComponents(char*, const size_t);
	void ExpandFilename(char*);
	void GetPathComponent(const(char)*, PathType, char*);

	static if ( MagickLibVersion >= 0x663 )
	{
		void MagickDelay(const MagickSizeType);
	}
}