module.h 2.33 KB
Newer Older
cristy's avatar
cristy committed
1
/*
cristy's avatar
cristy committed
2
  Copyright 1999-2013 ImageMagick Studio LLC, a non-profit organization
cristy's avatar
cristy committed
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
  dedicated to making software imaging solutions freely available.
  
  You may not use this file except in compliance with the License.
  obtain a copy of the License at
  
    http://www.imagemagick.org/script/license.php
  
  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.

  MagickCore module methods.
*/
#ifndef _MAGICKCORE_MODULE_H
#define _MAGICKCORE_MODULE_H

#if defined(__cplusplus) || defined(c_plusplus)
extern "C" {
#endif

#include <time.h>
#include "magick/version.h"

cristy's avatar
cristy committed
28
#define MagickImageCoderSignature  ((size_t) \
cristy's avatar
cristy committed
29
  (((MagickLibVersion) << 8) | MAGICKCORE_QUANTUM_DEPTH))
cristy's avatar
cristy committed
30
#define MagickImageFilterSignature  ((size_t) \
cristy's avatar
cristy committed
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
  (((MagickLibVersion) << 8) | MAGICKCORE_QUANTUM_DEPTH))

typedef enum
{
  MagickImageCoderModule,
  MagickImageFilterModule
} MagickModuleType;

typedef struct _ModuleInfo
{
  char
    *path,
    *tag;

  void
    *handle,
    (*unregister_module)(void);

cristy's avatar
cristy committed
49
  size_t
cristy's avatar
cristy committed
50 51 52 53 54 55 56 57 58 59 60 61
    (*register_module)(void);

  time_t
    timestamp;

  MagickBooleanType
    stealth;

  struct _ModuleInfo
    *previous,
    *next;  /* deprecated, use GetModuleInfoList() */

cristy's avatar
cristy committed
62
  size_t
cristy's avatar
cristy committed
63 64 65
    signature;
} ModuleInfo;

cristy's avatar
cristy committed
66
typedef size_t
cristy's avatar
cristy committed
67 68 69
  ImageFilterHandler(Image **,const int,const char **,ExceptionInfo *);

extern MagickExport char
cristy's avatar
cristy committed
70
  **GetModuleList(const char *,const MagickModuleType,size_t *,ExceptionInfo *);
cristy's avatar
cristy committed
71 72

extern MagickExport const ModuleInfo
cristy's avatar
cristy committed
73
  **GetModuleInfoList(const char *,size_t *,ExceptionInfo *);
cristy's avatar
cristy committed
74 75

extern MagickExport MagickBooleanType
cristy's avatar
cristy committed
76
  InitializeModuleList(ExceptionInfo *),
cristy's avatar
cristy committed
77 78 79
  InvokeDynamicImageFilter(const char *,Image **,const int,const char **,
    ExceptionInfo *),
  ListModuleInfo(FILE *,ExceptionInfo *),
cristy's avatar
cristy committed
80
  ModuleComponentGenesis(void),
cristy's avatar
cristy committed
81 82 83 84 85 86 87 88
  OpenModule(const char *,ExceptionInfo *),
  OpenModules(ExceptionInfo *);

extern MagickExport ModuleInfo
  *GetModuleInfo(const char *,ExceptionInfo *);

extern MagickExport void
  DestroyModuleList(void),
cristy's avatar
cristy committed
89
  ModuleComponentTerminus(void),
cristy's avatar
cristy committed
90 91 92 93 94 95 96 97
  RegisterStaticModules(void),
  UnregisterStaticModules(void);

#if defined(__cplusplus) || defined(c_plusplus)
}
#endif

#endif