Documentation  |   Table of Contents   |  < Previous   |  Next >   |  Index

13    System Event Manager

Programming Basics

Exploring Palm OS®

The System Event Manager APIs allow you to enable the Graffiti® 2 handwriting engine and to control the device's auto-off timer.

The contents of this chapter are organized as follows:

System Event Manager Structures and Types
System Event Manager Constants
System Event Manager Functions and Macros

The header file SysEvtMgr.h declares the API that this chapter describes.

For other APIs used to work with events, see Chapter 7, "Event." For background information on the Palm OS event system, see Chapter 3, "Events and the Event Loop."

System Event Manager Structures and Types ^TOP^

EvtSetAutoOffCmd Typedef ^TOP^

Purpose

Contains one of the auto-off-timer command values defined by the EvtSetAutoOffTag enum.

Declared In

SysEvtMgr.h

Prototype

typedef Enum8 EvtSetAutoOffCmd

System Event Manager Constants ^TOP^

EvtSetAutoOffTag Enum ^TOP^

Purpose

Commands used with EvtSetAutoOffTimer() to control the device's auto-off timer.

Declared In

SysEvtMgr.h

Constants

SetAtLeast
Make sure that the device won't turn off until timeout seconds of idle time has passed. (This operation only changes the current value if it's less than the value you specify.)
SetExactly
Set the timer to turn off in timeout seconds.
SetAtMost
Make sure the device will turn before timeout seconds has passed. (This operation only changes the current value if it's greater than the value you specify.)
SetDefault
Change the default auto-off timeout to timeout seconds.
ResetTimer
Reset the auto-off timer so that the device does not turn off until at least the default seconds of idle time has passed.

System Event Manager Functions and Macros ^TOP^

EvtEnableGraffiti Function ^TOP^

Purpose

Enable or disable Graffiti 2 handwriting recognition.

Declared In

SysEvtMgr.h

Prototype

void EvtEnableGraffiti (
   Boolean enable
)

Parameters

enable
true to enable handwriting recognition, false to disable it.

Returns

Nothing.

EvtResetAutoOffTimer Function ^TOP^

Purpose

Reset the auto-off timer.

Declared In

SysEvtMgr.h

Prototype

status_t EvtResetAutoOffTimer (
   void
)

Parameters

None.

Returns

Always returns errNone.

Comments

EvtResetAutoOffTimer resets the auto-off timer so that the device does not turn off until at least the default amount of idle time has passed. You can use this function to ensure that the device doesn't automatically power off during a long operation without user input (for example, when there is a lot of serial port activity).


NOTE: This function requires an IPC; accordingly, it should be used sparingly.

If you need more control over the auto-off timer, consider using EvtSetAutoOffTimer() instead of this function.

EvtSetAutoOffTimer Function ^TOP^

Purpose

Set the auto-off timer.

Declared In

SysEvtMgr.h

Prototype

status_t EvtSetAutoOffTimer (
   EvtSetAutoOffCmd cmd,
   uint16_t timeout
)

Parameters

cmd
One of the commands defined by the EvtSetAutoOffTag enum.
timeout
A new timeout value in seconds. If cmd is ResetTimer, this parameter is ignored.

Returns

Always returns errNone.

Comments

Use this function to ensure that the device doesn't automatically power off during a long operation that has no user input (for example, when there is a lot of serial port activity).

See Also

EvtResetAutoOffTimer()