scribble.h 1.1 KB

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