The file EventCodes.h
defines the Palm OS-generated events. This chapter documents that header file, and is organized as follows:
Event Codes Structures and Types
Event Codes Constants
Event Codes Events
For information on the structures that accompany most events, and the functions that can be used to manipulate the event queue, see Chapter 7, "Event." For conceptual information on events and the event queue, see Chapter 3, "Events and the Event Loop."
Event Codes Structures and Types
eventsEnum Typedef
Purpose
Defines a type that can be used to hold an event value.
Declared In
EventCodes.h
Prototype
typedef uint32_t eventsEnum
Comments
See "Event Codes Events" for the set of event values defined by Palm OS.
Event Codes Constants
Miscellaneous Event Codes Constants
Purpose
In addition to the enum that defines the events themselves, the EventCodes.h
header file declares these constants.
Declared In
EventCodes.h
Constants
-
invalidEvent = 100
- An invalid event value, used for error checking. This event is not normally posted to the event queue.
-
firstINetLibEvent = 0x1000
- Base value for Internet Library events.
-
firstWebLibEvent = 0x1100
- Base value for Web Library events.
-
firstUserEvent = 0x6000
- Base value for events generated by third-party applications. All events generated by Palm OS have a value less than
firstUserEvent
. Third-party application event values should fall in the range:firstUserEvent >=
n >= lastUserEvent -
lastUserEvent = 0x7FFF
- The maximum value that should be used for an event generated by a third-party application. Third-party application event values should fall in the range:
firstUserEvent >=
n >= lastUserEvent
Event Codes Events
NOTE: The events documented in this section represent general events of interest to most Palm OS programmers. Other events declared in
EventCodes.h
are generated by, or handled by, specific portions of the system and thus are only of interest to developers working with the corresponding operating system features. Those events are documented in other books in the Exploring Palm OS series, as listed under "Palm OS-Generated Events."
appStopEvent
Purpose
Request for the current application to terminate.
Prototype
There is no event-specific data associated with this event.
Comments
When the system wants to launch a different application than the one currently running, the event manager sends this event to request the current application to terminate. In response, an application has to exit its event loop, close any open files and forms, and exit.
If an application doesn't respond to this event by exiting, the system can't start the other application.
nilEvent
Purpose
Event that is sent by the Event Manager when there are no events in the event queue.
Prototype
There is no event-specific data associated with this event.
Comments
A nilEvent is useful for animation, polling, and similar situations.
The Event Manager sends this event when there are no events in the event queue. This can happen if the routine EvtGetEvent()
is passed a time-out value (a value other than evtWaitForever). If EvtGetEvent()
is unable to return an event in the specified time, it returns a nilEvent. Different Palm OS versions and different devices can send nilEvent
s under different circumstances, so you might receive a nilEvent
even before the timeout has expired.
prgMakeCallback
Purpose
This event is for use by the operating system only. Applications should not post or act upon this event
prgUpdateDialog
Purpose
This event is for use by the operating system only. Applications should not post or act upon this event