1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
/* Copyright (C) 2001-2020 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
implied.
This software is distributed under license and may not be copied,
modified or distributed except as expressly authorized under the terms
of the license contained in the file LICENSE in this distribution.
Refer to licensing information at http://www.artifex.com or contact
Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato,
CA 94945, U.S.A., +1(415)492-9861, for further information.
*/
/*
* Internal API for Ghostscript interpreter.
*/
#ifndef psapi_INCLUDED
# define psapi_INCLUDED
#include "gsmemory.h"
#include "gsdevice.h"
int
psapi_set_arg_encoding(gs_lib_ctx_t *instance,
int encoding);
/* Must match iapi.h and plapi.h */
enum {
PS_ARG_ENCODING_LOCAL = 0,
PS_ARG_ENCODING_UTF8 = 1,
PS_ARG_ENCODING_UTF16LE = 2
};
int
psapi_new_instance(gs_lib_ctx_t **pinstance,
void *caller_handle);
void
psapi_delete_instance(gs_lib_ctx_t *instance);
void
psapi_act_on_uel(gs_lib_ctx_t *instance);
int
psapi_init_with_args(gs_lib_ctx_t *instance,
int argc,
char **argv);
int
psapi_init_with_args01(gs_lib_ctx_t *instance,
int argc,
char **argv);
int
psapi_init_with_args2(gs_lib_ctx_t *instance);
int
psapi_set_param(gs_lib_ctx_t *ctx,
gs_param_list *plist);
int
psapi_set_device_param(gs_lib_ctx_t *ctx,
gs_param_list *plist);
int
psapi_get_device_params(gs_lib_ctx_t *ctx,
gs_param_list *plist);
int
psapi_add_path(gs_lib_ctx_t *ctx,
const char *path);
int
psapi_run_string_begin(gs_lib_ctx_t *instance,
int user_errors,
int *pexit_code);
int
psapi_run_string_continue(gs_lib_ctx_t *instance,
const char *str,
unsigned int length,
int user_errors,
int *pexit_code);
unsigned int
psapi_get_uel_offset(gs_lib_ctx_t *instance);
int
psapi_run_string_end(gs_lib_ctx_t *instance,
int user_errors,
int *pexit_code);
int
psapi_run_string_with_length(gs_lib_ctx_t *instance,
const char *str,
unsigned int length,
int user_errors,
int *pexit_code);
int
psapi_run_string(gs_lib_ctx_t *ctx,
const char *str,
int user_errors,
int *pexit_code);
int
psapi_run_file(gs_lib_ctx_t *instance,
const char *file_name,
int user_errors,
int *pexit_code);
gs_memory_t *
psapi_get_device_memory(gs_lib_ctx_t *instance);
int
psapi_set_device(gs_lib_ctx_t *instance,
gx_device *pdev);
int
psapi_exit(gs_lib_ctx_t *instance);
int
psapi_force_geometry(gs_lib_ctx_t *ctx, const float *resolutions, const long *dimensions);
#endif /* psapi_INCLUDED */
|