MagickWand.h revision c3eda391504812473b8d1379d13eda97a1376043
1/* 2 Copyright 1999-2013 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 _MAGICKWAND_MAGICKWAND_H 20#define _MAGICKWAND_MAGICKWAND_H 21 22#if defined(__cplusplus) || defined(c_plusplus) 23extern "C" { 24#endif 25 26#if !defined(_MAGICKWAND_CONFIG_H) 27# define _MAGICKWAND_CONFIG_H 28# if !defined(vms) && !defined(macintosh) 29# include "MagickCore/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(_magickcore_restrict) && !defined(restrict) 40# define restrict _magickcore_restrict 41#endif 42# if defined(__cplusplus) || defined(c_plusplus) 43# undef inline 44# endif 45#endif 46 47#define MAGICKWAND_CHECK_VERSION(major,minor,micro) \ 48 ((MAGICKWAND_MAJOR_VERSION > (major)) || \ 49 ((MAGICKWAND_MAJOR_VERSION == (major)) && \ 50 (MAGICKWAND_MINOR_VERSION > (minor))) || \ 51 ((MAGICKWAND_MAJOR_VERSION == (major)) && \ 52 (MAGICKWAND_MINOR_VERSION == (minor)) && \ 53 (MAGICKWAND_MICRO_VERSION >= (micro)))) 54 55#include <stdio.h> 56#include <stdarg.h> 57#include <stdlib.h> 58#include <math.h> 59#include <sys/types.h> 60 61#if defined(WIN32) || defined(WIN64) 62# define MAGICKWAND_WINDOWS_SUPPORT 63#else 64# define MAGICKWAND_POSIX_SUPPORT 65#endif 66 67#if defined(__BORLANDC__) && defined(_DLL) 68# pragma message("BCBMagick lib DLL export interface") 69# define _MAGICKDLL_ 70# define _MAGICKLIB_ 71#endif 72 73#include "MagickWand/method-attribute.h" 74 75#if defined(MAGICKWAND_WINDOWS_SUPPORT) && !defined(__CYGWIN__) 76# define WandPrivate 77# if defined(_MT) && defined(_DLL) && !defined(_MAGICKDLL_) && !defined(_LIB) 78# define _MAGICKDLL_ 79# endif 80# if defined(_MAGICKDLL_) 81# if defined(_VISUALC_) 82# pragma warning( disable: 4273 ) /* Disable the dll linkage warnings */ 83# endif 84# if !defined(_MAGICKLIB_) 85# if defined(__GNUC__) 86# define WandExport __attribute__ ((__dllimport__)) 87# else 88# define WandExport __declspec(dllimport) 89# endif 90# if defined(_VISUALC_) 91# pragma message( "MagickWand lib DLL import interface" ) 92# endif 93# else 94# if defined(__GNUC__) 95# define WandExport __attribute__ ((__dllexport__)) 96# else 97# define WandExport __declspec(dllexport) 98# endif 99# if defined(_VISUALC_) 100# pragma message( "MagickWand lib DLL export interface" ) 101# endif 102# endif 103# else 104# define WandExport 105# if defined(_VISUALC_) 106# pragma message( "MagickWand lib static interface" ) 107# endif 108# endif 109 110# define WandGlobal __declspec(thread) 111# if defined(_VISUALC_) 112# pragma warning(disable : 4018) 113# pragma warning(disable : 4244) 114# pragma warning(disable : 4142) 115# pragma warning(disable : 4800) 116# pragma warning(disable : 4786) 117# pragma warning(disable : 4996) 118# endif 119#else 120# if __GNUC__ >= 4 121# define WandExport __attribute__ ((__visibility__ ("default"))) 122# define WandPrivate __attribute__ ((__visibility__ ("hidden"))) 123# else 124# define WandExport 125# define WandPrivate 126# endif 127# define WandGlobal 128#endif 129 130#if defined(MAGICKCORE_HAVE___ATTRIBUTE__) 131# define wand_aligned(x) __attribute__((__aligned__(x))) 132# define wand_attribute __attribute__ 133# define wand_unused(x) wand_unused_ ## x __attribute__((__unused__)) 134#else 135# define wand_aligned(x) /* nothing */ 136# define wand_attribute(x) /* nothing */ 137# define wand_unused(x) x 138#endif 139 140#if defined(MAGICKCORE_HAVE___ALLOC_SIZE__) 141# define wand_alloc_size(x) __attribute__((__alloc_size__(x))) 142# define wand_alloc_sizes(x,y) __attribute__((__alloc_size__(x,y))) 143# define wand_cold __attribute__((__cold__)) 144# define wand_hot __attribute__((__hot__)) 145#else 146# define wand_alloc_size(x) /* nothing */ 147# define wand_alloc_sizes(x,y) /* nothing */ 148# define wand_cold 149# define wand_hot 150#endif 151 152typedef struct _MagickWand 153 MagickWand; 154 155#include "MagickCore/MagickCore.h" 156#include "MagickWand/animate.h" 157#include "MagickWand/compare.h" 158#include "MagickWand/composite.h" 159#include "MagickWand/conjure.h" 160#include "MagickWand/convert.h" 161#include "MagickWand/deprecate.h" 162#include "MagickWand/display.h" 163#include "MagickWand/drawing-wand.h" 164#include "MagickWand/identify.h" 165#include "MagickWand/import.h" 166#include "MagickWand/wandcli.h" 167#include "MagickWand/operation.h" 168#include "MagickWand/magick-cli.h" 169#include "MagickWand/magick-property.h" 170#include "MagickWand/magick-image.h" 171#include "MagickWand/mogrify.h" 172#include "MagickWand/montage.h" 173#include "MagickWand/pixel-iterator.h" 174#include "MagickWand/pixel-wand.h" 175#include "MagickWand/stream.h" 176#include "MagickWand/wand-view.h" 177 178extern WandExport char 179 *MagickGetException(const MagickWand *,ExceptionType *); 180 181extern WandExport ExceptionType 182 MagickGetExceptionType(const MagickWand *); 183 184extern WandExport MagickBooleanType 185 IsMagickWand(const MagickWand *), 186 MagickClearException(MagickWand *), 187 MagickSetIteratorIndex(MagickWand *,const ssize_t); 188 189extern WandExport MagickWand 190 *CloneMagickWand(const MagickWand *), 191 *DestroyMagickWand(MagickWand *), 192 *NewMagickWand(void), 193 *NewMagickWandFromImage(const Image *); 194 195extern WandExport ssize_t 196 MagickGetIteratorIndex(MagickWand *); 197 198extern WandExport void 199 ClearMagickWand(MagickWand *), 200 MagickWandGenesis(void), 201 MagickWandTerminus(void), 202 *MagickRelinquishMemory(void *), 203 MagickResetIterator(MagickWand *), 204 MagickSetFirstIterator(MagickWand *), 205 MagickSetLastIterator(MagickWand *); 206 207#if defined(__cplusplus) || defined(c_plusplus) 208} 209#endif 210 211#endif 212