xref: /plan9/sys/include/scribble.h (revision 3f9c83932f326ae8b6d81b36429957bc06a9813e)
1 #pragma src "/sys/src/libscribble"
2 #pragma lib "libscribble.a"
3 
4 #pragma incomplete struct graffiti
5 
6 typedef struct Scribble Scribble;
7 typedef struct graffiti Graffiti;
8 
9 typedef struct pen_point {
10 	Point;
11 	long	chaincode;
12 } pen_point;
13 
14 typedef struct Stroke {
15 	uint			npts;	/*Number of pen_point in array.*/
16 	pen_point*	pts;	/*Array of points.*/
17 } Stroke;
18 
19 #define CS_LETTERS     0
20 #define CS_DIGITS      1
21 #define CS_PUNCTUATION 2
22 
23 struct Scribble {
24 	/* private state */
25 	Point		*pt;
26 	int			ppasize;
27 	Stroke	    	ps;
28 	Graffiti	*graf;
29 	int			capsLock;
30 	int			puncShift;
31 	int			tmpShift;
32 	int			ctrlShift;
33 	int			curCharSet;
34 };
35 
36 Rune		recognize(Scribble *);
37 Scribble *	scribblealloc(void);
38 
39 extern int ScribbleDebug;
40