Previous Page Table of Contents Index Next Page

Palm OS SDK Reference


Palm Logo B Compatibility Guide

This appendix lists groups of functions and other features (such as events and launch codes) that have been added to the Palm OS® after version 1.0.

Before you use any new functions or features in an application, you must check to ensure that they are implemented in the OS version your application is running on. Checking the OS version number is not a reliable indicator that a specific feature is present, since some later OS versions do not include features present in earlier versions. In order to ensure that your code is supported, you must check for the presence of individual features.

To make this check easier, this appendix lists new functions and features in groups such that all functions and features in a group are always implemented together in the ROM of a Palm device. This means that you can check for a single feature in that group and be assured that if that feature is present than all functions and features in that group are implemented.

Each group includes a recommended test to check if it is implemented. The following groups are described:

2.0 New Feature Set

You can check that this feature set is implemented by checking that the system version is 2.0 or higher. Use this FtrGet call:

err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romversion);

The romversion parameter should be 0x02003000 or greater.

Launch Codes

This feature set adds the following launch codes:

sysAppLaunchCmdLookup
sysAppLaunchCmdPanelCalledFromApp
sysAppLaunchCmdReturnFromPanel
sysAppLaunchCmdSystemLock

Functions

This feature set adds the following functions:

CategoryInitialize CategorySetName
DmDeleteCategory DmDatabaseProtect
EvtAddUniqueEventToQueue
EvtSysEventAvail
EvtEventAvail
FldGetNumberOfBlankLines
FldSetInsertionPoint
FldGetScrollValues
FntGetScrollValues
FntWordWrapReverseNLines
FntWordWrap
FrmPointInTitle
FrmSetObjectBounds
FrmSetMenu
KeySetMask LocGetNumberSeparators
LstScrollList LstGetVisibleItems
MemCmp MenuSetActiveMenuRscID
PhoneNumberLookup
PrefSetPreference PrefGetPreference
SclDrawScrollBar
SclHandleEvent
SclGetScrollBar
SclSetScrollBar
SerControl
StrDelocalizeNumber
StrNCaselessCompare
StrNCompare
StrPrintF
StrLocalizeNumber
StrNCat
StrNCopy
StrVPrintF
SysBinarySearch
SysCreatePanelList
SysGraffitiReferenceDialog
SysStringByIndex
SysCreateDataBaseList
SysErrString
SysLibLoad
SysTicksPerSecond
TblHasScrollBar
TblSetColumnEditIndicator
TblSetBounds
TblSetRowStaticHeight
WinSetWindowBounds

Existing Functions that Changed

Several functions that existed in 1.0 were changed in 2.0:

CategoryCreateList (old function renamed CategoryCreateListV10)
CategoryEdit (old function renamed CategoryEditV10)
CategoryFreeList (old function renamed CategoryFreeListV10)
CategorySelect (old function renamed CategorySelectV10)
SelectDay (old function renamed SelectDayV10)
DmFindSortPosition (old function renamed DmFindSortPositionV10)
PrefGetAppPreferences (old function renamed PrefGetAppPreferencesV10)
PrefOpenPreferenceDB (old function renamed PrefOpenPreferenceDBV10)
PrefSetAppPreferences (old function renamed PrefSetAppPreferencesV10)
SerReceive (old function renamed SerReceive10)
SerSend (old function renamed SerSend10)
SysKeyboardDialog (old function renamed SysKeyboardDialogV10)

Other Changes

As a rule, all Palm OS applications developed with the 1.0 SDK should run error-free on the latest device. There are two possible pitfalls for 1.0 applications:

3.0 New Feature Set

You can check that this feature set is implemented by checking that the system version is 3.0 or higher. Use this FtrGet call:

err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romversion);

The romversion parameter should be 0x03003000 or greater.

Launch Codes

This feature set adds the following launch codes:

sysAppLaunchCmdExgAskUser
sysAppLaunchCmdExgReceiveData

