00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 #ifndef _MAGICKCORE_DELEGATE_H
00019 #define _MAGICKCORE_DELEGATE_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #if defined(MAGICKCORE_GS_DELEGATE)
00026 #include "ghostscript/iapi.h"
00027 #include "ghostscript/ierrors.h"
00028 #endif
00029 
00030 #ifndef gs_main_instance_DEFINED
00031 # define gs_main_instance_DEFINED
00032 typedef struct gs_main_instance_s gs_main_instance;
00033 #endif
00034 
00035 #if !defined(MagickDLLCall)
00036 #  if defined(__WINDOWS__)
00037 #    define MagickDLLCall __stdcall
00038 #  else
00039 #    define MagickDLLCall
00040 #  endif
00041 #endif
00042 
00043 typedef struct _GhostscriptVectors
00044 {
00045   int
00046     (MagickDLLCall *exit)(gs_main_instance *);
00047 
00048   int
00049     (MagickDLLCall *init_with_args)(gs_main_instance *,int,char **);
00050 
00051   int
00052     (MagickDLLCall *new_instance)(gs_main_instance **,void *);
00053 
00054   int
00055     (MagickDLLCall *run_string)(gs_main_instance *,const char *,int,int *);
00056 
00057   void
00058     (MagickDLLCall *delete_instance)(gs_main_instance *);
00059 } GhostscriptVectors;
00060 
00061 typedef struct _DelegateInfo
00062 {
00063   char
00064     *path,
00065     *decode,
00066     *encode,
00067     *commands;
00068                                                                                 
00069   long
00070     mode;
00071                                                                                 
00072   MagickBooleanType
00073     thread_support,
00074     spawn,
00075     stealth;
00076                                                                                 
00077   struct _DelegateInfo
00078     *previous,
00079     *next;  
00080 
00081   unsigned long
00082     signature;
00083 } DelegateInfo;
00084 
00085 extern MagickExport char
00086   *GetDelegateCommand(const ImageInfo *,Image *,const char *,const char *,
00087     ExceptionInfo *),
00088   **GetDelegateList(const char *,unsigned long *,ExceptionInfo *);
00089 
00090 extern MagickExport const char
00091   *GetDelegateCommands(const DelegateInfo *);
00092 
00093 extern MagickExport const DelegateInfo
00094   *GetDelegateInfo(const char *,const char *,ExceptionInfo *exception),
00095   **GetDelegateInfoList(const char *,unsigned long *,ExceptionInfo *);
00096 
00097 extern MagickExport long
00098   GetDelegateMode(const DelegateInfo *);
00099 
00100 extern MagickExport MagickBooleanType
00101   GetDelegateThreadSupport(const DelegateInfo *),
00102   InvokeDelegate(ImageInfo *,Image *,const char *,const char *,ExceptionInfo *),
00103   ListDelegateInfo(FILE *,ExceptionInfo *);
00104 
00105 extern MagickExport void
00106   DestroyDelegateList(void);
00107 
00108 #if defined(__cplusplus) || defined(c_plusplus)
00109 }
00110 #endif
00111 
00112 #endif