922
Appendix A: System Routines — Operating System
TI
-
89 / TI
-
92 Plus Developer Guide
Not for Distribution
Beta Version January 26, 2001
EV_sendEvent
Declaration:
void
EV_sendEvent
(AppID
destApp
, Event *
event
)
Category(ies):
Operating System
Description:
Sends an event message to an application. The destination app receives
and processes the event in its event handling entry point.
Inputs:
destApp
— ID of the destination application. Use
EV_getAppID
to find
an app’s ID given its internal name.
event
— Pointer to event message.
Outputs:
None
Assumptions:
The destination app does not have to be started or active to receive
messages. You should first start the app (
EV_startApp
) if it is important
that the app be on the screen before it receives
event
.
Applications may communicate with each other by sending interapplication
messages, but this means of interfacing between apps is not
recommended. Interapplication messaging is largely replaced with an
object-oriented approach. Applications should communicate with each
other through their frame interface.
Apps can use this routine to send or forward OS events to other apps.
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:
/* Send keypress to another application */
void sendChar(AppID destApp, USHORT ch)
{
Event e;
e.command = CM_KEY_PRESS; /* send keypress command */
e.info.keyInfo.keyCode = ch; /* stuff character to send */
EV_sendEvent(destApp, &e); /* send event to dest app */
}