In addition, the launch code sysAppLaunchCmdGoto is now also sent by the exchange manager, in addition to its use by the global find operation.

Font

This feature set adds the following font:

largeBoldFont

Functions

This feature set adds the following functions:

Dynamic User Interface Functions

CtlNewControl
CtlValidatePointer
FldNewField
FrmNewBitmap
FrmNewForm
FrmNewGadget
FrmNewLabel
FrmRemoveObject
FrmValidatePtr
LstNewList
WinValidateHandle

For more information on creating and using dynamic user interface elements, see the section "Dynamic UI" of the Palm OS Programmer's Companion.

Font Functions

FontSelect
FntDefineFont

For more information on these functions and the support for custom fonts, see the section "Fonts in Palm OS 3.0 and Later" of the Palm OS Programmer's Companion.

Progress Manager Functions

PrgHandleEvent
PrgStartDialog
PrgStopDialog
PrgUpdateDialog
PrgUserCancel

For more information, see the section "Progress Dialogs" of the Palm OS Programmer's Companion.

File Streaming Functions

FileClearerr
FileClose
FileControl
FileDelete
FileDmRead
FileEOF
FileError
FileFlush
FileGetLastError
FileOpen
FileRead
FileReadLow
(system use only)
FileRewind
FileSeek
FileTell
FileTruncate
FileWrite

For more information, see the section "File Streaming Application Program Interface" of the Palm OS Programmer's Companion.

Sound Functions

SndCreateMidiList
SndPlaySmf
SndDoCmd (enhanced in 3.0)

Exchange Manager Functions

ExgAccept
ExgDBRead
ExgDBWrite
ExgDisconnect
ExgPut
ExgReceive
ExgRegisterData
ExgSend

For more information, see the chapter Beaming (Infrared Communication) in the Palm OS Programmer's Companion.

IR Library Functions

IrAdvanceCredit
IrBind
IrClose
IrConnectIrLap
IrConnectReq
IrConnectRsp
IrDataReq
IrDisconnectIrLap
IrDiscoverReq
IrIAS_Add
IrIAS_GetInteger
IrIAS_GetIntLsap
IrIAS_GetObjectID
IrIAS_GetOctetString
IrIAS_GetOctetStringLen
IrIAS_GetType
IrIAS_GetUserString
IrIAS_GetUserStringCharSet
IrIAS_GetUserStringLen
IrIAS_Next
IrIAS_Query
IrIAS_SetDeviceName
IrIAS_StartResult
IrIsIrLapConnected
IrIsMediaBusy
IrIsNoProgress
IrIsRemoteBusy
IrLocalBusy
IrMaxRxSize
IrMaxTxSize
IrOpen
IrSetConTypeLMP
IrSetConTypeTTP
IrSetDeviceInfo
IrTestReq
IrUnbind

For more information, see the chapter Beaming (Infrared Communication) in the Palm OS Programmer's Companion.

Miscellaneous Functions

FrmRestoreActiveState
FrmSaveActiveState
ScrDisplayMode
SysGetAppInfo
(system use only)
SysGetOSVersionString
SysGetROMToken
SysGetStackInfo
SysGremlins
TblGetItemFont
TblSetItemFont

Existing Functions that Changed

Two functions that existed in 2.0 were changed in 3.0:

CategoryEdit (old function renamed CategoryEditV20)
SysBatteryInfo (old function renamed SysBatteryInfoV20)

Other Changes

3.1 New Feature Set

You can check that this feature set is implemented by checking that the system version is 3.1 or higher. Use this FtrGet call:

err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romversion);

The romversion parameter should be 0x03103000 or greater.

Functions

This feature set adds the following functions:

ChrHorizEllipsis
ChrNumericSpace
ContrastAdjust
FntWidthToOffset
FtrPtrNew
FtrPtrFree
FtrPtrResize
SelectOneTime
WinDrawChar
WinDrawTruncChars


NOTE:  

