Debian Codegraph @

texk/xdvik/special.h

raw
1 /*
2 * Copyright (c) 2002-2016 the xdvik development team
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to
6 * deal in the Software without restriction, including without limitation the
7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 * sell copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * PAUL VOJTA OR ANY OTHER AUTHOR OF THIS SOFTWARE BE LIABLE FOR ANY CLAIM,
18 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 */
22
23 #ifndef SPECIAL_H_
24 #define SPECIAL_H_
25
26 #include "xdvi.h"
27 #include "events.h"
28
29 extern Boolean scan_special(char *str, int str_len, void *data);
30
31 #if PS
32
33 struct psprocs {
34 void (*toggle) (int flag);
35 void (*destroy) (void);
36 void (*interrupt) (void);
37 void (*endpage) (void);
38 void (*drawbegin) (int, int, const char *);
39 void (*drawraw) (const char *);
40 void (*drawfile) (const char *, FILE *);
41 void (*drawend) (const char *);
42 void (*beginheader) (void);
43 void (*endheader) (void);
44 void (*newdoc) (void);
45 };
46
47 extern void ps_destroy(void);
48 extern void ps_destroy_nofree(void);
49 extern void drawbegin_none(int, int, const char *);
50 extern void draw_bbox(void);
51 extern void display_bboxes(void);
52 extern void clear_bboxes(void);
53 extern void save_bbox(void);
54
55 #endif
56
57 extern void applicationDoSpecial(char *str, size_t len);
58 extern void geom_do_special(struct scan_info *, char *, double);
59 extern void color_special(const char *colorspec);
60
61 extern void init_prescan(void);
62
63 /*
64 info on whether this DVI file contains papersize specials,
65 and a resetting method.
66 */
67 extern void reset_papersize_special(void);
68 extern Boolean have_papersize_special(void);
69
70 #if COLOR
71 extern void init_page_colors(struct rgb *foreground, struct rgb *background);
72 extern void scan_color_eop(void);
73 extern void scan_color(const char *color);
74 struct rgb; /* forward declaration */
75 extern void set_fg_color(const struct rgb *);
76 #endif
77
78 #endif /* SPECIAL_H_ */