scribble.h 715 B

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