event_t

Declaration

typedef struct {
ulong which;
ulong what;
ulong when;
int where_x;
int where_y;
int relative_x;
int relative_y;
ulong message;
ulong modifiers;
int next;
int prev;
} event_t

Prototype In

event.h

Description

Structure describing the information contained in an event extracted from the event queue.

Members

which | Window identifier for message for use by high level window manager code (i.e. MegaVision GUI or Windows API).
what | Type of event that occurred. Will be one of the values defined by the EVT_eventType enumeration.
when | Time that the event occurred in milliseconds since startup
where_x | X coordinate of the mouse cursor location at the time of the event (in screen coordinates). For joystick events this represents the position of the first joystick X axis.
where_y | Y coordinate of the mouse cursor location at the time of the event (in screen coordinates). For joystick events this represents the position of the first joystick Y axis.
relative_x | Relative movement of the mouse cursor in the X direction (in units of mickeys, or 1/200th of an inch). For joystick events this represents the position of the second joystick X axis.
relative_y | Relative movement of the mouse cursor in the Y direction (in units of mickeys, or 1/200th of an inch). For joystick events this represents the position of the second joystick Y axis.
message | Event specific message for the event. For use events this can be any user specific information. For keyboard events this contains the ASCII code in bits 0-7, the keyboard scan code in bits 8-15 and the character repeat count in bits 16-30. You can use the EVT_asciiCode, EVT_scanCode and EVT_repeatCount macros to extract this information from the message field. For mouse events this contains information about which button was pressed, and will be a combination of the flags defined by the EVT_eventMouseMaskType enumeration. For joystick events, this conatins information about which buttons were pressed, and will be a combination of the flags defined by the EVT_eventJoyMaskType enumeration.
modifiers | Contains additional information about the state of the keyboard shift modifiers (Ctrl, Alt and Shift keys) when the event occurred. For mouse events it will also contain the state of the mouse buttons. Will be a combination of the values defined by the EVT_eventModMaskType enumeration.
next | Internal use; do not use.
prev | Internal use; do not use.

Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com