1
0

scribble.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * This file is part of the UCB release of Plan 9. It is subject to the license
  3. * terms in the LICENSE file found in the top-level directory of this
  4. * distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
  5. * part of the UCB release of Plan 9, including this file, may be copied,
  6. * modified, propagated, or distributed except according to the terms contained
  7. * in the LICENSE file.
  8. */
  9. typedef struct Scribble Scribble;
  10. typedef struct graffiti Graffiti;
  11. typedef struct pen_point {
  12. Point Point;
  13. long chaincode;
  14. } pen_point;
  15. typedef struct Stroke {
  16. uint npts; /*Number of pen_point in array.*/
  17. pen_point* pts; /*Array of points.*/
  18. } Stroke;
  19. #define CS_LETTERS 0
  20. #define CS_DIGITS 1
  21. #define CS_PUNCTUATION 2
  22. struct Scribble {
  23. /* private state */
  24. Point *pt;
  25. int ppasize;
  26. Stroke ps;
  27. Graffiti *graf;
  28. int capsLock;
  29. int puncShift;
  30. int tmpShift;
  31. int ctrlShift;
  32. int curCharSet;
  33. };
  34. Rune recognize(Scribble *);
  35. Scribble * scribblealloc(void);
  36. extern int ScribbleDebug;