| 1 | |
|---|
| 2 | |
|---|
| 3 | |
|---|
| 4 | |
|---|
| 5 | |
|---|
| 6 | |
|---|
| 7 | |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | |
|---|
| 13 | |
|---|
| 14 | |
|---|
| 15 | |
|---|
| 16 | |
|---|
| 17 | |
|---|
| 18 | #ifndef _MAGICKCORE_DELEGATE_H |
|---|
| 19 | #define _MAGICKCORE_DELEGATE_H |
|---|
| 20 | |
|---|
| 21 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 22 | extern "C" { |
|---|
| 23 | #endif |
|---|
| 24 | |
|---|
| 25 | #if defined(HasGS) |
|---|
| 26 | #include "ghostscript/iapi.h" |
|---|
| 27 | #include "ghostscript/ierrors.h" |
|---|
| 28 | #endif |
|---|
| 29 | |
|---|
| 30 | #ifndef gs_main_instance_DEFINED |
|---|
| 31 | # define gs_main_instance_DEFINED |
|---|
| 32 | typedef struct gs_main_instance_s gs_main_instance; |
|---|
| 33 | #endif |
|---|
| 34 | |
|---|
| 35 | #if !defined(MagickDLLCall) |
|---|
| 36 | # if defined(__WINDOWS__) |
|---|
| 37 | # define MagickDLLCall __stdcall |
|---|
| 38 | # else |
|---|
| 39 | # define MagickDLLCall |
|---|
| 40 | # endif |
|---|
| 41 | #endif |
|---|
| 42 | |
|---|
| 43 | typedef struct _GhostscriptVectors |
|---|
| 44 | { |
|---|
| 45 | int |
|---|
| 46 | (MagickDLLCall *exit)(gs_main_instance *); |
|---|
| 47 | |
|---|
| 48 | int |
|---|
| 49 | (MagickDLLCall *init_with_args)(gs_main_instance *,int,char **); |
|---|
| 50 | |
|---|
| 51 | int |
|---|
| 52 | (MagickDLLCall *new_instance)(gs_main_instance **,void *); |
|---|
| 53 | |
|---|
| 54 | int |
|---|
| 55 | (MagickDLLCall *run_string)(gs_main_instance *,const char *,int,int *); |
|---|
| 56 | |
|---|
| 57 | void |
|---|
| 58 | (MagickDLLCall *delete_instance)(gs_main_instance *); |
|---|
| 59 | } GhostscriptVectors; |
|---|
| 60 | |
|---|
| 61 | typedef struct _DelegateInfo |
|---|
| 62 | { |
|---|
| 63 | char |
|---|
| 64 | *path, |
|---|
| 65 | *decode, |
|---|
| 66 | *encode, |
|---|
| 67 | *commands; |
|---|
| 68 | |
|---|
| 69 | long |
|---|
| 70 | mode; |
|---|
| 71 | |
|---|
| 72 | MagickBooleanType |
|---|
| 73 | thread_support, |
|---|
| 74 | spawn, |
|---|
| 75 | stealth; |
|---|
| 76 | |
|---|
| 77 | struct _DelegateInfo |
|---|
| 78 | *previous, |
|---|
| 79 | *next; |
|---|
| 80 | |
|---|
| 81 | unsigned long |
|---|
| 82 | signature; |
|---|
| 83 | } DelegateInfo; |
|---|
| 84 | |
|---|
| 85 | extern MagickExport char |
|---|
| 86 | *GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *, |
|---|
| 87 | ExceptionInfo *), |
|---|
| 88 | **GetDelegateList(const char *,unsigned long *,ExceptionInfo *); |
|---|
| 89 | |
|---|
| 90 | extern MagickExport const char |
|---|
| 91 | *GetDelegateCommands(const DelegateInfo *); |
|---|
| 92 | |
|---|
| 93 | extern MagickExport const DelegateInfo |
|---|
| 94 | *GetDelegateInfo(const char *,const char *,ExceptionInfo *exception), |
|---|
| 95 | **GetDelegateInfoList(const char *,unsigned long *,ExceptionInfo *); |
|---|
| 96 | |
|---|
| 97 | extern MagickExport long |
|---|
| 98 | GetDelegateMode(const DelegateInfo *); |
|---|
| 99 | |
|---|
| 100 | extern MagickExport MagickBooleanType |
|---|
| 101 | GetDelegateThreadSupport(const DelegateInfo *), |
|---|
| 102 | InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *), |
|---|
| 103 | ListDelegateInfo(FILE *,ExceptionInfo *); |
|---|
| 104 | |
|---|
| 105 | extern MagickExport void |
|---|
| 106 | DestroyDelegateList(void); |
|---|
| 107 | |
|---|
| 108 | #if defined(__cplusplus) || defined(c_plusplus) |
|---|
| 109 | } |
|---|
| 110 | #endif |
|---|
| 111 | |
|---|
| 112 | #endif |
|---|