The PalmOSGlue.lib provides compatibility functions and macros for ChrHorizEllipsis, ChrNumericSpace, WinDrawChar, and WinDrawTruncChars. If you want to use these functions on systems that don't have the 3.1 feature set, you can link your application with PalmOSGlue.lib. See the chapter "PalmOSGlue Library" for more information.

Changes to the Character Encoding

Starting in Palm OS 3.1, the character encoding used on most systems is Microsoft Windows code page 1252. Versions prior to 3.1 used an encoding that was very similar to code page 1252 but did not follow it exactly. The following changes to the character set are introduced in Palm OS 3.1:

Other Changes in 3.1

3.2 New Feature Set

You can check that this feature set is implemented by checking that the system version is 3.2 or higher. Use this FtrGet call:

err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romversion);

The romversion parameter should be 0x03203000 or greater.

Functions

This feature set adds the following functions:

AlmGetProcAlarm
AlmSetProcAlarm
ClipboardAppendItem
DmGetDatabaseLockState
ErrAlert
SndPlaySmfResource

Existing Functions that Changed

Two functions that existed in 3.0 were changed in 3.2:

SysGremlins was removed and replaced with a SysGremlins macro that maps it to the function HostGremlinIsRunning. The prototype is slightly different, but you can still call SysGremlins in the same way you did before.
PrgStartDialog (old function renamed PrgStartDialogV31)

Other Changes in 3.2

International Feature Set

You can check that this feature set is implemented by checking for the existence of the international manager. You can check by calling FtrGet as follows:

err = FtrGet(sysFtrCreator, sysFtrNumIntlMgr, &value);

If the international manager is installed, the value parameter will be non-zero and the returned error should also be zero (for no error).

You can learn more about the international manager by reading the chapter "Localized Applications" in the Palm OS Programmer's Companion.

NOTE:  

If you want to use international functions on systems that don't have the international feature, you can link your application with PalmOSGlue.lib. The functions in this library are the same as those listed below except that they use the prefix "TxtGlue" instead of "Txt." For more information, see the chapter "PalmOSGlue Library" .

Functions

This feature set adds the following functions:

Text Manager Functions

TxtByteAttr
TxtCaselessCompare
TxtCharAttr
TxtCharBounds
TxtCharEncoding
TxtCharIsAlNum
TxtCharIsAlpha
TxtCharIsCntrl
TxtCharIsDigit
TxtCharIsGraph
TxtCharIsHardKey
TxtCharIsHex
TxtCharIsLower
TxtCharIsPrint
TxtCharIsPunct
TxtCharIsSpace
TxtCharIsUpper
TxtCharSize
TxtCharWidth
TxtCharXAttr
TxtCompare
TxtEncodingName
TxtFindString
TxtGetChar
TxtGetNextChar
TxtGetPreviousChar
TxtCharIsValid
TxtMaxEncoding
TxtNextCharSize
TxtPreviousCharSize
TxtReplaceStr
TxtSetNextChar
TxtStrEncoding
TxtTransliterate
TxtGetTruncationOffset
TxtWordBounds

Other Functions

IntlGetRoutineAddress

Removed Functions and Macros

If the international feature set exists, then the following functions and macros are no longer available:

GetCharAttr
GetCharCaselessValue
GetCharSortValue
IsAscii
IsAlNum
IsAlpha
IsCntrl
IsDigit
IsGraph
IsLower
IsPrint
IsPunct
IsSpace
IsUpper
IsHex
IsDelim

Japanese Feature Set

You can check that the Japanese feature set is implemented by checking if the unit is Japanese. You can check by calling FtrGet as follows:

err = FtrGet(sysFtrCreator, sysFtrNumEncoding, &value);

The unit has the Japanese OS if the value parameter is charEncodingCP932.

For further information about the Japanese implementation, see the section "Notes on the Japanese Implementation" in the Palm OS Programmer's Companion.

Wireless Internet Feature Set

You can check that this feature set is implemented by checking for the existence of the Clipper and iMessenger applications. Here's an example of how to check for Clipper:

