summaryrefslogtreecommitdiff
path: root/Wrapper/FreeImage.NET/cs/Library/Structs/Plugin.cs
blob: 8de1666484dba04295cd26cada2a22be3848a35f (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
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
// ==========================================================
// FreeImage 3 .NET wrapper
// Original FreeImage 3 functions and .NET compatible derived functions
//
// Design and implementation by
// - Jean-Philippe Goerke (jpgoerke@users.sourceforge.net)
// - Carsten Klein (cklein05@users.sourceforge.net)
//
// Contributors:
// - David Boland (davidboland@vodafone.ie)
//
// Main reference : MSDN Knowlede Base
//
// This file is part of FreeImage 3
//
// COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTY
// OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
// THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE
// OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED
// CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT
// THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF ANY NECESSARY
// SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL
// PART OF THIS LICENSE. NO USE OF ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER
// THIS DISCLAIMER.
//
// Use at your own risk!
// ==========================================================

// ==========================================================
// CVS
// $Revision: 1.3 $
// $Date: 2008/06/17 13:48:22 $
// $Id: Plugin.cs,v 1.3 2008/06/17 13:48:22 cklein05 Exp $
// ==========================================================

using System;
using System.Runtime.InteropServices;
using FreeImageAPI.Plugins;

namespace FreeImageAPI.Plugins
{
	/// <summary>
	/// The structure contains functionpointers that make up a FreeImage plugin.
	/// </summary>
	[Serializable, StructLayout(LayoutKind.Sequential)]
	public struct Plugin
	{
		/// <summary>
		/// Delegate to a function that returns a string which describes
		/// the plugins format.
		/// </summary>
		public FormatProc formatProc;

		/// <summary>
		/// Delegate to a function that returns a string which contains
		/// a more detailed description.
		/// </summary>
		public DescriptionProc descriptionProc;

		/// <summary>
		/// Delegate to a function that returns a comma seperated list
		/// of file extensions the plugin can read or write.
		/// </summary>
		public ExtensionListProc extensionListProc;

		/// <summary>
		/// Delegate to a function that returns a regular expression that
		/// can be used to idientify whether a file can be handled by the plugin.
		/// </summary>
		public RegExprProc regExprProc;

		/// <summary>
		/// Delegate to a function that opens a file.
		/// </summary>
		public OpenProc openProc;

		/// <summary>
		/// Delegate to a function that closes a previosly opened file.
		/// </summary>
		public CloseProc closeProc;

		/// <summary>
		/// Delegate to a function that returns the number of pages of a multipage
		/// bitmap if the plugin is capable of handling multipage bitmaps.
		/// </summary>
		public PageCountProc pageCountProc;

		/// <summary>
		/// UNKNOWN
		/// </summary>
		public PageCapabilityProc pageCapabilityProc;

		/// <summary>
		/// Delegate to a function that loads and decodes a bitmap into memory.
		/// </summary>
		public LoadProc loadProc;

		/// <summary>
		///  Delegate to a function that saves a bitmap.
		/// </summary>
		public SaveProc saveProc;

		/// <summary>
		/// Delegate to a function that determines whether the source is a valid image.
		/// </summary>
		public ValidateProc validateProc;

		/// <summary>
		/// Delegate to a function that returns a string which contains
		/// the plugin's mime type.
		/// </summary>
		public MimeProc mimeProc;

		/// <summary>
		/// Delegate to a function that returns whether the plugin can handle the
		/// specified color depth.
		/// </summary>
		public SupportsExportBPPProc supportsExportBPPProc;

		/// <summary>
		/// Delegate to a function that returns whether the plugin can handle the
		/// specified image type.
		/// </summary>
		public SupportsExportTypeProc supportsExportTypeProc;

		/// <summary>
		/// Delegate to a function that returns whether the plugin can handle
		/// ICC-Profiles.
		/// </summary>
		public SupportsICCProfilesProc supportsICCProfilesProc;
	}
}