[ Maverik Level 1 functions ]

#

mav_mouseGet

## Summary

Sample the current mouse position and button status.

## Syntax

void mav_mouseGet(MAV_window *w, int *x, int *y, int *rx, int *ry, int *buts);

- MAV_window *w
  Window.

- int *x, int *y
  returns (x, y) position of mouse relative to window origin (pixels).

- int *rx, int *ry
  returns (x, y) position of mouse relative to root window origin (pixels).

- int *buts
  returns button status.

## Description

This function returns the current mouse position (`x`,`y`) in window `w`, and with respect to the root (background) window (`rx`,`ry`). If non-NULL, the array `buts` is filled with the status (`MAV_PRESSED` or `MAV_RELEASED`) of each button. NB. this function may not be supported on all platforms.

Back to the index page.