1 #pragma src "/sys/src/libdraw"
3 typedef struct Channel Channel;
4 typedef struct Cursor Cursor;
5 typedef struct Menu Menu;
6 typedef struct Mousectl Mousectl;
7 typedef struct Keyboardctl Keyboardctl;
11 int buttons; /* bit array: LMR=124 */
19 Channel *c; /* chan(Mouse) */
20 Channel *resizec; /* chan(int)[2] */
21 /* buffered in case client is waiting for a mouse action before handling resize */
24 int mfd; /* to mouse file */
25 int cfd; /* to cursor file */
26 int pid; /* of slave proc */
27 Image* image; /* of associated window/display */
40 extern Mousectl* initmouse(char*, Image*);
41 extern void moveto(Mousectl*, Point);
42 extern int readmouse(Mousectl*);
43 extern void closemouse(Mousectl*);
44 extern void setcursor(Mousectl*, Cursor*);
45 extern void drawgetrect(Rectangle, int);
46 extern Rectangle getrect(int, Mousectl*);
47 extern int menuhit(int, Mousectl*, Menu*, Screen*);
48 extern int enter(char *, char *, int, Mousectl*, Keyboardctl*, Screen*);