]> granicus.if.org Git - imagemagick/blob - wand/MagickWand.h
c506c83735a079e4a80eca671018f8298f72eca2
[imagemagick] / wand / MagickWand.h
1 /*
2   Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization
3   dedicated to making software imaging solutions freely available.
4   
5   You may not use this file except in compliance with the License.
6   obtain a copy of the License at
7   
8     http://www.imagemagick.org/script/license.php
9   
10   Unless required by applicable law or agreed to in writing, software
11   distributed under the License is distributed on an "AS IS" BASIS,
12   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   See the License for the specific language governing permissions and
14   limitations under the License.
15
16   MagickWand Application Programming Interface declarations.
17 */
18
19 #ifndef _MAGICK_WAND_H
20 #define _MAGICK_WAND_H
21
22 #if defined(__cplusplus) || defined(c_plusplus)
23 extern "C" {
24 #endif
25
26 #if !defined(_MAGICKWAND_CONFIG_H)
27 # define _MAGICKWAND_CONFIG_H
28 # if !defined(vms) && !defined(macintosh)
29 #  include "magick/magick-config.h"
30 # else
31 #  include "magick-config.h"
32 # endif
33 #if defined(_magickcore_const) && !defined(const)
34 # define const _magickcore_const
35 #endif
36 #if defined(_magickcore_inline) && !defined(inline)
37 # define inline _magickcore_inline
38 #endif
39 # if defined(__cplusplus) || defined(c_plusplus)
40 #  undef inline
41 # endif
42 #endif
43
44 #include <stdio.h>
45 #include <stdarg.h>
46 #include <stdlib.h>
47 #include <sys/types.h>
48
49 #if defined(WIN32) || defined(WIN64)
50 #  define MAGICKCORE_WINDOWS_SUPPORT
51 #if defined(_WIN64) 
52  typedef __int64 ssize_t;
53 #else
54  typedef long ssize_t;
55 #endif
56 #else
57 #  define MAGICKCORE_POSIX_SUPPORT
58 #endif 
59
60 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && !defined(__CYGWIN__) && !defined(__MINGW32__)
61 # if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB)
62 #  define _MAGICKDLL_
63 # endif
64 # if defined(_MAGICKDLL_)
65 #  if defined(_VISUALC_)
66 #   pragma warning( disable: 4273 )  /* Disable the dll linkage warnings */
67 #  endif
68 #  if !defined(_MAGICKLIB_)
69 #   define WandExport  __declspec(dllimport)
70 #   if defined(_VISUALC_)
71 #    pragma message( "MagickWand lib DLL import interface" )
72 #   endif
73 #  else
74 #   define WandExport  __declspec(dllexport)
75 #   if defined(_VISUALC_)
76 #    pragma message( "MagickWand lib DLL export interface" )
77 #   endif
78 #  endif
79 # else
80 #  define WandExport
81 #  if defined(_VISUALC_)
82 #   pragma message( "MagickWand lib static interface" )
83 #  endif
84 # endif
85
86 # if defined(_DLL) && !defined(_LIB)
87 #  define ModuleExport  __declspec(dllexport)
88 #  if defined(_VISUALC_)
89 #   pragma message( "MagickWand module DLL export interface" )
90 #  endif
91 # else
92 #  define ModuleExport
93 #  if defined(_VISUALC_)
94 #   pragma message( "MagickWand module static interface" )
95 #  endif
96
97 # endif
98 # define WandGlobal __declspec(thread)
99 # if defined(_VISUALC_)
100 #  pragma warning(disable : 4018)
101 #  pragma warning(disable : 4244)
102 #  pragma warning(disable : 4142)
103 #  pragma warning(disable : 4800)
104 #  pragma warning(disable : 4786)
105 #  pragma warning(disable : 4996)
106 # endif
107 #else
108 # define WandExport
109 # define ModuleExport
110 # define WandGlobal
111 #endif
112
113 #if !defined(MaxTextExtent)
114 # define MaxTextExtent  4096
115 #endif
116 #define WandSignature  0xabacadabUL
117
118 #if !defined(wand_attribute)
119 #  if !defined(__GNUC__)
120 #    define wand_attribute(x)  /* nothing */
121 #  else
122 #    define wand_attribute  __attribute__
123 #  endif
124 #endif
125
126 typedef struct _MagickWand
127   MagickWand;
128
129 #include "magick/MagickCore.h"
130 #include "wand/animate.h"
131 #include "wand/compare.h"
132 #include "wand/composite.h"
133 #include "wand/conjure.h"
134 #include "wand/convert.h"
135 #include "wand/deprecate.h"
136 #include "wand/display.h"
137 #include "wand/drawing-wand.h"
138 #include "wand/identify.h"
139 #include "wand/import.h"
140 #include "wand/magick-property.h"
141 #include "wand/magick-image.h"
142 #include "wand/mogrify.h"
143 #include "wand/montage.h"
144 #include "wand/pixel-iterator.h"
145 #include "wand/pixel-view.h"
146 #include "wand/pixel-wand.h"
147 #include "wand/stream.h"
148
149 extern WandExport char
150   *MagickGetException(const MagickWand *,ExceptionType *);
151
152 extern WandExport ExceptionType
153   MagickGetExceptionType(const MagickWand *);
154
155 extern WandExport MagickBooleanType
156   IsMagickWand(const MagickWand *),
157   MagickClearException(MagickWand *),
158   MagickSetIteratorIndex(MagickWand *,const ssize_t);
159
160 extern WandExport MagickWand
161   *CloneMagickWand(const MagickWand *),
162   *DestroyMagickWand(MagickWand *),
163   *NewMagickWand(void),
164   *NewMagickWandFromImage(const Image *);
165
166 extern WandExport ssize_t
167   MagickGetIteratorIndex(MagickWand *);
168
169 extern WandExport void
170   ClearMagickWand(MagickWand *),
171   MagickWandGenesis(void),
172   MagickWandTerminus(void),
173   *MagickRelinquishMemory(void *),
174   MagickResetIterator(MagickWand *),
175   MagickSetFirstIterator(MagickWand *),
176   MagickSetLastIterator(MagickWand *);
177
178 #if defined(__cplusplus) || defined(c_plusplus)
179 }
180 #endif
181
182 #endif