|
|
1.1 root 1: #ifndef FRAME_H
2: #define FRAME_H
3:
4: #include <jerq.h>
5: #include <font.h>
6: #include "defont.h"
7: #undef frinit
8: #undef frsetrects
9: typedef unsigned short ushort;
10: typedef unsigned char uchar;
11: typedef ushort Posn;
12: typedef struct Box{
13: short wid; /* in pixels */
14: short len; /* <0 ==> negate and treat as break char */
15: union{
16: uchar *BUptr;
17: struct{
18: short BUSbc;
19: short BUSminwid;
20: }BUS;
21: }BU;
22: }Box;
23: #define ptr BU.BUptr
24: #define bc BU.BUS.BUSbc
25: #define minwid BU.BUS.BUSminwid
26: typedef struct Frame{
27: Font *font;
28: Bitmap *b;
29: Rectangle r;
30: Rectangle entire;
31: Box *box;
32: Posn p0, p1;
33: ushort left;
34: ushort nbox, nalloc;
35: ushort maxtab;
36: ushort maxcharwid;
37: ushort nchars;
38: ushort nlines;
39: ushort maxlines;
40: ushort lastlinefull;
41: }Frame;
42: #define D (&display)
43: #define B (f->b)
44:
45: #undef charofpt();
46: #undef ptofchar();
47: Posn charofpt();
48: Point ptofchar();
49: Point ptofcharptb();
50: Point ptofcharnb();
51: uchar *allocstr();
52: uchar *dupstr();
53: Point draw();
54:
55: #define LEN(b) ((b)->len<0? 1 : (b)->len)
56: #endif FRAME_H
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.