blob: 2ce067f6c7c487b362cc282cff2ee57e8d7e775d [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
cristy7e41fe82010-12-04 23:12:08 +00002 Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization
cristy3ed852e2009-09-05 21:47:34 +00003 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 module methods.
17*/
18#ifndef _MAGICKCORE_MODULE_H
19#define _MAGICKCORE_MODULE_H
20
21#if defined(__cplusplus) || defined(c_plusplus)
22extern "C" {
23#endif
24
25#include <time.h>
26#include "magick/version.h"
27
cristybb503372010-05-27 20:51:26 +000028#define MagickImageCoderSignature ((size_t) \
cristy3ed852e2009-09-05 21:47:34 +000029 (((MagickLibVersion) << 8) | MAGICKCORE_QUANTUM_DEPTH))
cristybb503372010-05-27 20:51:26 +000030#define MagickImageFilterSignature ((size_t) \
cristy3ed852e2009-09-05 21:47:34 +000031 (((MagickLibVersion) << 8) | MAGICKCORE_QUANTUM_DEPTH))
32
33typedef enum
34{
35 MagickImageCoderModule,
36 MagickImageFilterModule
37} MagickModuleType;
38
39typedef struct _ModuleInfo
40{
41 char
42 *path,
43 *tag;
44
45 void
46 *handle,
47 (*unregister_module)(void);
48
cristybb503372010-05-27 20:51:26 +000049 size_t
cristy3ed852e2009-09-05 21:47:34 +000050 (*register_module)(void);
51
52 time_t
53 timestamp;
54
55 MagickBooleanType
56 stealth;
57
58 struct _ModuleInfo
59 *previous,
60 *next; /* deprecated, use GetModuleInfoList() */
61
cristybb503372010-05-27 20:51:26 +000062 size_t
cristy3ed852e2009-09-05 21:47:34 +000063 signature;
64} ModuleInfo;
65
cristybb503372010-05-27 20:51:26 +000066typedef ModuleExport size_t
cristy3ed852e2009-09-05 21:47:34 +000067 ImageFilterHandler(Image **,const int,const char **,ExceptionInfo *);
68
69extern MagickExport char
cristy8a0e4432010-06-30 15:00:28 +000070 **GetModuleList(const char *,const MagickModuleType,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000071
72extern MagickExport const ModuleInfo
cristybb503372010-05-27 20:51:26 +000073 **GetModuleInfoList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000074
75extern MagickExport MagickBooleanType
cristy498543d2009-10-11 03:14:50 +000076 InitializeModuleList(ExceptionInfo *),
cristy3ed852e2009-09-05 21:47:34 +000077 InvokeDynamicImageFilter(const char *,Image **,const int,const char **,
78 ExceptionInfo *),
79 ListModuleInfo(FILE *,ExceptionInfo *),
cristyf34a1452009-10-24 22:29:27 +000080 ModuleComponentGenesis(void),
cristy3ed852e2009-09-05 21:47:34 +000081 OpenModule(const char *,ExceptionInfo *),
82 OpenModules(ExceptionInfo *);
83
84extern MagickExport ModuleInfo
85 *GetModuleInfo(const char *,ExceptionInfo *);
86
87extern MagickExport void
88 DestroyModuleList(void),
cristyf34a1452009-10-24 22:29:27 +000089 ModuleComponentTerminus(void),
cristy3ed852e2009-09-05 21:47:34 +000090 RegisterStaticModules(void),
91 UnregisterStaticModules(void);
92
93#if defined(__cplusplus) || defined(c_plusplus)
94}
95#endif
96
97#endif