summaryrefslogtreecommitdiff
path: root/tools/gslite/gslt.h
blob: 96c6a5de5bcae04530518dc3c8ed5ec9d179af36 (plain)
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
/* Copyright (C) 2006 artofcode LLC.
   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 that
   license.  Refer to licensing information at http://www.artifex.com/
   or contact Artifex Software, Inc.,  7 Mt. Lassen Drive - Suite A-134,
   San Rafael, CA  94903, U.S.A., +1(415)492-9861, for further information.
*/

/* $Id: gslt.h 2713 2007-01-02 22:22:14Z henrys $ */
/* gslt "Ghostscript Lite" convenience header */

/*
 * The following typedefs will allow this file to be used
 * without including the regular gs headers.
 *
 * Always include this file *after* the regular gs headers.
 */

#ifndef gsmemory_INCLUDED
typedef struct gs_memory_s gs_memory_t;
#endif

#ifndef gxdevcli_INCLUDED
typedef struct gx_device_s gx_device;
#endif

#ifndef gsstate_INCLUDED
typedef struct gs_state_s gs_state;
#endif

#ifndef gs_matrix_DEFINED
typedef struct gs_matrix_s gs_matrix;
struct gs_matrix_s { float xx, xy, yx, yy, tx, ty; };
#endif

#ifndef gs_font_dir_DEFINED
typedef struct gs_font_dir_s gs_font_dir;
#endif

/*
 * A simple memory allocator, based on the the allocator for ghostpcl.
 */

gs_memory_t *gslt_alloc_init(void);

/*
 * Initialization helpers to set up the memory, device and gstate structs.
 */

gs_memory_t * gslt_init_library();
gx_device * gslt_init_device(gs_memory_t *mem, char *name);
gs_state *gslt_init_state(gs_memory_t *mem, gx_device *dev);
void gslt_free_state(gs_memory_t *mem, gs_state *pgs);
void gslt_free_device(gs_memory_t *mem, gx_device *dev);
void gslt_free_library(gs_memory_t *mem);

void gslt_get_device_param(gs_memory_t *mem, gx_device *dev, char *key);
void gslt_set_device_param(gs_memory_t *mem, gx_device *dev, char *key, char *val);