EVT_setUserEventFilter
Installs a user supplied event filter callback for event handling.
Declaration
void EVTAPI EVT_setUserEventFilter(
_EVT_userEventFilter filter)
Prototype In
event.h
Description
This function allows the application programmer to install an event filter callback for event handling. Once you install your callback, the MGL event handling routines will call your callback with a pointer to the new event that will be placed into the event queue. Your callback can the modify the contents of the event before it is placed into the queue (for instance adding custom information or perhaps high precision timing information).
If your callback returns FALSE, the event will be ignore and will not be posted to the event queue. You should always return true from your event callback unless you plan to use the events immediately that they are recieved.
Note: Your event callback may be called in response to a hardware interrupt and will be executing in the context of the hardware interrupt handler under MSDOS (ie: keyboard interrupt or mouse interrupt). For this reason the code pages for the callback that you register must be locked in memory with the PM_lockCodePages function. You must also lock down any data pages that your function needs to reference as well.
Note: You can also use this filter callback to process events at the time they are activated by the user (ie: when the user hits the key or moves the mouse), but make sure your code runs as fast as possible as it will be executing inside the context of an interrupt handler on some systems.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com