[ Maverik Level 1 typedefs ]


MAV_keyboardEvent

Summary

Keyboard 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 key;
  int modifiers[MAV_MODIFIER_MAX];
  int movement;  
} MAV_keyboardEvent;


Description

The keyboard event data structure, MAV_keyboardEvent, is passed to the application supplied callback function, set with the mav_callbackKeyboardSet function, upon keyboard events and details that event.

The MAV_object which is passed as the first parameter to the event callback function may well be different than obj stored in this data structure since the former is always an object of the same type as the callback was registered for. Therefore, event callbacks registered for non-object classes such as mav_class_any will receive a dummy object (in this case mav_object_any) as their first parameters. No interpretation should be made of these objects by the application. However, the obj field always contains the object which the mouse was pointing at when the event occurred regardless of how the callback function was registered.


Back to the index page.