]>
Commit | Line | Data |
---|---|---|
1 | typedef struct gs_memory_struct_type_s gs_memory_struct_type_t; | |
2 | typedef struct gs_matrix_s gs_matrix; | |
3 | typedef unsigned long long gx_color_index_data; | |
4 | typedef gx_color_index_data gx_color_index; | |
5 | typedef unsigned short gx_color_value; | |
6 | typedef struct gx_device_s gx_device; | |
7 | typedef struct gs_param_list_s gs_param_list; | |
8 | typedef struct gx_device_anti_alias_info_s { | |
9 | int text_bits; | |
10 | int graphics_bits; | |
11 | } gx_device_anti_alias_info; | |
12 | typedef enum { | |
13 | GX_CINFO_UNKNOWN_SEP_LIN = -1 | |
14 | } gx_color_enc_sep_lin_t; | |
15 | typedef 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; | |
23 | typedef struct gx_device_procs_s gx_device_procs; | |
24 | typedef struct gs_devn_params_s gs_devn_params; | |
25 | struct 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 | }; | |
37 | gx_device *gx_page_device_get_page_device(gx_device * dev); | |
38 | typedef struct gx_device_printer_s gx_device_printer; | |
39 | struct gx_device_printer_s { | |
40 | }; | |
41 | extern const gs_memory_struct_type_t st_device_printer; | |
42 | int gdev_prn_output_page(gx_device * dev, int num_copies, int flush); | |
43 | int gdev_prn_get_params(gx_device * dev, gs_param_list * plist); | |
44 | int gdev_prn_put_params(gx_device * dev, gs_param_list * plist); | |
45 | static int inferno_cmap2rgb(gx_device * dev, gx_color_index color, | |
46 | gx_color_value rgb[3]); | |
47 | static int inferno_open(gx_device * dev); | |
48 | static int inferno_close(gx_device * dev); | |
49 | typedef 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; | |
57 | static 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 | } | |
70 | static const gx_device_procs inferno_procs = { | |
71 | inferno_rgb2cmap | |
72 | }; | |
73 | inferno_device gs_inferno_device = { | |
74 | &inferno_procs | |
75 | }; |