Pajdeg  0.2.2
Pajdeg
pd_ps_implementation.h
Go to the documentation of this file.
1 //
2 // pd_ps_implementation.h
3 //
4 // Copyright (c) 2015 Karl-Johan Alm (http://github.com/kallewoof)
5 //
6 // Permission is hereby granted, free of charge, to any person obtaining a copy
7 // of this software and associated documentation files (the "Software"), to deal
8 // in the Software without restriction, including without limitation the rights
9 // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 // copies of the Software, and to permit persons to whom the Software is
11 // furnished to do so, subject to the following conditions:
12 //
13 // The above copyright notice and this permission notice shall be included in
14 // all copies or substantial portions of the Software.
15 //
16 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 // THE SOFTWARE.
23 //
24 
37 #ifndef INCLUDED_PD_PS_IMPLEMENTATION_H
38 #define INCLUDED_PD_PS_IMPLEMENTATION_H
39 
40 #include "PDDefines.h"
41 
45 typedef struct pd_ps_env_s *pd_ps_env;
46 struct pd_ps_env_s {
47  PDScannerRef scanner;
48  PDDictionaryRef userdict;
49  PDDictionaryRef operators;
50  pd_stack operands;
51  pd_stack dicts;
52  pd_stack execs;
53  PDBool failure;
54  PDBool mpbool;
55  PDBool explicitCMap;
56  PDCMapRef cmap;
57  PDDictionaryRef resources;
58 };
59 
65 extern pd_ps_env pd_ps_create(void);
66 
72 extern void pd_ps_destroy(pd_ps_env pse);
73 
83 extern void pd_ps_set_cmap(pd_ps_env pse, PDCMapRef cmap);
84 
92 extern PDCMapRef pd_ps_get_cmap(pd_ps_env pse);
93 
106 extern PDBool pd_ps_execute_postscript(pd_ps_env pse, char *stream, PDSize len);
107 
115 extern PDDictionaryRef pd_ps_get_results(pd_ps_env pse);
116 
132 extern void *pd_ps_get_operand(pd_ps_env pse, PDSize index);
133 
134 #endif
135 
Definition: pd_ps_implementation.h:46
void pd_ps_set_cmap(pd_ps_env pse, PDCMapRef cmap)
Definition: pd_ps_implementation.c:73
unsigned char PDBool
Definition: PDDefines.h:207
PDBool pd_ps_execute_postscript(pd_ps_env pse, char *stream, PDSize len)
Definition: pd_ps_implementation.c:86
size_t PDSize
Definition: PDDefines.h:213
void * pd_ps_get_operand(pd_ps_env pse, PDSize index)
Definition: pd_ps_implementation.c:111
pd_ps_env pd_ps_create(void)
Definition: pd_ps_implementation.c:49
PDDictionaryRef pd_ps_get_results(pd_ps_env pse)
Definition: pd_ps_implementation.c:104
Definition: pd_internal.h:544
Definition: pd_internal.h:688
Definition: pd_internal.h:639
Definition: pd_internal.h:507
PDCMapRef pd_ps_get_cmap(pd_ps_env pse)
Definition: pd_ps_implementation.c:81
Definitions for the Pajdeg interface.
struct pd_ps_env_s * pd_ps_env
Definition: pd_ps_implementation.h:45
void pd_ps_destroy(pd_ps_env pse)
Definition: pd_ps_implementation.c:60