github.com/kaydxh/golang@v0.0.131/pkg/gocv/cgo/third_path/graphics-magick/include/GraphicsMagick/magick/delegate.h (about) 1 /* 2 Copyright (C) 2003 GraphicsMagick Group 3 Copyright (C) 2002 ImageMagick Studio 4 5 This program is covered by multiple licenses, which are described in 6 Copyright.txt. You should have received a copy of Copyright.txt with this 7 package; otherwise see http://www.graphicsmagick.org/www/Copyright.html. 8 9 Methods to Read/Write/Invoke Delegates. 10 */ 11 #ifndef _MAGICK_DELEGATE_H 12 #define _MAGICK_DELEGATE_H 13 14 #if defined(__cplusplus) || defined(c_plusplus) 15 extern "C" { 16 #endif 17 18 /* 19 Delegate structure definitions. 20 */ 21 typedef struct _DelegateInfo 22 { 23 char 24 *path, /* Path to delegate configuation file */ 25 *decode, /* Decode from format */ 26 *encode; /* Transcode to format */ 27 28 char 29 *commands; /* Commands to execute */ 30 31 int mode; /* <0 = encoder, >0 = decoder */ 32 33 MagickBool 34 stealth; /* Don't list this delegate */ 35 36 unsigned long 37 signature; 38 39 struct _DelegateInfo 40 *previous, 41 *next; 42 } DelegateInfo; 43 44 /* 45 Magick delegate methods. 46 */ 47 extern MagickExport char 48 *GetDelegateCommand(const ImageInfo *image_info,Image *image, 49 const char *decode,const char *encode, 50 ExceptionInfo *exception); 51 52 extern MagickExport const DelegateInfo 53 *GetDelegateInfo(const char *decode,const char *encode, 54 ExceptionInfo *exception), 55 *GetPostscriptDelegateInfo(const ImageInfo *image_info, 56 unsigned int *antialias, ExceptionInfo *exception); 57 58 extern MagickExport DelegateInfo 59 *SetDelegateInfo(DelegateInfo *); 60 61 extern MagickExport MagickPassFail 62 InvokePostscriptDelegate(const unsigned int verbose,const char *command, 63 ExceptionInfo *exception), 64 InvokeDelegate(ImageInfo *image_info,Image *image,const char *decode, 65 const char *encode,ExceptionInfo *exception), 66 ListDelegateInfo(FILE *file,ExceptionInfo *exception); 67 68 #if defined(MAGICK_IMPLEMENTATION) 69 70 #if defined(HasGS) 71 #include "ghostscript/iapi.h" 72 #endif 73 74 #ifndef gs_main_instance_DEFINED 75 # define gs_main_instance_DEFINED 76 typedef struct gs_main_instance_s gs_main_instance; 77 #endif 78 79 #if !defined(MagickDLLCall) 80 # if defined(MSWINDOWS) 81 # define MagickDLLCall __stdcall 82 # else 83 # define MagickDLLCall 84 # endif 85 #endif 86 87 /* 88 Define a vector of Ghostscript library callback functions so that 89 DLL/shared and static Ghostscript libbraries may be handled identically. 90 These definitions must be compatible with those in the Ghostscript API 91 headers (which we don't require). 92 93 http://pages.cs.wisc.edu/~ghost/doc/cvs/API.htm 94 */ 95 typedef struct _GhostscriptVectors 96 { 97 /* Exit the interpreter (gsapi_exit)*/ 98 int (MagickDLLCall *exit)(gs_main_instance *instance); 99 100 /* Destroy instance of Ghostscript. Call exit first! (gsapi_delete_instance) */ 101 void (MagickDLLCall *delete_instance)(gs_main_instance *instance); 102 103 /* Initialize the Ghostscript interpreter (gsapi_init_with_args) */ 104 int (MagickDLLCall *init_with_args)(gs_main_instance *instance,int argc, 105 char **argv); 106 107 /* Create a new instance of the Ghostscript interpreter (gsapi_new_instance) */ 108 int (MagickDLLCall *new_instance)(gs_main_instance **pinstance, 109 void *caller_handle); 110 111 /* Execute string command in Ghostscript interpreter (gsapi_run_string) */ 112 int (MagickDLLCall *run_string)(gs_main_instance *instance,const char *str, 113 int user_errors,int *pexit_code); 114 } GhostscriptVectors; 115 116 extern MagickExport void 117 DestroyDelegateInfo(void); 118 119 extern MagickPassFail 120 InitializeDelegateInfo(void); 121 122 #endif /* MAGICK_IMPLEMENTATION */ 123 124 #if defined(__cplusplus) || defined(c_plusplus) 125 } 126 #endif 127 128 #endif /* _MAGICK_DELEGATE_H */ 129 130 /* 131 * Local Variables: 132 * mode: c 133 * c-basic-offset: 2 134 * fill-column: 78 135 * End: 136 */