Macaw OS C reference

Function mouse

#include <macaw.h>
void mouse(int *x, int *y, int *buttons);

Finds out where the pointer is and which mouse buttons are held down.

Parameters

xint *
Where to put the pointer's x in your window, in its own pixels: pass the address of an int, like &x, or NULL.
yint *
Where to put the pointer's y in your window, the same way. Both can be outside the window, even negative.
buttonsint *
Where to put the buttons held: 1 for left, 2 for right and 4 for middle, added together. It's 0 over another window.

In The keyboard and mouse, with btn, btnp, textinput, keysp, keyspname.