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;
10 int buttons; /* bit array: LMR=124 */
18 Channel *c; /* chan(Mouse) */
19 Channel *resizec; /* chan(int)[2] */
20 /* buffered in case client is waiting for a mouse action before handling resize */
23 int mfd; /* to mouse file */
24 int cfd; /* to cursor file */
25 int pid; /* of slave proc */
26 Image* image; /* of associated window/display */
39 extern Mousectl* initmouse(char*, Image*);
40 extern void moveto(Mousectl*, Point);
41 extern int readmouse(Mousectl*);
42 extern void closemouse(Mousectl*);
43 extern void setcursor(Mousectl*, Cursor*);
44 extern void drawgetrect(Rectangle, int);
45 extern Rectangle getrect(int, Mousectl*);
46 extern int menuhit(int, Mousectl*, Menu*, Screen*);