module.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. Copyright 1999 ImageMagick Studio LLC, a non-profit organization
  3. dedicated to making software imaging solutions freely available.
  4. You may not use this file except in compliance with the License. You may
  5. obtain a copy of the License at
  6. https://imagemagick.org/script/license.php
  7. Unless required by applicable law or agreed to in writing, software
  8. distributed under the License is distributed on an "AS IS" BASIS,
  9. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  10. See the License for the specific language governing permissions and
  11. limitations under the License.
  12. MagickCore module methods.
  13. */
  14. #ifndef MAGICKCORE_MODULE_H
  15. #define MAGICKCORE_MODULE_H
  16. #include <time.h>
  17. #include "magick/version.h"
  18. #if defined(__cplusplus) || defined(c_plusplus)
  19. extern "C" {
  20. #endif
  21. #define MagickImageCoderSignature ((size_t) \
  22. (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH))
  23. #define MagickImageFilterSignature ((size_t) \
  24. (((MagickLibInterface) << 8) | MAGICKCORE_QUANTUM_DEPTH))
  25. typedef enum
  26. {
  27. MagickImageCoderModule,
  28. MagickImageFilterModule
  29. } MagickModuleType;
  30. typedef struct _ModuleInfo
  31. {
  32. char
  33. *path,
  34. *tag;
  35. void
  36. *handle,
  37. (*unregister_module)(void);
  38. size_t
  39. (*register_module)(void);
  40. time_t
  41. timestamp;
  42. MagickBooleanType
  43. stealth;
  44. struct _ModuleInfo
  45. *previous,
  46. *next; /* deprecated, use GetModuleInfoList() */
  47. size_t
  48. signature;
  49. } ModuleInfo;
  50. typedef size_t
  51. ImageFilterHandler(Image **,const int,const char **,ExceptionInfo *);
  52. extern MagickExport char
  53. **GetModuleList(const char *,const MagickModuleType,size_t *,ExceptionInfo *);
  54. extern MagickExport const ModuleInfo
  55. **GetModuleInfoList(const char *,size_t *,ExceptionInfo *);
  56. extern MagickExport MagickBooleanType
  57. InvokeDynamicImageFilter(const char *,Image **,const int,const char **,
  58. ExceptionInfo *),
  59. ListModuleInfo(FILE *,ExceptionInfo *),
  60. ModuleComponentGenesis(void),
  61. OpenModule(const char *,ExceptionInfo *),
  62. OpenModules(ExceptionInfo *);
  63. extern MagickExport ModuleInfo
  64. *GetModuleInfo(const char *,ExceptionInfo *);
  65. extern MagickExport void
  66. DestroyModuleList(void),
  67. ModuleComponentTerminus(void);
  68. #if defined(__cplusplus) || defined(c_plusplus)
  69. }
  70. #endif
  71. #endif