Appendix A: System Routines — Operating System
915
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
EV_captureEvents
Declaration:
EV_entryPoint
EV_captureEvents
(EV_entryPoint
callback
)
Category(ies):
Operating System
Description:
Redirects all events to
callback
. Use this routine to capture events if you
are creating your own dialog or menu managers.
Save the returned value and use it to restore event processing when you
are finished capturing events.
Inputs:
callback
— The address of a routine which accepts one parameter, an
event pointer.
Outputs:
Returns pointer to previously captured event handler.
Assumptions:
None
Side Effects:
None
Availability:
All versions of the TI
-
89 / TI
-
92 Plus.
TI
-
89 / TI
-
92 Plus
Differences:
None
See Also:
Not applicable.
Example: MyDialog
opens a window and captures events. All subsequent events are
sent to
myEventHandler
. Routine
myEventHandler
calls cancel when it is
finished handling events. Routine
cancel
closes the dialog window and
restores normal event dispatching.
WINDOW myWindow;
EV_eventPoint oldEventHandler;
EV_FLAGS oldPaintState;
void MyDialog(void)
/* Initialize my display */
{
static const WIN_RECT r = {
(W_MAX_X - WINDOW_WIDTH*LF_WIDTH(' '))/2,
WINDOW_TOP,
(W_MAX_X + WINDOW_WIDTH*LF_WIDTH(' '))/2 + 1,
WINDOW_TOP+W_TITLE_Y+WINDOW_HEIGHT*LF_HEIGHT + 1
};
oldPaintState = EV_suspendPainting();
(continued)