1
0

scribble.h 679 B

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