Trinity Universityjhowland/class.files.cs3194.html/palm... · 2000. 3. 24. · Palm OS SDK...
Transcript of Trinity Universityjhowland/class.files.cs3194.html/palm... · 2000. 3. 24. · Palm OS SDK...
-
Palm OS® SDK Reference
Document Number 3003-002Print Date 3/00
-
Document Number 3003-002
CONTRIBUTORS
Written by Christopher Bey, Elly Freeman, Dwayne Mulder, and Jean Ostrem Production by PS document production servicesEngineering contributions by David Fedor, Roger Flores, Steve Lemke, Bob Ebert, Ken Krugler, Bruce Thompson, Jesse Donaldson, Tim Wiegman, Gavin Peacock, Ryan Robertson, and Waddah Kudaimi
Copyright © 1996 - 2000, Palm, Inc. All rights reserved. This documentation may be printed and copied solely for use in developing products for Palm OS software. In addition, two (2) copies of this documenta-tion may be made for archival and backup purposes. Except for the foregoing, no part of this documenta-tion may be reproduced or transmitted in any form or by any means or used to make any derivative work (such as translation, transformation or adaptation) without express written consent from Palm, Inc.
Palm, Inc. reserves the right to revise this documentation and to make changes in content from time to time without obligation on the part of Palm, Inc. to provide notification of such revision or changes. PALM, INC. MAKES NO REPRESENTATIONS OR WARRANTIES THAT THE DOCUMENTATION IS FREE OF ERRORS OR THAT THE DOCUMENTATION IS SUITABLE FOR YOUR USE. THE DOCUMEN-TATION IS PROVIDED ON AN “AS IS” BASIS. PALM, INC. MAKES NO WARRANTIES, TERMS OR CONDITIONS, EXPRESS OR IMPLIED, EITHER IN FACT OR BY OPERATION OF LAW, STATUTORY OR OTHERWISE, INCLUDING WARRANTIES, TERMS, OR CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND SATISFACTORY QUALITY.
TO THE FULL EXTENT ALLOWED BY LAW, PALM, INC. ALSO EXCLUDES FOR ITSELF AND ITS SUP-PLIERS ANY LIABILITY, WHETHER BASED IN CONTRACT OR TORT (INCLUDING NEGLIGENCE), FOR DIRECT, INCIDENTAL, CONSEQUENTIAL, INDIRECT, SPECIAL, OR PUNITIVE DAMAGES OF ANY KIND, OR FOR LOSS OF REVENUE OR PROFITS, LOSS OF BUSINESS, LOSS OF INFORMATION OR DATA, OR OTHER FINANCIAL LOSS ARISING OUT OF OR IN CONNECTION WITH THIS DOCU-MENTATION, EVEN IF PALM, INC. HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
Palm Computing, Palm OS, Graffiti, HotSync, and Palm Modem are registered trademarks, and Palm III, Palm IIIe, Palm IIIx, Palm V, Palm Vx, Palm VII, Palm, More connected., Simply Palm, the Palm Comput-ing platform logo, Palm III logo, Palm IIIx logo, Palm V logo, and HotSync logo are trademarks of Palm, Inc. or its subsidiaries. All other product and brand names may be trademarks or registered trademarks of their respective owners.
IF THIS DOCUMENTATION IS PROVIDED ON A COMPACT DISK, THE OTHER SOFTWARE AND DOCUMENTATION ON THE COMPACT DISK ARE SUBJECT TO THE LICENSE AGREEMENT AC-COMPANYING THE COMPACT DISK.
Palm, Inc.5400 Bayfront PlazaSanta Clara, CA 95052USA
www.palm.com/devzone
Palm OS SDK ReferenceDocument Number 3003-002March 16, 2000
-
Palm OS SDK Reference 3
Table of Contents About This Document 49
Palm OS SDK Documentation . . . . . . . . . . . . . . . 49What This Volume Contains . . . . . . . . . . . . . . . . 49Conventions Used in This Guide . . . . . . . . . . . . . . 50
Part I: User Interface
1 Application Launch Codes 53Launch Codes . . . . . . . . . . . . . . . . . . . . . . 55
sysAppLaunchCmdAddRecord . . . . . . . . . . . . . 55sysAppLaunchCmdAlarmTriggered . . . . . . . . . . . 58sysAppLaunchCmdCountryChange . . . . . . . . . . . 59sysAppLaunchCmdDisplayAlarm . . . . . . . . . . . . 59sysAppLaunchCmdExgAskUser . . . . . . . . . . . . . 60sysAppLaunchCmdExgReceiveData . . . . . . . . . . . 62sysAppLaunchCmdFind . . . . . . . . . . . . . . . . 63sysAppLaunchCmdGoto . . . . . . . . . . . . . . . . 65sysAppLaunchCmdGoToURL . . . . . . . . . . . . . . 66sysAppLaunchCmdInitDatabase . . . . . . . . . . . . . 66sysAppLaunchCmdLookup . . . . . . . . . . . . . . . 67sysAppLaunchCmdNotify . . . . . . . . . . . . . . . 68sysAppLaunchCmdOpenDB. . . . . . . . . . . . . . . 68sysAppLaunchCmdPanelCalledFromApp . . . . . . . . . 69sysAppLaunchCmdReturnFromPanel. . . . . . . . . . . 69sysAppLaunchCmdSaveData . . . . . . . . . . . . . . 70sysAppLaunchCmdSyncNotify . . . . . . . . . . . . . 70sysAppLaunchCmdSystemLock . . . . . . . . . . . . . 71sysAppLaunchCmdSystemReset . . . . . . . . . . . . . 71sysAppLaunchCmdTimeChange . . . . . . . . . . . . . 72sysAppLaunchCmdURLParams . . . . . . . . . . . . . 72
Launch Flags. . . . . . . . . . . . . . . . . . . . . . . 73
-
4 Palm OS SDK Reference
2 Palm OS Resources 75System Resources . . . . . . . . . . . . . . . . . . . . . 75
The ‘code’ #1 Resource . . . . . . . . . . . . . . . . . 75The ‘code’ #0 and ‘data’ #0 Resources . . . . . . . . . . . 76The ‘pref’ #0 Resource . . . . . . . . . . . . . . . . . 76
Resource Types . . . . . . . . . . . . . . . . . . . . . . 77Catalog Resources . . . . . . . . . . . . . . . . . . . 77Project Resources. . . . . . . . . . . . . . . . . . . . 78
Alert Resource . . . . . . . . . . . . . . . . . . . . . . 79Button Resource . . . . . . . . . . . . . . . . . . . . . 81Check Box Resource. . . . . . . . . . . . . . . . . . . . 83Field Resource . . . . . . . . . . . . . . . . . . . . . . 84Form Resource . . . . . . . . . . . . . . . . . . . . . . 86Form Bitmap Resource . . . . . . . . . . . . . . . . . . 89Gadget Resource . . . . . . . . . . . . . . . . . . . . . 90Graffiti Shift Indicator Resource . . . . . . . . . . . . . . 91Label Resource . . . . . . . . . . . . . . . . . . . . . . 91List Resource. . . . . . . . . . . . . . . . . . . . . . . 92Menus and Menu Bars . . . . . . . . . . . . . . . . . . 94Popup Trigger Resource . . . . . . . . . . . . . . . . . . 96Push Button Resource . . . . . . . . . . . . . . . . . . . 97Repeating Button Resource. . . . . . . . . . . . . . . . . 99Scroll Bar Resource . . . . . . . . . . . . . . . . . . . . 100Selector Trigger Resource . . . . . . . . . . . . . . . . . 101String Resource. . . . . . . . . . . . . . . . . . . . . . 103Table Resource . . . . . . . . . . . . . . . . . . . . . . 103
3 Palm OS Events 105Event Data Structures . . . . . . . . . . . . . . . . . . . 106
eventsEnum . . . . . . . . . . . . . . . . . . . . . . 106EventType. . . . . . . . . . . . . . . . . . . . . . . 107EventPtr . . . . . . . . . . . . . . . . . . . . . . . 109
Event Reference . . . . . . . . . . . . . . . . . . . . . 109appStopEvent . . . . . . . . . . . . . . . . . . . . . 109ctlEnterEvent . . . . . . . . . . . . . . . . . . . . . 109
-
Palm OS SDK Reference 5
ctlExitEvent . . . . . . . . . . . . . . . . . . . . . . 110ctlRepeatEvent . . . . . . . . . . . . . . . . . . . . . 110ctlSelectEvent . . . . . . . . . . . . . . . . . . . . . 111daySelectEvent. . . . . . . . . . . . . . . . . . . . . 112fldChangedEvent . . . . . . . . . . . . . . . . . . . 113fldEnterEvent . . . . . . . . . . . . . . . . . . . . . 113fldHeightChangedEvent . . . . . . . . . . . . . . . . 113frmCloseEvent . . . . . . . . . . . . . . . . . . . . . 114frmGadgetEnterEvent . . . . . . . . . . . . . . . . . 115frmGadgetMiscEvent . . . . . . . . . . . . . . . . . . 115frmGotoEvent . . . . . . . . . . . . . . . . . . . . . 116frmLoadEvent . . . . . . . . . . . . . . . . . . . . . 117frmOpenEvent . . . . . . . . . . . . . . . . . . . . . 117frmSaveEvent . . . . . . . . . . . . . . . . . . . . . 118frmTitleEnterEvent . . . . . . . . . . . . . . . . . . . 118frmTitleSelectEvent . . . . . . . . . . . . . . . . . . . 118frmUpdateEvent . . . . . . . . . . . . . . . . . . . . 119inetSockReadyEvent . . . . . . . . . . . . . . . . . . 120inetSockStatusChangeEvent . . . . . . . . . . . . . . . 120keyDownEvent . . . . . . . . . . . . . . . . . . . . 121lstEnterEvent . . . . . . . . . . . . . . . . . . . . . 122lstExitEvent . . . . . . . . . . . . . . . . . . . . . . 123lstSelectEvent . . . . . . . . . . . . . . . . . . . . . 123menuCloseEvent . . . . . . . . . . . . . . . . . . . . 124menuCmdBarOpenEvent . . . . . . . . . . . . . . . . 124menuEvent . . . . . . . . . . . . . . . . . . . . . . 124menuOpenEvent . . . . . . . . . . . . . . . . . . . . 125nilEvent. . . . . . . . . . . . . . . . . . . . . . . . 126penDownEvent . . . . . . . . . . . . . . . . . . . . 126penMoveEvent. . . . . . . . . . . . . . . . . . . . . 127penUpEvent . . . . . . . . . . . . . . . . . . . . . . 127popSelectEvent . . . . . . . . . . . . . . . . . . . . 128sclEnterEvent . . . . . . . . . . . . . . . . . . . . . 129sclExitEvent . . . . . . . . . . . . . . . . . . . . . . 129sclRepeatEvent. . . . . . . . . . . . . . . . . . . . . 130tblEnterEvent . . . . . . . . . . . . . . . . . . . . . 131
-
6 Palm OS SDK Reference
tblExitEvent . . . . . . . . . . . . . . . . . . . . . . 131tblSelectEvent . . . . . . . . . . . . . . . . . . . . . 132winEnterEvent . . . . . . . . . . . . . . . . . . . . . 133winExitEvent . . . . . . . . . . . . . . . . . . . . . 133
4 Categories 135Category Data Structures . . . . . . . . . . . . . . . . . 135
AppInfoType . . . . . . . . . . . . . . . . . . . . . 135Category Constants . . . . . . . . . . . . . . . . . . . . 136Category Functions . . . . . . . . . . . . . . . . . . . . 137
CategoryCreateList . . . . . . . . . . . . . . . . . . . 137CategoryCreateListV10 . . . . . . . . . . . . . . . . . 139CategoryEdit . . . . . . . . . . . . . . . . . . . . . 139CategoryEditV20 . . . . . . . . . . . . . . . . . . . . 140CategoryEditV10 . . . . . . . . . . . . . . . . . . . . 141CategoryFind . . . . . . . . . . . . . . . . . . . . . 142CategoryFreeList . . . . . . . . . . . . . . . . . . . . 142CategoryFreeListV10 . . . . . . . . . . . . . . . . . . 143CategoryGetName . . . . . . . . . . . . . . . . . . . 144CategoryGetNext. . . . . . . . . . . . . . . . . . . . 144CategoryInitialize . . . . . . . . . . . . . . . . . . . 145CategorySelect . . . . . . . . . . . . . . . . . . . . . 146CategorySelectV10 . . . . . . . . . . . . . . . . . . . 147CategorySetName . . . . . . . . . . . . . . . . . . . 148CategorySetTriggerLabel . . . . . . . . . . . . . . . . 149CategoryTruncateName . . . . . . . . . . . . . . . . . 149
5 Clipboard 151Clipboard Data Structures . . . . . . . . . . . . . . . . . 151
ClipboardFormatType . . . . . . . . . . . . . . . . . 151Clipboard Functions . . . . . . . . . . . . . . . . . . . 152
ClipboardAddItem . . . . . . . . . . . . . . . . . . . 152ClipboardAppendItem . . . . . . . . . . . . . . . . . 153ClipboardGetItem . . . . . . . . . . . . . . . . . . . 154
-
Palm OS SDK Reference 7
6 Controls 155Control Data Structures . . . . . . . . . . . . . . . . . . 155
ButtonFrameType . . . . . . . . . . . . . . . . . . . 155ControlAttrType . . . . . . . . . . . . . . . . . . . . 156ControlPtr. . . . . . . . . . . . . . . . . . . . . . . 157ControlStyleType. . . . . . . . . . . . . . . . . . . . 157ControlType . . . . . . . . . . . . . . . . . . . . . . 159GraphicControlType . . . . . . . . . . . . . . . . . . 160SliderControlType . . . . . . . . . . . . . . . . . . . 162
Control Resources . . . . . . . . . . . . . . . . . . . . 164Control Functions. . . . . . . . . . . . . . . . . . . . . 165
CtlDrawControl . . . . . . . . . . . . . . . . . . . . 165CtlEnabled . . . . . . . . . . . . . . . . . . . . . . 165CtlEraseControl . . . . . . . . . . . . . . . . . . . . 166CtlGetLabel . . . . . . . . . . . . . . . . . . . . . . 166CtlGetSliderValues . . . . . . . . . . . . . . . . . . . 167CtlGetValue . . . . . . . . . . . . . . . . . . . . . . 168CtlHandleEvent . . . . . . . . . . . . . . . . . . . . 168CtlHideControl . . . . . . . . . . . . . . . . . . . . 169CtlHitControl . . . . . . . . . . . . . . . . . . . . . 170CtlNewControl . . . . . . . . . . . . . . . . . . . . 170CtlNewGraphicControl . . . . . . . . . . . . . . . . . 172CtlNewSliderControl . . . . . . . . . . . . . . . . . . 174CtlSetEnabled . . . . . . . . . . . . . . . . . . . . . 175CtlSetGraphics . . . . . . . . . . . . . . . . . . . . . 176CtlSetLabel . . . . . . . . . . . . . . . . . . . . . . 177CtlSetSliderValues . . . . . . . . . . . . . . . . . . . 178CtlSetUsable . . . . . . . . . . . . . . . . . . . . . . 179CtlSetValue . . . . . . . . . . . . . . . . . . . . . . 179CtlShowControl . . . . . . . . . . . . . . . . . . . . 180CtlValidatePointer . . . . . . . . . . . . . . . . . . . 181
7 Date and Time Selector 183Date and Time Selections Data Structures . . . . . . . . . . 183
SelectDayType . . . . . . . . . . . . . . . . . . . . . 183DaySelectorType . . . . . . . . . . . . . . . . . . . . 183
-
8 Palm OS SDK Reference
HMSTime . . . . . . . . . . . . . . . . . . . . . . . 184Date and Time Selection Functions . . . . . . . . . . . . . 184
DayHandleEvent . . . . . . . . . . . . . . . . . . . . 184SelectDay . . . . . . . . . . . . . . . . . . . . . . . 185SelectDayV10 . . . . . . . . . . . . . . . . . . . . . 186SelectOneTime . . . . . . . . . . . . . . . . . . . . . 186SelectTime . . . . . . . . . . . . . . . . . . . . . . 187SelectTimeV33 . . . . . . . . . . . . . . . . . . . . . 188
8 Fields 191Field Data Structures . . . . . . . . . . . . . . . . . . . 191
FieldAttrType . . . . . . . . . . . . . . . . . . . . . 191FieldPtr . . . . . . . . . . . . . . . . . . . . . . . . 193FieldType . . . . . . . . . . . . . . . . . . . . . . . 194LineInfoPtr . . . . . . . . . . . . . . . . . . . . . . 197LineInfoType . . . . . . . . . . . . . . . . . . . . . 198
Field Resources. . . . . . . . . . . . . . . . . . . . . . 198Field Functions . . . . . . . . . . . . . . . . . . . . . . 199
FldCalcFieldHeight . . . . . . . . . . . . . . . . . . . 199FldCompactText . . . . . . . . . . . . . . . . . . . . 199FldCopy . . . . . . . . . . . . . . . . . . . . . . . 200FldCut . . . . . . . . . . . . . . . . . . . . . . . . 201FldDelete . . . . . . . . . . . . . . . . . . . . . . . 201FldDirty . . . . . . . . . . . . . . . . . . . . . . . 202FldDrawField . . . . . . . . . . . . . . . . . . . . . 203FldEraseField . . . . . . . . . . . . . . . . . . . . . 203FldFreeMemory . . . . . . . . . . . . . . . . . . . . 204FldGetAttributes . . . . . . . . . . . . . . . . . . . . 205FldGetBounds . . . . . . . . . . . . . . . . . . . . . 205FldGetFont . . . . . . . . . . . . . . . . . . . . . . 206FldGetInsPtPosition . . . . . . . . . . . . . . . . . . 206FldGetMaxChars . . . . . . . . . . . . . . . . . . . . 207FldGetNumberOfBlankLines . . . . . . . . . . . . . . 207FldGetScrollPosition . . . . . . . . . . . . . . . . . . 208FldGetScrollValues . . . . . . . . . . . . . . . . . . . 208FldGetSelection . . . . . . . . . . . . . . . . . . . . 209
-
Palm OS SDK Reference 9
FldGetTextAllocatedSize . . . . . . . . . . . . . . . . 210FldGetTextHandle . . . . . . . . . . . . . . . . . . . 210FldGetTextHeight . . . . . . . . . . . . . . . . . . . 212FldGetTextLength . . . . . . . . . . . . . . . . . . . 212FldGetTextPtr . . . . . . . . . . . . . . . . . . . . . 212FldGetVisibleLines . . . . . . . . . . . . . . . . . . . 213FldGrabFocus . . . . . . . . . . . . . . . . . . . . . 213FldHandleEvent . . . . . . . . . . . . . . . . . . . . 214FldInsert . . . . . . . . . . . . . . . . . . . . . . . 215FldMakeFullyVisible . . . . . . . . . . . . . . . . . . 216FldNewField . . . . . . . . . . . . . . . . . . . . . 217FldPaste . . . . . . . . . . . . . . . . . . . . . . . 219FldRecalculateField. . . . . . . . . . . . . . . . . . . 219FldReleaseFocus . . . . . . . . . . . . . . . . . . . . 220FldScrollable. . . . . . . . . . . . . . . . . . . . . . 221FldScrollField . . . . . . . . . . . . . . . . . . . . . 221FldSendChangeNotification . . . . . . . . . . . . . . . 222FldSendHeightChangeNotification . . . . . . . . . . . . 223FldSetAttributes . . . . . . . . . . . . . . . . . . . . 223FldSetBounds . . . . . . . . . . . . . . . . . . . . . 224FldSetDirty . . . . . . . . . . . . . . . . . . . . . . 225FldSetFont . . . . . . . . . . . . . . . . . . . . . . 225FldSetInsertionPoint . . . . . . . . . . . . . . . . . . 226FldSetInsPtPosition . . . . . . . . . . . . . . . . . . . 226FldSetMaxChars . . . . . . . . . . . . . . . . . . . . 227FldSetScrollPosition . . . . . . . . . . . . . . . . . . 228FldSetSelection. . . . . . . . . . . . . . . . . . . . . 228FldSetText . . . . . . . . . . . . . . . . . . . . . . . 229FldSetTextAllocatedSize . . . . . . . . . . . . . . . . . 231FldSetTextHandle . . . . . . . . . . . . . . . . . . . 231FldSetTextPtr . . . . . . . . . . . . . . . . . . . . . 233FldSetUsable . . . . . . . . . . . . . . . . . . . . . 234FldUndo . . . . . . . . . . . . . . . . . . . . . . . 234FldWordWrap . . . . . . . . . . . . . . . . . . . . . 235
-
10 Palm OS SDK Reference
9 Find 237Find Functions . . . . . . . . . . . . . . . . . . . . . . 237
FindDrawHeader . . . . . . . . . . . . . . . . . . . 237FindGetLineBounds . . . . . . . . . . . . . . . . . . 237FindSaveMatch . . . . . . . . . . . . . . . . . . . . 238FindStrInStr . . . . . . . . . . . . . . . . . . . . . . 239
10 Forms 241Form Data Structures . . . . . . . . . . . . . . . . . . . 241
FormAttrType . . . . . . . . . . . . . . . . . . . . . 241FormBitmapType. . . . . . . . . . . . . . . . . . . . 242FormFrameType . . . . . . . . . . . . . . . . . . . . 243FormGadgetAttrType. . . . . . . . . . . . . . . . . . 243FormGadgetType. . . . . . . . . . . . . . . . . . . . 244FormLabelType . . . . . . . . . . . . . . . . . . . . 245FormLineType . . . . . . . . . . . . . . . . . . . . . 246FormObjAttrType . . . . . . . . . . . . . . . . . . . 246FormObjectKind . . . . . . . . . . . . . . . . . . . . 247FormObjectType . . . . . . . . . . . . . . . . . . . . 248FormObjListType. . . . . . . . . . . . . . . . . . . . 249FormPopupType . . . . . . . . . . . . . . . . . . . . 250FormPtr. . . . . . . . . . . . . . . . . . . . . . . . 250FormRectangleType . . . . . . . . . . . . . . . . . . 251FormTitleType . . . . . . . . . . . . . . . . . . . . . 251FormType . . . . . . . . . . . . . . . . . . . . . . . 251FrmGraffitiStateType . . . . . . . . . . . . . . . . . . 253
Form Constants . . . . . . . . . . . . . . . . . . . . . 253Form Resources . . . . . . . . . . . . . . . . . . . . . 254Form Functions. . . . . . . . . . . . . . . . . . . . . . 255
FrmAlert . . . . . . . . . . . . . . . . . . . . . . . 255FrmCloseAllForms . . . . . . . . . . . . . . . . . . . 255FrmCopyLabel . . . . . . . . . . . . . . . . . . . . . 256FrmCopyTitle . . . . . . . . . . . . . . . . . . . . . 257FrmCustomAlert . . . . . . . . . . . . . . . . . . . . 257FrmCustomResponseAlert . . . . . . . . . . . . . . . 258FrmDeleteForm . . . . . . . . . . . . . . . . . . . . 259
-
Palm OS SDK Reference 11
FrmDispatchEvent . . . . . . . . . . . . . . . . . . . 260FrmDoDialog . . . . . . . . . . . . . . . . . . . . . 260FrmDrawForm. . . . . . . . . . . . . . . . . . . . . 261FrmEraseForm . . . . . . . . . . . . . . . . . . . . . 262FrmGetActiveForm . . . . . . . . . . . . . . . . . . . 262FrmGetActiveFormID. . . . . . . . . . . . . . . . . . 262FrmGetControlGroupSelection . . . . . . . . . . . . . . 263FrmGetControlValue . . . . . . . . . . . . . . . . . . 263FrmGetFirstForm. . . . . . . . . . . . . . . . . . . . 264FrmGetFocus . . . . . . . . . . . . . . . . . . . . . 265FrmGetFormBounds . . . . . . . . . . . . . . . . . . 265FrmGetFormId. . . . . . . . . . . . . . . . . . . . . 266FrmGetFormPtr . . . . . . . . . . . . . . . . . . . . 266FrmGetGadgetData. . . . . . . . . . . . . . . . . . . 266FrmGetLabel . . . . . . . . . . . . . . . . . . . . . 267FrmGetNumberOfObjects . . . . . . . . . . . . . . . . 268FrmGetObjectBounds . . . . . . . . . . . . . . . . . . 268FrmGetObjectId . . . . . . . . . . . . . . . . . . . . 269FrmGetObjectIndex. . . . . . . . . . . . . . . . . . . 269FrmGetObjectPosition . . . . . . . . . . . . . . . . . 270FrmGetObjectPtr . . . . . . . . . . . . . . . . . . . . 270FrmGetObjectType . . . . . . . . . . . . . . . . . . . 271FrmGetTitle . . . . . . . . . . . . . . . . . . . . . . 271FrmGetWindowHandle . . . . . . . . . . . . . . . . . 272FrmGotoForm . . . . . . . . . . . . . . . . . . . . . 272FrmHandleEvent . . . . . . . . . . . . . . . . . . . . 273FrmHelp . . . . . . . . . . . . . . . . . . . . . . . 276FrmHideObject . . . . . . . . . . . . . . . . . . . . 277FrmInitForm. . . . . . . . . . . . . . . . . . . . . . 277FrmNewBitmap . . . . . . . . . . . . . . . . . . . . 278FrmNewForm . . . . . . . . . . . . . . . . . . . . . 279FrmNewGadget . . . . . . . . . . . . . . . . . . . . 280FrmNewGsi . . . . . . . . . . . . . . . . . . . . . . 281FrmNewLabel . . . . . . . . . . . . . . . . . . . . . 282FrmPointInTitle . . . . . . . . . . . . . . . . . . . . 283
-
12 Palm OS SDK Reference
FrmPopupForm . . . . . . . . . . . . . . . . . . . . 284FrmRemoveObject . . . . . . . . . . . . . . . . . . . 284FrmRestoreActiveState . . . . . . . . . . . . . . . . . 285FrmReturnToForm . . . . . . . . . . . . . . . . . . . 286FrmSaveActiveState . . . . . . . . . . . . . . . . . . 286FrmSaveAllForms . . . . . . . . . . . . . . . . . . . 287FrmSetActiveForm . . . . . . . . . . . . . . . . . . . 287FrmSetCategoryLabel . . . . . . . . . . . . . . . . . . 288FrmSetControlGroupSelection . . . . . . . . . . . . . . 288FrmSetControlValue . . . . . . . . . . . . . . . . . . 289FrmSetEventHandler . . . . . . . . . . . . . . . . . . 290FrmSetFocus. . . . . . . . . . . . . . . . . . . . . . 290FrmSetGadgetData . . . . . . . . . . . . . . . . . . . 291FrmSetGadgetHandler . . . . . . . . . . . . . . . . . 292FrmSetMenu. . . . . . . . . . . . . . . . . . . . . . 292FrmSetObjectBounds . . . . . . . . . . . . . . . . . . 293FrmSetObjectPosition . . . . . . . . . . . . . . . . . . 293FrmSetTitle . . . . . . . . . . . . . . . . . . . . . . 294FrmShowObject . . . . . . . . . . . . . . . . . . . . 295FrmUpdateForm . . . . . . . . . . . . . . . . . . . . 295FrmUpdateScrollers . . . . . . . . . . . . . . . . . . 296FrmValidatePtr. . . . . . . . . . . . . . . . . . . . . 297FrmVisible . . . . . . . . . . . . . . . . . . . . . . 297
Application-Defined Functions . . . . . . . . . . . . . . . 298FormCheckResponseFunc . . . . . . . . . . . . . . . . 298FormEventHandler . . . . . . . . . . . . . . . . . . . 299FormGadgetHandler . . . . . . . . . . . . . . . . . . 299
11 Graffiti Shift 303GraffitiShift Functions . . . . . . . . . . . . . . . . . . . 303
GsiEnable . . . . . . . . . . . . . . . . . . . . . . . 303GsiEnabled . . . . . . . . . . . . . . . . . . . . . . 303GsiInitialize . . . . . . . . . . . . . . . . . . . . . . 304GsiSetLocation . . . . . . . . . . . . . . . . . . . . . 304GsiSetShiftState . . . . . . . . . . . . . . . . . . . . 305
-
Palm OS SDK Reference 13
12 Insertion Point 307Insertion Point Functions . . . . . . . . . . . . . . . . . 307
InsPtEnable . . . . . . . . . . . . . . . . . . . . . . 307InsPtEnabled . . . . . . . . . . . . . . . . . . . . . 308InsPtGetHeight . . . . . . . . . . . . . . . . . . . . 308InsPtGetLocation. . . . . . . . . . . . . . . . . . . . 308InsPtSetHeight . . . . . . . . . . . . . . . . . . . . . 309InsPtSetLocation . . . . . . . . . . . . . . . . . . . . 309
13 Lists 311List Data Structures . . . . . . . . . . . . . . . . . . . . 311
ListAttrType . . . . . . . . . . . . . . . . . . . . . . 311ListType . . . . . . . . . . . . . . . . . . . . . . . 312
List Resources . . . . . . . . . . . . . . . . . . . . . . 313List Functions . . . . . . . . . . . . . . . . . . . . . . 314
LstDrawList . . . . . . . . . . . . . . . . . . . . . . 314LstEraseList . . . . . . . . . . . . . . . . . . . . . . 314LstGetNumberOfItems . . . . . . . . . . . . . . . . . 315LstGetSelection . . . . . . . . . . . . . . . . . . . . 315LstGetSelectionText. . . . . . . . . . . . . . . . . . . 315LstGetVisibleItems . . . . . . . . . . . . . . . . . . . 316LstHandleEvent . . . . . . . . . . . . . . . . . . . . 316LstMakeItemVisible . . . . . . . . . . . . . . . . . . 317LstNewList . . . . . . . . . . . . . . . . . . . . . . 318LstPopupList . . . . . . . . . . . . . . . . . . . . . 319LstScrollList . . . . . . . . . . . . . . . . . . . . . . 319LstSetDrawFunction . . . . . . . . . . . . . . . . . . 320LstSetHeight. . . . . . . . . . . . . . . . . . . . . . 320LstSetListChoices . . . . . . . . . . . . . . . . . . . 321LstSetPosition . . . . . . . . . . . . . . . . . . . . . 321LstSetSelection . . . . . . . . . . . . . . . . . . . . . 322LstSetTopItem . . . . . . . . . . . . . . . . . . . . . 322
Application-Defined Function . . . . . . . . . . . . . . . 323
-
14 Palm OS SDK Reference
14 Menus 325Menu Data Structures . . . . . . . . . . . . . . . . . . . 325
MenuBarAttrType . . . . . . . . . . . . . . . . . . . 325MenuCmdBarButtonType . . . . . . . . . . . . . . . . 326MenuCmdBarResultType . . . . . . . . . . . . . . . . 327MenuCmdBarType . . . . . . . . . . . . . . . . . . . 328MenuBarPtr . . . . . . . . . . . . . . . . . . . . . . 330MenuBarType . . . . . . . . . . . . . . . . . . . . . 330MenuItemType. . . . . . . . . . . . . . . . . . . . . 332MenuPullDownPtr . . . . . . . . . . . . . . . . . . . 333MenuPullDownType . . . . . . . . . . . . . . . . . . 333
Menu Constants . . . . . . . . . . . . . . . . . . . . . 334Menu Resources . . . . . . . . . . . . . . . . . . . . . 334Menu Functions . . . . . . . . . . . . . . . . . . . . . 335
MenuAddItem . . . . . . . . . . . . . . . . . . . . . 335MenuCmdBarAddButton . . . . . . . . . . . . . . . . 336MenuCmdBarDisplay. . . . . . . . . . . . . . . . . . 339MenuCmdBarGetButtonData . . . . . . . . . . . . . . 340MenuDispose . . . . . . . . . . . . . . . . . . . . . 341MenuDrawMenu. . . . . . . . . . . . . . . . . . . . 342MenuEraseStatus. . . . . . . . . . . . . . . . . . . . 343MenuGetActiveMenu . . . . . . . . . . . . . . . . . . 344MenuHandleEvent . . . . . . . . . . . . . . . . . . . 346MenuHideItem . . . . . . . . . . . . . . . . . . . . 348MenuInit . . . . . . . . . . . . . . . . . . . . . . . 348MenuSetActiveMenu . . . . . . . . . . . . . . . . . . 349MenuSetActiveMenuRscID . . . . . . . . . . . . . . . 349MenuShowItem . . . . . . . . . . . . . . . . . . . . 350
15 Private Records 351Private Record Data Structures . . . . . . . . . . . . . . . 351
privateRecordViewEnum . . . . . . . . . . . . . . . . 351Private Record Functions . . . . . . . . . . . . . . . . . 352
SecSelectViewStatus . . . . . . . . . . . . . . . . . . 352SecVerifyPW . . . . . . . . . . . . . . . . . . . . . 353
-
Palm OS SDK Reference 15
16 Progress Manager 355Progress Manager Functions . . . . . . . . . . . . . . . . 355
PrgHandleEvent . . . . . . . . . . . . . . . . . . . . 355PrgStartDialog . . . . . . . . . . . . . . . . . . . . . 356PrgStartDialogV31 . . . . . . . . . . . . . . . . . . . 357PrgStopDialog . . . . . . . . . . . . . . . . . . . . . 358PrgUpdateDialog. . . . . . . . . . . . . . . . . . . . 359PrgUserCancel . . . . . . . . . . . . . . . . . . . . . 360
Application-Defined Functions . . . . . . . . . . . . . . . 361PrgCallbackFunc . . . . . . . . . . . . . . . . . . . . 361
17 Scroll Bars 365Scroll Bar Data Structures . . . . . . . . . . . . . . . . . 365
ScrollBarAttrType . . . . . . . . . . . . . . . . . . . 365ScrollBarPtr . . . . . . . . . . . . . . . . . . . . . . 366ScrollBarType . . . . . . . . . . . . . . . . . . . . . 366
Scroll Bar Resources. . . . . . . . . . . . . . . . . . . . 368Scroll Bar Functions . . . . . . . . . . . . . . . . . . . . 368
SclDrawScrollBar. . . . . . . . . . . . . . . . . . . . 368SclGetScrollBar . . . . . . . . . . . . . . . . . . . . 369SclHandleEvent . . . . . . . . . . . . . . . . . . . . 370SclSetScrollBar . . . . . . . . . . . . . . . . . . . . . 371
18 System Dialogs 373System Dialog Functions . . . . . . . . . . . . . . . . . 373
SysAppLauncherDialog . . . . . . . . . . . . . . . . . 373SysFatalAlert . . . . . . . . . . . . . . . . . . . . . 374SysGraffitiReferenceDialog . . . . . . . . . . . . . . . 374
19 Tables 375Table Data Structures . . . . . . . . . . . . . . . . . . . 375
TableAttrType . . . . . . . . . . . . . . . . . . . . . 375TableColumnAttrType . . . . . . . . . . . . . . . . . 376TableItemPtr . . . . . . . . . . . . . . . . . . . . . . 378TableItemType . . . . . . . . . . . . . . . . . . . . . 378TablePtr . . . . . . . . . . . . . . . . . . . . . . . . 382
-
16 Palm OS SDK Reference
TableRowAttrType . . . . . . . . . . . . . . . . . . . 383TableType . . . . . . . . . . . . . . . . . . . . . . . 384
Table Constants . . . . . . . . . . . . . . . . . . . . . 387Table Resource . . . . . . . . . . . . . . . . . . . . . . 387Table Functions. . . . . . . . . . . . . . . . . . . . . . 388
TblDrawTable . . . . . . . . . . . . . . . . . . . . . 388TblEditing. . . . . . . . . . . . . . . . . . . . . . . 389TblEraseTable . . . . . . . . . . . . . . . . . . . . . 390TblFindRowData . . . . . . . . . . . . . . . . . . . . 390TblFindRowID . . . . . . . . . . . . . . . . . . . . . 391TblGetBounds . . . . . . . . . . . . . . . . . . . . . 391TblGetColumnSpacing . . . . . . . . . . . . . . . . . 392TblGetColumnWidth . . . . . . . . . . . . . . . . . . 392TblGetCurrentField. . . . . . . . . . . . . . . . . . . 393TblGetItemBounds . . . . . . . . . . . . . . . . . . . 393TblGetItemFont . . . . . . . . . . . . . . . . . . . . 394TblGetItemInt . . . . . . . . . . . . . . . . . . . . . 394TblGetItemPtr . . . . . . . . . . . . . . . . . . . . . 395TblGetLastUsableRow . . . . . . . . . . . . . . . . . 396TblGetNumberOfRows . . . . . . . . . . . . . . . . . 396TblGetRowData . . . . . . . . . . . . . . . . . . . . 397TblGetRowHeight . . . . . . . . . . . . . . . . . . . 397TblGetRowID . . . . . . . . . . . . . . . . . . . . . 398TblGetSelection . . . . . . . . . . . . . . . . . . . . 398TblGrabFocus . . . . . . . . . . . . . . . . . . . . . 399TblHandleEvent . . . . . . . . . . . . . . . . . . . . 400TblHasScrollBar . . . . . . . . . . . . . . . . . . . . 401TblInsertRow . . . . . . . . . . . . . . . . . . . . . 402TblMarkRowInvalid . . . . . . . . . . . . . . . . . . 402TblMarkTableInvalid . . . . . . . . . . . . . . . . . . 403TblRedrawTable . . . . . . . . . . . . . . . . . . . . 403TblReleaseFocus . . . . . . . . . . . . . . . . . . . . 404TblRemoveRow . . . . . . . . . . . . . . . . . . . . 405TblRowInvalid. . . . . . . . . . . . . . . . . . . . . 406TblRowMasked . . . . . . . . . . . . . . . . . . . . 406
-
Palm OS SDK Reference 17
TblRowSelectable . . . . . . . . . . . . . . . . . . . 407TblRowUsable . . . . . . . . . . . . . . . . . . . . . 407TblSelectItem . . . . . . . . . . . . . . . . . . . . . 408TblSetBounds . . . . . . . . . . . . . . . . . . . . . 409TblSetColumnEditIndicator . . . . . . . . . . . . . . . 409TblSetColumnMasked . . . . . . . . . . . . . . . . . 410TblSetColumnSpacing . . . . . . . . . . . . . . . . . 411TblSetColumnUsable . . . . . . . . . . . . . . . . . . 411TblSetColumnWidth . . . . . . . . . . . . . . . . . . 412TblSetCustomDrawProcedure . . . . . . . . . . . . . . 412TblSetItemFont . . . . . . . . . . . . . . . . . . . . 413TblSetItemInt . . . . . . . . . . . . . . . . . . . . . 414TblSetItemPtr . . . . . . . . . . . . . . . . . . . . . 415TblSetItemStyle . . . . . . . . . . . . . . . . . . . . 415TblSetLoadDataProcedure . . . . . . . . . . . . . . . . 417TblSetRowData . . . . . . . . . . . . . . . . . . . . 417TblSetRowHeight . . . . . . . . . . . . . . . . . . . 418TblSetRowID . . . . . . . . . . . . . . . . . . . . . 418TblSetRowMasked . . . . . . . . . . . . . . . . . . . 419TblSetRowSelectable . . . . . . . . . . . . . . . . . . 420TblSetRowStaticHeight . . . . . . . . . . . . . . . . . 421TblSetRowUsable . . . . . . . . . . . . . . . . . . . 421TblSetSaveDataProcedure . . . . . . . . . . . . . . . . 422TblUnhighlightSelection . . . . . . . . . . . . . . . . 422
Application-Defined Functions . . . . . . . . . . . . . . . 423TableDrawItemFuncType . . . . . . . . . . . . . . . . 423TableLoadDataFuncType . . . . . . . . . . . . . . . . 424TableSaveDataFuncType . . . . . . . . . . . . . . . . 425
20 UI Color List 427UI Color Data Types . . . . . . . . . . . . . . . . . . . 427
UIColorTableEntries . . . . . . . . . . . . . . . . . . 427UI Color Functions . . . . . . . . . . . . . . . . . . . . 431
UIColorGetTableEntryIndex . . . . . . . . . . . . . . . 431UIColorGetTableEntryRGB . . . . . . . . . . . . . . . 432UIColorSetTableEntry . . . . . . . . . . . . . . . . . 433
-
18 Palm OS SDK Reference
21 UI Controls 435UI Control Functions . . . . . . . . . . . . . . . . . . . 435
UIBrightnessAdjust. . . . . . . . . . . . . . . . . . . 435UIContrastAdjust . . . . . . . . . . . . . . . . . . . 436UIPickColor . . . . . . . . . . . . . . . . . . . . . . 436
22 Miscellaneous User Interface Functions 439Miscellaneous User Interface Functions . . . . . . . . . . . 439
PhoneNumberLookup . . . . . . . . . . . . . . . . . 439ResLoadConstant . . . . . . . . . . . . . . . . . . . 440ResLoadForm . . . . . . . . . . . . . . . . . . . . . 441ResLoadMenu . . . . . . . . . . . . . . . . . . . . . 441
Part II: System Management
23 Alarm Manager 445Alarm Manager Functions . . . . . . . . . . . . . . . . . 445
AlmGetAlarm . . . . . . . . . . . . . . . . . . . . . 445AlmGetProcAlarm . . . . . . . . . . . . . . . . . . . 446AlmSetAlarm . . . . . . . . . . . . . . . . . . . . . 446AlmSetProcAlarm . . . . . . . . . . . . . . . . . . . 447
Application-Defined Functions . . . . . . . . . . . . . . . 449AlmAlarmProcPtr . . . . . . . . . . . . . . . . . . . 449
24 Bitmaps 451Bitmap Data Structures . . . . . . . . . . . . . . . . . . 451
BitmapCompressionType . . . . . . . . . . . . . . . . 451BitmapFlagsType. . . . . . . . . . . . . . . . . . . . 452BitmapPtr . . . . . . . . . . . . . . . . . . . . . . . 453BitmapType . . . . . . . . . . . . . . . . . . . . . . 454ColorTableType . . . . . . . . . . . . . . . . . . . . 456RGBColorType. . . . . . . . . . . . . . . . . . . . . 457
Bitmap Constants . . . . . . . . . . . . . . . . . . . . . 458Bitmap Resources. . . . . . . . . . . . . . . . . . . . . 459Bitmap Functions . . . . . . . . . . . . . . . . . . . . . 460
BmpBitsSize . . . . . . . . . . . . . . . . . . . . . . 460BmpColortableSize . . . . . . . . . . . . . . . . . . . 460
-
Palm OS SDK Reference 19
BmpCompress . . . . . . . . . . . . . . . . . . . . . 461BmpCreate . . . . . . . . . . . . . . . . . . . . . . 462BmpDelete . . . . . . . . . . . . . . . . . . . . . . 464BmpGetBits . . . . . . . . . . . . . . . . . . . . . . 464BmpGetColortable . . . . . . . . . . . . . . . . . . . 465BmpSize . . . . . . . . . . . . . . . . . . . . . . . 465ColorTableEntries . . . . . . . . . . . . . . . . . . . 466
25 Character Attributes 467Character Attribute Functions . . . . . . . . . . . . . . . 467
ChrHorizEllipsis . . . . . . . . . . . . . . . . . . . . 467ChrIsHardKey . . . . . . . . . . . . . . . . . . . . . 468ChrNumericSpace . . . . . . . . . . . . . . . . . . . 468GetCharAttr . . . . . . . . . . . . . . . . . . . . . . 469GetCharCaselessValue . . . . . . . . . . . . . . . . . 470GetCharSortValue . . . . . . . . . . . . . . . . . . . 471
26 Data and Resource Manager 473Data Manager Data Structures . . . . . . . . . . . . . . . 473
DmOpenRef . . . . . . . . . . . . . . . . . . . . . . 473DmResID . . . . . . . . . . . . . . . . . . . . . . . 473DmResType . . . . . . . . . . . . . . . . . . . . . . 474SortRecordInfoType . . . . . . . . . . . . . . . . . . 474
Data Manager Constants. . . . . . . . . . . . . . . . . . 474Category Constants. . . . . . . . . . . . . . . . . . . 474Record Attribute Constants . . . . . . . . . . . . . . . 475Database Attribute Constants . . . . . . . . . . . . . . 475Error Codes . . . . . . . . . . . . . . . . . . . . . . 477Open Mode Constants . . . . . . . . . . . . . . . . . 480
Data Manager Functions. . . . . . . . . . . . . . . . . . 481DmArchiveRecord . . . . . . . . . . . . . . . . . . . 481DmAttachRecord. . . . . . . . . . . . . . . . . . . . 482DmAttachResource . . . . . . . . . . . . . . . . . . . 483DmCloseDatabase . . . . . . . . . . . . . . . . . . . 484DmCreateDatabase . . . . . . . . . . . . . . . . . . . 485DmCreateDatabaseFromImage. . . . . . . . . . . . . . 486DmDatabaseInfo . . . . . . . . . . . . . . . . . . . . 487
-
20 Palm OS SDK Reference
DmDatabaseProtect . . . . . . . . . . . . . . . . . . 489DmDatabaseSize . . . . . . . . . . . . . . . . . . . . 490DmDeleteCategory . . . . . . . . . . . . . . . . . . . 491DmDeleteDatabase . . . . . . . . . . . . . . . . . . . 492DmDeleteRecord . . . . . . . . . . . . . . . . . . . . 493DmDetachRecord . . . . . . . . . . . . . . . . . . . 494DmDetachResource. . . . . . . . . . . . . . . . . . . 495DmFindDatabase. . . . . . . . . . . . . . . . . . . . 496DmFindRecordByID . . . . . . . . . . . . . . . . . . 496DmFindResource. . . . . . . . . . . . . . . . . . . . 497DmFindResourceType . . . . . . . . . . . . . . . . . 498DmFindSortPosition . . . . . . . . . . . . . . . . . . 499DmFindSortPositionV10 . . . . . . . . . . . . . . . . 500DmGetAppInfoID . . . . . . . . . . . . . . . . . . . 501DmGetDatabase . . . . . . . . . . . . . . . . . . . . 501DmGetDatabaseLockState . . . . . . . . . . . . . . . . 502DmGetLastErr . . . . . . . . . . . . . . . . . . . . . 503DmGetNextDatabaseByTypeCreator . . . . . . . . . . . 504DmGetRecord . . . . . . . . . . . . . . . . . . . . . 507DmGetResource . . . . . . . . . . . . . . . . . . . . 507DmGetResourceIndex. . . . . . . . . . . . . . . . . . 508DmGet1Resource. . . . . . . . . . . . . . . . . . . . 509DmInsertionSort . . . . . . . . . . . . . . . . . . . . 510DmMoveCategory . . . . . . . . . . . . . . . . . . . 511DmMoveRecord . . . . . . . . . . . . . . . . . . . . 512DmNewHandle . . . . . . . . . . . . . . . . . . . . 513DmNewRecord . . . . . . . . . . . . . . . . . . . . 513DmNewResource . . . . . . . . . . . . . . . . . . . 514DmNextOpenDatabase . . . . . . . . . . . . . . . . . 515DmNextOpenResDatabase . . . . . . . . . . . . . . . 515DmNumDatabases . . . . . . . . . . . . . . . . . . . 516DmNumRecords . . . . . . . . . . . . . . . . . . . . 517DmNumRecordsInCategory . . . . . . . . . . . . . . . 517DmNumResources . . . . . . . . . . . . . . . . . . . 518DmOpenDatabase . . . . . . . . . . . . . . . . . . . 519
-
Palm OS SDK Reference 21
DmOpenDatabaseByTypeCreator . . . . . . . . . . . . 521DmOpenDatabaseInfo . . . . . . . . . . . . . . . . . 522DmOpenDBNoOverlay . . . . . . . . . . . . . . . . . 523DmPositionInCategory . . . . . . . . . . . . . . . . . 523DmQueryNextInCategory . . . . . . . . . . . . . . . . 524DmQueryRecord . . . . . . . . . . . . . . . . . . . . 526DmQuickSort . . . . . . . . . . . . . . . . . . . . . 526DmRecordInfo . . . . . . . . . . . . . . . . . . . . . 527DmReleaseRecord . . . . . . . . . . . . . . . . . . . 528DmReleaseResource . . . . . . . . . . . . . . . . . . 529DmRemoveRecord . . . . . . . . . . . . . . . . . . . 529DmRemoveResource . . . . . . . . . . . . . . . . . . 530DmRemoveSecretRecords . . . . . . . . . . . . . . . . 531DmResizeRecord . . . . . . . . . . . . . . . . . . . . 531DmResizeResource . . . . . . . . . . . . . . . . . . . 532DmResourceInfo . . . . . . . . . . . . . . . . . . . . 532DmSearchRecord . . . . . . . . . . . . . . . . . . . . 533DmSearchResource . . . . . . . . . . . . . . . . . . . 534DmSeekRecordInCategory . . . . . . . . . . . . . . . 534DmSet . . . . . . . . . . . . . . . . . . . . . . . . 536DmSetDatabaseInfo . . . . . . . . . . . . . . . . . . 537DmSetRecordInfo . . . . . . . . . . . . . . . . . . . 538DmSetResourceInfo . . . . . . . . . . . . . . . . . . 539DmStrCopy . . . . . . . . . . . . . . . . . . . . . . 540DmWrite . . . . . . . . . . . . . . . . . . . . . . . 540DmWriteCheck . . . . . . . . . . . . . . . . . . . . 541
Application-Defined Functions . . . . . . . . . . . . . . . 541DmComparF . . . . . . . . . . . . . . . . . . . . . 541
27 Time Manager 543Time Manager Data Structures . . . . . . . . . . . . . . . 543
TimeFormatType . . . . . . . . . . . . . . . . . . . . 543DaylightSavingsTypes . . . . . . . . . . . . . . . . . 543DateFormatType . . . . . . . . . . . . . . . . . . . . 544DateTimeType . . . . . . . . . . . . . . . . . . . . . 545TimeType . . . . . . . . . . . . . . . . . . . . . . . 545
-
22 Palm OS SDK Reference
DateType . . . . . . . . . . . . . . . . . . . . . . . 545Time Manager Constants . . . . . . . . . . . . . . . . . 546Time Manager Functions . . . . . . . . . . . . . . . . . 546
DateAdjust . . . . . . . . . . . . . . . . . . . . . . 546DateDaysToDate . . . . . . . . . . . . . . . . . . . . 547DateSecondsToDate . . . . . . . . . . . . . . . . . . 547DateTemplateToAscii . . . . . . . . . . . . . . . . . . 548DateToAscii . . . . . . . . . . . . . . . . . . . . . . 550DateToDays . . . . . . . . . . . . . . . . . . . . . . 551DateToDOWDMFormat . . . . . . . . . . . . . . . . . 551DayOfMonth . . . . . . . . . . . . . . . . . . . . . 552DayOfWeek . . . . . . . . . . . . . . . . . . . . . . 553DaysInMonth . . . . . . . . . . . . . . . . . . . . . 553TimAdjust. . . . . . . . . . . . . . . . . . . . . . . 553TimDateTimeToSeconds . . . . . . . . . . . . . . . . . 554TimGetSeconds . . . . . . . . . . . . . . . . . . . . 554TimGetTicks . . . . . . . . . . . . . . . . . . . . . . 555TimSecondsToDateTime . . . . . . . . . . . . . . . . . 555TimSetSeconds . . . . . . . . . . . . . . . . . . . . . 556TimeToAscii . . . . . . . . . . . . . . . . . . . . . . 557
28 Error Manager 559ERROR_CHECK_LEVEL Define . . . . . . . . . . . . . . 559Error Manager Functions . . . . . . . . . . . . . . . . . 560
ErrAlert . . . . . . . . . . . . . . . . . . . . . . . . 560ErrDisplay . . . . . . . . . . . . . . . . . . . . . . 561ErrDisplayFileLineMsg . . . . . . . . . . . . . . . . . 561ErrFatalDisplayIf . . . . . . . . . . . . . . . . . . . . 562ErrNonFatalDisplayIf . . . . . . . . . . . . . . . . . . 562ErrThrow . . . . . . . . . . . . . . . . . . . . . . . 563
29 Feature Manager 565Feature Manager Functions . . . . . . . . . . . . . . . . 565
FtrGet . . . . . . . . . . . . . . . . . . . . . . . . 565FtrGetByIndex . . . . . . . . . . . . . . . . . . . . . 566FtrPtrFree . . . . . . . . . . . . . . . . . . . . . . . 566
-
Palm OS SDK Reference 23
FtrPtrNew. . . . . . . . . . . . . . . . . . . . . . . 567FtrPtrResize . . . . . . . . . . . . . . . . . . . . . . 568FtrSet . . . . . . . . . . . . . . . . . . . . . . . . . 569FtrUnregister . . . . . . . . . . . . . . . . . . . . . 570
30 File Streaming 571File Streaming Constants . . . . . . . . . . . . . . . . . 571
Primary Open Mode Constants . . . . . . . . . . . . . 571Secondary Open Mode Constants . . . . . . . . . . . . 572
File Streaming Functions. . . . . . . . . . . . . . . . . . 573FileClearerr . . . . . . . . . . . . . . . . . . . . . . 573FileClose . . . . . . . . . . . . . . . . . . . . . . . 573FileControl . . . . . . . . . . . . . . . . . . . . . . 574FileDelete . . . . . . . . . . . . . . . . . . . . . . . 578FileDmRead . . . . . . . . . . . . . . . . . . . . . . 578FileEOF . . . . . . . . . . . . . . . . . . . . . . . . 579FileError . . . . . . . . . . . . . . . . . . . . . . . 580FileFlush . . . . . . . . . . . . . . . . . . . . . . . 580FileGetLastError . . . . . . . . . . . . . . . . . . . . 581FileOpen . . . . . . . . . . . . . . . . . . . . . . . 582FileRead . . . . . . . . . . . . . . . . . . . . . . . 584FileRewind . . . . . . . . . . . . . . . . . . . . . . 585FileSeek . . . . . . . . . . . . . . . . . . . . . . . . 585FileTell . . . . . . . . . . . . . . . . . . . . . . . . 586FileTruncate . . . . . . . . . . . . . . . . . . . . . . 587FileWrite . . . . . . . . . . . . . . . . . . . . . . . 587
File Streaming Error Codes. . . . . . . . . . . . . . . . . 588
31 Float Manager 591Float Manager Functions . . . . . . . . . . . . . . . . . 591
FplAdd . . . . . . . . . . . . . . . . . . . . . . . . 591FplAToF. . . . . . . . . . . . . . . . . . . . . . . . 592FplBase10Info . . . . . . . . . . . . . . . . . . . . . 592FplDiv . . . . . . . . . . . . . . . . . . . . . . . . 593FplFloatToLong . . . . . . . . . . . . . . . . . . . . 593FplFloatToULong. . . . . . . . . . . . . . . . . . . . 594
-
24 Palm OS SDK Reference
FplFree . . . . . . . . . . . . . . . . . . . . . . . . 594FplFToA. . . . . . . . . . . . . . . . . . . . . . . . 594FplInit . . . . . . . . . . . . . . . . . . . . . . . . 595FplLongToFloat . . . . . . . . . . . . . . . . . . . . 595FplMul . . . . . . . . . . . . . . . . . . . . . . . . 596FplSub . . . . . . . . . . . . . . . . . . . . . . . . 596
32 Fonts 597Font Functions . . . . . . . . . . . . . . . . . . . . . . 597
FntAverageCharWidth . . . . . . . . . . . . . . . . . 597FntBaseLine . . . . . . . . . . . . . . . . . . . . . . 597FntCharHeight. . . . . . . . . . . . . . . . . . . . . 598FntCharsInWidth. . . . . . . . . . . . . . . . . . . . 598FntCharsWidth . . . . . . . . . . . . . . . . . . . . 599FntCharWidth . . . . . . . . . . . . . . . . . . . . . 599FntDefineFont . . . . . . . . . . . . . . . . . . . . . 599FntDescenderHeight . . . . . . . . . . . . . . . . . . 601FntGetFont . . . . . . . . . . . . . . . . . . . . . . 601FntGetFontPtr . . . . . . . . . . . . . . . . . . . . . 601FntGetScrollValues . . . . . . . . . . . . . . . . . . . 602FntLineHeight . . . . . . . . . . . . . . . . . . . . . 602FntLineWidth . . . . . . . . . . . . . . . . . . . . . 602FntSetFont . . . . . . . . . . . . . . . . . . . . . . 603FntWidthToOffset . . . . . . . . . . . . . . . . . . . 603FntWordWrap . . . . . . . . . . . . . . . . . . . . . 604FntWordWrapReverseNLines . . . . . . . . . . . . . . 605FontSelect . . . . . . . . . . . . . . . . . . . . . . . 605
33 Graffiti Manager 607Graffiti Manager Functions . . . . . . . . . . . . . . . . 607
GrfAddMacro . . . . . . . . . . . . . . . . . . . . . 607GrfAddPoint . . . . . . . . . . . . . . . . . . . . . 608GrfCleanState . . . . . . . . . . . . . . . . . . . . . 608GrfDeleteMacro . . . . . . . . . . . . . . . . . . . . 608GrfFilterPoints . . . . . . . . . . . . . . . . . . . . . 609GrfFindBranch . . . . . . . . . . . . . . . . . . . . . 609
-
Palm OS SDK Reference 25
GrfFlushPoints. . . . . . . . . . . . . . . . . . . . . 609GrfGetAndExpandMacro . . . . . . . . . . . . . . . . 610GrfGetGlyphMapping . . . . . . . . . . . . . . . . . 610GrfGetMacro . . . . . . . . . . . . . . . . . . . . . 611GrfGetMacroName . . . . . . . . . . . . . . . . . . . 611GrfGetNumPoints . . . . . . . . . . . . . . . . . . . 612GrfGetPoint . . . . . . . . . . . . . . . . . . . . . . 612GrfGetState . . . . . . . . . . . . . . . . . . . . . . 612GrfInitState . . . . . . . . . . . . . . . . . . . . . . 613GrfMatch . . . . . . . . . . . . . . . . . . . . . . . 613GrfMatchGlyph . . . . . . . . . . . . . . . . . . . . 614GrfProcessStroke . . . . . . . . . . . . . . . . . . . . 614GrfSetState . . . . . . . . . . . . . . . . . . . . . . 615
34 Key Manager 617Key Manager Functions . . . . . . . . . . . . . . . . . . 617
KeyCurrentState . . . . . . . . . . . . . . . . . . . . 617KeyRates . . . . . . . . . . . . . . . . . . . . . . . 618KeySetMask . . . . . . . . . . . . . . . . . . . . . . 618
35 Memory Manager 619Memory Manager Functions . . . . . . . . . . . . . . . . 619
MemCardInfo . . . . . . . . . . . . . . . . . . . . . 619MemCmp . . . . . . . . . . . . . . . . . . . . . . . 620MemDebugMode . . . . . . . . . . . . . . . . . . . 621MemHandleCardNo . . . . . . . . . . . . . . . . . . 621MemHandleDataStorage . . . . . . . . . . . . . . . . 621MemHandleFree . . . . . . . . . . . . . . . . . . . . 622MemHandleHeapID . . . . . . . . . . . . . . . . . . 622MemHandleLock. . . . . . . . . . . . . . . . . . . . 623MemHandleNew. . . . . . . . . . . . . . . . . . . . 623MemHandleResize . . . . . . . . . . . . . . . . . . . 624MemHandleSetOwner . . . . . . . . . . . . . . . . . 625MemHandleSize . . . . . . . . . . . . . . . . . . . . 625MemHandleToLocalID . . . . . . . . . . . . . . . . . 626MemHandleUnlock . . . . . . . . . . . . . . . . . . 626
-
26 Palm OS SDK Reference
MemHeapCheck . . . . . . . . . . . . . . . . . . . . 627MemHeapCompact. . . . . . . . . . . . . . . . . . . 627MemHeapDynamic. . . . . . . . . . . . . . . . . . . 628MemHeapFlags . . . . . . . . . . . . . . . . . . . . 628MemHeapFreeBytes . . . . . . . . . . . . . . . . . . 629MemHeapID . . . . . . . . . . . . . . . . . . . . . 629MemHeapScramble. . . . . . . . . . . . . . . . . . . 630MemHeapSize . . . . . . . . . . . . . . . . . . . . . 631MemLocalIDKind . . . . . . . . . . . . . . . . . . . 631MemLocalIDToGlobal . . . . . . . . . . . . . . . . . 631MemLocalIDToLockedPtr . . . . . . . . . . . . . . . . 632MemLocalIDToPtr . . . . . . . . . . . . . . . . . . . 632MemMove . . . . . . . . . . . . . . . . . . . . . . 633MemNumCards . . . . . . . . . . . . . . . . . . . . 633MemNumHeaps . . . . . . . . . . . . . . . . . . . . 634MemNumRAMHeaps . . . . . . . . . . . . . . . . . 634MemPtrCardNo . . . . . . . . . . . . . . . . . . . . 635MemPtrDataStorage . . . . . . . . . . . . . . . . . . 635MemPtrFree . . . . . . . . . . . . . . . . . . . . . . 636MemPtrHeapID . . . . . . . . . . . . . . . . . . . . 636MemPtrNew. . . . . . . . . . . . . . . . . . . . . . 636MemPtrRecoverHandle . . . . . . . . . . . . . . . . . 637MemPtrResize . . . . . . . . . . . . . . . . . . . . . 637MemPtrSetOwner . . . . . . . . . . . . . . . . . . . 638MemPtrSize . . . . . . . . . . . . . . . . . . . . . . 638MemPtrToLocalID . . . . . . . . . . . . . . . . . . . 639MemPtrUnlock . . . . . . . . . . . . . . . . . . . . 639MemSet . . . . . . . . . . . . . . . . . . . . . . . . 639MemSetDebugMode . . . . . . . . . . . . . . . . . . 640MemStoreInfo . . . . . . . . . . . . . . . . . . . . . 641
36 Notification Manager 643Notification Data Structures . . . . . . . . . . . . . . . . 643
SleepEventParamType . . . . . . . . . . . . . . . . . 643SysNotifyDisplayChangeDetailsType . . . . . . . . . . . 644SysNotifyParamType . . . . . . . . . . . . . . . . . . 644
-
Palm OS SDK Reference 27
Notification Constants. . . . . . . . . . . . . . . . . . . 646Notification Manager Event Constants . . . . . . . . . . 646Miscellaneous Constants . . . . . . . . . . . . . . . . 649
Notification Functions. . . . . . . . . . . . . . . . . . . 649SysNotifyBroadcast. . . . . . . . . . . . . . . . . . . 649SysNotifyBroadcastDeferred. . . . . . . . . . . . . . . 651SysNotifyRegister . . . . . . . . . . . . . . . . . . . 652SysNotifyUnregister . . . . . . . . . . . . . . . . . . 654
Application-Defined Functions . . . . . . . . . . . . . . . 655SysNotifyProcPtr. . . . . . . . . . . . . . . . . . . . 655
37 Overlay Manager 657Overlay Manager Data Structures . . . . . . . . . . . . . . 657
OmLocaleType. . . . . . . . . . . . . . . . . . . . . 657OmOverlayRscType . . . . . . . . . . . . . . . . . . 658OmOverlaySpecType . . . . . . . . . . . . . . . . . . 659
Overlay Manager Constants . . . . . . . . . . . . . . . . 660Overlay Manager Functions . . . . . . . . . . . . . . . . 661
OmGetCurrentLocale . . . . . . . . . . . . . . . . . . 661OmGetIndexedLocale. . . . . . . . . . . . . . . . . . 662OmGetRoutineAddress . . . . . . . . . . . . . . . . . 663OmGetSystemLocale . . . . . . . . . . . . . . . . . . 663OmLocaleToOverlayDBName . . . . . . . . . . . . . . 664OmOverlayDBNameToLocale . . . . . . . . . . . . . . 665OmSetSystemLocale . . . . . . . . . . . . . . . . . . 666
38 Password 669Password Functions. . . . . . . . . . . . . . . . . . . . 669
PwdExists . . . . . . . . . . . . . . . . . . . . . . . 669PwdRemove . . . . . . . . . . . . . . . . . . . . . . 669PwdSet . . . . . . . . . . . . . . . . . . . . . . . . 670PwdVerify. . . . . . . . . . . . . . . . . . . . . . . 670
39 Pen Manager 671Pen Manager Functions . . . . . . . . . . . . . . . . . . 671
PenCalibrate. . . . . . . . . . . . . . . . . . . . . . 671PenResetCalibration . . . . . . . . . . . . . . . . . . 672
-
28 Palm OS SDK Reference
40 Preferences 673Preferences Functions . . . . . . . . . . . . . . . . . . . 673
PrefGetAppPreferences . . . . . . . . . . . . . . . . . 673PrefGetAppPreferencesV10 . . . . . . . . . . . . . . . 674PrefGetPreference . . . . . . . . . . . . . . . . . . . 675PrefGetPreferences . . . . . . . . . . . . . . . . . . . 675PrefOpenPreferenceDBV10 . . . . . . . . . . . . . . . 676PrefSetAppPreferences . . . . . . . . . . . . . . . . . 676PrefSetAppPreferencesV10 . . . . . . . . . . . . . . . 677PrefSetPreference. . . . . . . . . . . . . . . . . . . . 678PrefSetPreferences . . . . . . . . . . . . . . . . . . . 678
41 Rectangles 679Rectangle Functions. . . . . . . . . . . . . . . . . . . . 679
RctCopyRectangle . . . . . . . . . . . . . . . . . . . 679RctGetIntersection . . . . . . . . . . . . . . . . . . . 679RctInsetRectangle . . . . . . . . . . . . . . . . . . . 680RctOffsetRectangle . . . . . . . . . . . . . . . . . . . 681RctPtInRectangle . . . . . . . . . . . . . . . . . . . . 681RctSetRectangle . . . . . . . . . . . . . . . . . . . . 682
42 Sound Manager 683Sound Manager Data Structures . . . . . . . . . . . . . . 683
SndCallbackInfoType . . . . . . . . . . . . . . . . . . 684SndCmdIDType . . . . . . . . . . . . . . . . . . . . 685SndCommandType . . . . . . . . . . . . . . . . . . . 686SndMidiListItemType . . . . . . . . . . . . . . . . . . 687SndMidiRecHdrType . . . . . . . . . . . . . . . . . . 687SndMidiRecType . . . . . . . . . . . . . . . . . . . . 688SndSmfCallbacksType . . . . . . . . . . . . . . . . . 688SndSmfChanRangeType. . . . . . . . . . . . . . . . . 689SndSmfOptionsType . . . . . . . . . . . . . . . . . . 689
Sound Manager Functions . . . . . . . . . . . . . . . . . 691SndCreateMidiList . . . . . . . . . . . . . . . . . . . 691SndDoCmd . . . . . . . . . . . . . . . . . . . . . . 692SndGetDefaultVolume . . . . . . . . . . . . . . . . . 693
-
Palm OS SDK Reference 29
SndPlaySmf . . . . . . . . . . . . . . . . . . . . . . 694SndPlaySmfResource . . . . . . . . . . . . . . . . . . 696SndPlaySystemSound. . . . . . . . . . . . . . . . . . 697
Application-Defined Functions . . . . . . . . . . . . . . . 697SndComplFuncType . . . . . . . . . . . . . . . . . . 698SndBlockingFuncType . . . . . . . . . . . . . . . . . 698
43 Standard IO 701Standard IO Functions . . . . . . . . . . . . . . . . . . 701
fgetc . . . . . . . . . . . . . . . . . . . . . . . . . 701fgets . . . . . . . . . . . . . . . . . . . . . . . . . 702fprintf . . . . . . . . . . . . . . . . . . . . . . . . 702fputc . . . . . . . . . . . . . . . . . . . . . . . . . 703fputs . . . . . . . . . . . . . . . . . . . . . . . . . 703getchar . . . . . . . . . . . . . . . . . . . . . . . . 704gets. . . . . . . . . . . . . . . . . . . . . . . . . . 704printf . . . . . . . . . . . . . . . . . . . . . . . . . 705putc . . . . . . . . . . . . . . . . . . . . . . . . . 705putchar . . . . . . . . . . . . . . . . . . . . . . . . 706puts . . . . . . . . . . . . . . . . . . . . . . . . . 706SioAddCommand . . . . . . . . . . . . . . . . . . . 706sprintf . . . . . . . . . . . . . . . . . . . . . . . . 707system . . . . . . . . . . . . . . . . . . . . . . . . 707vfprintf . . . . . . . . . . . . . . . . . . . . . . . . 708vsprintf . . . . . . . . . . . . . . . . . . . . . . . . 709
Standard IO Provider Functions . . . . . . . . . . . . . . 709SioClearScreen . . . . . . . . . . . . . . . . . . . . . 710SioExecCommand . . . . . . . . . . . . . . . . . . . 710SioFree . . . . . . . . . . . . . . . . . . . . . . . . 711SioHandleEvent . . . . . . . . . . . . . . . . . .