[ Maverik Level 1 typedefs ]
MAV_mouseEvent
Summary
Mouse event.
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.
- win
window in which event occurred.
- x, y
position of mouse relative to window origin when event occured.
- root_x, root_y
as (x,y) but relative to root window.
- line
the line from the eye point through the world position of the mouse when
the mouse event occured.
- intersects
MAV_TRUE if line intersects an object, MAV_FALSE otherwise.
- obj
the object intersected by the line (if any).
- objint
the details of any object intersection.
- button
MAV_LEFT_BUTTON, MAV_MIDDLE_BUTTON or MAV_RIGHT_BUTTON, to indicate
which button generated the event.
- modifiers
an array containing the status (MAV_PRESSED or MAV_RELEASED) of the
various keyboard modifiers (e.g. MAV_MODIFIER_SHIFT,
MAV_MODIFIER_CTRL, MAV_MODIFIER_ALT).
- movement
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.
Back to the index page.