home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-01-22 | 9.2 KB | 307 lines | [TEXT/PJMM] |
- unit InterfacesUI;
-
- {Unit for making Think Pascal work with Universal Interfaces}
- {All units that are not in Interfaces.lib are not reflected here.}
- {This implements changes to the core Toolbox, excluding most System7-}
- {specific units. You have to inlude them in your project anyway, so}
- {you can just as well make the changes in the interface files as}
- {necessary.}
-
- interface
-
- {Controls}
- type
- ControlRef = ControlHandle;
- ConstStr255Param = Str255;
- WindowRef = WindowPtr;
- ControlActionUPP = ProcPtr;
- procedure SetControlTitle (theControl: ControlRef; title: ConstStr255Param);
- inline
- $A95F;
- procedure GetControlTitle (theControl: ControlRef; var title: Str255);
- inline
- $A95E;
- procedure UpdateControls (theWindow: WindowRef; updateRgn: RgnHandle);
- inline
- $A953;
- procedure SetControlValue (theControl: ControlRef; theValue: INTEGER);
- inline
- $A963;
- function GetControlValue (theControl: ControlRef): INTEGER;
- inline
- $A960;
- procedure SetControlMinimum (theControl: ControlRef; minValue: INTEGER);
- inline
- $A964;
- function GetControlMinimum (theControl: ControlRef): INTEGER;
- inline
- $A961;
- procedure SetControlMaximum (theControl: ControlRef; maxValue: INTEGER);
- inline
- $A965;
- function GetControlMaximum (theControl: ControlRef): INTEGER;
- inline
- $A962;
- function GetAuxiliaryControlRecord (theControl: ControlRef; var acHndl: AuxCtlHandle): BOOLEAN;
- inline
- $AA44;
- procedure SetControlReference (theControl: ControlRef; data: LONGINT);
- inline
- $A95B;
- function GetControlReference (theControl: ControlRef): LONGINT;
- inline
- $A95A;
- procedure SetControlAction (theControl: ControlRef; actionProc: ControlActionUPP);
- inline
- $A96B;
- function GetControlAction (theControl: ControlRef): ControlActionUPP;
- inline
- $A96A;
- procedure SetControlColor (theControl: ControlRef; newColorTable: CCTabHandle);
- inline
- $AA43;
- function GetControlVariant (theControl: ControlRef): INTEGER;
- inline
- $A809;
- {Dialogs}
- type
- DialogRef = DialogPtr;
- procedure DisposeDialog (theDialog: DialogRef);
- inline
- $A983;
- procedure UpdateDialog (theDialog: DialogRef; updateRgn: RgnHandle);
- inline
- $A978;
- procedure GetDialogItem (theDialog: DialogRef; itemNo: INTEGER; var itemType: INTEGER; var item: Handle; var box: Rect);
- inline
- $A98D;
- procedure SetDialogItem (theDialog: DialogRef; itemNo: INTEGER; itemType: INTEGER; item: Handle; {CONST}
- var box: Rect);
- inline
- $A98E;
- procedure HideDialogItem (theDialog: DialogRef; itemNo: INTEGER);
- inline
- $A827;
- procedure ShowDialogItem (theDialog: DialogRef; itemNo: INTEGER);
- inline
- $A828;
- procedure SelectDialogItemText (theDialog: DialogRef; itemNo: INTEGER; strtSel: INTEGER; endSel: INTEGER);
- inline
- $A97E;
- procedure GetDialogItemText (item: Handle; var text: Str255);
- inline
- $A990;
- procedure SetDialogItemText (item: Handle; text: ConstStr255Param);
- inline
- $A98F;
- function FindDialogItem (theDialog: DialogRef; thePt: Point): INTEGER;
- inline
- $A984;
- function NewColorDialog (dStorage: univ Ptr; {CONST}
- var boundsRect: Rect; title: ConstStr255Param; visible: BOOLEAN; procID: INTEGER; behind: WindowRef; goAwayFlag: BOOLEAN; refCon: LONGINT; items: Handle): DialogRef;
- inline
- $AA4B;
- function GetAlertStage: INTEGER;
- inline
- $3EB8, $0A9A; { MOVE.W $0A9A,(SP) }
-
- procedure ResetAlertStage;
- inline
- $4278, $0A9A;
- procedure DialogCut (theDialog: DialogRef);
- procedure DialogPaste (theDialog: DialogRef);
- procedure DialogCopy (theDialog: DialogRef);
- procedure DialogDelete (theDialog: DialogRef);
- procedure SetDialogFont (value: INTEGER);
- inline
- $31DF, $0AFA; { MOVE.W (SP)+,$0AFA }
-
- {Events}
- function KeyTranslate (transData: univ Ptr; keycode: INTEGER; var state: LONGINT): LONGINT;
- inline
- $A9C3;
-
- {Lists}
- procedure LSetDrawingMode (drawIt: BOOLEAN; lHandle: ListHandle);
- inline
- $3F3C, $002C, $A9E7;
- procedure LGetCellDataLocation (var offset: INTEGER; var len: INTEGER; theCell: Cell; lHandle: ListHandle);
- inline
- $3F3C, $0034, $A9E7;
-
- {Memory}
- function ApplicationZone: THz;
- inline
- $2EB8, $02AA; { MOVE.L $02AA,(SP) }
- function TempNewHandle (logicalSize: Size; var resultCode: OSErr): Handle;
- inline
- $3F3C, $001D, $A88F;
- function TempMaxMem (var grow: Size): Size;
- inline
- $3F3C, $0015, $A88F;
- function TempFreeMem: LONGINT;
- inline
- $3F3C, $0018, $A88F;
- { Temporary Memory routines renamed, but obsolete, in System 7.0 and later. }
- procedure TempHLock (h: Handle; var resultCode: OSErr);
- inline
- $3F3C, $001E, $A88F;
- procedure TempHUnlock (h: Handle; var resultCode: OSErr);
- inline
- $3F3C, $001F, $A88F;
- procedure TempDisposeHandle (h: Handle; var resultCode: OSErr);
- inline
- $3F3C, $0020, $A88F;
- function TempTopMem: Ptr;
- inline
- $3F3C, $0016, $A88F;
- procedure ReserveMem (cbNeeded: Size);
- inline
- $201F, $A040;
- procedure ReserveMemSys (cbNeeded: Size);
- inline
- $201F, $A440;
- procedure DisposePtr (p: Ptr); {Unnecessary?}
- inline
- $205F, $A01F;
- procedure DisposeHandle (h: Handle); {Unnecessary?}
- inline
- $205F, $A023;
- procedure ReallocateHandle (h: Handle; byteCount: Size);
- inline
- $201F, $205F, $A027;
- {Menus}
- type
- MenuRef = MenuHandle;
- procedure AppendResMenu (theMenu: MenuRef; theType: ResType);
- inline
- $A94D;
- procedure InsertMenuItem (theMenu: MenuRef; itemString: ConstStr255Param; afterItem: INTEGER);
- inline
- $A826;
- procedure DeleteMenuItem (theMenu: MenuRef; item: INTEGER);
- inline
- $A952;
- procedure SetMenuItemText (theMenu: MenuRef; item: INTEGER; itemString: ConstStr255Param);
- inline
- $A947;
- procedure GetMenuItemText (theMenu: MenuRef; item: INTEGER; var itemString: Str255);
- inline
- $A946;
- function GetMenuHandle (menuID: INTEGER): MenuRef;
- inline
- $A949;
- procedure DeleteMCEntries (menuID: INTEGER; menuItem: INTEGER);
- inline
- $AA60;
- procedure DisposeMCInfo (menuCTbl: MCTableHandle);
- inline
- $AA63;
- {OSUtils}
- type
- LongDateRec = DateTimeRec;
- LongDateTime = Longint;
- procedure LongDateToSeconds ({CONST}
- var lDate: LongDateRec; var lSecs: LongDateTime);
- inline
- $2F3C, $8008, $FFF2, $A8B5;
- procedure LongSecondsToDate (var lSecs: LongDateTime; var lDate: LongDateRec);
- inline
- $2F3C, $8008, $FFF0, $A8B5;
- function IsMetric: BOOLEAN;
- inline
- $3F3C, $0004, $A9ED;
- procedure DateToSeconds ({CONST}
- var d: DateTimeRec; var secs: LONGINT);
- procedure SecondsToDate (secs: LONGINT; var d: DateTimeRec);
- inline
- $205F, $201F, $A9C6;
- {PictUtils - unnecessary?}
- {function DisposePictInfo (thePictInfoID: PictInfoID): OSErr;}
- {inline}
- {$303C, $0206, $A831;}
- {QuickDraw - unnecessary?}
- procedure DisposePixMap (pm: PixMapHandle);
- inline
- $AA04;
- procedure DisposePixPat (pp: PixPatHandle);
- inline
- $AA08;
- procedure DisposeCTable (cTable: CTabHandle);
- inline
- $AA24;
- procedure DisposeCCursor (cCrsr: CCrsrHandle);
- inline
- $AA26;
- procedure DisposeCIcon (theIcon: CIconHandle); {Rather Icons.p today?}
- inline
- $AA25;
- procedure DisposeGDevice (gdh: GDHandle);
- inline
- $AA30;
- {QuickdrawText}
- {function PixelToChar (textBuf: Ptr; textLength: LONGINT; slop: Fixed; pixelWidth: Fixed; var leadingEdge: BOOLEAN; var widthRemaining: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point): INTEGER;}
- {inline}
- {$2F3C, $8222, $002E, $A8B5;}
- {function CharToPixel (textBuf: Ptr; textLength: LONGINT; slop: Fixed; offset: LONGINT; direction: INTEGER; styleRunPosition: JustStyleCode; numer: Point; denom: Point): INTEGER;}
- {inline}
- {$2F3C, $821C, $0030, $A8B5;}
- {procedure DrawJustified (textPtr: Ptr; textLength: LONGINT; slop: Fixed; styleRunPosition: JustStyleCode; numer: Point; denom: Point);}
- {inline}
- {$2F3C, $8016, $0032, $A8B5;}
- {procedure MeasureJustified (textPtr: Ptr; textLength: LONGINT; slop: Fixed; charLocs: Ptr; styleRunPosition: JustStyleCode; numer: Point; denom: Point);}
- {inline}
- {$2F3C, $801A, $0034, $A8B5;}
- {function PortionLine (textPtr: Ptr; textLen: LONGINT; styleRunPosition: JustStyleCode; numer: Point; denom: Point): Fixed;}
- {inline}
- {$2F3C, $8412, $0036, $A8B5;}
- {Resources}
- function GetResourceSizeOnDisk (theResource: Handle): LONGINT;
- inline
- $A9A5;
- function GetMaxResourceSize (theResource: Handle): LONGINT;
- inline
- $A821;
- procedure RemoveResource (theResource: Handle);
- inline
- $A9AD;
- {TextEdit}
- type
- TEClickLoopUPP = ProcPtr;
- WordBreakUPP = ProcPtr;
- procedure TESetAlignment (just: INTEGER; hTE: TEHandle);
- inline
- $A9DF;
- procedure TETextBox (text: univ Ptr; length: LONGINT; {CONST}
- var box: Rect; just: INTEGER);
- inline
- $A9CE;
- function TEStyleNew ({CONST}
- var destRect: Rect; {CONST}
- var viewRect: Rect): TEHandle;
- inline
- $A83E;
- procedure TESetStyleHandle (theHandle: TEStyleHandle; hTE: TEHandle);
- inline
- $3F3C, $0005, $A83D;
- function TEGetStyleHandle (hTE: TEHandle): TEStyleHandle;
- inline
- $3F3C, $0004, $A83D;
- procedure TEStylePaste (hTE: TEHandle);
- inline
- $3F3C, $0000, $A83D;
- function TEGetStyleScrapHandle (hTE: TEHandle): StScrpHandle;
- inline
- $3F3C, $0006, $A83D;
- procedure TEUseStyleScrap (rangeStart: LONGINT; rangeEnd: LONGINT; newStyles: StScrpHandle; fRedraw: BOOLEAN; hTE: TEHandle);
- inline
- $3F3C, $000B, $A83D;
- procedure TESetClickLoop (clikProc: TEClickLoopUPP; hTE: TEHandle);
- function TEGetScrapLength: LONGINT;
- procedure TESetWordBreak (wBrkProc: WordBreakUPP; hTE: TEHandle);
- procedure TEStyleInsert (text: univ Ptr; length: LONGINT; hST: StScrpHandle; hTE: TEHandle);
- inline
- $3F3C, $0007, $A83D;
-
- implementation
- end.