Documentation  |   Table of Contents   |  < Previous   |  Next >  

35    Event.h

Porting Applications to Palm OS® Cobalt

Exploring Palm OS®

There are relatively few changes in the Event APIs. A couple of functions that formerly returned void now return a status value. The EvtCopyEvent() function is no longer supported, and neither is the winDisplayChangedEvent.

There are a number of new functions declared in Event.h primarily to enable the passing of events across process boundaries. Of particular importance is EvtCreateBackgroundThread(). This function creates a new background thread and returns a queue through which you can communicate with that thread. See Chapter 7, "Event," in Exploring Palm OS: Programming Basics for a complete description of all of the Palm OS Cobalt event APIs.

Deleted APIs ^TOP^

Table 35.1  Deleted functions

Deleted API

Use instead

EvtCopyEvent()

Palm OS Cobalt doesn't export a function that provides similar functionality.

Table 35.2  Deleted #defines

Deleted API

Use instead

winDisplayChangedEvent

Modified APIs ^TOP^

Table 35.3  Modified functions

Modified API

Description of change

status_t EvtAddEventToQueue (const EventType *)

Now returns an error code if the event queue is full.

status_t EvtAddUniqueEventToQueue (const EventType *, uint32_t, Boolean)

Now returns an error code if the event queue is full.

status_t EvtGetPen (Coord *, Coord *, Boolean *)

Now returns an error code.

Table 35.4  Modified structures

Modified API

Description of change

EventType

The winDisplayChanged struct has been removed from this union, and the following structures have been added: tsmFepChange, tsmFepDisplayOptions, tsmFepSelectOption, gsiStateChange.

Table 35.5  Modified enumerated types

Modified API

Description of change

eventsEnum

Formerly an enum, this is now a typedef that accepts one of the values defined by the eventsEnumTag enum.

Unchanged APIs ^TOP^

Table 35.6  Unchanged functions

EvtEventAvail()

EvtGetEvent()

Table 35.7  Unchanged macros

EvtKeydownIsVirtual()

Table 35.8  Unchanged types

EventPtr