win.h 934 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. enum
  2. {
  3. False,
  4. True,
  5. EVENTSIZE=256,
  6. };
  7. typedef struct Event Event;
  8. struct Event
  9. {
  10. int c1;
  11. int c2;
  12. int q0;
  13. int q1;
  14. int flag;
  15. int nb;
  16. int nr;
  17. char b[EVENTSIZE*UTFmax+1];
  18. Rune r[EVENTSIZE+1];
  19. };
  20. typedef struct Win Win;
  21. struct Win
  22. {
  23. int winid;
  24. int addr;
  25. Biobuf *body;
  26. int ctl;
  27. int data;
  28. int event;
  29. char buf[512];
  30. char *bufp;
  31. int nbuf;
  32. };
  33. int dead(Win*);
  34. void wnew(Win*);
  35. void wwritebody(Win*, char *s, int n);
  36. void wread(Win*, uint, uint, char*);
  37. void wclean(Win*);
  38. void wname(Win*, char*);
  39. void wdormant(Win*);
  40. void wevent(Win*, Event*);
  41. void wtagwrite(Win*, char*, int);
  42. void wwriteevent(Win*, Event*);
  43. void wslave(Win*, Channel*); /* chan(Event) */
  44. void wreplace(Win*, char*, char*, int);
  45. void wselect(Win*, char*);
  46. int wdel(Win*);
  47. int wreadall(Win*, char**);
  48. void ctlwrite(Win*, char*);
  49. int getec(Win*);
  50. int geten(Win*);
  51. int geter(Win*, char*, int*);
  52. int openfile(Win*, char*);
  53. void openbody(Win*, int);