Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-08-27 09:33:38

0001 /* Copyright (C) 2001-2023 Artifex Software, Inc.
0002    All Rights Reserved.
0003 
0004    This software is provided AS-IS with no warranty, either express or
0005    implied.
0006 
0007    This software is distributed under license and may not be copied,
0008    modified or distributed except as expressly authorized under the terms
0009    of the license contained in the file LICENSE in this distribution.
0010 
0011    Refer to licensing information at http://www.artifex.com or contact
0012    Artifex Software, Inc.,  39 Mesa Street, Suite 108A, San Francisco,
0013    CA 94129, USA, for further information.
0014 */
0015 
0016 
0017 
0018 /*
0019  * Public API for Ghostscript interpreter
0020  * for use both as DLL and for static linking.
0021  *
0022  * Should work for Windows, OS/2, Linux, Mac.
0023  *
0024  * DLL exported functions should be as similar as possible to imain.c
0025  * You will need to include "ierrors.h".
0026  *
0027  * Current problems:
0028  * 1. Ghostscript does not support multiple instances.
0029  * 2. Global variables in gs_main_instance_default()
0030  *    and gsapi_instance_counter
0031  */
0032 
0033 /* Exported functions may need different prefix
0034  *  GSDLLEXPORT marks functions as exported
0035  *  GSDLLAPI is the calling convention used on functions exported
0036  *   by Ghostscript
0037  *  GSDLLCALL is used on callback functions called by Ghostscript
0038  * When you include this header file in the caller, you may
0039  * need to change the definitions by defining these
0040  * before including this header file.
0041  * Make sure you get the calling convention correct, otherwise your
0042  * program will crash either during callbacks or soon after returning
0043  * due to stack corruption.
0044  */
0045 
0046 #ifndef iapi_INCLUDED
0047 #  define iapi_INCLUDED
0048 
0049 #ifdef __cplusplus
0050 extern "C" {
0051 #endif
0052 
0053 #if defined(_WINDOWS_) || defined(__WINDOWS__)
0054 # ifndef _Windows
0055 #  define _Windows
0056 # endif
0057 #endif
0058 
0059 #ifdef _Windows
0060 # ifndef GSDLLEXPORT
0061 /* We don't need both the "__declspec(dllexport)" declaration
0062  * and the listing in the .def file - having both results in
0063  * a linker warning on x64 builds (but is incorrect on x86, too)
0064  */
0065 #  if 0
0066 #    define GSDLLEXPORT __declspec(dllexport)
0067 #  else
0068 #    define GSDLLEXPORT
0069 #  endif
0070 # endif
0071 # ifdef __MINGW32__
0072 /* export stdcall functions as "name" instead of "_name@ordinal" */
0073 #  undef GSDLLAPI
0074 #  define GSDLLAPI
0075 # endif
0076 # ifndef GSDLLAPI
0077 #  define GSDLLAPI __stdcall
0078 # endif
0079 # ifndef GSDLLCALL
0080 #  define GSDLLCALL __stdcall
0081 # endif
0082 #endif  /* _Windows */
0083 
0084 #if defined(OS2) && defined(__IBMC__)
0085 # ifndef GSDLLAPI
0086 #  define GSDLLAPI _System
0087 # endif
0088 # ifndef GSDLLCALL
0089 #  define GSDLLCALL _System
0090 # endif
0091 #endif  /* OS2 && __IBMC */
0092 
0093 #ifdef __MACOS__
0094 # pragma export on
0095 #endif
0096 
0097 #ifndef GSDLLEXPORT
0098 # ifdef __GNUC__
0099 #   define GSDLLEXPORT __attribute__ ((visibility ("default")))
0100 # else
0101 #   define GSDLLEXPORT
0102 # endif
0103 #endif
0104 #ifndef GSDLLAPI
0105 # define GSDLLAPI
0106 #endif
0107 #ifndef GSDLLCALL
0108 # define GSDLLCALL
0109 #endif
0110 
0111 #if defined(__IBMC__)
0112 # define GSDLLAPIPTR * GSDLLAPI
0113 # define GSDLLCALLPTR * GSDLLCALL
0114 #else
0115 # define GSDLLAPIPTR GSDLLAPI *
0116 # define GSDLLCALLPTR GSDLLCALL *
0117 #endif
0118 
0119 #ifndef display_callback_DEFINED
0120 # define display_callback_DEFINED
0121 typedef struct display_callback_s display_callback;
0122 #endif
0123 
0124 #ifndef gs_memory_DEFINED
0125 #  define gs_memory_DEFINED
0126 typedef struct gs_memory_s gs_memory_t;
0127 #endif
0128 
0129 #ifndef gp_file_DEFINED
0130 #  define gp_file_DEFINED
0131 typedef struct gp_file_s gp_file;
0132 #endif
0133 
0134 typedef struct gsapi_revision_s {
0135     const char *product;
0136     const char *copyright;
0137     long revision;
0138     long revisiondate;
0139 } gsapi_revision_t;
0140 
0141 /* Get version numbers and strings.
0142  * This is safe to call at any time.
0143  * You should call this first to make sure that the correct version
0144  * of the Ghostscript is being used.
0145  * pr is a pointer to a revision structure.
0146  * len is the size of this structure in bytes.
0147  * Returns 0 if OK, or if len too small (additional parameters
0148  * have been added to the structure) it will return the required
0149  * size of the structure.
0150  */
0151 GSDLLEXPORT int GSDLLAPI
0152 gsapi_revision(gsapi_revision_t *pr, int len);
0153 
0154 /*
0155  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
0156  *  On non-threading capable platforms, Ghostscript supports only
0157  *  one instance. The current implementation uses a global static
0158  *  instance counter to make sure that only a single instance is
0159  *  used. If you try to create two instances, the second attempt
0160  *  will return < 0 and set pinstance to NULL.
0161  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
0162  */
0163 /* Create a new instance of Ghostscript.
0164  * This instance is passed to most other API functions.
0165  * The caller_handle will be provided to callback functions.
0166  */
0167 
0168 GSDLLEXPORT int GSDLLAPI
0169 gsapi_new_instance(void **pinstance, void *caller_handle);
0170 
0171 /*
0172  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
0173  *  On non-threading capable platforms, Ghostscript supports only
0174  *  one instance. The current implementation uses a global static
0175  *  instance counter to make sure that only a single instance is
0176  *  used.
0177  * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING
0178  */
0179 /* Destroy an instance of Ghostscript
0180  * Before you call this, Ghostscript must have finished.
0181  * If Ghostscript has been initialised, you must call gsapi_exit()
0182  * before gsapi_delete_instance.
0183  */
0184 GSDLLEXPORT void GSDLLAPI
0185 gsapi_delete_instance(void *instance);
0186 
0187 /* Set the callback functions for stdio
0188  * The stdin callback function should return the number of
0189  * characters read, 0 for EOF, or -1 for error.
0190  * The stdout and stderr callback functions should return
0191  * the number of characters written.
0192  * If a callback address is NULL, the real stdio will be used.
0193  */
0194 GSDLLEXPORT int GSDLLAPI
0195 gsapi_set_stdio(void *instance,
0196     int (GSDLLCALLPTR stdin_fn)(void *caller_handle, char *buf, int len),
0197     int (GSDLLCALLPTR stdout_fn)(void *caller_handle, const char *str, int len),
0198     int (GSDLLCALLPTR stderr_fn)(void *caller_handle, const char *str, int len));
0199 
0200 /* Does the same as the above, but using the caller_handle given here,
0201  * rather than the default one specified at gsapi_new_instance time. */
0202 GSDLLEXPORT int GSDLLAPI
0203 gsapi_set_stdio_with_handle(void *instance,
0204     int (GSDLLCALLPTR stdin_fn)(void *caller_handle, char *buf, int len),
0205     int (GSDLLCALLPTR stdout_fn)(void *caller_handle, const char *str, int len),
0206     int (GSDLLCALLPTR stderr_fn)(void *caller_handle, const char *str, int len),
0207     void *caller_handle);
0208 
0209 /* Set the callback function for polling.
0210  * This is used for handling window events or cooperative
0211  * multitasking.  This function will only be called if
0212  * Ghostscript was compiled with CHECK_INTERRUPTS
0213  * as described in gpcheck.h.
0214  * The polling function should return 0 if all is well,
0215  * and negative if it wants ghostscript to abort.
0216  * The polling function must be fast.
0217  */
0218 GSDLLEXPORT int GSDLLAPI gsapi_set_poll(void *instance,
0219     int (GSDLLCALLPTR poll_fn)(void *caller_handle));
0220 
0221 /* Does the same as the above, but using the caller_handle given here,
0222  * rather than the default one specified at gsapi_new_instance time. */
0223 GSDLLEXPORT int GSDLLAPI gsapi_set_poll_with_handle(void *instance,
0224     int (GSDLLCALLPTR poll_fn)(void *caller_handle), void *caller_handle);
0225 
0226 /* Set the display device callback structure.
0227  * If the display device is used, this must be called
0228  * after gsapi_new_instance() and before gsapi_init_with_args().
0229  * See gdevdisp.h for more details.
0230  * DEPRECATED: Use the gsapi_register_callback mechanism instead.
0231  */
0232 GSDLLEXPORT int GSDLLAPI gsapi_set_display_callback(
0233    void *instance, display_callback *callback);
0234 
0235 /* The callout mechanism allows devices to query "callers" (users of the
0236  * DLL) in device specific ways. The callout function pointer type will
0237  * be called with:
0238  *   callout_handle = the value given at registration
0239  *   device_name    = the name of the current device
0240  *   id             = An integer, guaranteed to be unique within the
0241  *                    callouts from a given device, identifying the
0242  *                    purpose of this call.
0243  *   size           = device/id specific, but typically the size of 'data'.
0244  *   data           = device/id specific, but typically the pointer to
0245  *                    an in/out data block.
0246  *  Returns an error code (gs_error_unknownerror (-1) if unclaimed,
0247  *  non-negative on success, standard gs error numbers recommended).
0248  */
0249 typedef int (*gs_callout)(void *instance,
0250                           void *callout_handle,
0251                           const char *device_name,
0252                           int id,
0253                           int size,
0254                           void *data);
0255 
0256 /* Register a handler for gs callouts.
0257  * This must be called after gsapi_new_instance() and (typically)
0258  * before gsapi_init_with_args().
0259  */
0260 GSDLLEXPORT int GSDLLAPI gsapi_register_callout(
0261    void *instance, gs_callout callout, void *callout_handle);
0262 
0263 /* Deregister a handler for gs callouts. */
0264 GSDLLEXPORT void GSDLLAPI gsapi_deregister_callout(
0265    void *instance, gs_callout callout, void *callout_handle);
0266 
0267 /* Set the string containing the list of default device names
0268  * for example "display x11alpha x11 bbox". Allows the calling
0269  * application to influence which device(s) gs will try in order
0270  * to select the default device
0271  *
0272  * *Must* be called after gsapi_new_instance() and before
0273  * gsapi_init_with_args().
0274  */
0275 GSDLLEXPORT int GSDLLAPI
0276 gsapi_set_default_device_list(void *instance, const char *list, int listlen);
0277 
0278 /* Returns a pointer to the current default device string
0279  * *Must* be called after gsapi_new_instance().
0280  */
0281 GSDLLEXPORT int GSDLLAPI
0282 gsapi_get_default_device_list(void *instance, char **list, int *listlen);
0283 
0284 /* Set the encoding used for the args. By default we assume
0285  * 'local' encoding. For windows this equates to whatever the current
0286  * codepage is. For linux this is utf8.
0287  *
0288  * Use of this API (gsapi) with 'local' encodings (and hence without calling
0289  * this function) is now deprecated!
0290  */
0291 GSDLLEXPORT int GSDLLAPI gsapi_set_arg_encoding(void *instance,
0292                                                 int encoding);
0293 
0294 enum {
0295     GS_ARG_ENCODING_LOCAL = 0,
0296     GS_ARG_ENCODING_UTF8 = 1,
0297     GS_ARG_ENCODING_UTF16LE = 2
0298 };
0299 
0300 /* Initialise the interpreter.
0301  * This calls gs_main_init_with_args() in imainarg.c
0302  * 1. If quit or EOF occur during gsapi_init_with_args(),
0303  *    the return value will be gs_error_Quit.  This is not an error.
0304  *    You must call gsapi_exit() and must not call any other
0305  *    gsapi_XXX functions.
0306  * 2. If usage info should be displayed, the return value will be gs_error_Info
0307  *    which is not an error.  Do not call gsapi_exit().
0308  * 3. Under normal conditions this returns 0.  You would then
0309  *    call one or more gsapi_run_*() functions and then finish
0310  *    with gsapi_exit().
0311  */
0312 GSDLLEXPORT int GSDLLAPI gsapi_init_with_args(void *instance,
0313     int argc, char **argv);
0314 
0315 #ifdef __WIN32__
0316 GSDLLEXPORT int GSDLLAPI gsapi_init_with_argsA(void *instance,
0317     int argc, char **argv);
0318 
0319 GSDLLEXPORT int GSDLLAPI gsapi_init_with_argsW(void *instance,
0320     int argc, wchar_t **argv);
0321 #endif
0322 
0323 /*
0324  * The gsapi_run_* functions are like gs_main_run_* except
0325  * that the error_object is omitted.
0326  * If these functions return <= -100, either quit or a fatal
0327  * error has occured.  You then call gsapi_exit() next.
0328  * The only exception is gsapi_run_string_continue()
0329  * which will return gs_error_NeedInput if all is well.
0330  */
0331 
0332 GSDLLEXPORT int GSDLLAPI
0333 gsapi_run_string_begin(void *instance,
0334     int user_errors, int *pexit_code);
0335 
0336 GSDLLEXPORT int GSDLLAPI
0337 gsapi_run_string_continue(void *instance,
0338     const char *str, unsigned int length, int user_errors, int *pexit_code);
0339 
0340 GSDLLEXPORT int GSDLLAPI
0341 gsapi_run_string_end(void *instance,
0342     int user_errors, int *pexit_code);
0343 
0344 GSDLLEXPORT int GSDLLAPI
0345 gsapi_run_string_with_length(void *instance,
0346     const char *str, unsigned int length, int user_errors, int *pexit_code);
0347 
0348 GSDLLEXPORT int GSDLLAPI
0349 gsapi_run_string(void *instance,
0350     const char *str, int user_errors, int *pexit_code);
0351 
0352 GSDLLEXPORT int GSDLLAPI
0353 gsapi_run_file(void *instance,
0354     const char *file_name, int user_errors, int *pexit_code);
0355 
0356 #ifdef __WIN32__
0357 GSDLLEXPORT int GSDLLAPI
0358 gsapi_run_fileA(void *instance,
0359     const char *file_name, int user_errors, int *pexit_code);
0360 
0361 GSDLLEXPORT int GSDLLAPI
0362 gsapi_run_fileW(void *instance,
0363     const wchar_t *file_name, int user_errors, int *pexit_code);
0364 #endif
0365 
0366 /* Exit the interpreter.
0367  * This must be called on shutdown if gsapi_init_with_args()
0368  * has been called, and just before gsapi_delete_instance().
0369  */
0370 GSDLLEXPORT int GSDLLAPI
0371 gsapi_exit(void *instance);
0372 
0373 typedef enum {
0374     gs_spt_invalid = -1,
0375     gs_spt_null    = 0,   /* void * is NULL */
0376     gs_spt_bool    = 1,   /* void * is a pointer to an int (0 false,
0377                            * non-zero true). */
0378     gs_spt_int     = 2,   /* void * is a pointer to an int */
0379     gs_spt_float   = 3,   /* void * is a float * */
0380     gs_spt_name    = 4,   /* void * is a char * */
0381     gs_spt_string  = 5,   /* void * is a char * */
0382     gs_spt_long    = 6,   /* void * is a long * */
0383     gs_spt_i64     = 7,   /* void * is an int64_t * */
0384     gs_spt_size_t  = 8,   /* void * is a size_t * */
0385     gs_spt_parsed  = 9,   /* void * is a pointer to a char * to be parsed */
0386 
0387     /* Setting a typed param causes it to be instantly fed to to the
0388      * device. This can cause the device to reinitialise itself. Hence,
0389      * setting a sequence of typed params can cause the device to reset
0390      * itself several times. Accordingly, if you OR the type with
0391      * gs_spt_more_to_come, the param will held ready to be passed into
0392      * the device, and will only actually be sent when the next typed
0393      * param is set without this flag (or on device init). Not valid
0394      * for get_typed_param. */
0395     gs_spt_more_to_come = 1<<31
0396 } gs_set_param_type;
0397 /* gs_spt_parsed allows for a string such as "<< /Foo 0 /Bar true >>" or
0398  * "[ 1 2 3 ]" etc to be used so more complex parameters can be set. */
0399 
0400 GSDLLEXPORT int GSDLLAPI gsapi_set_param(void *instance, const char *param, const void *value, gs_set_param_type type);
0401 
0402 /* Called to get a value. value points to storage of the appropriate
0403  * type. If value is passed as NULL on entry, then the return code is
0404  * the number of bytes storage required for the type. Thus to read a
0405  * name/string/parsed value, call once with value=NULL, then obtain
0406  * the storage, and call again with value=the storage to get a nul
0407  * terminated string. (nul terminator is included in the count - hence
0408  * an empty string requires 1 byte storage). Returns gs_error_undefined
0409  * (-21) if not found. */
0410 GSDLLEXPORT int GSDLLAPI gsapi_get_param(void *instance, const char *param, void *value, gs_set_param_type type);
0411 
0412 /* Enumerator to list all the parameters.
0413  * Caller defines void *iter = NULL, and calls with &iter.
0414  * Each call, iter is updated to reflect the position within the
0415  * enumeration, so passing iterator back in gets the next key. The call
0416  * returns negative values for errors, 0 for success, and 1 for "no more
0417  * keys".
0418  *
0419  *  void *iter = NULL;
0420  *  gs_set_param_type type;
0421  *  const char *key;
0422  *  int code;
0423  *  while ((code = gsapi_enumerate_params(inst, &iter, &key, &type)) == 0) {
0424  *      // Process key
0425  *  }
0426  *
0427  * Note that the ordering of enumerations is NOT defined. key is valid
0428  * until the next call to gsapi_enumerate_params. Only one enumeration
0429  * at a time (starting a new enumeration will invalidate any previous
0430  * enumeration).
0431  */
0432 GSDLLEXPORT int GSDLLAPI gsapi_enumerate_params(void *instance, void **iterator, const char **key, gs_set_param_type *type);
0433 
0434 enum {
0435     GS_PERMIT_FILE_READING = 0,
0436     GS_PERMIT_FILE_WRITING = 1,
0437     GS_PERMIT_FILE_CONTROL = 2
0438 };
0439 
0440 /* Add a path to one of the sets of permitted paths. */
0441 GSDLLEXPORT int GSDLLAPI
0442 gsapi_add_control_path(void *instance, int type, const char *path);
0443 
0444 /* Remove a path from one of the sets of permitted paths. */
0445 GSDLLEXPORT int GSDLLAPI
0446 gsapi_remove_control_path(void *instance, int type, const char *path);
0447 
0448 /* Purge all the paths from the one of the sets of permitted paths. */
0449 GSDLLEXPORT void GSDLLAPI
0450 gsapi_purge_control_paths(void *instance, int type);
0451 
0452 GSDLLEXPORT void GSDLLAPI
0453 gsapi_activate_path_control(void *instance, int enable);
0454 
0455 GSDLLEXPORT int GSDLLAPI
0456 gsapi_is_path_control_active(void *instance);
0457 
0458 /* Details of gp_file can be found in gp.h.
0459  * Users wanting to use this function should include
0460  * that file. Not included here to avoid bloating the
0461  * API inclusions for the majority of people who won't
0462  * want it. */
0463 #ifndef gp_file_name_sizeof
0464 #define gp_file_name_sizeof 4096
0465 #endif
0466 
0467 typedef struct
0468 {
0469     int (*open_file)(const gs_memory_t *mem,
0470                            void        *secret,
0471                      const char        *fname,
0472                      const char        *mode,
0473                            gp_file    **file);
0474     int (*open_pipe)(const gs_memory_t *mem,
0475                            void        *secret,
0476                      const char        *fname,
0477                            char        *rfname, /* 4096 bytes */
0478                      const char        *mode,
0479                            gp_file    **file);
0480     int (*open_scratch)(const gs_memory_t *mem,
0481                               void        *secret,
0482                         const char        *prefix,
0483                               char        *rfname, /* 4096 bytes */
0484                         const char        *mode,
0485                               int          rm,
0486                               gp_file    **file);
0487     int (*open_printer)(const gs_memory_t *mem,
0488                               void        *secret,
0489                               char        *fname, /* 4096 bytes */
0490                               int          binary,
0491                               gp_file    **file);
0492     int (*open_handle)(const gs_memory_t *mem,
0493                              void        *secret,
0494                              char        *fname, /* 4096 bytes */
0495                        const char        *mode,
0496                              gp_file    **file);
0497 } gsapi_fs_t;
0498 
0499 GSDLLEXPORT int GSDLLAPI
0500 gsapi_add_fs(void *instance, gsapi_fs_t *fs, void *secret);
0501 
0502 GSDLLEXPORT void GSDLLAPI
0503 gsapi_remove_fs(void *instance, gsapi_fs_t *fs, void *secret);
0504 
0505 /* function prototypes */
0506 typedef int (GSDLLAPIPTR PFN_gsapi_revision)(
0507     gsapi_revision_t *pr, int len);
0508 typedef int (GSDLLAPIPTR PFN_gsapi_new_instance)(
0509     void **pinstance, void *caller_handle);
0510 typedef void (GSDLLAPIPTR PFN_gsapi_delete_instance)(
0511     void *instance);
0512 typedef int (GSDLLAPIPTR PFN_gsapi_set_stdio)(void *instance,
0513     int (GSDLLCALLPTR stdin_fn)(void *caller_handle, char *buf, int len),
0514     int (GSDLLCALLPTR stdout_fn)(void *caller_handle, const char *str, int len),
0515     int (GSDLLCALLPTR stderr_fn)(void *caller_handle, const char *str, int len));
0516 typedef int (GSDLLAPIPTR PFN_gsapi_set_poll)(void *instance,
0517     int(GSDLLCALLPTR poll_fn)(void *caller_handle));
0518 typedef int (GSDLLAPIPTR PFN_gsapi_set_display_callback)(
0519     void *instance, display_callback *callback);
0520 typedef int (GSDLLAPIPTR PFN_gsapi_set_default_device_list)(
0521     void *instance, char *list, int listlen);
0522 typedef int (GSDLLAPIPTR PFN_gsapi_get_default_device_list)(
0523     void *instance, char **list, int *listlen);
0524 typedef int (GSDLLAPIPTR PFN_gsapi_init_with_args)(
0525     void *instance, int argc, char **argv);
0526 #ifdef __WIN32__
0527 typedef int (GSDLLAPIPTR PFN_gsapi_init_with_argsA)(
0528     void *instance, int argc, char **argv);
0529 typedef int (GSDLLAPIPTR PFN_gsapi_init_with_argsW)(
0530     void *instance, int argc, wchar_t **argv);
0531 #endif
0532 typedef int (GSDLLAPIPTR PFN_gsapi_set_arg_encoding)(
0533     void *instance, int encoding);
0534 typedef int (GSDLLAPIPTR PFN_gsapi_run_string_begin)(
0535     void *instance, int user_errors, int *pexit_code);
0536 typedef int (GSDLLAPIPTR PFN_gsapi_run_string_continue)(
0537     void *instance, const char *str, unsigned int length,
0538     int user_errors, int *pexit_code);
0539 typedef int (GSDLLAPIPTR PFN_gsapi_run_string_end)(
0540     void *instance, int user_errors, int *pexit_code);
0541 typedef int (GSDLLAPIPTR PFN_gsapi_run_string_with_length)(
0542     void *instance, const char *str, unsigned int length,
0543     int user_errors, int *pexit_code);
0544 typedef int (GSDLLAPIPTR PFN_gsapi_run_string)(
0545     void *instance, const char *str,
0546     int user_errors, int *pexit_code);
0547 typedef int (GSDLLAPIPTR PFN_gsapi_run_file)(void *instance,
0548     const char *file_name, int user_errors, int *pexit_code);
0549 #ifdef __WIN32__
0550 typedef int (GSDLLAPIPTR PFN_gsapi_run_fileA)(void *instance,
0551     const char *file_name, int user_errors, int *pexit_code);
0552 typedef int (GSDLLAPIPTR PFN_gsapi_run_fileW)(void *instance,
0553     const wchar_t *file_name, int user_errors, int *pexit_code);
0554 #endif
0555 typedef int (GSDLLAPIPTR PFN_gsapi_exit)(void *instance);
0556 typedef int (GSDLLAPIPTR PFN_gsapi_set_param)(void *instance, const char *param, const void *value, gs_set_param_type type);
0557 
0558 typedef int (GSDLLAPIPTR PFN_gsapi_add_control_path)(void *instance, int type, const char *path);
0559 typedef int (GSDLLAPIPTR PFN_gsapi_remove_control_path)(void *instance, int type, const char *path);
0560 typedef void (GSDLLAPIPTR PFN_gsapi_purge_control_paths)(void *instance, int type);
0561 typedef void (GSDLLAPIPTR PFN_gsapi_activate_path_control)(void *instance, int enable);
0562 typedef int (GSDLLAPIPTR PFN_gsapi_is_path_control_active)(void *instance);
0563 typedef int (GSDLLAPIPTR PFN_gsapi_add_fs)(void *instance, gsapi_fs_t *fs, void *secret);
0564 typedef void (GSDLLAPIPTR PFN_gsapi_remove_fs)(void *instance, gsapi_fs_t *fs, void *secret);
0565 
0566 #ifdef __MACOS__
0567 #pragma export off
0568 #endif
0569 
0570 #ifdef __cplusplus
0571 } /* extern 'C' protection */
0572 #endif
0573 
0574 #endif /* iapi_INCLUDED */