blob: 1282d56a27ef7f371bd79e9020a01d674b5d2f1a [file] [log] [blame]
cristy3ed852e2009-09-05 21:47:34 +00001/*
Cristyf6ff9ea2016-12-05 09:53:35 -05002 Copyright 1999-2017 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
Cristyf19d4142017-04-24 11:34:30 -04008 https://www.imagemagick.org/script/license.php
cristy3ed852e2009-09-05 21:47:34 +00009
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*/
Cristy83bceaa2016-06-03 20:39:35 -040018#ifndef MAGICKCORE_MODULE_H
19#define MAGICKCORE_MODULE_H
cristy3ed852e2009-09-05 21:47:34 +000020
cristy6398ec72013-11-28 02:00:27 +000021#include "MagickCore/version.h"
22
cristy3ed852e2009-09-05 21:47:34 +000023#if defined(__cplusplus) || defined(c_plusplus)
24extern "C" {
25#endif
26
cristybb503372010-05-27 20:51:26 +000027#define MagickImageCoderSignature ((size_t) \
cristyed2c7202014-09-13 13:00:37 +000028 (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH))
cristybb503372010-05-27 20:51:26 +000029#define MagickImageFilterSignature ((size_t) \
cristyed2c7202014-09-13 13:00:37 +000030 (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH))
cristy3ed852e2009-09-05 21:47:34 +000031
32typedef enum
33{
34 MagickImageCoderModule,
35 MagickImageFilterModule
36} MagickModuleType;
37
38typedef struct _ModuleInfo
39{
40 char
41 *path,
42 *tag;
43
44 void
45 *handle,
46 (*unregister_module)(void);
47
cristybb503372010-05-27 20:51:26 +000048 size_t
cristy3ed852e2009-09-05 21:47:34 +000049 (*register_module)(void);
50
51 time_t
52 timestamp;
53
54 MagickBooleanType
55 stealth;
56
cristybb503372010-05-27 20:51:26 +000057 size_t
cristy3ed852e2009-09-05 21:47:34 +000058 signature;
59} ModuleInfo;
60
cristy7b8e0c32011-08-31 16:57:19 +000061typedef size_t
cristy3ed852e2009-09-05 21:47:34 +000062 ImageFilterHandler(Image **,const int,const char **,ExceptionInfo *);
63
64extern MagickExport char
cristy8a0e4432010-06-30 15:00:28 +000065 **GetModuleList(const char *,const MagickModuleType,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000066
67extern MagickExport const ModuleInfo
cristybb503372010-05-27 20:51:26 +000068 **GetModuleInfoList(const char *,size_t *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000069
70extern MagickExport MagickBooleanType
cristy3ed852e2009-09-05 21:47:34 +000071 InvokeDynamicImageFilter(const char *,Image **,const int,const char **,
72 ExceptionInfo *),
cristy7832dc22011-09-05 01:21:53 +000073 ListModuleInfo(FILE *,ExceptionInfo *);
cristy3ed852e2009-09-05 21:47:34 +000074
75extern MagickExport ModuleInfo
76 *GetModuleInfo(const char *,ExceptionInfo *);
77
78extern MagickExport void
79 DestroyModuleList(void),
cristy3ed852e2009-09-05 21:47:34 +000080 RegisterStaticModules(void),
81 UnregisterStaticModules(void);
82
83#if defined(__cplusplus) || defined(c_plusplus)
84}
85#endif
86
87#endif