PalmAPI2.pas
Un article de Wikipedia.
{ PalmAPI2 = PalmAPI + PalmAPI1 + more API...:) PalmAPI (Version 5 - May 11, 2004 - from PP v2.10 distribution) and- PalmAPI1 (Version 1.04 - January 6, 2005 - from PIAF v1.17) were made by: Laurent Duveau & Philippe Guillot (http://ppcompiler.org/?lng=en) PalmAPI2 v0.9 - 25-Jul-2006 (see changes.txt) by Yuval Melamed. Everyone is welcome to update this, but PLEASE follow these guidelines: 1. Update also version number/date & "changes.txt" file (by APPEND), 2. Maintain proper credits/copyrights & downgrade-compatibility, 3. Publish your PalmAPI2.pas seperately as "news" in English PP site! Tip: I have used regular-expressions to convert C into pascal...;) } const SYSTRAP = $4E4F; {Mode flags passed to DmOpenDatabase} dmModeReadOnly = $0001; // read access dmModeWrite = $0002; // write access dmModeReadWrite = $0003; // read & write access dmModeLeaveOpen = $0004; // leave open when app quits dmModeExclusive = $0008; // don't let anyone else open it dmModeShowSecret = $0010; // force show of secret records // keyDownEvent modifers shiftKeyMask = $0001; capsLockMask = $0002; numLockMask = $0004; commandKeyMask = $0008; optionKeyMask = $0010; controlKeyMask = $0020; autoRepeatKeyMask = $0040; // True if generated due to auto-repeat doubleTapKeyMask = $0080; // True if this is a double-tap event poweredOnKeyMask = $0100; // True if this is a double-tap event appEvtHookKeyMask = $0200; // True if this is an app hook key libEvtHookKeyMask = $0400; // True if this is a library hook key // define mask for all "virtual" keys virtualKeyMask = (appEvtHookKeyMask or libEvtHookKeyMask or commandKeyMask); evtWaitForever = -1; evtNoWait = 0; noPreferenceFound = -1; // System SysAppLaunch Commands sysAppLaunchCmdNormalLaunch = 0; // Normal Launch sysAppLaunchCmdSyncNotify = 3; // Sent to apps whose databases changed during // HotSync after the sync has been completed, // including when the app itself has been installed // by HotSync. The data database(s) must have the // same creator ID as the application for this // mechanism to function correctly. This is a // good opportunity to update/initialize/validate // the app's data, such as resorting records, // setting alarms, etc. // // Parameter block: None. // Restrictions: No accessing of global or // static variables; no User Interface calls. // Notes: This action code is sent via a // direct function call into the app's // PilotMain function from the background // thread of the HotSync application. sysAppLaunchCmdTimeChange = 4; // Sent to all applications and preference // panels when the system time is changed. // This notification is the right place to // update alarms and other time-related // activities and resources. // // Parameter block: None. // Restrictions: No accessing of global or // static variables; no User Interface calls. // Notes: This action code is sent via a direct // function call into the app's PilotMain // function without "launching" the app. sysAppLaunchCmdSystemReset = 5; // Sent to all applications and preference // panels when the system is either soft-reset // or hard-reset. This notification is the // right place to initialize and/or validate // your application's preferences/features/ // database(s) as well as to update alarms and // other time-related activities and resources. // // Parameter block: SysAppLaunchCmdSystemResetType // Restrictions: No accessing of global or // static variables; no User Interface calls. // Notes: This action code is sent via a direct // function call into the app's PilotMain // function without "launching" the app. sysAppLaunchCmdAlarmTriggered = 6; // Sent to an application at the time its // alarm time expires (even when another app // is already displaying its alarm dialog box). // This call is intended to allow the app to // perform some very quick activity, such as // scheduling the next alarm or performing a // quick maintenance task. The handler for // sysAppLaunchCmdAlarmTriggered must take as // little time as possible and is *not* allowed // to block (this would delay notification for // alarms set by other applications). // // Parameter block: SysAlarmTriggeredParamType // (defined in AlarmMgr.h) // Restrictions: No accessing of global or // static variables unless sysAppLaunchFlagSubCall // flag is set, as discussed above. // Notes: This action code is sent via a direct // function call into the app's PilotMain // function without "launching" the app. sysAppLaunchCmdDisplayAlarm = 7; // Sent to an application when it is time // to display the alarm UI. The application // is responsible for making any alarm sounds // and for displaying the alarm UI. // sysAppLaunchCmdDisplayAlarm calls are ordered // chronoligically and are not overlapped. // This means that your app will receive // sysAppLaunchCmdDisplayAlarm only after // all earlier alarms have been displayed. // // Parameter block: SysDisplayAlarmParamType // (defined in AlarmMgr.h) // Restrictions: No accessing of global or // static variables unless sysAppLaunchFlagSubCall // flag is set, as discussed above. UI calls are // allowed to display the app's alarm dialog. // Notes: This action code is sent via a direct // function call into the app's PilotMain // function without "launching" the app. sysAppLaunchCmdPanelCalledFromApp = 13; // The panel should display a done // button instead of the pick list. // The Done button will return the user // to the last app. sysAppLaunchCmdReturnFromPanel = 14; // A panel returned to this app sysAppLaunchCmdSystemLock = 16; // Lock the system until a password is entered. sysAppLaunchCmdNotify = 51; // This is a NotifyMgr notification sent // via SysNotifyBroadcast. The cmdPBP parameter // points to a SysNotifyParamType structure // containing more specific information // about the notification (e.g., what it's for). sysAppLaunchCmdOpenDB = 52; // Sent to switch to an application and have it // "open" up the given data file. The cmdPBP // pointer is a pointer to a SysAppLaunchCmdOpenDBType // structure that has the cardNo and localID of the database // to open. This action code is used by the Launcher // to launch data files, like Eleven PQA files that // have the dmHdrAttrLaunchableData bit set in their // database attributes. sysAppLaunchCmdCardLaunch = 58; // Sent to an application by the Launcher when the // application is being run from a card. // Standard Frame Types noFrame = 0; simpleFrame = 1; rectangleFrame = 1; simple3DFrame = $0012; // 3d, frame = 2 roundFrame = $0401; // corner = 7, frame = 1 boldRoundFrame = $0702; // corner = 7, frame = 2 popupFrame = $0205; // corner = 2, frame = 1, shadow = 1 dialogFrame = $0302; // corner = 3, frame = 2 menuFrame = popupFrame; noFocus = $FFFF; stdFont=0; boldFont=1; largeFont=2; symbolFont=3; symbol11Font=4; symbol7Font=5; ledFont=6; largeBoldFont=7; fntAppFontCustomBase=128; sysFtrCreator = Ord('p') shl 24 + Ord('s') shl 16 + Ord('y') shl 8 + Ord('s'); sysFtrNumROMVersion = 1; sysFtrNumWinVersion = 24; V100 = $01003001; V200 = $02003000; V300 = $03003000; V310 = $03103000; V320 = $03203000; V330 = $03303000; V350 = $03503000; V351 = $03513000; V400 = $04003000; V410 = $04100000; V500 = $05003000; V510 = $05103000; V530 = $05303000; V600 = $06003000; // Definition of bit field returned from KeyCurrentState keyBitPower = $0001; // Power key keyBitPageUp = $0002; // Page-up keyBitPageDown = $0004; // Page-down keyBitHard1 = $0008; // App #1 keyBitHard2 = $0010; // App #2 keyBitHard3 = $0020; // App #3 keyBitHard4 = $0040; // App #4 keyBitCradle = $0080; // Button on cradle keyBitAntenna = $0100; // Antenna "key" <chg 3-31-98 RM> keyBitContrast = $0200; // Contrast key keyBitsAll = $FFFFFFFF; // all keys dmDBNameLength = 32; // 31 chars + 1 null terminator {note: use string[dmDBNameLength-1] as PP doesn't count the null terminator!} errNone = 0; frmNoSelectedControl = $ff; type SndSysBeepType = ( sndInfo = 1, sndWarning, sndError, sndStartUp, sndAlarm, sndConfirmation, sndClick ); SndCmdIDType = ( sndCmdFreqDurationAmp = 1, sndCmdNoteOn, sndCmdFrqOn, sndCmdQuiet ); Byte = 0..255; Int16 = -32768..32767; UInt16 = 0..65535; Int8 = -128..127; UInt8 = 0..255; Int32 = Integer; UInt32 = 0..MaxInt; WChar = UInt16; StringPtr = ^String; FontID = UInt8; LocalID = UInt32; Err = UInt16; Coord = Int16; Opaque = record end; MemHandle = ^Opaque; itemsTextType = array[0..255] of StringPtr; itemsTextPtr = ^ItemsTextType; FieldPtr = ^Opaque; TablePtr = ^Opaque; MemPtr = Pointer; DmOpenRef = Pointer; ScrollBarPtr=^opaque; FormGadgetPtr=^opaque; FrameType = UInt16; PointType = record x,y:Coord; end; AbsRectType = record left,top,right,bottom:Coord; end; RectangleType = record topLeft,extent:PointType; end; ListType=record {$ifdef allowInternalaccess} id : UInt16; bounds : rectangleType; attr : UInt16; itemsText : itemsTextPtr; numItems : Int16; currentItem : Int16; topItem : Int16; font : FontID; reserved : UInt8; popupwin : MemHandle; drawItemsCallback : pointer; {$endif} end; ListPtr = ^ListType; RGBColorType = record index,r,g,b:UInt8; end; IndexedColorType = UInt8; // 0..215 combination of // ff cc 99 66 33 00 // B : 0 6 12 108 114 120 // R : 0 18 36 54 72 90 // G : 0 1 2 3 4 5 // e.g 12+54+5 = $99 B + $66 R +$0 G // 216..224 // gray 22 44 55 77 88 aa bb dd // 225..229 = specials: light gray,marron,purple,green,cyan // 230..255 = unused (black) WinHandle = ^Opaque; FormPtr = ^Opaque; MenuBarPtr = ^opaque; ControlStyleType = ( buttonCtl, pushButtonCtl, CheckBoxCtl, popupTriggerCtl, selectorTriggerCtl, repeatingButtonCtl, SliderCtl, feedbackSliderCtl ); ControlType=record {$ifdef allowInternalaccess} id : UInt16; bounds : RectangleType; text : StringPtr; attr : UInt16; style : ControlStyleType; // ( enum ) font : FontID; group : UInt8; reserved : UInt8; {$endif} end; ControlPtr = ^ControlType; DmSearchStateType = record info:array[0..7] of UInt32; end; clipboardFormatType = ( clipboardText, clipboardInk, clipboardBitmap ); eventsEnum = ( nilEvent = 0, // system level penDownEvent, // system level penUpEvent, // system level penMoveEvent, // system level keyDownEvent, // system level winEnterEvent, // system level winExitEvent, // system level ctlEnterEvent, ctlExitEvent, ctlSelectEvent, ctlRepeatEvent, lstEnterEvent, lstSelectEvent, lstExitEvent, popSelectEvent, fldEnterEvent, fldHeightChangedEvent, fldChangedEvent, tblEnterEvent, tblSelectEvent, daySelectEvent, menuEvent, appStopEvent = 22, // system level frmLoadEvent, frmOpenEvent, frmGotoEvent, frmUpdateEvent, frmSaveEvent, frmCloseEvent, frmTitleEnterEvent, frmTitleSelectEvent, tblExitEvent, sclEnterEvent, sclExitEvent, sclRepeatEvent, tsmConfirmEvent = 35, // system level tsmFepButtonEvent, // system level tsmFepModeEvent, // system level attnIndicatorEnterEvent, // for attention manager's indicator attnIndicatorSelectEvent, // for attention manager's indicator // add future UI level events in this numeric space // to save room for new system level events menuCmdBarOpenEvent = $0800, menuOpenEvent, menuCloseEvent, frmGadgetEnterEvent, frmGadgetMiscEvent, // <chg 2-25-98 RM> Equates added for library events firstINetLibEvent = $1000, firstWebLibEvent = $1100, // GFa, 07/20/01 : integrated the bellagio telephony events. telAsyncReplyEvent = $1200, // Can't add these to the system event range because PACE won't pass them through, // add them to the licensee range here: keyUpEvent = $4000, keyHoldEvent = $4001, frmObjectFocusTakeEvent = $4002, frmObjectFocusLostEvent = $4003, winDisplayChangedEvent = $4101, // BGT, 06/24/2003 Clarify the range reserved for licensees firstLicenseeEvent = $5000, lastLicenseeEvent = $5FFF, // <chg 10/9/98 SCL> Changed firstUserEvent from 32767 (0x7FFF) to 0x6000 // Enums are signed ints, so 32767 technically only allowed for ONE event. firstUserEvent = $6000, lastUserEvent = $7FFF ); LmLocaleType = record language, // Language spoken in locale (LanguageType) country:UInt16; // Specifies "dialect" of language (CountryType) end; DateTimeType = record second,minute,hour,day,month,year, weekDay: Int16; // Days since Sunday (0 to 6) end; DateTimePtr = ^DateTimeType; SelectDayType = ( selectDayByDay, // return d/m/y selectDayByWeek, // return d/m/y with d as same day of the week selectDayByMonth // return d/m/y with d as same day of the month ); DaySelectorType = record bounds: RectangleType; visible: Boolean; reserved1: UInt8; visibleMonth: Int16; // month actually displayed visibleYear: Int16; // year actually displayed selected: DateTimeType; selectDayBy: SelectDayType; reserved2: UInt8; end; DaySelectorPtr = ^DaySelectorType; {_}KeyDownEventType = record chr:WChar; // ascii code keyCode, // virtual key code modifiers:UInt16; end; EventType = record eType : eventsEnum; penDown : Boolean; tapCount : UInt8; screenX, screenY : Int16; case integer of 0: (generic : record datum : array[0..7] of Int16 end); 1: (penUp : record start, finish : PointType end); 2: (keyDown : KeyDownEventType); 3: (winEnter : record enterWindow,exitWindow:winHandle end); 4: (winExit : record enterWindow, exitWindow:winHandle end); 5: (tsmConfirm : record yomiText:StringPtr;formID:UInt16 end); 6: (tsmFepButton : record buttonID:UInt16 end); 7: (tsmFepMode: record mode : UInt16 end); 8: (ctlEnter: record controlID:UInt16; pControl:ControlPtr end); 9: (ctlSelect: record controlID: UInt16; pControl: ControlPtr; on: Boolean; reserved1:UInt8; value: UInt16 end); 10: (ctlRepeat: record controlID:UInt16; pControl:ControlPtr; time:UInt32; value: UInt16 end); 11: (ctlExit: record controlID:UInt16; pControl:ControlPtr end); 12: (fldEnter: record fieldID:UInt16; pField:FieldPtr end); 13: (fldHeightChanged: record fieldID:UInt16; pField:FieldPtr; newHeight:Int16; currentPos:UInt16 end); 14: (fldChanged: record FieldID:UInt16; pField:FieldPtr end); 15: (fldExit: record FieldID:UInt16;pField:FieldPtr end); 16: (lstEnter: record listID:UInt16; pList:ListPtr; selection:Int16 end); 17: (lstExit: record listID:UInt16; pList:ListPtr end); 18: (lstSelect: record listID:UInt16; pList:ListPtr; selection:Int16 end); 19: (tblEnter: record tableID:UInt16; pTable:TablePtr; row,column:Int16 end); 20: (tblExit: record tableID:UInt16; pTable:TablePtr; row,column:Int16 end); 21: (tblSelect: record tableID:UInt16; pTable:TablePtr; row,column:Int16 end); 22: (frmLoad: record formID:UInt16 end); 23: (frmOpen: record formID:UInt16 end); 24: (frmGoto: record formID, recordNum,matchPos,matchLen,matchFieldNum:UInt16; matchCustom:UInt32 end); 25: (frmClose: record formID:UInt16 end); 26: (frmUpdate: record formID:UInt16; updateCode:UInt16 end); 27: (frmTitleEnter: record formID: UInt16 end); 28: (frmTitleSelect: record formID:UInt16 end); 29: (attnIndicatorEnter: record formID:UInt16 end); 30: (attnIndicatorSelect: record formID:UInt16 end); 31: (daySelect: record pSelector:DaySelectorPtr; selection:Int16; UseThisDate:Boolean; reserved1:UInt8 end); 32: (menu: record itemID:UInt16 end); 33: (popSelect: record controlID:UInt16;controlP:ControlPtr;listID:UInt16;listP:ListPtr; selection, priorselection:Int16 end); 34: (sclEnter: record scrollBarID:UInt16; pScrollBar:ScrollBarPtr end); 35: (sclExit: record scrollBarID:UInt16; pScrollBar:ScrollBarPtr; value, newvalue:Int16 end); 36: (sclRepeat: record scrollBarID:UInt16; pScrollBar:ScrollBarPtr; value, newvalue:Int16; time:Int32 end); 37: (menuCmdBarOpen: record preventFieldButton:Boolean; reserved:UInt8 end); 38: (menuOpen: record menuRscID:UInt16; cause:Int16 end); 39: (gadgetEnter: record gadgetID:UInt16; gadgetP:FormGadgetPtr end); 40: (gadgetMisc: record gadgetID:UInt16; gadgetP:FormGadgetPtr; selector:UInt16; dataP:pointer end); 41: (winDisplayChanged: record newBounds:RectangleType end); end; EventPtr = ^EventType; {$ifdef AllowInternalAccess} bitmapCompressionType = ( BitmapCompressionTypeScanLine, BitmapCompressionTypeRLE, BitmapCompressionTypePackBits, BitmapCompressionTypeEnd, BitmapCompressionTypeBest=$64, BitmapCompressionTypeNone=255 ); PixelFormatType = ( PixelFormatIndexed, PixelFormat565, PixelFormat565LE, PixelFormatIndexedLE ); {$endif} DensityType = ( kDensityLow = 72, kDensityOneAndAHalf = 108, kDensityDouble=144, kDensityTriple=216, kDensityQuadruple=288 ); // bitmap flags: // 15 : compressed // 14 : has color table // 13 : has transparency // 12 : indirect // 11 : for screen // 10 : direct color // 9 :indirect color table // 8 : no dither // other unused (0) BitmapType = record {$ifdef AllowInternalAccess} width : Int16; // in pixel height : Int16; // in pixel rowBytes : UInt16; // number of byte stored for each row flags : UInt16; pixelSize : UInt8; // pixel deptnh : 1,2,4,8-bit case version:UInt8 of 0,1:( // uses nextDepthOffset reserved3 : array[0..2] of UInt16; ); 2:( nextDepthOffset : UInt16; // number of 4-bytes words to the next bitmap from the beginning of this one transparentIndex : UInt8; // compression type reserved1 : UInt16; ); 3:( size : UInt8; // size of this structure in byte (24) pixelFormat : PixelFormatType; unused : UInt8; compressionType : BitmapCompressionType; density : DensityType; transparentValue : UInt32; nextBitmapOffset : UInt32; // number of byte to tne next bitmap ); {$endif} end; BitmapPtr = ^BitmapType; UnderlineModeType = ( noUnderline, grayUnderline, solidUnderline, colorUnderline ); WinScreenModeOperation = ( winScreenModeGetDefaults, winScreenModeGet, winScreenModeSetToDefaults, winScreenModeSet, winScreenModeGetSupportedDepths, winScreenModeGetSupportsColor ); WinDirectionType = ( winUp, winDown, winLeft, winRight ); WinDrawOperation = ( winPaint, winErase, winMask, winInvert, winOverlay, winPaintInverse, winSwap ); SysLibTblEntryType = record dispatchTblP : Pointer; globalsP : Pointer; dbID : LocalID; CodeRscH : Pointer; end; SysLibTblEntryPtr=^SysLibTblEntryType; EvtSetAutoOffCmd = ( SetAtLeast, // turn off in at least xxx seconds SetExactly, // turn off in xxx seconds SetAtMost, // turn off in at most xxx seconds SetDefault, // change default auto-off timeout to xxx seconds ResetTimer // reset the timer to the default auto-off timeout ); SystemPreferencesChoice = ( prefVersion, prefCountry, prefDateFormat, prefLongDateFormat, prefWeekStartDay, prefTimeFormat, prefNumberFormat, prefAutoOffDuration, // prefAutoOffDurationSecs is now preferred (prefAutoOffDuration is in minutes) prefSysSoundLevelV20, // slOn or slOff - error beeps and other non-alarm/game sounds prefGameSoundLevelV20, // slOn or slOff - game sound effects prefAlarmSoundLevelV20, // slOn or slOff - alarm sound effects prefHidePrivateRecordsV33, prefDeviceLocked, prefLocalSyncRequiresPassword, prefRemoteSyncRequiresPassword, prefSysBatteryKind, prefAllowEasterEggs, prefMinutesWestOfGMT, // deprecated old unsigned minutes EAST of GMT prefDaylightSavings, // deprecated old daylight saving time rule prefRonamaticChar, prefHard1CharAppCreator, // App creator for hard key #1 prefHard2CharAppCreator, // App creator for hard key #2 prefHard3CharAppCreator, // App creator for hard key #3 prefHard4CharAppCreator, // App creator for hard key #4 prefCalcCharAppCreator, // App creator for calculator soft key prefHardCradleCharAppCreator, // App creator for hard cradle key prefLauncherAppCreator, // App creator for launcher soft key prefSysPrefFlags, prefHardCradle2CharAppCreator, // App creator for 2nd hard cradle key prefAnimationLevel, // Additions for PalmOS 3.0: prefSysSoundVolume, // actual amplitude - error beeps and other non-alarm/game sounds prefGameSoundVolume, // actual amplitude - game sound effects prefAlarmSoundVolume, // actual amplitude - alarm sound effects prefBeamReceive, // not used - use ExgLibControl with ir(Get/Set)ScanningMode instead prefCalibrateDigitizerAtReset, // True makes the user calibrate at soft reset time prefSystemKeyboardID, // ID of the preferred keyboard resource prefDefSerialPlugIn, // creator ID of the default serial plug-in // Additions for PalmOS 3.1: prefStayOnWhenPluggedIn, // don't sleep after timeout when using line current prefStayLitWhenPluggedIn, // keep backlight on when not sleeping on line current // Additions for PalmOS 3.2: prefAntennaCharAppCreator, // App creator for antenna key // Additions for PalmOS 3.3: prefMeasurementSystem, // English, Metric, etc. // Additions for PalmOS 3.5: prefShowPrivateRecords, // returns privateRecordViewEnum prefAutoOffDurationSecs, // auto-off duration in seconds // Additions for PalmOS 4.0: prefTimeZone, // GMT offset in minutes, + for east of GMT, - for west prefDaylightSavingAdjustment, // current DST adjustment in minutes (typically 0 or 60) prefAutoLockType, // Never, on poweroff, after preset delay or at preset time. prefAutoLockTime, // Auto lock preset time or delay. prefAutoLockTimeFlag, // For Minutes or Hours. prefLanguage, // Language spoken in country selected via Setup app/Formats panel prefLocale, // Locale for country selected via Setup app/Formats panel prefTimeZoneCountry, // Country used to specify time zone. prefAttentionFlags, // User prefs for getting user's attention prefDefaultAppCreator // Default application launched on reset. ); SndCommandType = record cmd: SndCmdIDType; reserved: UInt8; param1: Int32; param2, param3: UInt16; end; SndCommandPtr=^SndCommandType; SysBatteryKind = ( sysBatteryKindAlkaline=0, sysBatteryKindNiCad, sysBatteryKindLiIon, sysBatteryKindRechAlk, sysBatteryKindNiMH, sysBatteryKindLiIon1400 ); KeyboardType = ( kbdAlpha = 0, kbdNumbersAndPunc = 1, kbdAccent = 2, kbdDefault = $ff // based on graffiti mode (usually alphaKeyboard) ); privateRecordViewEnum = ( showPrivateRecords = 0, maskPrivateRecords, hidePrivateRecords ); SysDBListItemType = record name: string[dmDBNameLength-1]; creator: UInt32; {type} db_type: UInt32; version: UInt16; dbID: LocalID; cardNo: UInt16; iconP: BitmapPtr; end; FormCheckResponseFuncPtr = function(button: Int16; attempt: string): Boolean; // ================= // Palm OS API calls // ================= function BmpCreate(width,height:Coord;depth:UInt8;colortableP:pointer;var error:UInt16):BitmapPtr; inline(SYSTRAP,$A3DD); function BmpDelete(bitmapP:BitmapPtr):Err; inline(SYSTRAP,$A3DE); procedure ClipboardAddItem(format:ClipboardFormatType;var ptr;length:UInt16); inline(SYSTRAP,$A10A); function ClipboardAppendItem(format:ClipboardFormatType;var ptr;length:UInt16):Err; inline(SYSTRAP,$A370); function ClipboardGetItem(format:ClipboardFormatType;var length:UInt16):MemHandle;inline(SYSTRAP,$A10C); // control function CtlGetLabel(const controlP: ControlPtr):StringPtr; inline(SYSTRAP,$A113); procedure CtlGetSliderValues(ctlP:ControlPtr;minValueP,maxValueP,pageSizeP,valueP:Pointer); inline(SYSTRAP,$A3DA); function CtlGetValue(controlP:ControlPtr):UInt16;inline(SYSTRAP,$A111); procedure CtlSetLabel(controlP:ControlPtr;const newLabel:StringPtr); inline(SYSTRAP,$A114); procedure CtlSetSliderValues(ctlP:ControlPtr;minValueP,maxValueP,pageSizeP,valueP:Pointer); inline(SYSTRAP,$A3DB); procedure CtlSetValue(ControlP:ControlPtr;newValue:Int16); inline(SYSTRAP,$A112); // data function DmCloseDatabase(dbP:DmOpenRef):UInt16; inline(SYSTRAP,$A04A); function DmCreateDatabase(cardNo:UInt16;const name:String;c,t:UInt32;resDB:Boolean):UInt16; inline(SYSTRAP,$A041); function DmDatabaseInfo(cardNo:UInt16;dbID:LocalID;var name:String;var attributes,version:UInt16;var crDate,modDate,bkpUpDate,modNum:UInt32;var appInfoID,sortInfoID:LocalID;var t,c:UInt32):UInt16; inline(SYSTRAP,$A046); function DmDatabaseProtect(cardNo:UInt16;dbID:LocalID;protect:Boolean):Err; inline(SYSTRAP,$A2EB); function DmDeleteDatabase(cardNo:UInt16;dbID:LocalID):UInt16; inline(SYSTRAP,$A042); function DmFindDatabase(cardNo:UInt16;const name:String):LocalID; inline(SYSTRAP,$A045); function DmFindResource(dbP:DmOpenRef;ResType:UInt32;ResID:UInt16;resH:MemHandle):UInt16; inline(SYSTRAP,$A065); function DmGet1Resource(resType: UInt32;resID: UInt16): MemHandle; inline(SYSTRAP,$A060); Function DmGetDatabase (cardNo: UInt16; index: UInt16): LocalID; inline(SYSTRAP,$A044); function DmGetNextDatabaseByTypeCreator(newSearch:Boolean;var stateInfo:DmSearchStateType;t,c:UInt32;onlyLastVers:Boolean;var cardNo:UInt16;var dbIDP:LocalID):UInt16; inline(SYSTRAP,$A078); function DmGetRecord(dbP:DmOpenRef;index:UInt16):MemHandle; inline($4E4F,$A05C); function DmGetResource(typ:UInt32;resID:UInt16):Memhandle; inline(SYSTRAP,$A05F); function DmGetResourceIndex(dbP:DmOpenRef;index:UInt16):MemHandle; inline(SYSTRAP,$A06E); function DmNewRecord(dbP:DmOpenRef;var at:UInt16;size:UInt32):MemHandle; inline(SYSTRAP,$A055); function DmNewResource(dbP:DmOpenRef;ResType:UInt32;ResID:UInt16;size:UInt32):MemHandle; inline(SYSTRAP,$A06C); function DmNumDatabase(cardNo:UInt16):UInt16;inline(SYSTRAP,$A043); //TYPO - left for compatibility! function DmNumDatabases(cardNo:UInt16):UInt16;inline(SYSTRAP,$A043); function DmNumRecords (dbP: DmOpenRef): UInt16; inline(SYSTRAP,$A04F); function DmNumRecordsInCategory(dbP:DmOpenRef;category:UInt16):UInt16; inline(SYSTRAP,$A071); function DmNumResources(dbP:DmOpenRef):UInt16; inline(SYSTRAP,$A067); function DmOpenDatabase(cardNo:UInt16;dbID:LocalID;mode:UInt16):DmOpenRef; inline(SYSTRAP,$A049); function DmOpenDatabaseByTypeCreator(typo,creator:UInt32;mode:UInt16):DmOpenRef; inline(SYSTRAP,$A075); function DmOpenDatabaseInfo(dbP:DmOpenRef;var dbIDP:LocalID;var openCountP,modeP,cardNoP:UInt16; var resDBP: Boolean):Err; inline(SYSTRAP,$A04C); function DmQueryRecord(dbP:DmOpenRef;index:UInt16):MemHandle; inline($4E4F,$A05B); function DmReleaseRecord(dbP:DmOpenRef;index:UInt16;dirty:Boolean):UInt16; inline(SYSTRAP,$A05E); function DmReleaseResource(resourceH:MemHandle):Err; inline(SYSTRAP,$A061); function DmRemoveResource(dbP:DmOpenRef;index:UInt16):Err; inline(SYSTRAP,$A06D); function DmResourceInfo(dbP:DmOpenRef;index:UInt16;var ResTypeP:UInt32;var ResID:UInt16;var chunkLocalIDP:LocalID):Err; inline(SYSTRAP,$A068); function DmSet(rec:Pointer;offset:UInt32;bytes:UInt32;value:UInt8):UInt16; inline(SYSTRAP,$A07E); function DmSetDatabaseInfo(cardNo:UInt16;dbID:LocalID;var name:String;var attributes,version:UInt16;var crDate,modDate,bkpUpDate,modNum:UInt32;var appInfoID,sortInfoID:LocalID;var t,c:UInt32):UInt16; inline(SYSTRAP,$A047); function DmWrite(recordP:Pointer;offset:UInt32;srcP:Pointer;bytes:UInt32):UInt16; inline(SYSTRAP,$A076); // events procedure EvtAddEventToQueue(event:EventPtr); inline(SYSTRAP, $A11B); procedure EvtEnableGraffiti(enable: Boolean); inline(SYSTRAP, $A132); function EvtEnqueueKey(ascii:WChar;keycode,modifiers:UInt16):Err; inline(SYSTRAP,$A12D); function EvtEventAvail:Boolean; inline(SYSTRAP,$A2CC); function EvtFlushKeyQueue:Err; inline(SYSTRAP,$A12C); function EvtFlushPenQueue:Err; inline(SYSTRAP,$A125); procedure EvtGetEvent(var event:EventType;timeout:UInt32); inline(SYSTRAP,$A11D); function EvtKeyQueueEmpty:Boolean; inline(SYSTRAP,$A131); function EvtSetAutoOffTimer(cmd:EvtSetAutoOffCmd;timeout:UInt16):Err; inline(SYSTRAP,$A3AD); function EvtSetNullEventTick(tick: UInt32): Boolean; inline(SYSTRAP, $A3E5); function EvtSysEventAvail(ignorePenUps: Boolean): Boolean; inline(SYSTRAP, $A2CD); function EvtWakeup: Err; inline(SYSTRAP, $A12F); // fields procedure FldCopy(fldP: FieldPtr); inline(SYSTRAP, $A133); procedure FldCut(fldP: FieldPtr); inline(SYSTRAP, $A134); procedure FldDelete(fldP: FieldPtr; start, end_: UInt16); inline(SYSTRAP, $A15E); function FldDirty(fldP: FieldPtr): Boolean; inline(SYSTRAP, $A155); procedure FldDrawField(fldP:FieldPtr);inline($4e4f,$a135); procedure FldGetAttributes(fldP:pointer;var attrP:UInt16); inline(SYSTRAP,$A14F); function FldGetInsPtPosition(fldP: FieldPtr): UInt16; inline(SYSTRAP, $A145); procedure FldGetSelection(fldP:FieldPtr;var startPosition,endPosition:UInt16);inline(SYSTRAP,$A13A); function FldGetTextHandle(fldP:FieldPtr):MemHandle;inline(SYSTRAP,$A153); function FldGetTextLength(fldP:FieldPtr):UInt16;inline(SYSTRAP,$A14B); function FldGetTextPtr(fldP:FieldPtr):StringPtr; inline(SYSTRAP,$A139); function FldHandleEvent(fldP:FieldPtr;var event:EventType):Boolean;inline(SYSTRAP,$A13B); function FldInsert(fldP:FieldPtr;insertChars:StringPtr;insertLen:UInt16):Boolean;inline(SYSTRAP,$A15D); procedure FldPaste(fldP: FieldPtr); inline(SYSTRAP, $A13C); procedure FldReleaseFocus(fldP:FieldPtr);inline(SYSTRAP,$A144); procedure FldSetAttributes(fldP:pointer; var attrP:UInt16); inline(SYSTRAP,$A150); procedure FldSetDirty(fldP: FieldPtr; dirty: Boolean); inline(SYSTRAP, $A160); procedure FldSetInsPtPosition(fldP: FieldPtr; pos: UInt16); inline(SYSTRAP, $A146); procedure FldSetSelection(fldP:FieldPtr;startPosition,endPosition:UInt16);inline(SYSTRAP,$A142); procedure FldSetText(fldP:FieldPtr;textHandle:MemHandle;offset,size:UInt16);inline(SYSTRAP,$A13F); procedure FldSetTextHandle(fldP:FieldPtr;textHandle:MemHandle);inline(SYSTRAP,$A158); procedure FldSetTextPtr(fldP:FieldPtr;textP:StringPtr); inline(SYSTRAP,$A159); procedure FldUndo(fldP: FieldPtr); inline(SYSTRAP, $A15F); // fonts function FntCharHeight:Int16;inline(SYSTRAP,$A167); function FntCharsWidth(const Chars:String;Len:Int16):Int16; inline(SYSTRAP,$A16B); function FntCharWidth(ch:char):Int16;inline(SYSTRAP,$A16A); function FntDefineFont(font:FontID;fontP:pointer):UInt16;inline($4e4f,$a321); function FntGetFont: FontID; inline(SYSTRAP, $A163); function FntSetFont(font:FontID):FontID;inline($4e4f,$a164); function FontSelect(fntID: FontID): FontID; inline(SYSTRAP, $A320); // Insersion Point procedure InsPtEnable(enableIt : Boolean);inline(SYSTRAP,$a1ab); procedure InsPtSetHeight(Height:Int16); inline(SYSTRAP,$A1AD); procedure InsPtSetLocation(x,y:Int16); inline(SYSTRAP,$a1a9); // Forms function FrmAlert(alertId:UInt16):UInt16; inline(SYSTRAP,$A192); procedure FrmCloseAllForms;inline(SYSTRAP,$A1A1); procedure FrmCopyLabel(FormP:FormPtr;labelID:UInt16;Const newLabel:String); inline(SYSTRAP,$A18C); procedure FrmCopyTitle(formP:FormPtr;const newTitle:string);inline(SYSTRAP,$A19A); function FrmCustomAlert(alertId:UInt16;const s1,s2,s3:String):UInt16; inline(SYSTRAP,$A194); function FrmCustomResponseAlert(alertId:UInt16;const s1,s2,s3,entryStringBuf:String;entryStringBufLength:Int16;callback:FormCheckResponseFuncPtr):UInt16;inline(SYSTRAP,$A3D3); procedure FrmDeleteForm(FormP:FormPtr); inline(SYSTRAP,$A170); function FrmDispatchEvent(var event:EventType):Boolean; inline(SYSTRAP,$A1A0); function FrmDoDialog(formP:FormPtr):UInt16; inline(SYSTRAP,$A193); procedure FrmDrawForm(FormP:FormPtr); inline(SYSTRAP,$A171); procedure FrmEraseForm(FormP:FormPtr); inline(SYSTRAP,$A172); function FrmGetActiveForm:FormPtr; inline(SYSTRAP,$A173); function FrmGetControlGroupSelection(formP: FormPtr; groupNum: UInt8): UInt16; inline(SYSTRAP, $A18A); function FrmGetFocus(formP:FormPtr):UInt16;inline(SYSTRAP,$A178); function FrmGetFormId(const formP:FormPtr):UInt16; inline(SYSTRAP,$A17D); function FrmGetFormPtr(formId:UInt16):FormPtr; inline(SYSTRAP,$A17E); function FrmGetLabel(formP:FormPtr;labelID:UInt16):StringPtr; inline(SYSTRAP,$A18E); procedure FrmGetObjectBounds(formP:FormPtr;objIndex:UInt16;var r:RectangleType);inline(SYSTRAP,$A199); function FrmGetObjectIndex(formP:FormPtr;objID:UInt16):UInt16; inline(SYSTRAP,$A180); procedure FrmGetObjectPosition(formP:FormPtr;objIndex:UInt16;var x,y:Coord);inline(SYSTRAP,$A186); function FrmGetObjectPtr(formP:FormPtr;objIndex:UInt16):pointer; inline(SYSTRAP,$A183); function FrmGetTitle(formP: FormPtr): StringPtr; inline(SYSTRAP,$A190); procedure FrmGotoForm(FormID:UInt16); inline(SYSTRAP,$A19B); function FrmHandleEvent(formP:FormPtr;var event:EventType):Boolean; inline(SYSTRAP,$A17A); procedure FrmHelp(helpMsgId:UInt16); inline(SYSTRAP,$A195); procedure FrmHideObject(formP:FormPtr;objIndex:UInt16); inline(SYSTRAP,$A184); function FrmInitForm(rscID:UInt16):FormPtr; inline(SYSTRAP,$A16F); function FrmPointInTitle(formP: FormPtr; x, y: Coord): Boolean; inline(SYSTRAP, $A2D5); procedure FrmPopupForm(formId : UInt16); inline(SYSTRAP,$A19C); procedure FrmReturnToForm(formId : UInt16); inline(SYSTRAP,$A19E); procedure FrmSetActiveForm(FormP:FormPtr); inline(SYSTRAP,$A174); procedure FrmSetControlGroupSelection(formP:FormPtr;groupNum:UInt8;controlID:UInt16); inline(SYSTRAP,$A18B); procedure FrmSetControlValue(formP:FormPtr;objIndex:UInt16;newValue:UInt16); inline(SYSTRAP,$A189); procedure FrmSetEventHandler(FormP:FormPtr;function handler(var event:Eventtype):Boolean); inline(SYSTRAP,$A19F); procedure FrmSetFocus(formP:FormPtr;fieldIndex:UInt16);inline(SYSTRAP,$A179); procedure FrmSetObjectBounds(formP:FormPtr;objIndex:UInt16;var r:RectangleType);inline(SYSTRAP,$A303); procedure FrmSetObjectPosition(FormP:FormPtr;objIndex:UInt16;x,y:Coord); inline(SYSTRAP,$A187); procedure FrmSetTitle(formP:FormPtr;const newTitle:string);inline(SYSTRAP,$A191); procedure FrmShowObject(formP:FormPtr;objIndex:UInt16); inline(SYSTRAP,$A185); // features function FtrGet(creator:UInt32;featureNum:UInt16;var valueP:UInt32):Err; inline(SYSTRAP,$A27B); function FtrSet(creator:UInt32;featureNum:UInt16;valueP:UInt32):Err; inline(SYSTRAP,$A27C); function FtrUnregister(creator:UInt32;featureNum:UInt16):Err; inline(SYSTRAP, $A27A); // List procedure LstDrawList(ListP:ListPtr);inline(SYSTRAP,$A1B1); procedure LstEraseList(ListP:ListPtr);inline(SYSTRAP,$A1B2); function LstGetNumberOfItems(ListP:ListPtr):Int16;inline(SYSTRAP,$A1BA); function LstGetSelection(ListP:ListPtr):Int16; inline(SYSTRAP,$A1B3); function LstGetSelectionText(ListP:ListPtr;intemNum:Int16):StringPtr; inline(SYSTRAP,$A1B4); function LstGetVisibleItems(ListP:ListPtr):Int16;inline(SYSTRAP,$A2FF); procedure LstMakeItemVisible(ListP:ListPtr;itemNum:Int16); inline(SYSTRAP,$A0B9); function LstScrollList(ListP:ListPtr;direction:WinDirectionType;itemCount:Int16):Boolean;inline(SYSTRAP,$A2FB); procedure LstSetListChoices(listP:ListPtr;itemsText:Pointer;numItems:Int16); inline(SYSTRAP,$A1B8); procedure LstSetSelection(ListP:ListPtr;itemNum:Int16); inline(SYSTRAP,$A1B7); procedure LstSetTopItem(ListP:ListPtr;itemNum:Int16);inline(SYSTRAP,$A2B5); // Memory function MemCmp(var s1, s2; numBytes: Int32): Int16; inline(SYSTRAP,$A2D7); function MemHandleFree(h: MemHandle): UInt16; inline(SYSTRAP,$A02B); function MemHandleLock(h:MemHandle):MemPtr; inline(SYSTRAP,$A021); function MemHandleNew(size:UInt32):MemHandle;inline(SYSTRAP,$A01E); function MemHandleResize(h:MemHandle; newSize: UInt32):Err; inline(SYSTRAP,$A033); function MemHandleSetOwner(h:MemHandle;owner:UInt16): Err; inline(SYSTRAP,$A032); function MemHandleSize(h:MemHandle):UInt32; inline(SYSTRAP,$A02D); function MemHandleUnlock(h:MemHandle):UInt16; inline(SYSTRAP,$A022); function MemMove(var dst,s;numBytes:integer):err; inline($4E4F,$A026); function MemPtrFree(p : MemPtr): UInt16; inline(SYSTRAP,$A012); function MemPtrNew(size: UInt32): MemPtr; inline(SYSTRAP,$A013); function MemPtrResize(p: MemPtr; newSize: UInt32): Err; inline(SYSTRAP,$A01C); function MemPtrSetOwner(p:MemPtr;owner:UInt16):UInt16; inline(SYSTRAP,$A01B); function MemPtrSize(p: MemPtr): UInt32; inline(SYSTRAP,$A016); function MemPtrUnlock(p: MemPtr): Err; inline(SYSTRAP,$A035); function MemSet(var dst;numBytes:integer;value:UInt8):err; inline($4E4F,$A027); // menu function MenuHandleEvent(menuP:Pointer;var event:EventType;var error:UInt16):Boolean; inline(SYSTRAP,$A1BF); procedure MenuEraseStatus(menuP:Pointer); inline(SYSTRAP,$A1C1); // prefs function PrefGetAppPreferences(creator:UInt32;id:UInt16;var prefs;var prefsSize:UInt16;saved:Boolean):Int16; inline(SYSTRAP,$A2D3); procedure PrefSetAppPreferences(creator:UInt32;id,version:UInt16;var prefs;prefsSize:UInt16;saved:Boolean); inline(SYSTRAP,$A2D4); function PrefGetPreference(choice:SystemPreferencesChoice):UInt32; inline(SYSTRAP,$A2D1); procedure PrefSetPreference(choice:SystemPreferencesChoice;value:UInt32); inline(SYSTRAP,$A2D2); // rectangle function RctPtInRectangle(x,y:Coord;var r:RectangleType):Boolean; inline(SYSTRAP,$A1C8); procedure RctSetRectangle(var r:RectangleType;left,top,width,height:Coord); inline(SYSTRAP,$A1C4); // sound function SndDoCmd(channelP:Pointer;commandP:SndCmdIDType;noWait:Boolean):Err;inline(SYSTRAP,$A233); procedure SndPlaySystemSound(beepID:SndSysBeepType); inline(SYSTRAP,$A234); // strings function StrAToI(const S:string):integer; inline(SYSTRAP,$a0ce); function StrCaselessCompare(const s1,s2:string):Int16; inline(SYSTRAP,$A0CA); procedure StrCopy(dst:MemPtr;const src:String); inline(SYSTRAP,$A0C5); procedure StrIToA(var S:string;N:integer); inline(SYSTRAP,$A0C9); function StrIToH(var s:String;i:UInt32):StringPtr; inline(SYSTRAP,$A0CB); function StrStr(const str,token:String):StringPtr; inline(SYSTRAP,$A0CD); // system function SysAppLaunch(cardNo:UInt16;dbID:LocalID;launchFlags,cmd:UInt16;cmdPBP:MemPtr;var resultP:UInt32):Err;inline(SYSTRAP,$A08E); function SysBatteryInfo(setTresholds:Boolean;var warnThresholdP,criticalThresholdP:UInt16;var maxTicksP:Int16;kindP:SysBatteryKind;pluggedIn:Boolean;var percentP:UInt8):UInt16; inline(SYSTRAP,$A324); function SysBroadcastActionCode(cmd: UInt16; cmdPBP: MemPtr): Err; inline(SYSTRAP, $A089); procedure SysCopyStringResource(var s: string; theID: Int16); inline(SYSTRAP, $A0BC); function SysCreateDataBaseList(typ, cre: UInt32; var dbCount: UInt16; var dbIDs: MemHandle; lookupName: Boolean): Boolean; inline(SYSTRAP, $A2DB); function SysCreatePanelList(var panelCount: UInt16; var panelIDs: MemHandle): Boolean; inline(SYSTRAP, $A2DC); function SysCurAppDatabase(var cardNo:UInt16;var dbID:LocalID):UInt16;inline(SYSTRAP,$A0AC); function SysErrString(error: Err; strP: StringPtr; maxLen: UInt16): string; inline(SYSTRAP, $A2F4); function SysFormPointerArrayToStrings(c:Pointer;StringCount:Int16):MemHandle; inline(SYSTRAP,$A0C1); function SysGetOSVersionString:StringPtr; inline(SYSTRAP,$A323); function SysGetStackInfo(var startPP, endPP: MemPtr): Boolean; inline(SYSTRAP, $A33D); function SysHandleEvent(var event:EventType):Boolean; inline(SYSTRAP,$A0A9); procedure SysKeyboardDialog(kbd: KeyboardType); inline(SYSTRAP, $A2E2); function SysLibFind(const name:string;var refnum:UInt16):Err;inline($4E4F,$A0BA); function SysLibLoad(libType,libCreator:UInt32;var refnum:UInt16):Err;inline($4E4F,$A2AC); function SysLibRemove(refnum:UInt16):Err;inline($4E4F,$A0B8); function SysLibTblEntry(refnum:UInt16):SysLibTblEntryPtr;inline(SYSTRAP,$A0B9); function SysLibTrapClose(refnum:UInt16;var usecount:UInt16):Err;inline($4E4F,$A802); function SysLibTrapOpen(refnum,version:UInt16):Err;inline($4E4F,$A801); procedure SysReset; inline(SYSTRAP,$A08C); function SysSetAutoOffTime(seconds:UInt16):UInt16; inline(SYSTRAP,$A0C0); function SysTaskDelay(delay:Int32):Err; inline(SYSTRAP,$A0A0); function SysTicksPerSecond:UInt16; inline(SYSTRAP,$A2E9); function SysUIAppSwitch(cardNo:UInt16;dbID:LocalID;cmd:UInt16;cmdPBP:Pointer):UInt16; inline(SYSTRAP,$A0A7); // time function TimGetSeconds:UInt32; inline(SYSTRAP,$A0F5); function TimGetTicks:UInt32; inline(SYSTRAP,$A0F7); procedure TimSecondsToDateTime(seconds:UInt32;dateTimeP:DateTimePtr); inline(SYSTRAP,$A0FC); function TimDateTimeToSeconds(dateTimeP:DateTimePtr):UInt32; inline(SYSTRAP,$A0FD); procedure TimAdjust(dateTimeP:DateTimePtr;adjustment:Int32); inline(SYSTRAP,$A0FE); // window function WinCreateBitmapWindow(bitmapP:BitmapPtr;var error:UInt16):WinHandle; inline(SYSTRAP,$A3E4); procedure WinDeleteWindow(win:WinHandle;eraseIt:boolean); inline(SYSTRAP,$A1F8); procedure WinDrawBitmap(bitmapP:BitmapPtr;x,y:Coord); inline(SYSTRAP,$A226); procedure WinDrawChars(const chars : string;len:Int16;x,y:Coord); inline(SYSTRAP,$A220); procedure WinDrawChar(theChar : WChar; x,y:Coord); inline(SYSTRAP,$A350); procedure WinDrawLine(x1,y1,x2,y2:Coord); inline(SYSTRAP,$A213); procedure WinDrawRectangle(var r:RectangleType;cornerDiam:UInt16); inline(SYSTRAP,$A218); procedure WinDrawRectangleFrame(frame:FrameType;var rP:RectangleType); inline(SYSTRAP,$A21B); procedure WinEraseLine(x1,y1,x2,y2:Coord); inline(SYSTRAP,$A215); procedure WinEraseRectangle(var r:RectangleType;cornerDiam:UInt16); inline(SYSTRAP,$A219); function WinRGBToIndex(var rgbP:RGBColorType):IndexedColorType; inline(SYSTRAP,$A39E); function WinScreenMode(operation:WinScreenModeOperation;var widthP,heightP,depthP:UInt32;var enableColorP:Boolean):Err; inline(SYSTRAP,$A33E); function WinSetDrawWindow(win:WinHandle):WinHandle; inline(SYSTRAP,$A1FD); function WinSetForeColor(foreColor:IndexedColorType):IndexedColorType; inline(SYSTRAP,$A398); function WinSetBackColor(foreColor:IndexedColorType):IndexedColorType; inline(SYSTRAP,$A399); function WinSetTextColor(foreColor:IndexedColorType):IndexedColorType; inline(SYSTRAP,$A39A); function WinSetDrawMode(newMode:WinDrawOperation):WinDrawOperation; inline(SYSTRAP,$A397); procedure WinSetClip(const r:RectangleType);inline(SYSTRAP,$A210); procedure WinScrollRectangle(const r:RectangleType;direction:WinDirectionType;distance:Coord;var vacated:RectangleType);inline(SYSTRAP,$A20A); // scroll bars procedure SclSetScrollBar(barP:ScrollBarPtr;value,min,max,pageSize:Int16);inline(SYSTRAP,$A2B6); // Special functions function GetCharCaselessValue:pointer;inline(SYSTRAP,$A296); function KeyCurrentState:UInt32;inline(SYSTRAP,$A2A2); function KeySetMask(keyMask:UInt32):UInt32; inline(SYSTRAP,$A2CF); function SecSelectViewStatus: privateRecordViewEnum; inline(SYSTRAP, $A3CF); function SecVerifyPW(newSecLevel: privateRecordViewEnum): Boolean; inline(SYSTRAP, $A3CE); function VersionSupported(MinVersion:UInt32):boolean; var ErrNo:Err; ROMVersion:UInt32; begin ErrNo:=FtrGet(sysFtrCreator, sysFtrNumROMVersion, ROMVersion); VersionSupported:=ROMVersion>=MinVersion; end; function HandlerNONE(var e:EventType):boolean; begin HandlerNONE:=false; end; // push and pop registers for callback functions procedure PushRegs; inline($48e7,$1F38); // push registers A2-A4, D3-D7 procedure PopRegs; inline($4cdf,$1CF8); // pop registers A2-A4, D3-D7
Catégories: Source | Logiciel | Pascal | Palm