|
API Guide Home (Online version only) |
![]() |
Include dependency graph for common/system/palmOneNavigator.h:

Go to the source code of this file.
| #define IsFiveWayNavEvent | ( | eventP | ) |
Value:
( \
IsFiveWayNavPalmEvent(eventP) \
|| TxtCharIsRockerKey((eventP)->data.keyDown.modifiers, (eventP)->data.keyDown.chr) \
)
if (IsFiveWayNavEvent(eventP)) { // Handle five way events here }
Definition at line 167 of file common/system/palmOneNavigator.h.
| #define IsFiveWayNavPalmEvent | ( | eventP | ) |
Value:
( \
( ((eventP)->data.keyDown.chr == vchrPageUp) \
|| ((eventP)->data.keyDown.chr == vchrPageDown) \
|| ((eventP)->data.keyDown.chr == vchrNavChange) ) \
&& (((eventP)->data.keyDown.keyCode & (navBitsAll | navChangeBitsAll)) != 0) \
)
((eventP)->data.keyDown.keyCode & navChangeBitsAll) != 0 will be true if any of the 5 buttons is pressed or released.
The situation where these would differ is holding down one or more of the 5 buttons until it generates a repeat event. In that case, none of the navChangeBits will be set.
Unfortunately, on the Treo 600, the vchrPageUp/Down is accompanied by a keyCode that has some nav bits set. Thus, we will not be able to distinguish the HandSpring nav event from the Palm nav event here in such cases, and this macro will return true. Then, when using NavDirectionPressed, via NavKeyPressed e.g., the nav direction palm and HS macros will return false, as this case matches neither, and the vchrPageUp/Down will incorrectly be returned as not a 5-way nav event for our purposes of supporting non-5-way devices. That can be avoided by ensuring the focus state on HandSpring devices is set to object mode for the given form, thus ensuring vchrRockerUp/Down chrs are sent instead of vcrhPageUp/Down chrs, while also ensuring this continues to work as expected on palmOne devices.
if (IsFiveWayNavPalmEvent(eventP)) { // Handle five way events here }
Definition at line 124 of file common/system/palmOneNavigator.h.
| #define keyBitNavLeft 0x01000000 |
Key state mask to check the five way navigation LEFT button.
Definition at line 47 of file common/system/palmOneNavigator.h.
| #define keyBitNavLRS 0x07000000 |
Key state mask to check the five way navigation LEFT, RIGHT and SELECT buttons.
Definition at line 50 of file common/system/palmOneNavigator.h.
| #define keyBitNavRight 0x02000000 |
Key state mask to check the five way navigation RIGHT button.
Definition at line 48 of file common/system/palmOneNavigator.h.
| #define keyBitNavSelect 0x04000000 |
Key state mask to check the five way navigation SELECT button.
Definition at line 49 of file common/system/palmOneNavigator.h.
| #define navBitDown 0x0002 |
Key mask for the five way navigation DOWN button.
Definition at line 59 of file common/system/palmOneNavigator.h.
| #define navBitLeft 0x0004 |
Key mask for the five way navigation LEFT button.
Definition at line 60 of file common/system/palmOneNavigator.h.
| #define navBitRight 0x0008 |
Key mask for the five way navigation RIGHT button.
Definition at line 61 of file common/system/palmOneNavigator.h.
| #define navBitsAll 0x001F |
Key mask for all five way navigation buttons.
Definition at line 63 of file common/system/palmOneNavigator.h.
| #define navBitSelect 0x0010 |
Key mask for the five way navigation SELECT button.
Definition at line 62 of file common/system/palmOneNavigator.h.
| #define navBitUp 0x0001 |
Key mask for the five way navigation UP button.
Definition at line 58 of file common/system/palmOneNavigator.h.
| #define navChangeBitsAll 0x1F00 |
Key mask for all five way navigation buttons state change.
Definition at line 76 of file common/system/palmOneNavigator.h.
| #define navChangeDown 0x0200 |
Key mask for the five way navigation DOWN button state change.
Definition at line 72 of file common/system/palmOneNavigator.h.
| #define navChangeLeft 0x0400 |
Key mask for the five way navigation LEFT button state change.
Definition at line 73 of file common/system/palmOneNavigator.h.
| #define navChangeRight 0x0800 |
Key mask for the five way navigation RIGHT button state change.
Definition at line 74 of file common/system/palmOneNavigator.h.
| #define navChangeSelect 0x1000 |
Key mask for the five way navigation SELECT button state change.
Definition at line 75 of file common/system/palmOneNavigator.h.
| #define navChangeUp 0x0100 |
Key mask for the five way navigation UP button state change.
Definition at line 71 of file common/system/palmOneNavigator.h.
| #define NavDirectionHSPressed | ( | eventP, | |||
| nav | ) |
Value:
( \
((vchrRocker ## nav) != vchrRockerCenter) \
&& ( ( (((eventP)->data.keyDown.modifiers & commandKeyMask) != 0) \
&& ((eventP)->data.keyDown.chr == (vchrRocker ## nav)))) \
)
if (NavDirectionHSPressed(eventP, Left)) if (NavDirectionHSPressed(eventP, Right)) if (NavDirectionHSPressed(eventP, Up)) - also works without 5-way if (NavDirectionHSPressed(eventP, Down)) - also works without 5-way
Definition at line 267 of file common/system/palmOneNavigator.h.
| #define NavDirectionPalmPressed | ( | eventP, | |||
| nav | ) |
Value:
( \
((eventP)->data.keyDown.modifiers & autoRepeatKeyMask) \
? (((eventP)->data.keyDown.keyCode & (navBitsAll | navChangeBitsAll)) == \
(navBit ## nav)) \
: (((eventP)->data.keyDown.keyCode & (navBitsAll | navChangeBitsAll)) == \
(navBit ## nav | navChange ## nav)) \
)
if (NavDirectionPalmPressed(eventP, Left)) if (NavDirectionPalmPressed(eventP, Right)) if (NavDirectionPalmPressed(eventP, Up)) - also works without 5-way if (NavDirectionPalmPressed(eventP, Down)) - also works without 5-way
Definition at line 292 of file common/system/palmOneNavigator.h.
| #define NavDirectionPressed | ( | eventP, | |||
| nav | ) |
Value:
( \
IsFiveWayNavEvent(eventP) \
? ( NavDirectionPalmPressed(eventP, nav) \
|| NavDirectionHSPressed(eventP, nav)) \
: ( ((eventP)->data.keyDown.chr == vchrPageUp && (navBit ## nav) == navBitUp) \
|| ((eventP)->data.keyDown.chr == vchrPageDown && (navBit ## nav) == navBitDown)) \
)
if (NavDirectionPressed(eventP, Left)) if (NavDirectionPressed(eventP, Right)) if (NavDirectionPressed(eventP, Up)) - also works without 5-way if (NavDirectionPressed(eventP, Down)) - also works without 5-way
Definition at line 321 of file common/system/palmOneNavigator.h.
| #define navFtrCreator 'fway' |
Creator ID for 5-Way navigator.
Definition at line 37 of file common/system/palmOneNavigator.h.
| #define navFtrVersion 0 |
Feature id for 5-Way.
Definition at line 38 of file common/system/palmOneNavigator.h.
| #define NavKeyPressed | ( | eventP, | |||
| nav | ) |
Value:
( \
(navBit ## nav == navBitSelect) \
? NavSelectPressed(eventP) \
: NavDirectionPressed(eventP, nav) \
)
if (NavKeyPressed(eventP, Select)) if (NavKeyPressed(eventP, Left)) if (NavKeyPressed(eventP, Right)) if (NavKeyPressed(eventP, Up)) - also works without 5-way if (NavKeyPressed(eventP, Down)) - also works without 5-way
Definition at line 345 of file common/system/palmOneNavigator.h.
| #define NavSelectHSPressed | ( | eventP | ) |
Value:
( \
(((eventP)->data.keyDown.modifiers & commandKeyMask) != 0) \
&& ((eventP)->data.keyDown.chr == vchrRockerCenter) \
)
if (NavSelectHSPressed(eventP)) { // Select was pressed }
Definition at line 188 of file common/system/palmOneNavigator.h.
| #define NavSelectPalmPressed | ( | eventP | ) |
Value:
( \
(((eventP)->data.keyDown.modifiers & autoRepeatKeyMask) == 0) \
&& ((eventP)->data.keyDown.chr == vchrNavChange) \
&& (((eventP)->data.keyDown.keyCode & (navBitsAll | navChangeBitsAll)) == \
navChangeSelect) \
)
if (NavSelectPalmPressed(eventP)) { // Select was pressed }
Definition at line 214 of file common/system/palmOneNavigator.h.
| #define NavSelectPressed | ( | eventP | ) |
Value:
( \
IsFiveWayNavEvent(eventP) \
&& ( NavSelectPalmPressed(eventP) \
|| NavSelectHSPressed(eventP)) \
)
if (NavSelectPressed(eventP)) { // Select was pressed }
Definition at line 242 of file common/system/palmOneNavigator.h.
| #define navVersion 0x00010000 |
Version for 5-Way.
Definition at line 39 of file common/system/palmOneNavigator.h.
| Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:07:52 2008 for Palm API Guide |