dvi-draw.h (1569B)
1 #include <X11/Intrinsic.h> /* Boolean */ 2 3 #include "data.h" /* set_char_proc */ 4 5 6 /* 7 * pixel_conv is currently used only for converting absolute positions 8 * to pixel values; although normally it should be 9 * ((int) ((x) / shrink_factor + (1 << 15) >> 16)), 10 * the rounding is achieved instead by moving the constant 1 << 15 to 11 * PAGE_OFFSET in dvi-draw.c. 12 */ 13 #define pixel_conv(x) ((int) ((x) / shrink_factor >> 16)) 14 #define pixel_round(x) ((int) ROUNDUP(x, shrink_factor << 16)) 15 #define spell_conv0(n, f) ((long) (n * f)) 16 #define spell_conv(n) spell_conv0(n, dimconv) 17 18 struct frame { 19 struct framedata { 20 long dvi_h, dvi_v, w, x, y, z; 21 int pxl_v; 22 } data; 23 struct frame *next, *prev; 24 }; 25 26 struct drawinf { /* this information is saved when using virtual fonts */ 27 struct framedata data; 28 struct font *fontp; 29 set_char_proc set_char_p; 30 int tn_table_len; 31 struct font **tn_table; 32 struct tn *tn_head; 33 unsigned char *pos, *end; 34 struct font *virtual; 35 }; 36 37 struct drawinf currinf; 38 39 /* entries below with the characters 'dvi' in them are actually stored in 40 scaled pixel units */ 41 42 #define DVI_H currinf.data.dvi_h 43 #define PXL_H pixel_conv(currinf.data.dvi_h) 44 #define DVI_V currinf.data.dvi_v 45 #define PXL_V currinf.data.pxl_v 46 #define WW currinf.data.w 47 #define XX currinf.data.x 48 #define YY currinf.data.y 49 #define ZZ currinf.data.z 50 51 struct htex_data { 52 int temp_incomplete; 53 char *temp_url; 54 char *links[26]; 55 }; 56 57 58 Boolean drawing_mag = False; 59 60 void draw_page(void); 61 void hypertex_search(struct htex_data *); 62 void prescan(void);