DmSearchStateType searchState;
UInt cardNo;
LocalID dbID;
err = DmGetNextDatabaseByTypeCreator(true, &searchState, sysFileTApplication, sysFileCClipper, true, &cardNo, &dbID);

If Clipper is not present, the DmGetNextDatabaseByTypeCreator routine returns an error. To check for iMessenger, you can use the creator type sysFileCMessaging.

You can learn more about the Palm.Net system for wireless Internet access and the programmatic interfaces to the Clipper and iMessenger applications by reading the chapter "Internet and Messaging Applications" in the Palm OS Programmer's Companion.

Launch Codes

This feature set adds the following launch codes:

sysAppLaunchCmdAddRecord (for iMessenger application; existed for Mail in 3.0)
sysAppLaunchCmdGoToURL
sysAppLaunchCmdOpenDB
sysAppLaunchCmdURLParams

Events

This feature set adds the following events:

inetSockReadyEvent
inetSockStatusChangeEvent

This feature set also adds the following keyDownEvent key codes:

vchrHardAntenna
vchrRadioCoverageOK
vchrRadioCoverageFail

These key codes are described in the section New keyDownEvent Key Codes.

Functions

This feature set adds the following functions.

Internet Library Functions

For more information, see the chapter "Network Communication" in the Palm OS Programmer's Companion.

INetLibCacheGetObject
INetLibCacheList
INetLibCheckAntennaState
INetLibClose
INetLibConfigAliasGet
INetLibConfigAliasSet
INetLibConfigDelete
INetLibConfigIndexFromName
INetLibConfigList
INetLibConfigMakeActive
INetLibConfigRename
INetLibConfigSaveAs
INetLibGetEvent
INetLibOpen
INetLibSettingGet
INetLibSettingSet
INetLibSockClose
INetLibSockConnect
INetLibSockHTTPAttrGet
INetLibSockHTTPAttrSet
INetLibSockHTTPReqCreate
INetLibSockHTTPReqSend
INetLibSockOpen
INetLibSockRead
INetLibSockSettingGet
INetLibSockSettingSet
INetLibSockStatus
INetLibURLCrack
INetLibURLGetInfo
INetLibURLOpen
INetLibURLsAdd
INetLibWiCmd

New Serial Manager Feature Set

You can check that this feature set is implemented by checking for the existence of the new serial manager. You can check by calling FtrGet as follows:

err = FtrGet(sysFileCSerialMgr, sysFtrNewSerialPresent, &value);

If the new serial manager is installed, the value parameter will be non-zero and the returned error should also be zero (for no error).

You can learn more about the new serial manager and connection manager by reading the sections "The New Serial Manager" and "The Connection Manager" in the Palm OS Programmer's Companion.

Functions

This feature set adds the following functions.

New Serial Manager Functions

SrmClearErr
SrmClose
SrmControl
SrmGetDeviceCount
SrmGetDeviceInfo
SrmGetStatus
SrmOpen
SrmOpenBackground
SrmPrimeWakeupHandler
SrmReceive
SrmReceiveCheck
SrmReceiveFlush
SrmReceiveWait
SrmReceiveWindowClose
SrmReceiveWindowOpen
SrmSend
SrmSendCheck
SrmSendFlush
SrmSendWait
SrmSetReceiveBuffer
SrmSetWakeupHandler
WakeupHandlerProc

Serial Driver Functions

DrvEntryPoint
SdrvClose
SdrvControl
SdrvISP
SdrvOpen
SdrvReadChar
SdrvStatus
SdrvWriteChar

Virtual Driver Functions

DrvEntryPoint
GetSize
GetSpace
VdrvControl
VdrvOpen
VdrvStatus
VdrvWrite
WriteBlock
WriteByte

Connection Manager Functions

CncAddProfile
CncDeleteProfile
CncGetProfileInfo
CncGetProfileList

Serial Link Manager Function

SlkSocketPortID

3.5 New Feature Set

You can check that this feature set is implemented by checking that the system version is 3.5 or higher. Use this FtrGet call:

