MAV_mouseEvent(3)

NAME
MAV_mouseEvent - Mouse event.

LEVEL
Maverik Level 1

SYNTAX

 typedef struct {
  MAV_window *win;
  int x;
  int y;
  int root_x;
  int root_y;
  MAV_line line;
  int intersects;
  MAV_object *obj;
  MAV_objectIntersection objint;
  int button;
  int modifiers[MAV_MODIFIER_MAX];
  int movement;
} MAV_mouseEvent;

DESCRIPTION
The mouse event data structure, MAV_mouseEvent, is passed to the application supplied callback function (set with the @mav_callbackMouseSet function) upon mouse button events and details that event. window in which event occurred. position of mouse relative to window origin when event occured. as (x,y) but relative to root window. the line from the eye point through the world position of the mouse when the mouse event occured. MAV_TRUE if line intersects an object, MAV_FALSE otherwise. the object intersected by the line (if any). the details of any object intersection. ^MAV_LEFT_BUTTON, ^MAV_MIDDLE_BUTTON or ^MAV_RIGHT_BUTTON, to indicate which button generated the event. MAV_PRESSED if button down event, MAV_RELEASED otherwise.

See MAV_keyboardEvent for why obj will not necessarily be the same as the MAV_object passed to the event callback function.