]> git.wh0rd.org - ICEs.git/blame - sh-ghostscript/gdevifno.i.2
more ices
[ICEs.git] / sh-ghostscript / gdevifno.i.2
CommitLineData
81f80d8c
MF
1typedef struct gs_memory_struct_type_s gs_memory_struct_type_t;
2typedef struct gs_matrix_s gs_matrix;
3typedef unsigned long long gx_color_index_data;
4typedef gx_color_index_data gx_color_index;
5typedef unsigned short gx_color_value;
6typedef struct gx_device_s gx_device;
7typedef struct gs_param_list_s gs_param_list;
8typedef struct gx_device_anti_alias_info_s {
9 int text_bits;
10 int graphics_bits;
11} gx_device_anti_alias_info;
12typedef enum {
13 GX_CINFO_UNKNOWN_SEP_LIN = -1
14} gx_color_enc_sep_lin_t;
15typedef struct gx_device_color_info_s {
16 int max_components;
17 gx_device_anti_alias_info anti_alias;
18 gx_color_enc_sep_lin_t separable_and_linear;
19 unsigned char comp_shift[(8 * 8)];
20 unsigned char comp_bits[(8 * 8)];
21 int black_component;
22} gx_device_color_info;
23typedef struct gx_device_procs_s gx_device_procs;
24typedef struct gs_devn_params_s gs_devn_params;
25struct gx_device_procs_s {
26 int (*open_device) (gx_device * dev);
27 void (*get_initial_matrix) (gx_device * dev, gs_matrix * pmat);
28 int (*sync_output) (gx_device * dev);
29 int (*output_page) (gx_device * dev, int num_copies, int flush);
30 int (*close_device) (gx_device * dev);
31 gx_color_index(*map_rgb_color) (gx_device * dev,
32 const gx_color_value cv[]);
33 int (*map_color_rgb) (gx_device * dev, gx_color_index color,
34 gx_color_value rgb[3]);
35 gs_devn_params *(*ret_devn_params) (gx_device * dev);
36};
37gx_device *gx_page_device_get_page_device(gx_device * dev);
38typedef struct gx_device_printer_s gx_device_printer;
39struct gx_device_printer_s {
40};
41extern const gs_memory_struct_type_t st_device_printer;
42int gdev_prn_output_page(gx_device * dev, int num_copies, int flush);
43int gdev_prn_get_params(gx_device * dev, gs_param_list * plist);
44int gdev_prn_put_params(gx_device * dev, gs_param_list * plist);
45static int inferno_cmap2rgb(gx_device * dev, gx_color_index color,
46 gx_color_value rgb[3]);
47static int inferno_open(gx_device * dev);
48static int inferno_close(gx_device * dev);
49typedef struct inferno_device_s {
50 int retained;
51 int is_open;
52 gx_device_color_info color_info;
53 gx_device_procs orig_procs;
54 int ldepth;
55 int cmapcall;
56} inferno_device;
57static gx_color_index inferno_rgb2cmap(void *dev)
58{
59 inferno_device *bdev;
60 bdev = (inferno_device *) dev;
61 int mask;
62 gx_color_value red;
63 gx_color_value green;
64 gx_color_value blue;
65 if (red == mask)
66 bdev->ldepth = 3;
67 bdev->cmapcall = 1;
68 return mask;
69}
70static const gx_device_procs inferno_procs = {
71inferno_rgb2cmap
72};
73inferno_device gs_inferno_device = {
74&inferno_procs
75};