err = FtrGet(sysFtrCreator, sysFtrNumROMVersion, &romversion);

The romversion parameter should be 0x03503000 or greater.

Launch Codes

This feature set adds the following launch codes:

sysAppLaunchCmdNotify

Events

This feature set adds the following events:

frmGadgetEnterEvent
frmGadgetMiscEvent
menuCmdBarOpenEvent
menuOpenEvent

Functions

This feature set adds the following functions.

Bitmaps

BmpBitsSize
BmpColortableSize
BmpCompress
BmpCreate
BmpDelete
BmpGetBits
BmpGetColortable
BmpSize
ColorTableEntries

Controls

CtlGetSliderValues
CtlNewGraphicControl
CtlNewSliderControl
CtlSetGraphics
CtlSetSliderValues

Forms

FrmCustomResponseAlert
FrmNewGsi
FrmSetGadgetHandler

Menus

MenuAddItem
MenuCmdBarDisplay
MenuHideItem
MenuCmdBarAddButton
MenuCmdBarGetButtonData
MenuShowItem

Overlay Manager

OmGetCurrentLocale
OmGetIndexedLocale
OmGetRoutineAddress
OmGetSystemLocale
OmLocaleToOverlayDBName
OmOverlayDBNameToLocale
OmSetSystemLocale

Private Records

SecSelectViewStatus SecVerifyPW

Tables

TblGetItemPtr
TblRowMasked
TblSetColumnMasked
TblSetRowMasked

UI Colors

UIColorGetTableEntryIndex
UIColorGetTableEntryRGB
UIColorSetTableEntry

UI Controls

UIBrightnessAdjust UIPickColor

Windows

WinCreateBitmapWindow
WinDrawPixel
WinErasePixel
WinGetBitmap
WinGetPatternType
WinGetPixel
WinIndexToRGB
WinInvertPixel
WinPaintBitmap
WinPaintChar WinPaintChars
WinPaintLine
WinPaintLines
WinPaintPixel
WinPaintPixels
WinPaintRectangle
WinPaintRectangleFrame
WinPalette
WinPopDrawState
WinPushDrawState
WinRGBToIndex
WinScreenLock
WinScreenMode
WinScreenUnlock
WinSetBackColor
WinSetDrawMode
WinSetForeColor
WinSetPatternType WinSetTextColor

Miscellaneous New Functions

DmOpenDBNoOverlay
ExgDoDialog DateToAscii
ResLoadConstant
TxtParamString

Existing Functions that Changed

The following functions that existed prior to 3.5 have changed in release 3.5:

ScrDisplayMode was changed to WinScreenMode.
ContrastAdjust was changed to UIContrastAdjust.
SelectTime (old function renamed SelectTimeV33)

New Data Types

The data types Byte, Word, DWord and so on are now deprecated. It is recommend that you use the corresponding new data types. For example, use Int16 instead of SWord and UInt32 instead of DWord. In particular, the unfortunate distinction between Handle/VoidHand has been fixed; use MemHandle instead.

To learn in general how the type names changed, see the header file PalmOSCompatibility.h. This file provides a mapping from the old type name to the new type name. If you need to move forward without modifying your code, you can include this file in your project to provide declarations for the old type names.

Changes to Events

Other Changes

Notification Feature Set

You can check that this feature set is implemented by checking for the existence of the notification manager. You can check by calling FtrGet as follows:

err = FtrGet(sysFtrCreator, sysFtrNumNotifyMgrVersion, &value);

If the notification manager is part of the system, the value parameter will be non-zero and the returned error should also be zero (for no error).

Notification Manager

SysNotifyBroadcast
SysNotifyBroadcastDeferred
SysNotifyRegister
SysNotifyUnregister



Palm OS SDK Reference

  Previous Page Table of Contents Index Next Page  

This is page 66 of 85 in this book

Palm Computing Platform Development Zone
Copyright © 2000, Palm, Inc. All rights reserved.