{ Pascal interface specification for TransSkel } { for: TransSkel 3.17 } { last edit: 01 Jun 94 } {----------------------------------------------------------------------------} unit TransSkel; {----------------------------------------------------------------------------} interface {----------------------------------------------------------------------------} const {----------------------------------------------------------------------------} { general } skelMajorRelease = 3; { current release is 3.17 } skelMinorRelease = 17; { window property numbers } skelWPropAll = 0; { pseudo-property } skelWPropModeless = 1; { modeless dialog } skelWPropModal = 2; { modal dialog } skelWPropTool = 3; { tool window } skelWPropMovableModal = 4; { movable modal dialog } skelWPropHelp = 5; { help window } skelWPropText = 6; { text window } skelWPropDisplayWind = 7; { TransDisplay window } skelWPropEditWind = 8; { TransEdit window } skelWPropApplBase = 256; { general-use prop num base } { SkelQuery () query selectors } skelQVersion = 1; { TransSkel version } skelQSysVersion = 2; { System software version } skelQHasWNE = 3; { whether has WaitNextEvent() } skelQMBarHeight = 4; { menu bar height } skelQHas64KROM = 5; { whether has 64K ROM } skelQHasColorQD = 6; { whether has Color QuickDraw } skelQInForeground = 7; { whether in foreground } skelQHasGestalt = 8; { whether has Gestalt() } skelQHasAppleEvents = 9; { whether has Apple Events } skelQQDVersion = 10; { QuickDraw version } skelQGrayRgn = 11; { Desktop region } { convenience routines } skelPositionNone = 0; { leave as is } skelPositionOnMainDevice = 1; { position on main device } skelPositionOnParentWindow = 2; { position on FrontWindow() } skelPositionOnParentDevice = 3; { position on FrontWindow()'s device } { Apple menu number } skelAppleMenuID = 128; {----------------------------------------------------------------------------} type {----------------------------------------------------------------------------} { window property types } SkelWindPropPtr = ^SkelWindProperty; SkelWindPropHandle = ^SkelWindPropPtr; SkelWindProperty = record skelWPropType: Integer; skelWPropData: LongInt; skelWPropNext: SkelWindPropHandle; end; { initialization parameters } SkelInitParamsPtr = ^SkelInitParams; SkelInitParams = record skelMoreMasters: Integer; skelGzProc: ProcPtr; skelResumeProc: ProcPtr; skelStackAdjust: Size; end; { Procedure types below are all equivalenced to ProcPtr. They're used so } { that procedure/function specifications will read more similarly to their } { C counterparts. The comment preceding each type definition shows how } { procedures should be written. } { miscellaneous procedure types } { procedure Idle; } SkelIdleProcPtr = ProcPtr; { procedure EventHook (event: EventRecord); } SkelEventHookProcPtr = ProcPtr; { procedure SuspendResume (inForeground: Boolean); } SkelSuspendResumeProcPtr = ProcPtr; { procedure ClipCvt (inForeground: Boolean); } SkelClipCvtProcPtr = ProcPtr; { procedure AEHandler (event: EventRecord); } SkelAEHandlerProcPtr = ProcPtr; { procedure DlogItemProc (dlog: DialogPtr; item: Integer); } SkelDlogItemProcPtr = ProcPtr; { window-handler procedure types } { procedure Mouse (where: Point; when: LongInt; modifiers: Integer); } SkelWindMouseProcPtr = ProcPtr; { procedure Key (c: char; code: Integer; modifiers: Integer); } SkelWindKeyProcPtr = ProcPtr; { procedure Update (resized: Boolean); } SkelWindUpdateProcPtr = ProcPtr; { procedure Activate (active: Boolean); } SkelWindActivateProcPtr = ProcPtr; { procedure Close; } SkelWindCloseProcPtr = ProcPtr; { procedure Clobber; } SkelWindClobberProcPtr = ProcPtr; { procedure WindIdle; } SkelWindIdleProcPtr = ProcPtr; { procedure Select(dlog: DialogPtr; item:Integer); } SkelWindSelectProcPtr = ProcPtr; { procedure Zoom (wind: WindowPtr; zoomDir: Integer); } SkelWindZoomProcPtr = ProcPtr; { menu-handler procedure types } { procedure Select (item: Integer); } SkelMenuSelectProcPtr = ProcPtr; { procedure Clobber (menu: MenuHandle); } SkelMenuClobberProcPtr = ProcPtr; { procedure MenuHook; } SkelMenuHookProcPtr = ProcPtr; { This is used for routines that pass around pointers to event} { records. } EventRecordPtr = ^EventRecord; {----------------------------------------------------------------------------} { Core routines } {----------------------------------------------------------------------------} { initialization/termination routines } procedure SkelGetInitParams (initParams: SkelInitParamsPtr); procedure SkelInit (initParams: SkelInitParamsPtr); procedure SkelCleanup; { event-loop-related routines } procedure SkelEventLoop; procedure SkelStopEventLoop; procedure SkelRouteEvent (var event: EventRecord); procedure SkelActivate (wind: WindowPtr; active: Boolean); procedure SkelClose (wind: WindowPtr); function SkelGetCurrentEvent: EventRecordPtr; function SkelGetModifiers: Integer; procedure SkelSetEventMask (mask: Integer); function SkelGetEventMask: Integer; procedure SkelSetIdle (p: SkelIdleProcPtr); function SkelGetIdle: SkelIdleProcPtr; procedure SkelSetEventHook (p: SkelEventHookProcPtr); function SkelGetEventHook: SkelEventHookProcPtr; procedure SkelSetSuspendResume (p: SkelSuspendResumeProcPtr); function SkelGetSuspendResume: SkelSuspendResumeProcPtr; procedure SkelSetClipCvt (p: SkelClipCvtProcPtr); function SkelGetClipCvt: SkelClipCvtProcPtr; procedure SkelSetWaitTimes (fgTime: LongInt; bgTime: LongInt); procedure SkelGetWaitTimes (var fgTime: LongInt; var bgTime: LongInt); procedure SkelSetAEHandler (p: SkelAEHandlerProcPtr); function SkelGetAEHandler: SkelAEHandlerProcPtr; { window handling routines } function SkelWindow (wind: WindowPtr; doMouse: SkelWindMouseProcPtr; doKey: SkelWindKeyProcPtr; doUpdate: SkelWindUpdateProcPtr; doActivate: SkelWindActivateProcPtr; doClose: SkelWindCloseProcPtr; doClobber: SkelWindClobberProcPtr; doIdle: SkelWindIdleProcPtr; frontOnly: Boolean): Boolean; function SkelDialog (dlog: DialogPtr; doFilter: ModalFilterProcPtr; doEvent: SkelWindSelectProcPtr; doClose: SkelWindCloseProcPtr; doClobber: SkelWindClobberProcPtr): Boolean; procedure SkelRmveWind (wind: WindowPtr); procedure SkelRmveDlog (dlog: DialogPtr); function SkelWindowRegistered (wind: WindowPtr): Boolean; function SkelIsDlog (wind: WindowPtr): Boolean; function SkelIsMMDlog (wind: WindowPtr): Boolean; procedure SkelSetGrowBounds (wind: WindowPtr; hLo: Integer; vLo: Integer; hHi: Integer; vHi: Integer); procedure SkelSetZoom (wind: WindowPtr; p: SkelWindZoomProcPtr); function SkelGetZoom (wind: WindowPtr): SkelWindZoomProcPtr; function SkelGetRectDevice (r: Rect; var gd: GDHandle; var devRect: Rect; var isMain: Boolean): Boolean; function SkelGetWindowDevice (wind: WindowPtr; var gd: GDHandle; var devRect: Rect): Boolean; procedure SkelGetWindContentRect (wind: WindowPtr; var r: Rect); procedure SkelGetWindStructureRect (wind: WindowPtr; var r: Rect); function SkelGetWindTitleHeight (wind: WindowPtr): Integer; function SkelAddWindProp (w: WindowPtr; propType: Integer; propData: LongInt): Boolean; procedure SkelRmveWindProp (w: WindowPtr; propType: Integer); function SkelGetWindProp (w: WindowPtr; propType: Integer): SkelWindPropHandle; function SkelGetWindPropData (w: WindowPtr; propType: Integer): LongInt; { menu handling routines } function SkelMenu (menu: MenuHandle; doSelect: SkelMenuSelectProcPtr; doClobber: SkelMenuClobberProcPtr; subMenu: Boolean; drawMenuBar: Boolean): Boolean; procedure SkelRmveMenu (menu: MenuHandle); procedure SkelSetMenuHook (p: SkelMenuHookProcPtr); function SkelGetMenuHook: SkelMenuHookProcPtr; { environment information routines} function SkelQuery (selector: Integer): LongInt; function SkelTrapAvailable (theTrap: Integer): Boolean; {----------------------------------------------------------------------------} { Auxiliary routines } {----------------------------------------------------------------------------} procedure SkelApple (items: Str255; doSelect: SkelMenuSelectProcPtr); procedure SkelDoEvents (mask: Integer); procedure SkelDoUpdates; function SkelDlogFilter (filter: ModalFilterProcPtr; doReturn: Boolean): ModalFilterProcPtr; function SkelDlogFilterYD (filter: ModalFilterYDProcPtr; doReturn: Boolean): ModalFilterYDProcPtr; procedure SkelRmveDlogFilter; procedure SkelDlogDefaultItem (item: Integer); procedure SkelDlogCancelItem (item: Integer); procedure SkelDlogTracksCursor (track: Boolean); function SkelCmdPeriod (event: EventRecord): Boolean; {----------------------------------------------------------------------------} { Convenience routines } {----------------------------------------------------------------------------} procedure SkelGetMainDeviceRect (var r: Rect); procedure SkelPositionRect (refRect: Rect; var r: Rect; hRatio: Fixed; vRatio: Fixed); procedure SkelGetReferenceRect (var r: Rect; positionType: Integer); procedure SkelPositionWindow (wind: WindowPtr; positionType: Integer; hRatio: Fixed; vRatio: Fixed); function SkelTestRectVisible (r: Rect): Boolean; { alert presentation routines } function SkelAlert (alrtResNum: Integer; filter: ModalFilterProcPtr; positionType: Integer): Integer; procedure SkelSetAlertPosRatios (hRatio: Fixed; vRatio: Fixed); procedure SkelGetAlertPosRatios (var hRatio: Fixed; var vRatio: Fixed); { control manipulation routines } function SkelHiliteControl (ctrl: ControlHandle; hilite: Integer): Boolean; procedure SkelDrawButtonOutline (ctrl: ControlHandle); procedure SkelEraseButtonOutline (ctrl: ControlHandle); procedure SkelFlashButton (ctrl: ControlHandle); function SkelToggleCtlValue (ctrl: ControlHandle): Integer; { dialog item manipulation routines } function SkelGetDlogCtl (dlog: DialogPtr; item: Integer): ControlHandle; function SkelSetDlogCtlHilite (dlog: DialogPtr; item: Integer; hilite: Integer): Boolean; function SkelGetDlogCtlHilite (dlog: DialogPtr; item: Integer): Integer; procedure SkelSetDlogCtlValue (dlog: DialogPtr; item: Integer; value: Integer); function SkelGetDlogCtlValue (dlog: DialogPtr; item: Integer): Integer; function SkelToggleDlogCtlValue (dlog: DialogPtr; item: Integer): Integer; procedure SkelSetDlogCtlRefCon (dlog: DialogPtr; item: Integer; value: LongInt); function SkelGetDlogCtlRefCon (dlog: DialogPtr; item: Integer): LongInt; procedure SkelSetDlogStr (dlog: DialogPtr; item: integer; str: Str255); procedure SkelGetDlogStr (dlog: DialogPtr; item: integer; var str: Str255); procedure SkelSetDlogRect (dlog: DialogPtr; item: integer; r: Rect); procedure SkelGetDlogRect (dlog: DialogPtr; item: integer; var r: Rect); procedure SkelSetDlogProc (dlog: DialogPtr; item: Integer; p: SkelDlogItemProcPtr); function SkelGetDlogProc (dlog: DialogPtr; item: Integer): SkelDlogItemProcPtr; procedure SkelSetDlogType (dlog: DialogPtr; item: Integer; itemType: Integer); function SkelGetDlogType (dlog: DialogPtr; item: Integer): Integer; procedure SkelSetDlogRadioButtonSet (dlog: DialogPtr; first: Integer; last: Integer; choice: Integer); procedure SkelSetDlogButtonOutliner (dlog: DialogPtr; item: Integer); procedure SkelSetDlogCursor (dlog: DialogPtr); function SkelDlogMapKeyToButton (dlog: DialogPtr; evt: EventRecord; var item: Integer; defaultItem: Integer; cancelItem: Integer): Boolean; procedure SkelPause (ticks: LongInt); implementation end.