Home | History | Annotate | Download | only in MagickCore
      1 /*
      2   Copyright 1999-2016 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   MagickCore magick methods.
     17 */
     18 #ifndef MAGICKCORE_MAGICK_H
     19 #define MAGICKCORE_MAGICK_H
     20 
     21 #if defined(__cplusplus) || defined(c_plusplus)
     22 extern "C" {
     23 #endif
     24 
     25 #include <stdarg.h>
     26 #include "MagickCore/semaphore.h"
     27 
     28 typedef enum
     29 {
     30   UndefinedFormatType,
     31   ImplicitFormatType,
     32   ExplicitFormatType
     33 } MagickFormatType;
     34 
     35 typedef enum
     36 {
     37   CoderNoFlag = 0x0000,
     38   CoderAdjoinFlag = 0x0001,
     39   CoderBlobSupportFlag = 0x0002,
     40   CoderDecoderThreadSupportFlag = 0x0004,
     41   CoderEncoderThreadSupportFlag = 0x0008,
     42   CoderEndianSupportFlag = 0x0010,
     43   CoderRawSupportFlag = 0x0020,
     44   CoderSeekableStreamFlag = 0x0040,
     45   CoderStealthFlag = 0x0080,
     46   CoderUseExtensionFlag = 0x0100
     47 } MagickInfoFlag;
     48 
     49 typedef Image
     50   *DecodeImageHandler(const ImageInfo *,ExceptionInfo *);
     51 
     52 typedef MagickBooleanType
     53   EncodeImageHandler(const ImageInfo *,Image *,ExceptionInfo *);
     54 
     55 typedef MagickBooleanType
     56   IsImageFormatHandler(const unsigned char *,const size_t);
     57 
     58 typedef struct _MagickInfo
     59 {
     60   char
     61     *name,
     62     *description,
     63     *version,
     64     *mime_type,
     65     *note,
     66     *module;
     67 
     68   DecodeImageHandler
     69     *decoder;
     70 
     71   EncodeImageHandler
     72     *encoder;
     73 
     74   ImageInfo
     75     *image_info;
     76 
     77   IsImageFormatHandler
     78     *magick;
     79 
     80   MagickFormatType
     81     format_type;
     82 
     83   MagickStatusType
     84     flags;
     85 
     86   SemaphoreInfo
     87     *semaphore;
     88 
     89   size_t
     90     signature;
     91 
     92   void
     93     *client_data;
     94 } MagickInfo;
     95 
     96 extern MagickExport char
     97   **GetMagickList(const char *,size_t *,ExceptionInfo *);
     98 
     99 extern MagickExport const char
    100   *GetMagickDescription(const MagickInfo *),
    101   *GetMagickMimeType(const MagickInfo *);
    102 
    103 extern MagickExport DecodeImageHandler
    104   *GetImageDecoder(const MagickInfo *);
    105 
    106 extern MagickExport EncodeImageHandler
    107   *GetImageEncoder(const MagickInfo *);
    108 
    109 extern MagickExport int
    110   GetMagickPrecision(void),
    111   SetMagickPrecision(const int);
    112 
    113 extern MagickExport MagickBooleanType
    114   GetImageMagick(const unsigned char *,const size_t,char *),
    115   GetMagickAdjoin(const MagickInfo *),
    116   GetMagickBlobSupport(const MagickInfo *),
    117   GetMagickDecoderThreadSupport(const MagickInfo *),
    118   GetMagickEncoderThreadSupport(const MagickInfo *),
    119   GetMagickEndianSupport(const MagickInfo *),
    120   GetMagickRawSupport(const MagickInfo *),
    121   GetMagickSeekableStream(const MagickInfo *),
    122   GetMagickStealth(const MagickInfo *),
    123   GetMagickUseExtension(const MagickInfo *),
    124   IsMagickCoreInstantiated(void),
    125   RegisterMagickInfo(MagickInfo *),
    126   UnregisterMagickInfo(const char *);
    127 
    128 extern const MagickExport MagickInfo
    129   *GetMagickInfo(const char *,ExceptionInfo *),
    130   **GetMagickInfoList(const char *,size_t *,ExceptionInfo *);
    131 
    132 extern MagickExport MagickInfo
    133   *AcquireMagickInfo(const char *, const char *, const char *);
    134 
    135 extern MagickExport void
    136   MagickCoreGenesis(const char *,const MagickBooleanType),
    137   MagickCoreTerminus(void);
    138 
    139 #if defined(__cplusplus) || defined(c_plusplus)
    140 }
    141 #endif
    142 
    143 #endif
    144