* update for amigaos 3.9

This commit is contained in:
nils 2003-02-07 20:45:08 +00:00
parent 9ad1d0ffe2
commit 171ee607fa
10 changed files with 1632 additions and 627 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,7 +2,7 @@
This file is part of the Free Pascal run time library.
A file in Amiga system run time library.
Copyright (c) 1998 by Nils Sjoholm
Copyright (c) 1998-2003 by Nils Sjoholm
member of the Amiga RTL development team.
See the file COPYING.FPC, included in this distribution,
@ -18,16 +18,28 @@ unit amigaprinter;
INTERFACE
uses exec, graphics;
uses exec, graphics,utility,intuition,prefs;
Const
{ V34-V40 commands }
PRD_RAWWRITE = CMD_NONSTD + 0;
PRD_PRTCOMMAND = CMD_NONSTD + 1;
PRD_DUMPRPORT = CMD_NONSTD + 2;
PRD_QUERY = CMD_NONSTD + 3;
{ V44 commands }
PRD_RESETPREFS = (CMD_NONSTD+4); { PRIVATE: do not use! }
PRD_LOADPREFS = (CMD_NONSTD+5); { PRIVATE: do not use! }
PRD_USEPREFS = (CMD_NONSTD+6); { PRIVATE: do not use! }
PRD_SAVEPREFS = (CMD_NONSTD+7); { PRIVATE: do not use! }
PRD_READPREFS = (CMD_NONSTD+8);
PRD_WRITEPREFS = (CMD_NONSTD+9);
PRD_EDITPREFS = (CMD_NONSTD+10);
PRD_SETERRHOOK = (CMD_NONSTD+11);
PRD_DUMPRPORTTAGS = (CMD_NONSTD+12);
{ printer command definitions }
aRIS = 0; { ESCc reset ISO }
@ -172,6 +184,29 @@ Type
io_Special : Word; { option flags }
end;
{ For PRD_DUMPRPORTTAGS (V44) }
PIODRPTagsReq = ^tIODRPTagsReq;
tIODRPTagsReq = record
io_Message : tMessage;
io_Device : PDevice; { device node pointer }
io_Unit : PUnit; { unit (driver private)}
io_Command : UWORD; { device command }
io_Flags : UBYTE;
io_Error : BYTE; { error or warning num }
io_RastPort : PRastPort; { raster port }
io_ColorMap : PColorMap; { color map }
io_Modes : ULONG; { graphics viewport modes }
io_SrcX : UWORD; { source x origin }
io_SrcY : UWORD; { source y origin }
io_SrcWidth : UWORD; { source x width }
io_SrcHeight : UWORD; { source x height }
io_DestCols : LONG; { destination x width }
io_DestRows : LONG; { destination y height }
io_Special : UWORD; { option flags }
io_TagList : PTagItem; { tag list with additional info }
end;
Const
SPECIAL_MILCOLS = $0001; { DestCols specified in 1/1000" }
@ -223,6 +258,17 @@ Const
PDERR_TOOKCONTROL = 8; { Took control in case 0 of render }
PDERR_BADPREFERENCES = 9; { preferences file corrupt }
{
Note: all error codes < 32 are reserved for printer.device.
All error codes >= 32 and < 127 are reserved for driver specific
errors. Negative errors are reserved for system use (standard I/O
errors) and error code 127 is reserved for future expansion.
}
PDERR_LASTSTANDARD = 31;
PDERR_FIRSTCUSTOM = 32;
PDERR_LASTCUSTOM = 126;
{ internal use }
SPECIAL_DENSITYMASK = $0700; { masks out density values }
@ -230,6 +276,143 @@ Const
SPECIAL_FULLCOLS + SPECIAL_FULLROWS + SPECIAL_FRACCOLS +
SPECIAL_FRACROWS + SPECIAL_ASPECT;
{**************************************************************************}
{ The following tags are used for PRD_DUMPRPORTTAGS }
DRPA_Dummy = (TAG_USER + $60000);
{**************************************************************************}
{ The following tags are not implemented but reserved for future use. }
DRPA_ICCProfile = (DRPA_Dummy+1); { APTR }
DRPA_ICCName = (DRPA_Dummy+2); { STRPTR }
DRPA_NoColCorrect = (DRPA_Dummy+3); { LBOOL }
{**************************************************************************}
{ If the following tag is used io_RastPort and io_ColorMap are
ignored.
}
DRPA_SourceHook = (DRPA_Dummy+4); { struct Hook * }
{ The source hook (DRPA_SourceHook) is called with object NULL and
message is a pointer to the following struct.
VOID hook(struct Hook * hook,
APTR dummy,
struct DRPSourceMsg * drpm);
}
type
PDRPSourceMsg = ^tDRPSourceMsg;
tDRPSourceMsg = record
x : LONG;
y : LONG;
width : LONG;
height : LONG;
buf : PULONG; { fill this buffer with 0x00RRGGBB pixels }
end;
const
{**************************************************************************}
{ If these tags are used io_Modes is ignored for aspect ratio }
DRPA_AspectX = (DRPA_Dummy+5); { ULONG }
DRPA_AspectY = (DRPA_Dummy+6); { ULONG }
{**************************************************************************}
{ The following tags are used for PRD_EDITPREFS }
PPRA_Dummy = (TAG_USER + $70000);
{**************************************************************************}
{ Request to edit prefs (for PRD_EDITPREFS; V44) }
type
PIOPrtPrefsReq = ^tIOPrtPrefsReq;
tIOPrtPrefsReq = record
io_Message : tMessage;
io_Device : PDevice; { device node pointer }
io_Unit : PUnit; { unit (driver private)}
io_Command : UWORD; { device command }
io_Flags : UBYTE;
io_Error : BYTE; { error or warning num }
io_TagList : PTagItem; { requester tag list }
end;
const
PPRA_Window = (PPRA_Dummy+1); { struct Window * }
PPRA_Screen = (PPRA_Dummy+2); { struct Screen * }
PPRA_PubScreen = (PPRA_Dummy+3); { STRPTR }
{**************************************************************************}
{ Request to set error hook (for PRD_SETERRHOOK; V44)}
{
#define PDHOOK_NONE ((struct Hook *) NULL)
#define PDHOOK_STD ((struct Hook *) 1)
}
type
PIOPrtErrReq = ^tIOPrtErrReq;
tIOPrtErrReq = record
io_Message : tMessage;
io_Device : PDevice; { device node pointer }
io_Unit : PUnit; { unit (driver private)}
io_Command : UWORD; { device command }
io_Flags : UBYTE;
io_Error : BYTE; { error or warning num }
io_Hook : PHook;
end;
{**************************************************************************}
{
The error hook is called with the IORequest that caused the error as
object (2nd Parameter) and a pointer to struct PrtErrMsg as message
(3rd Parameter):
VOID hook(struct Hook * hook,
struct printerIO * ior,
struct PrtErrMsg * pem);
}
PPrtErrMsg = ^tPrtErrMsg;
tPrtErrMsg = record
pe_Version : ULONG;
pe_ErrorLevel : ULONG;
pe_Window : PWindow;
pe_ES : PEasyStruct;
pe_IDCMP : PULONG;
pe_ArgList : APTR;
end;
const
PDHOOK_VERSION = 1;
type
PIOPrefsReq = ^IOPrefsReq;
IOPrefsReq = record
io_Message : tMessage;
io_Device : PDevice; { device node pointer }
io_Unit : PUnit; { unit (driver private)}
io_Command : UWORD; { device command }
io_Flags : UBYTE;
io_Error : BYTE; { error or warning num }
io_TxtPrefs : PPrinterTxtPrefs;
io_UnitPrefs : PPrinterUnitPrefs;
io_DevUnitPrefs : PPrinterDeviceUnitPrefs;
io_GfxPrefs : PPrinterGfxPrefs;
end;
IMPLEMENTATION
end.

View File

@ -40,14 +40,31 @@
Just changed the result to a longint.
06 Sep 2000.
Fixed the above functions so that they return a
Fixed the above functions so that they return a
shortint as they should. Made some changes to the
stub.
20 Sep 2000.
Put together exec.pp and exec.inc.
04 Feb 2003.
Update for AmigaOS 3.9.
Added some consts and a record.
Functions added.
PROCEDURE NewMinList
FUNCTION AVL_AddNode
FUNCTION AVL_RemNodeByAddress
FUNCTION AVL_RemNodeByKey
FUNCTION AVL_FindNode
FUNCTION AVL_FindPrevNodeByAddress
FUNCTION AVL_FindPrevNodeByKey
FUNCTION AVL_FindNextNodeByAddress
FUNCTION AVL_FindNextNodeByKey
FUNCTION AVL_FindFirstNode
FUNCTION AVL_FindLastNode
05 Feb 2003.
nils.sjoholm@mailbox.swipnet.se
}
@ -1098,6 +1115,7 @@ CONST
AFB_68881 = 4; { also set for 68882 }
AFB_68882 = 5;
AFB_FPU40 = 6; { Set if 68040 FPU }
AFB_68060 = 7;
AFF_68010 = %00000001;
AFF_68020 = %00000010;
@ -1106,6 +1124,7 @@ CONST
AFF_68881 = %00010000;
AFF_68882 = %00100000;
AFF_FPU40 = %01000000;
AFF_68060 = (1 shl 7);
{ AFB_RESERVED8 = %000100000000; }
{ AFB_RESERVED9 = %001000000000; }
@ -1137,6 +1156,22 @@ CONST
DMA_ReadFromRAM = 8; { Set if DMA goes *FROM* RAM to device }
{ Don't even think about the contents of this structure. Just embed it
* and reference it
*}
type
PAVLNode = ^tAVLNode;
tAVLNode = record
reserved : array[0..3] of ULONG;
end;
ppAVLNode = ^pAVLNode;
PAVLNODECOMP = ^AVLNODECOMP;
AVLNODECOMP = APTR;
PAVLKEYCOMP = ^AVLKEYCOMP;
AVLKEYCOMP = APTR;
@ -1146,13 +1181,12 @@ PROCEDURE AddHead(list : pList; node : pNode);
PROCEDURE AddIntServer(intNumber : LONGINT; interrupt_ : pInterrupt);
PROCEDURE AddLibrary(lib : pLibrary);
PROCEDURE AddMemHandler(memhand : pInterrupt);
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER;
const name : pCHAR);
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR);
PROCEDURE AddPort(port : pMsgPort);
PROCEDURE AddResource(resource : POINTER);
PROCEDURE AddSemaphore(sigSem : pSignalSemaphore);
PROCEDURE AddTail(list : pList; node : pNode);
FUNCTION AddTask(task : pTask; initPC : POINTER; finalPC : POINTER) : POINTER;
FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER;
PROCEDURE Alert(alertNum : ULONG);
FUNCTION AllocAbs(byteSize : ULONG; location : POINTER) : POINTER;
FUNCTION Allocate(freeList : pMemHeader; byteSize : ULONG) : POINTER;
@ -1168,8 +1202,8 @@ FUNCTION AvailMem(requirements : ULONG) : ULONG;
PROCEDURE CacheClearE(address : POINTER; length : ULONG; caches : ULONG);
PROCEDURE CacheClearU;
FUNCTION CacheControl(cacheBits : ULONG; cacheMask : ULONG) : ULONG;
PROCEDURE CachePostDMA(address : POINTER; VAR length : ULONG; flags : ULONG);
FUNCTION CachePreDMA(address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG);
FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
PROCEDURE Cause(interrupt_ : pInterrupt);
FUNCTION CheckIO(ioRequest : pIORequest) : pIORequest;
PROCEDURE ChildFree(tid : POINTER);
@ -1179,12 +1213,11 @@ PROCEDURE ChildWait(tid : POINTER);
PROCEDURE CloseDevice(ioRequest : pIORequest);
PROCEDURE CloseLibrary(lib : pLibrary);
PROCEDURE ColdReboot;
PROCEDURE CopyMem(source : POINTER; dest : POINTER; size : ULONG);
PROCEDURE CopyMemQuick(source : POINTER; dest : POINTER; size : ULONG);
FUNCTION CreateIORequest(port : pMsgPort; size : ULONG) : POINTER;
PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG);
PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG);
FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER;
FUNCTION CreateMsgPort : pMsgPort;
FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) :
POINTER;
FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) : POINTER;
PROCEDURE Deallocate(freeList : pMemHeader; memoryBlock : POINTER; byteSize : ULONG);
PROCEDURE Debug(flags : ULONG);
PROCEDURE DeleteIORequest(iorequest : POINTER);
@ -1210,27 +1243,23 @@ PROCEDURE FreeVec(memoryBlock : POINTER);
FUNCTION GetCC : ULONG;
FUNCTION GetMsg(port : pMsgPort) : pMessage;
PROCEDURE InitCode(startClass : ULONG; version : ULONG);
FUNCTION InitResident(resident_ : pResident; segList : ULONG) : POINTER;
FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER;
PROCEDURE InitSemaphore(sigSem : pSignalSemaphore);
PROCEDURE InitStruct(initTable : POINTER; memory : POINTER; size : ULONG);
PROCEDURE MakeFunctions(target : POINTER; functionArray : POINTER; funcDispBase :
ULONG);
FUNCTION MakeLibrary(funcInit : POINTER; structInit : POINTER; libInit : tPROCEDURE;
dataSize : ULONG; segList : ULONG) : pLibrary;
PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG);
PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer);
FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE;dataSize : ULONG; segList : ULONG) : pLibrary;
FUNCTION ObtainQuickVector(interruptCode : POINTER) : ULONG;
PROCEDURE ObtainSemaphore(sigSem : pSignalSemaphore);
PROCEDURE ObtainSemaphoreList(sigSem : pList);
PROCEDURE ObtainSemaphoreShared(sigSem : pSignalSemaphore);
FUNCTION OldOpenLibrary(const libName : pCHAR) : pLibrary;
FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest;
flags : ULONG) : shortint;
FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest; flags : ULONG) : shortint;
FUNCTION OpenLibrary(const libName : pCHAR; version : ULONG) : pLibrary;
FUNCTION OpenResource(const resName : pCHAR) : POINTER;
PROCEDURE Permit;
FUNCTION Procure(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage) : BOOLEAN;
PROCEDURE PutMsg(port : pMsgPort; message : pMessage);
PROCEDURE RawDoFmt(formatString : pCHAR; dataStream : POINTER; putChProc : tPROCEDURE;
putChData : POINTER);
function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
PROCEDURE ReleaseSemaphore(sigSem : pSignalSemaphore);
PROCEDURE ReleaseSemaphoreList(sigSem : pList);
PROCEDURE RemDevice(device : pDevice);
@ -1247,9 +1276,8 @@ PROCEDURE RemTask(task : pTask);
PROCEDURE ReplyMsg(message : pMessage);
PROCEDURE SendIO(ioRequest : pIORequest);
FUNCTION SetExcept(newSignals : ULONG; signalSet : ULONG) : ULONG;
FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) :
POINTER;
FUNCTION SetIntVector(intNumber : LONGINT; interrupt_ : pInterrupt) : pInterrupt;
FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) : POINTER;
FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt;
FUNCTION SetSignal(newSignals : ULONG; signalSet : ULONG) : ULONG;
FUNCTION SetSR(newSR : ULONG; mask : ULONG) : ULONG;
FUNCTION SetTaskPri(task : pTask; priority : LONGINT) : shortint;
@ -1259,31 +1287,36 @@ PROCEDURE SumKickData;
PROCEDURE SumLibrary(lib : pLibrary);
FUNCTION SuperState : POINTER;
FUNCTION Supervisor(userFunction : tPROCEDURE) : ULONG;
FUNCTION TypeOfMem(address : POINTER) : ULONG;
FUNCTION TypeOfMem(const address : POINTER) : ULONG;
PROCEDURE UserState(sysStack : POINTER);
PROCEDURE Vacate(sigSem : pSignalSemaphore; bidMsg : pSemaphoreMessage);
FUNCTION Wait(signalSet : ULONG) : ULONG;
FUNCTION WaitIO(ioRequest : pIORequest) : shortint;
FUNCTION WaitPort(port : pMsgPort) : pMessage;
{$ifdef amiga_overlays}
PROCEDURE NewMinList(minlist : pMinList);
FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode;
FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode;
FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode;
FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode;
FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode;
FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode;
FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode;
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER;
const name : String);
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String);
FUNCTION FindName(list : pList; const name : String) : pNode;
FUNCTION FindPort(const name : String) : pMsgPort;
FUNCTION FindResident(const name : String) : pResident;
FUNCTION FindSemaphore(const sigSem : String) : pSignalSemaphore;
FUNCTION FindTask(const name : String) : pTask;
FUNCTION OldOpenLibrary(const libName : String) : pLibrary;
FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;
flags : ULONG) : shortint;
FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;flags : ULONG) : shortint;
FUNCTION OpenLibrary(const libName : String; version : ULONG) : pLibrary;
FUNCTION OpenResource(const resName : String) : POINTER;
PROCEDURE RawDoFmt(formatString : String; dataStream : POINTER; putChProc :
tPROCEDURE; putChData : POINTER);
{$endif}
function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc :tPROCEDURE; putChData : POINTER): pointer;
function BitMask(no :shortint): longint;
function IsListEmpty( list : pList): boolean;
@ -1291,9 +1324,7 @@ function IsMsgPortEmpty( mp : pMsgPort): boolean;
IMPLEMENTATION
{$ifdef amiga_overlays}
uses pastoc;
{$endif}
function BitMask(no :shortint): longint;
begin
@ -1379,8 +1410,7 @@ BEGIN
END;
END;
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER;
const name : pCHAR);
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : pCHAR);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1440,7 +1470,7 @@ BEGIN
END;
END;
FUNCTION AddTask(task : pTask; initPC : POINTER; finalPC : POINTER) : POINTER;
FUNCTION AddTask(task : pTask;const initPC : POINTER;const finalPC : POINTER) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1641,7 +1671,7 @@ BEGIN
END;
END;
PROCEDURE CachePostDMA(address : POINTER; VAR length : ULONG; flags : ULONG);
PROCEDURE CachePostDMA(const address : POINTER; VAR length : ULONG; flags : ULONG);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1654,7 +1684,7 @@ BEGIN
END;
END;
FUNCTION CachePreDMA(address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
FUNCTION CachePreDMA(const address : POINTER; VAR length : ULONG; flags : ULONG) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1767,7 +1797,7 @@ BEGIN
END;
END;
PROCEDURE CopyMem(source : POINTER; dest : POINTER; size : ULONG);
PROCEDURE CopyMem(const source : POINTER; dest : POINTER; size : ULONG);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1780,7 +1810,7 @@ BEGIN
END;
END;
PROCEDURE CopyMemQuick(source : POINTER; dest : POINTER; size : ULONG);
PROCEDURE CopyMemQuick(const source : POINTER; dest : POINTER; size : ULONG);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1793,7 +1823,7 @@ BEGIN
END;
END;
FUNCTION CreateIORequest(port : pMsgPort; size : ULONG) : POINTER;
FUNCTION CreateIORequest(const port : pMsgPort; size : ULONG) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -1817,7 +1847,7 @@ BEGIN
END;
END;
FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) :
FUNCTION CreatePool(requirements : ULONG; puddleSize : ULONG; threshSize : ULONG) :
POINTER;
BEGIN
ASM
@ -2121,7 +2151,7 @@ BEGIN
END;
END;
FUNCTION InitResident(resident_ : pResident; segList : ULONG) : POINTER;
FUNCTION InitResident(const resident_ : pResident; segList : ULONG) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2145,7 +2175,7 @@ BEGIN
END;
END;
PROCEDURE InitStruct(initTable : POINTER; memory : POINTER; size : ULONG);
PROCEDURE InitStruct(const initTable : POINTER; memory : POINTER; size : ULONG);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2158,8 +2188,7 @@ BEGIN
END;
END;
PROCEDURE MakeFunctions(target : POINTER; functionArray : POINTER; funcDispBase :
ULONG);
PROCEDURE MakeFunctions(const target : POINTER;const functionArray : POINTER;const funcDispBase :pointer);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2172,8 +2201,7 @@ BEGIN
END;
END;
FUNCTION MakeLibrary(funcInit : POINTER; structInit : POINTER; libInit : tPROCEDURE;
dataSize : ULONG; segList : ULONG) : pLibrary;
FUNCTION MakeLibrary(const funcInit : POINTER;const structInit : POINTER; libInit : tPROCEDURE; dataSize : ULONG; segList : ULONG) : pLibrary;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2246,7 +2274,7 @@ BEGIN
END;
END;
FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest;
FUNCTION OpenDevice(const devName : pCHAR; unite : ULONG; ioRequest : pIORequest;
flags : ULONG) : shortint;
BEGIN
ASM
@ -2325,8 +2353,7 @@ BEGIN
END;
END;
PROCEDURE RawDoFmt(formatString : pCHAR; dataStream : POINTER; putChProc : tPROCEDURE;
putChData : POINTER);
function RawDoFmt(const formatString : pCHAR;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2337,6 +2364,7 @@ BEGIN
MOVEA.L _ExecBase,A6
JSR -522(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
@ -2521,7 +2549,7 @@ BEGIN
END;
END;
FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) :
FUNCTION SetFunction(lib : pLibrary; funcOffset : LONGINT; newFunction : tPROCEDURE) :
POINTER;
BEGIN
ASM
@ -2536,7 +2564,7 @@ BEGIN
END;
END;
FUNCTION SetIntVector(intNumber : LONGINT; interrupt_ : pInterrupt) : pInterrupt;
FUNCTION SetIntVector(intNumber : LONGINT;const interrupt_ : pInterrupt) : pInterrupt;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2655,7 +2683,7 @@ BEGIN
END;
END;
FUNCTION TypeOfMem(address : POINTER) : ULONG;
FUNCTION TypeOfMem(const address : POINTER) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -2726,9 +2754,150 @@ BEGIN
END;
END;
{$ifdef amiga_overlays}
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER;
const name : String);
PROCEDURE NewMinList(minlist : pMinList);
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L minlist,A0
MOVEA.L _ExecBase,A6
JSR -828(A6)
MOVEA.L (A7)+,A6
END;
END;
FUNCTION AVL_AddNode(root : ppAVLNode; node : pAVLNode; func : POINTER) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L node,A1
MOVEA.L func,A2
MOVEA.L _ExecBase,A6
JSR -852(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_RemNodeByAddress(root : ppAVLNode; node : pAVLNode) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L node,A1
MOVEA.L _ExecBase,A6
JSR -858(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_RemNodeByKey(root : ppAVLNode; key : POINTER; func : POINTER) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L key,A1
MOVEA.L func,A2
MOVEA.L _ExecBase,A6
JSR -864(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindNode(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L key,A1
MOVEA.L func,A2
MOVEA.L _ExecBase,A6
JSR -870(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindPrevNodeByAddress(CONST node : pAVLNode) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L node,A0
MOVEA.L _ExecBase,A6
JSR -876(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindPrevNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L key,A1
MOVEA.L func,A2
MOVEA.L _ExecBase,A6
JSR -882(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindNextNodeByAddress(CONST node : pAVLNode) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L node,A0
MOVEA.L _ExecBase,A6
JSR -888(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindNextNodeByKey(CONST root : pAVLNode; key : POINTER; func : POINTER) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L key,A1
MOVEA.L func,A2
MOVEA.L _ExecBase,A6
JSR -894(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindFirstNode(CONST root : pAVLNode) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L _ExecBase,A6
JSR -900(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
FUNCTION AVL_FindLastNode(CONST root : pAVLNode) : pAVLNode;
BEGIN
ASM
MOVE.L A6,-(A7)
MOVEA.L root,A0
MOVEA.L _ExecBase,A6
JSR -906(A6)
MOVEA.L (A7)+,A6
MOVE.L D0,@RESULT
END;
END;
PROCEDURE AddMemList(size : ULONG; attributes : ULONG; pri : LONGINT; base : POINTER; const name : String);
BEGIN
AddMemList(size,attributes,pri,base,pas2c(name));
END;
@ -2756,7 +2925,7 @@ FUNCTION OldOpenLibrary(const libName : String) : pLibrary;
BEGIN
OldOpenLibrary := OldOpenLibrary(pas2c(libName));
END;
FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;
FUNCTION OpenDevice(const devName : String; unite : ULONG; ioRequest : pIORequest;
flags : ULONG) : shortint;
BEGIN
OpenDevice := OpenDevice(pas2c(devName),unite,ioRequest,flags);
@ -2769,20 +2938,17 @@ FUNCTION OpenResource(const resName : String) : POINTER;
BEGIN
OpenResource := OpenResource(pas2c(resName));
END;
PROCEDURE RawDoFmt(formatString : String; dataStream : POINTER; putChProc :
tPROCEDURE; putChData : POINTER);
function RawDoFmt(const formatString : String;const dataStream : POINTER; putChProc : tPROCEDURE; putChData : POINTER): pointer;
BEGIN
RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData);
RawDoFmt := RawDoFmt(pas2c(formatString),dataStream,putChProc,putChData);
END;
{$endif}
END. (* UNIT EXEC *)
{
$Log$
Revision 1.1 2003-02-04 18:07:40 nils
* initial release
Revision 1.2 2003-02-07 20:45:08 nils
* update for amigaos 3.9
Revision 1.1.2.2 2001/07/24 07:34:30 pierre
* amigaoverlays include file insertion commented out as it does seem necessary

View File

@ -2,7 +2,7 @@
This file is part of the Free Pascal run time library.
A file in Amiga system run time library.
Copyright (c) 1998 by Nils Sjoholm
Copyright (c) 1998-2003 by Nils Sjoholm
member of the Amiga RTL development team.
See the file COPYING.FPC, included in this distribution,
@ -16,10 +16,27 @@
unit hardblocks;
{
History:
Updated for AmigaOs 3.9.
A few changes in records.
28 Jan 2003.
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
INTERFACE
uses exec;
{ Changes
** Expanded envec
** Added storage for driveinit name up to 31 letters.
** Added storage for filesysten name up to 83 letters.
**}
{--------------------------------------------------------------------
*
* This file describes blocks of data that exist on a hard disk
@ -40,10 +57,19 @@ uses exec;
* file system load images, drive bad block maps, spare blocks,
* etc.
*
* Though only 512 byte blocks are currently supported by the
* file system, this proposal tries to be forward-looking by
* making the block size explicit, and by using only the first
* 256 bytes for all blocks but the LoadSeg data.
* Though all descriptions in this file contemplate 512 blocks
* per track this desecription works functionally with any block
* size. The LSEG blocks should make most efficient use of the
* disk block size possible, for example. While this specification
* can support 256 byte sectors that is deprecated at this time.
*
* This version adds some modest storage spaces for inserting
* the actual source filename for files installed on the RDBs
* as either DriveInit code or Filesystem code. This makes
* creating a mountfile suitable for use with the "C:Mount"
* command that can be used for manually mounting the disk if
* ever required.
*
*
*------------------------------------------------------------------}
@ -106,7 +132,7 @@ type
rdb_ControllerVendor : Array [0..7] of Char;
rdb_ControllerProduct : Array [0..15] of Char;
rdb_ControllerRevision : Array [0..3] of Char;
rdb_Reserved5 : Array [0..9] of ULONG;
rdb_DriveInitName : array[0..39] of char;
end;
const
@ -173,8 +199,8 @@ type
pb_DriveName : Array [0..31] of Char; { preferred DOS device name: BSTR form }
{ (not used if this name is in use) }
pb_Reserved2 : Array [0..14] of ULONG; { filler to 32 longwords }
pb_Environment : Array [0..16] of ULONG; { environment vector for this partition }
pb_EReserved : Array [0..14] of ULONG; { reserved for future environment vector }
pb_Environment : Array [0..19] of ULONG; { environment vector for this partition }
pb_EReserved : Array [0..11] of ULONG; { reserved for future environment vector }
end;
const
@ -218,7 +244,7 @@ type
{ processing before substitution }
fhb_GlobalVec : Longint; { BCPL global vector when starting task }
fhb_Reserved2 : Array [0..22] of ULONG; { (those reserved by PatchFlags) }
fhb_Reserved3 : Array [0..20] of ULONG;
fhb_FileSysName : array[0..83] of char; { File system file name as loaded. }
end;
const

View File

@ -2,7 +2,7 @@
This file is part of the Free Pascal run time library.
A file in Amiga system run time library.
Copyright (c) 1998-2002 by Nils Sjoholm
Copyright (c) 1998-2003 by Nils Sjoholm
member of the Amiga RTL development team.
See the file COPYING.FPC, included in this distribution,
@ -35,6 +35,10 @@
Added the define use_amiga_smartlink.
13 Jan 2003.
Update for AmigaOS 3.9.
New consts and new records.
04 Feb 2003.
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
@ -2928,6 +2932,17 @@ Type
o_Class : pIClass;
END;
{ BOOPSI class libraries should use this structure as the base for their
* library data. This allows developers to obtain the class pointer for
* performing object-less inquiries. }
PClassLibrary = ^tClassLibrary;
tClassLibrary = record
cl_Lib : tLibrary; { Embedded library }
cl_Pad : UWORD; { Align the structure }
cl_Class : PIClass; { Class pointer }
end;
{
* NOTE: <intuition/iobsolete.h> is included at the END of this file!
@ -2936,89 +2951,197 @@ Type
{ Gadget Class attributes }
CONST
GA_Dummy = (TAG_USER +$30000);
{ (LONG) Left edge of the gadget relative to the left edge of
* the window }
GA_Left = (GA_Dummy + $0001);
{ (LONG) Left edge of the gadget relative to the right edge of
* the window }
GA_RelRight = (GA_Dummy + $0002);
{ (LONG) Top edge of the gadget relative to the top edge of
* the window }
GA_Top = (GA_Dummy + $0003);
{ (LONG) Top edge of the gadget relative to the bottom edge
* of the window }
GA_RelBottom = (GA_Dummy + $0004);
{ (LONG) Width of the gadget }
GA_Width = (GA_Dummy + $0005);
{ (LONG) Width of the gadget relative to the width of the
* window }
GA_RelWidth = (GA_Dummy + $0006);
{ (LONG) Height of the gadget }
GA_Height = (GA_Dummy + $0007);
{ (LONG) Height of the gadget relative to the height of
* the window }
GA_RelHeight = (GA_Dummy + $0008);
{ (STRPTR) Gadget imagry is NULL terminated string }
GA_Text = (GA_Dummy + $0009); { ti_Data is (UBYTE *) }
{ (struct Image *) Gadget imagry is an image }
GA_Image = (GA_Dummy + $000A);
{ (struct Border *) Gadget imagry is a border }
GA_Border = (GA_Dummy + $000B);
{ (struct Image *) Selected gadget imagry }
GA_SelectRender = (GA_Dummy + $000C);
{ (UWORD) One of GFLG_GADGHNONE, GFLG_GADGHBOX, GFLG_GADGHCOMP,
* or GFLG_GADGHIMAGE }
GA_Highlight = (GA_Dummy + $000D);
{ (BOOL) Indicate whether gadget is disabled or not.
* Defaults to FALSE. }
GA_Disabled = (GA_Dummy + $000E);
{ (BOOL) Indicate whether the gadget is for
* WFLG_GIMMEZEROZERO window borders or not. Defaults
* to FALSE. }
GA_GZZGadget = (GA_Dummy + $000F);
{ (UWORD) Gadget ID assigned by the application }
GA_ID = (GA_Dummy + $0010);
{ (APTR) Application specific data }
GA_UserData = (GA_Dummy + $0011);
{ (APTR) Gadget specific data }
GA_SpecialInfo = (GA_Dummy + $0012);
{ (BOOL) Indicate whether the gadget is selected or not.
* Defaults to FALSE }
GA_Selected = (GA_Dummy + $0013);
{ (BOOL) When set tells the system that when this gadget
* is selected causes the requester that it is in to be
* ended. Defaults to FALSE. }
GA_EndGadget = (GA_Dummy + $0014);
{ (BOOL) When set indicates that the gadget is to
* notify the application when it becomes active. Defaults
* to FALSE. }
GA_Immediate = (GA_Dummy + $0015);
{ (BOOL) When set indicates that the application wants to
* verify that the pointer was still over the gadget when
* the select button is released. Defaults to FALSE. }
GA_RelVerify = (GA_Dummy + $0016);
{ (BOOL) When set indicates that the application wants to
* be notified of mouse movements while the gadget is active.
* It is recommmended that GA_Immediate and GA_RelVerify are
* also used so that the active gadget can be tracked by the
* application. Defaults to FALSE. }
GA_FollowMouse = (GA_Dummy + $0017);
{ (BOOL) Indicate whether the gadget is in the right border
* or not. Defaults to FALSE. }
GA_RightBorder = (GA_Dummy + $0018);
{ (BOOL) Indicate whether the gadget is in the left border
* or not. Defaults to FALSE. }
GA_LeftBorder = (GA_Dummy + $0019);
{ (BOOL) Indicate whether the gadget is in the top border
* or not. Defaults to FALSE. }
GA_TopBorder = (GA_Dummy + $001A);
{ (BOOL) Indicate whether the gadget is in the bottom border
* or not. Defaults to FALSE. }
GA_BottomBorder = (GA_Dummy + $001B);
{ (BOOL) Indicate whether the gadget is toggle-selected
* or not. Defaults to FALSE. }
GA_ToggleSelect = (GA_Dummy + $001C);
{ internal use only, until further notice, please }
{ (BOOL) Reserved for system use to indicate that the
* gadget belongs to the system. Defaults to FALSE. }
GA_SysGadget = (GA_Dummy + $001D);
{ bool, sets GTYP_SYSGADGET field in type }
{ (UWORD) Reserved for system use to indicate the
* gadget type. }
GA_SysGType = (GA_Dummy + $001E);
{ e.g., GTYP_WUPFRONT, ... }
{ (struct Gadget *) Previous gadget in the linked list.
* NOTE: This attribute CANNOT be used to link new gadgets
* into the gadget list of an open window or requester.
* You must use AddGList(). }
GA_Previous = (GA_Dummy + $001F);
{ previous gadget (or (struct Gadget **)) in linked list
* NOTE: This attribute CANNOT be used to link new gadgets
* into the gadget list of an open window or requester.
* You must use AddGList().
}
{ (struct Gadget *) Next gadget in the linked list. }
GA_Next = (GA_Dummy + $0020);
{ not implemented }
{ (struct DrawInfo *) Some gadgets need a DrawInfo at creation time }
GA_DrawInfo = (GA_Dummy + $0021);
{ some fancy gadgets need to see a DrawInfo
* when created or for layout
}
{ You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage }
GA_IntuiText = (GA_Dummy + $0022);
{ ti_Data is (struct IntuiText *) }
{ You should use at most ONE of GA_Text, GA_IntuiText, and GA_LabelImage }
{ (struct IntuiText *) Label is an IntuiText. }
GA_IntuiText = (GA_Dummy + $0022);
GA_LabelImage = (GA_Dummy + $0023);
{ ti_Data is an image (object), used in place of
* GadgetText
}
{ (Object *) Label is an image object. }
GA_LabelImage = (GA_Dummy + $0023);
GA_TabCycle = (GA_Dummy + $0024);
{ New for V37:
{ New for V37:
* Boolean indicates that this gadget is to participate in
* cycling activation with Tab or Shift-Tab.
}
}
GA_TabCycle = (GA_Dummy + $0024);
GA_GadgetHelp = (GA_Dummy + $0025);
{ New for V39:
{ New for V39:
* Boolean indicates that this gadget sends gadget-help
}
}
GA_GadgetHelp = (GA_Dummy + $0025);
GA_Bounds = (GA_Dummy + $0026);
{ New for V39:
{ New for V39:
* ti_Data is a pointer to an IBox structure which is
* to be copied into the extended gadget's bounds.
}
}
GA_Bounds = (GA_Dummy + $0026);
GA_RelSpecial = (GA_Dummy + $0027);
{ New for V39:
{ New for V39:
* Boolean indicates that this gadget has the "special relativity"
* property, which is useful for certain fancy relativity
* operations through the GM_LAYOUT method.
}
}
GA_RelSpecial = (GA_Dummy + $0027);
GA_TextAttr = GA_Dummy + 40;
{ (struct TextAttr ) Indicate the font to use for the gadget.
New for V42. }
GA_ReadOnly = GA_Dummy + 41;
{ (BOOL) Indicate that the gadget is read-only (non-selectable).
Defaults to FALSE. New for V42. }
GA_Underscore = GA_Dummy + 42;
{ (UBYTE) Underscore/escape character for keyboard shortcuts.
Defaults to '_' . New for V44. }
GA_ActivateKey = GA_Dummy + 43;
{ (STRPTR) Set/Get the gadgets shortcut/activation key(s)
Defaults to NULL. New for V44. }
GA_BackFill = GA_Dummy + 44;
{ (struct Hook ) Backfill pattern hook.
Defaults to NULL. New for V44. }
GA_GadgetHelpText = GA_Dummy + 45;
{ (STRPTR) RESERVERD/PRIVATE DO NOT USE
Defaults to NULL. New for V44. }
GA_UserInput = GA_Dummy + 46;
{ (BOOL) Notification tag indicates this notification is from the activite
gadget receiving user input - an attempt to make IDCMPUPDATE more efficient.
Defaults to FALSE. New for V44. }
{ PROPGCLASS attributes }
PGA_Dummy = (TAG_USER + $31000);
@ -3075,6 +3198,14 @@ CONST
LAYOUTA_LayoutObj = (LAYOUTA_Dummy + $0001);
LAYOUTA_Spacing = (LAYOUTA_Dummy + $0002);
LAYOUTA_Orientation = (LAYOUTA_Dummy + $0003);
LAYOUTA_ChildMaxWidth = LAYOUTA_Dummy + $0004;
{ (BOOL) Child objects are of equal width. Should default to TRUE for
gadgets with a horizontal orientation. New for V42. }
LAYOUTA_ChildMaxHeight = LAYOUTA_Dummy + $0005;
{ (BOOL) Child objects are of equal height. Should default to TRUE for
gadgets with a vertical orientation. New for V42. }
{ orientation values }
LORIENT_NONE = 0;
@ -3233,6 +3364,89 @@ Type
*}
end;
{***************************************************************************}
{ The GM_DOMAIN method is used to obtain the sizing requirements of an
* object for a class before ever creating an object. }
{ GM_DOMAIN }
PgpDomain = ^tgpDomain;
tgpDomain = record
MethodID : ULONG;
gpd_GInfo : PGadgetInfo;
gpd_RPort : PRastPort; { RastPort to layout for }
gpd_Which : LONG;
gpd_Domain : tIBox; { Resulting domain }
gpd_Attrs : PTagItem; { Additional attributes }
end;
const
GDOMAIN_MINIMUM = 0;
{ Minimum size }
GDOMAIN_NOMINAL = 1;
{ Nominal size }
GDOMAIN_MAXIMUM = 2;
{ Maximum size }
{***************************************************************************}
{ The GM_KEYTEST method is used to determin if a key press matches an
* object's activation key(s). }
{ GM_KEYTEST send this message.
}
type
PgpKeyTest = ^tgpKeyTest;
tgpKeyTest = record
MethodID : ULONG;
gpkt_GInfo : PGadgetInfo;
gpkt_IMsg : PIntuiMessage; { The IntuiMessage that triggered this }
gpkt_VanillaKey : ULONG;
end;
{***************************************************************************}
{ The GM_KEYGOACTIVE method is called to "simulate" a gadget going down.
* A gadget should render itself in a selected state when receiving
* this message. If the class supports this method, it must return
* GMR_KEYACTIVE.
*
* If a gadget returns zero for this method, it will subsequently be
* activated via ActivateGadget() with a NULL IEvent.
}
PgpKeyInput = ^tgpKeyInput;
tgpKeyInput = record
MethodID : ULONG; { GM_KEYGOACTIVE }
gpk_GInfo : PGadgetInfo;
gpk_IEvent : PInputEvent;
gpk_Termination : PLONG;
end;
const
GMR_KEYACTIVE = 1 shl 4;
{ you MUST set gpk_Termination }
GMR_KEYVERIFY = 1 shl 5;
{ The GM_KEYGOINACTIVE method is called to simulate the gadget release.
* Upon receiving this message, the gadget should do everything a
* normal gadget release would do.
}
type
PgpKeyGoInactive = ^tgpKeyGoInactive;
tgpKeyGoInactive = record
MethodID : ULONG;
gpki_GInfo : PGadgetInfo;
gpki_Abort : ULONG;
end;
CONST
ICM_Dummy = ($0401); { used for nothing }
@ -3348,6 +3562,34 @@ CONST
* to FRAME_DEFAULT.
}
IA_Underscore = IA_Dummy + $1c;
{ V44, Indicate underscore keyboard shortcut for image labels.
(UBYTE) Defaults to '_'
}
IA_Scalable = IA_Dummy + $1d;
{ V44, Attribute indicates this image is allowed
to/can scale its rendering.
(BOOL) Defaults to FALSE.
}
IA_ActivateKey = IA_Dummy + $1e;
{ V44, Used to get an underscored label shortcut.
Useful for labels attached to string gadgets.
(UBYTE) Defaults to NULL.
}
IA_Screen = IA_Dummy + $1f;
{ V44 Screen pointer, may be useful/required by certain classes.
(struct Screen )
}
IA_Precision = IA_Dummy + $20;
{ V44 Precision value, typically pen precision but may be
used for similar custom purposes.
(ULONG)
}
{* next attribute: (IA_Dummy + $1c) *}
{***********************************************}
@ -3377,6 +3619,22 @@ CONST
MENUCHECK = ($10); { Menu checkmark image }
AMIGAKEY = ($11); { Menu Amiga-key image }
{ Data values for IA_FrameType (recognized by FrameIClass)
*
* FRAME_DEFAULT: The standard V37-type frame, which has
* thin edges.
* FRAME_BUTTON: Standard button gadget frames, having thicker
* sides and nicely edged corners.
* FRAME_RIDGE: A ridge such as used by standard string gadgets.
* You can recess the ridge to get a groove image.
* FRAME_ICONDROPBOX: A broad ridge which is the standard imagery
* for areas in AppWindows where icons may be dropped.
}
FRAME_DEFAULT = 0;
FRAME_BUTTON = 1;
FRAME_RIDGE = 2;
FRAME_ICONDROPBOX = 3;
{ image message id's }
IM_DRAW = $202; { draw yourself, with "state" }
@ -3388,6 +3646,7 @@ CONST
IM_FRAMEBOX = $207; { get recommended frame around some box}
IM_HITFRAME = $208; { hittest with dimensions }
IM_ERASEFRAME= $209; { hittest with dimensions }
IM_DOMAINFRAME = $20A;{ query image for its domain info (V44) }
{ image draw states or styles, for IM_DRAW }
IDS_NORMAL = (0);
@ -3398,6 +3657,7 @@ CONST
IDS_INACTIVENORMAL = (5); { normal, in inactive window border }
IDS_INACTIVESELECTED= (6); { selected, in inactive border }
IDS_INACTIVEDISABLED= (7); { disabled, in inactive border }
IDS_SELECTEDDISABLED = 8; { disabled and selected }
{ oops, please forgive spelling error by jimm }
IDS_INDETERMINANT = IDS_INDETERMINATE;
@ -3476,6 +3736,30 @@ Type
end;
END;
{ The IM_DOMAINFRAME method is used to obtain the sizing
* requirements of an image object within a layout group.
}
{ IM_DOMAINFRAME }
PimpDomainFrame = ^timpDomainFrame;
timpDomainFrame = record
MethodID : ULONG;
imp_DrInfo : PDrawInfo;
imp_RPort : PRastPort;
imp_Which : LONG;
imp_Domain : tIBox;
imp_Attrs : PTagItem;
end;
{ Accepted vales for imp_Which.
}
const
IDOMAIN_MINIMUM = 0;
IDOMAIN_NOMINAL = 1;
IDOMAIN_MAXIMUM = 2;
{ ** 'boopsi' pointer class interface }
const
@ -3785,10 +4069,10 @@ FUNCTION AddGadget(window : pWindow; gadget : pGadget; position : ULONG) : WORD;
FUNCTION AddGList(window : pWindow; gadget : pGadget; position : ULONG; numGad : LONGINT; requester : pRequester) : WORD;
FUNCTION AllocRemember(VAR rememberKey : pRemember; size : ULONG; flags : ULONG) : POINTER;
FUNCTION AllocScreenBuffer(sc : pScreen; bm : pBitMap; flags : ULONG) : pScreenBuffer;
FUNCTION AutoRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
FUNCTION AutoRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
PROCEDURE BeginRefresh(window : pWindow);
FUNCTION BuildEasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmp : ULONG; args : POINTER) : pWindow;
FUNCTION BuildSysRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
FUNCTION BuildEasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmp : ULONG;const args : POINTER) : pWindow;
FUNCTION BuildSysRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
FUNCTION ChangeScreenBuffer(sc : pScreen; sb : pScreenBuffer) : ULONG;
PROCEDURE ChangeWindowBox(window : pWindow; left : LONGINT; top : LONGINT; width : LONGINT; height : LONGINT);
FUNCTION ClearDMRequest(window : pWindow) : BOOLEAN;
@ -3798,15 +4082,15 @@ PROCEDURE CloseScreen(screen : pScreen);
PROCEDURE CloseWindow(window : pWindow);
FUNCTION CloseWorkBench : BOOLEAN;
PROCEDURE CurrentTime(VAR seconds : ULONG; VAR micros : ULONG);
FUNCTION DisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG) : BOOLEAN;
FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG) : BOOLEAN;
PROCEDURE DisplayBeep(screen : pScreen);
PROCEDURE DisposeObject(obj : POINTER);
FUNCTION DoGadgetMethodA(gad : pGadget; win : pWindow; req : pRequester; message : tMsg) : ULONG;
FUNCTION DoubleClick(sSeconds : ULONG; sMicros : ULONG; cSeconds : ULONG; cMicros : ULONG) : BOOLEAN;
PROCEDURE DrawBorder(rp : pRastPort; border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
PROCEDURE DrawBorder(rp : pRastPort;const border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
PROCEDURE DrawImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG; drawInfo : pDrawInfo);
FUNCTION EasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmpPtr : ULONG; args : POINTER) : LONGINT;
PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG;const drawInfo : pDrawInfo);
FUNCTION EasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmpPtr : pULONG;const args : POINTER) : LONGINT;
PROCEDURE EndRefresh(window : pWindow; complete : LONGINT);
PROCEDURE EndRequest(requester : pRequester; window : pWindow);
PROCEDURE EraseImage(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT);
@ -3815,22 +4099,22 @@ PROCEDURE FreeRemember(VAR rememberKey : pRemember; reallyForget : LONGINT);
PROCEDURE FreeScreenBuffer(sc : pScreen; sb : pScreenBuffer);
PROCEDURE FreeScreenDrawInfo(screen : pScreen; drawInfo : pDrawInfo);
PROCEDURE FreeSysRequest(window : pWindow);
PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : POINTER);
FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : POINTER) : ULONG;
PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : pInteger);
FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : pULONG) : ULONG;
PROCEDURE GetDefaultPubScreen(nameBuffer : pCHAR);
FUNCTION GetDefPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
FUNCTION GetPrefs(preferences : pPreferences; size : LONGINT) : pPreferences;
FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG; screen : pScreen) : BOOLEAN;
FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG;const screen : pScreen) : BOOLEAN;
FUNCTION GetScreenDrawInfo(screen : pScreen) : pDrawInfo;
PROCEDURE HelpControl(win : pWindow; flags : ULONG);
PROCEDURE InitRequester(requester : pRequester);
FUNCTION IntuiTextLength(iText : pIntuiText) : LONGINT;
FUNCTION ItemAddress(menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
FUNCTION IntuiTextLength(const iText : pIntuiText) : LONGINT;
FUNCTION ItemAddress(const menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
PROCEDURE LendMenus(fromwindow : pWindow; towindow : pWindow);
FUNCTION LockIBase(dontknow : ULONG) : ULONG;
FUNCTION LockPubScreen(name : pCHAR) : pScreen;
FUNCTION LockPubScreen(const name : pCHAR) : pScreen;
FUNCTION LockPubScreenList : pList;
FUNCTION MakeClass(classID : pCHAR; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : pCHAR;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeScreen(screen : pScreen) : LONGINT;
FUNCTION ModifyIDCMP(window : pWindow; flags : ULONG) : BOOLEAN;
PROCEDURE ModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG);
@ -3838,21 +4122,21 @@ PROCEDURE MoveScreen(screen : pScreen; dx : LONGINT; dy : LONGINT);
PROCEDURE MoveWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
PROCEDURE MoveWindowInFrontOf(window : pWindow; behindWindow : pWindow);
PROCEDURE NewModifyProp(gadget : pGadget; window : pWindow; requester : pRequester; flags : ULONG; horizPot : ULONG; vertPot : ULONG; horizBody : ULONG; vertBody : ULONG; numGad : LONGINT);
FUNCTION NewObjectA(classPtr : pIClass; classID : pCHAR; tagList : pTagItem) : POINTER;
FUNCTION NewObjectA(classPtr : pIClass;const classID : pCHAR;const tagList : pTagItem) : POINTER;
FUNCTION NextObject(objectPtrPtr : POINTER) : POINTER;
FUNCTION NextPubScreen(screen : pScreen; namebuf : pCHAR) : pCHAR;
FUNCTION NextPubScreen(const screen : pScreen; namebuf : pCHAR) : pCHAR;
FUNCTION ObtainGIRPort(gInfo : pGadgetInfo) : pRastPort;
PROCEDURE OffGadget(gadget : pGadget; window : pWindow; requester : pRequester);
PROCEDURE OffMenu(window : pWindow; menuNumber : ULONG);
PROCEDURE OnGadget(gadget : pGadget; window : pWindow; requester : pRequester);
PROCEDURE OnMenu(window : pWindow; menuNumber : ULONG);
FUNCTION OpenScreen(newScreen : pNewScreen) : pScreen;
FUNCTION OpenScreenTagList(newScreen : pNewScreen; tagList : pTagItem) : pScreen;
FUNCTION OpenWindow(newWindow : pNewWindow) : pWindow;
FUNCTION OpenWindowTagList(newWindow : pNewWindow; tagList : pTagItem) : pWindow;
FUNCTION OpenScreen(const newScreen : pNewScreen) : pScreen;
FUNCTION OpenScreenTagList(const newScreen : pNewScreen;const tagList : pTagItem) : pScreen;
FUNCTION OpenWindow(const newWindow : pNewWindow) : pWindow;
FUNCTION OpenWindowTagList(const newWindow : pNewWindow;const tagList : pTagItem) : pWindow;
FUNCTION OpenWorkBench : ULONG;
FUNCTION PointInImage(point : ULONG; image : pImage) : BOOLEAN;
PROCEDURE PrintIText(rp : pRastPort; iText : pIntuiText; left : LONGINT; top : LONGINT);
PROCEDURE PrintIText(rp : pRastPort;const iText : pIntuiText; left : LONGINT; top : LONGINT);
FUNCTION PubScreenStatus(screen : pScreen; statusFlags : ULONG) : WORD;
FUNCTION QueryOverscan(displayID : ULONG; rect : pRectangle; oScanType : LONGINT) : LONGINT;
PROCEDURE RefreshGadgets(gadgets : pGadget; window : pWindow; requester : pRequester);
@ -3872,27 +4156,27 @@ PROCEDURE ScreenPosition(screen : pScreen; flags : ULONG; x1 : LONGINT; y1 : LON
PROCEDURE ScreenToBack(screen : pScreen);
PROCEDURE ScreenToFront(screen : pScreen);
PROCEDURE ScrollWindowRaster(win : pWindow; dx : LONGINT; dy : LONGINT; xMin : LONGINT; yMin : LONGINT; xMax : LONGINT; yMax : LONGINT);
FUNCTION SetAttrsA(obj : POINTER; tagList : pTagItem) : ULONG;
PROCEDURE SetDefaultPubScreen(name : pCHAR);
FUNCTION SetAttrsA(obj : POINTER;const tagList : pTagItem) : ULONG;
PROCEDURE SetDefaultPubScreen(const name : pCHAR);
FUNCTION SetDMRequest(window : pWindow; requester : pRequester) : BOOLEAN;
FUNCTION SetEditHook(hook : pHook) : pHook;
FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester; tagList : pTagItem) : ULONG;
FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester;const tagList : pTagItem) : ULONG;
FUNCTION SetMenuStrip(window : pWindow; menu : pMenu) : BOOLEAN;
FUNCTION SetMouseQueue(window : pWindow; queueLength : ULONG) : LONGINT;
PROCEDURE SetPointer(window : pWindow; pointer_ : POINTER; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
FUNCTION SetPrefs(preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
PROCEDURE SetPointer(window : pWindow; pointer_ : pword; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
FUNCTION SetPrefs(const preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
FUNCTION SetPubScreenModes(modes : ULONG) : WORD;
PROCEDURE SetWindowPointerA(win : pWindow; taglist : pTagItem);
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : pCHAR);
PROCEDURE SetWindowPointerA(win : pWindow;const taglist : pTagItem);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : pCHAR);
PROCEDURE ShowTitle(screen : pScreen; showIt : LONGINT);
PROCEDURE SizeWindow(window : pWindow; dx : LONGINT; dy : LONGINT);
FUNCTION SysReqHandler(window : pWindow; idcmpPtr : ULONG; waitInput : LONGINT) : LONGINT;
FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
FUNCTION SysReqHandler(window : pWindow; idcmpPtr : pULONG; waitInput : LONGINT) : LONGINT;
FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
PROCEDURE UnlockIBase(ibLock : ULONG);
PROCEDURE UnlockPubScreen(name : pCHAR; screen : pScreen);
PROCEDURE UnlockPubScreen(const name : pCHAR; screen : pScreen);
PROCEDURE UnlockPubScreenList;
FUNCTION ViewAddress : pView;
FUNCTION ViewPortAddress(window : pWindow) : pViewPort;
FUNCTION ViewPortAddress(const window : pWindow) : pViewPort;
FUNCTION WBenchToBack : BOOLEAN;
FUNCTION WBenchToFront : BOOLEAN;
FUNCTION WindowLimits(window : pWindow; widthMin : LONGINT; heightMin : LONGINT; widthMax : ULONG; heightMax : ULONG) : BOOLEAN;
@ -3920,18 +4204,18 @@ function ITEMNUM( n : Word): Word;
function MENUNUM( n : Word): Word;
function SUBNUM( n : Word): Word;
FUNCTION DisplayAlert(alertNumber : ULONG; string_ : string; height : ULONG) : BOOLEAN;
FUNCTION LockPubScreen(name : string) : pScreen;
FUNCTION MakeClass(classID : string; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(classID : pCHAR; superClassID : string; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(classID : string; superClassID : string; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION NewObjectA(classPtr : pIClass; classID : string; tagList : pTagItem) : POINTER;
PROCEDURE SetDefaultPubScreen(name : string);
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : string; screenTitle : pCHAR);
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : string);
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : string; screenTitle : string);
FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
PROCEDURE UnlockPubScreen(name : string; screen : pScreen);
FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG) : BOOLEAN;
FUNCTION LockPubScreen(const name : string) : pScreen;
FUNCTION MakeClass(const classID : string;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : pCHAR;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : string;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION NewObjectA(classPtr : pIClass;const classID : string;const tagList : pTagItem) : POINTER;
PROCEDURE SetDefaultPubScreen(const name : string);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : pCHAR);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : string);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : string);
FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
PROCEDURE UnlockPubScreen(const name : string; screen : pScreen);
IMPLEMENTATION
@ -4136,7 +4420,7 @@ BEGIN
END;
END;
FUNCTION AutoRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
FUNCTION AutoRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; pFlag : ULONG; nFlag : ULONG; width : ULONG; height : ULONG) : BOOLEAN;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4169,7 +4453,7 @@ BEGIN
END;
END;
FUNCTION BuildEasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmp : ULONG; args : POINTER) : pWindow;
FUNCTION BuildEasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmp : ULONG;const args : POINTER) : pWindow;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4184,7 +4468,7 @@ BEGIN
END;
END;
FUNCTION BuildSysRequest(window : pWindow; body : pIntuiText; posText : pIntuiText; negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
FUNCTION BuildSysRequest(window : pWindow;const body : pIntuiText;const posText : pIntuiText;const negText : pIntuiText; flags : ULONG; width : ULONG; height : ULONG) : pWindow;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4315,7 +4599,7 @@ BEGIN
END;
END;
FUNCTION DisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG) : BOOLEAN;
FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG) : BOOLEAN;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4387,7 +4671,7 @@ BEGIN
END;
END;
PROCEDURE DrawBorder(rp : pRastPort; border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
PROCEDURE DrawBorder(rp : pRastPort;const border : pBorder; leftOffset : LONGINT; topOffset : LONGINT);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4415,7 +4699,7 @@ BEGIN
END;
END;
PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG; drawInfo : pDrawInfo);
PROCEDURE DrawImageState(rp : pRastPort; image : pImage; leftOffset : LONGINT; topOffset : LONGINT; state : ULONG;const drawInfo : pDrawInfo);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4431,7 +4715,7 @@ BEGIN
END;
END;
FUNCTION EasyRequestArgs(window : pWindow; easyStruct : pEasyStruct; idcmpPtr : ULONG; args : POINTER) : LONGINT;
FUNCTION EasyRequestArgs(window : pWindow;const easyStruct : pEasyStruct; idcmpPtr : pULONG;const args : POINTER) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4546,7 +4830,7 @@ BEGIN
END;
END;
PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : POINTER);
PROCEDURE GadgetMouse(gadget : pGadget; gInfo : pGadgetInfo; mousePoint : pInteger);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4559,7 +4843,7 @@ BEGIN
END;
END;
FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : POINTER) : ULONG;
FUNCTION GetAttr(attrID : ULONG; obj : POINTER; storagePtr : pULONG) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4610,7 +4894,7 @@ BEGIN
END;
END;
FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG; screen : pScreen) : BOOLEAN;
FUNCTION GetScreenData(buffer : POINTER; size : ULONG; type_ : ULONG;const screen : pScreen) : BOOLEAN;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4663,7 +4947,7 @@ BEGIN
END;
END;
FUNCTION IntuiTextLength(iText : pIntuiText) : LONGINT;
FUNCTION IntuiTextLength(const iText : pIntuiText) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4675,7 +4959,7 @@ BEGIN
END;
END;
FUNCTION ItemAddress(menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
FUNCTION ItemAddress(const menuStrip : pMenu; menuNumber : ULONG) : pMenuItem;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4712,7 +4996,7 @@ BEGIN
END;
END;
FUNCTION LockPubScreen(name : pCHAR) : pScreen;
FUNCTION LockPubScreen(const name : pCHAR) : pScreen;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4735,7 +5019,7 @@ BEGIN
END;
END;
FUNCTION MakeClass(classID : pCHAR; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : pCHAR;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4854,7 +5138,7 @@ BEGIN
END;
END;
FUNCTION NewObjectA(classPtr : pIClass; classID : pCHAR; tagList : pTagItem) : POINTER;
FUNCTION NewObjectA(classPtr : pIClass;const classID : pCHAR;const tagList : pTagItem) : POINTER;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4880,7 +5164,7 @@ BEGIN
END;
END;
FUNCTION NextPubScreen(screen : pScreen; namebuf : pCHAR) : pCHAR;
FUNCTION NextPubScreen(const screen : pScreen; namebuf : pCHAR) : pCHAR;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4955,7 +5239,7 @@ BEGIN
END;
END;
FUNCTION OpenScreen(newScreen : pNewScreen) : pScreen;
FUNCTION OpenScreen(const newScreen : pNewScreen) : pScreen;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4967,7 +5251,7 @@ BEGIN
END;
END;
FUNCTION OpenScreenTagList(newScreen : pNewScreen; tagList : pTagItem) : pScreen;
FUNCTION OpenScreenTagList(const newScreen : pNewScreen;const tagList : pTagItem) : pScreen;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4980,7 +5264,7 @@ BEGIN
END;
END;
FUNCTION OpenWindow(newWindow : pNewWindow) : pWindow;
FUNCTION OpenWindow(const newWindow : pNewWindow) : pWindow;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -4992,7 +5276,7 @@ BEGIN
END;
END;
FUNCTION OpenWindowTagList(newWindow : pNewWindow; tagList : pTagItem) : pWindow;
FUNCTION OpenWindowTagList(const newWindow : pNewWindow;const tagList : pTagItem) : pWindow;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5032,7 +5316,7 @@ BEGIN
END;
END;
PROCEDURE PrintIText(rp : pRastPort; iText : pIntuiText; left : LONGINT; top : LONGINT);
PROCEDURE PrintIText(rp : pRastPort;const iText : pIntuiText; left : LONGINT; top : LONGINT);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5294,7 +5578,7 @@ BEGIN
END;
END;
FUNCTION SetAttrsA(obj : POINTER; tagList : pTagItem) : ULONG;
FUNCTION SetAttrsA(obj : POINTER;const tagList : pTagItem) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5307,7 +5591,7 @@ BEGIN
END;
END;
PROCEDURE SetDefaultPubScreen(name : pCHAR);
PROCEDURE SetDefaultPubScreen(const name : pCHAR);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5346,7 +5630,7 @@ BEGIN
END;
END;
FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester; tagList : pTagItem) : ULONG;
FUNCTION SetGadgetAttrsA(gadget : pGadget; window : pWindow; requester : pRequester;const tagList : pTagItem) : ULONG;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5390,7 +5674,7 @@ BEGIN
END;
END;
PROCEDURE SetPointer(window : pWindow; pointer_ : POINTER; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
PROCEDURE SetPointer(window : pWindow; pointer_ : pword; height : LONGINT; width : LONGINT; xOffset : LONGINT; yOffset : LONGINT);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5406,7 +5690,7 @@ BEGIN
END;
END;
FUNCTION SetPrefs(preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
FUNCTION SetPrefs(const preferences : pPreferences; size : LONGINT; inform : LONGINT) : pPreferences;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5432,7 +5716,7 @@ BEGIN
END;
END;
PROCEDURE SetWindowPointerA(win : pWindow; taglist : pTagItem);
PROCEDURE SetWindowPointerA(win : pWindow;const taglist : pTagItem);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5444,7 +5728,7 @@ BEGIN
END;
END;
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : pCHAR);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : pCHAR);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5482,7 +5766,7 @@ BEGIN
END;
END;
FUNCTION SysReqHandler(window : pWindow; idcmpPtr : ULONG; waitInput : LONGINT) : LONGINT;
FUNCTION SysReqHandler(window : pWindow; idcmpPtr : pULONG; waitInput : LONGINT) : LONGINT;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5496,7 +5780,7 @@ BEGIN
END;
END;
FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : pCHAR; height : ULONG; time : ULONG) : BOOLEAN;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5525,7 +5809,7 @@ BEGIN
END;
END;
PROCEDURE UnlockPubScreen(name : pCHAR; screen : pScreen);
PROCEDURE UnlockPubScreen(const name : pCHAR; screen : pScreen);
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5558,7 +5842,7 @@ BEGIN
END;
END;
FUNCTION ViewPortAddress(window : pWindow) : pViewPort;
FUNCTION ViewPortAddress(const window : pWindow) : pViewPort;
BEGIN
ASM
MOVE.L A6,-(A7)
@ -5651,62 +5935,62 @@ BEGIN
END;
FUNCTION DisplayAlert(alertNumber : ULONG; string_ : string; height : ULONG) : BOOLEAN;
FUNCTION DisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG) : BOOLEAN;
begin
DisplayAlert := DisplayAlert(alertNumber,pas2c(string_),height);
end;
FUNCTION LockPubScreen(name : string) : pScreen;
FUNCTION LockPubScreen(const name : string) : pScreen;
begin
LockPubScreen := LockPubScreen(pas2c(name));
end;
FUNCTION MakeClass(classID : string; superClassID : pCHAR; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : string;const superClassID : pCHAR;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
begin
MakeClass := MakeClass(pas2c(classID),superClassID,superClassPtr,instanceSize,flags);
end;
FUNCTION MakeClass(classID : pCHAR; superClassID : string; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : pCHAR;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
begin
MakeClass := MakeClass(classID,pas2c(superClassID),superClassPtr,instanceSize,flags);
end;
FUNCTION MakeClass(classID : string; superClassID : string; superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
FUNCTION MakeClass(const classID : string;const superClassID : string;const superClassPtr : pIClass; instanceSize : ULONG; flags : ULONG) : pIClass;
begin
MakeClass := MakeClass(pas2c(classID),pas2c(superClassID),superClassPtr,instanceSize,flags);
end;
FUNCTION NewObjectA(classPtr : pIClass; classID : string; tagList : pTagItem) : POINTER;
FUNCTION NewObjectA(classPtr : pIClass;const classID : string;const tagList : pTagItem) : POINTER;
begin
NewObjectA := NewObjectA(classPtr,pas2c(classID),taglist);
end;
PROCEDURE SetDefaultPubScreen(name : string);
PROCEDURE SetDefaultPubScreen(const name : string);
begin
SetDefaultPubScreen(pas2c(name));
end;
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : string; screenTitle : pCHAR);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : pCHAR);
begin
SetWindowTitles(window,pas2c(windowTitle),screenTitle);
end;
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : pCHAR; screenTitle : string);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : pCHAR;const screenTitle : string);
begin
SetWindowTitles(window,windowTitle,pas2c(screenTitle));
end;
PROCEDURE SetWindowTitles(window : pWindow; windowTitle : string; screenTitle : string);
PROCEDURE SetWindowTitles(window : pWindow;const windowTitle : string;const screenTitle : string);
begin
SetWindowTitles(window,pas2c(windowTitle),pas2c(screenTitle));
end;
FUNCTION TimedDisplayAlert(alertNumber : ULONG; string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
FUNCTION TimedDisplayAlert(alertNumber : ULONG;const string_ : string; height : ULONG; time : ULONG) : BOOLEAN;
begin
TimedDisplayAlert := TimedDisplayAlert(alertNumber,pas2c(string_),height,time);
end;
PROCEDURE UnlockPubScreen(name : string; screen : pScreen);
PROCEDURE UnlockPubScreen(const name : string; screen : pScreen);
begin
UnlockPubScreen(pas2c(name),screen);
end;
@ -5716,7 +6000,10 @@ END. (* UNIT INTUITION *)
{
$Log$
Revision 1.3 2003-01-13 20:34:19 nils
Revision 1.4 2003-02-07 20:45:08 nils
* update for amigaos 3.9
Revision 1.3 2003/01/13 20:34:19 nils
* added the define use_amiga_smartlink
Revision 1.2 2002/11/19 18:47:42 nils

View File

@ -13,13 +13,50 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{
History:
Update for AmigaOS 3.9.
Added some const and a few records.
Added reaction and workbench.
31 Jan 2003.
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
unit prefs;
INTERFACE
uses exec, iffparse, graphics, timer, intuition;
{ Asl }
const
ID_ASL = $41534C20;
{ These members correspond directly to the associated
members of the 'AslSemaphore' data structure defined
in the <libraries/asl.h> header file by the same names.
}
type
PAslPrefs = ^tAslPrefs;
tAslPrefs = record
ap_Reserved : array[0..3] of LONG;
ap_SortBy : UBYTE;
ap_SortDrawers : UBYTE;
ap_SortOrder : UBYTE;
ap_SizePosition : UBYTE;
ap_RelativeLeft : WORD;
ap_RelativeTop : WORD;
ap_RelativeWidth : UBYTE;
ap_RelativeHeight : UBYTE;
end;
{ Font }
{***************************************************************************}
@ -77,13 +114,14 @@ const
ICB_STRGAD_FILTER = 2;
ICB_MENUSNAP = 3;
ICB_MODEPROMOTE = 4;
ICB_SQUARE_RATIO = 5;
ICF_COERCE_COLORS = 1;
ICF_COERCE_LACE = 2;
ICF_STRGAD_FILTER = 4;
ICF_MENUSNAP = 8;
ICF_MODEPROMOTE = 16;
ICF_SQUARE_RATIO = (1 shl 5);
{***************************************************************************}
@ -485,10 +523,11 @@ const
const
ID_PTXT = 1347704916;
ID_PUNT = 1347767892;
ID_PDEV = $50444556;
DRIVERNAMESIZE = 30; { Filename size }
DEVICENAMESIZE = 32; { .device name size }
UNITNAMESIZE = 32;
Type
pPrinterTxtPrefs = ^tPrinterTxtPrefs;
@ -546,6 +585,11 @@ const
PQ_DRAFT = 0;
PQ_LETTER = 1;
{ PrinterUnitPrefs is used from printer.device to open
the connection device
}
Type
pPrinterUnitPrefs = ^tPrinterUnitPrefs;
tPrinterUnitPrefs = record
@ -555,6 +599,43 @@ Type
pu_DeviceName : Array[0..DEVICENAMESIZE-1] of Char; { Name for OpenDevice() }
end;
{ PrinterDeviceUnitPrefs is used as descriptor for printer device
units.
}
PPrinterDeviceUnitPrefs = ^tPrinterDeviceUnitPrefs;
tPrinterDeviceUnitPrefs = record
pd_Reserved : array[0..3] of LONG; { System reserved }
pd_UnitNum : LONG; { Unit number for OpenDevice() }
pd_UnitName : array[0..(UNITNAMESIZE)-1] of UBYTE; { Symbolic name of the unit }
end;
{ Reaction }
const
ID_RACT = $52414354;
type
PReactionPrefs = ^tReactionPrefs;
tReactionPrefs = record
rp_BevelType : UWORD;
rp_GlyphType : UWORD;
rp_LayoutSpacing : UWORD;
rp_3DProp : BOOL;
rp_LabelPen : UWORD;
rp_LabelPlace : UWORD;
rp_3DLabel : BOOL;
rp_SimpleRefresh : BOOL;
rp_3DLook : BOOL;
rp_FallbackAttr : tTextAttr;
rp_LabelAttr : tTextAttr;
rp_FallbackName : array[0..(FONTNAMESIZE)-1] of UBYTE;
rp_LabelName : array[0..(FONTNAMESIZE)-1] of UBYTE;
rp_Pattern : array[0..255] of UBYTE;
end;
{ File format for screen mode preferences }
const
@ -666,6 +747,27 @@ const
WBPF_NOREMAP = $0010;
{ Don't remap the pattern }
{ PDTA_DitherQuality: see pictureclass.h }
WBPF_DITHER_MASK = $0300;
{ DitherQuality: Default }
WBPF_DITHER_DEF = $0000;
{ DitherQuality: 0 }
WBPF_DITHER_BAD = $0100;
{ DitherQuality: 2 }
WBPF_DITHER_GOOD = $0200;
{ DitherQuality: 4 }
WBPF_DITHER_BEST = $0300;
{ OBP_Precision: see pictureclass.h }
WBPF_PRECISION_MASK = $0C00;
WBPF_PRECISION_DEF = $0000;
WBPF_PRECISION_ICON = $0400;
WBPF_PRECISION_IMAGE = $0800;
WBPF_PRECISION_EXACT = $0C00;
WBPF_PLACEMENT_MASK = $3000;
WBPF_PLACEMENT_TILE = $0000;
WBPF_PLACEMENT_CENTER = $1000;
WBPF_PLACEMENT_SCALE = $2000;
WBPF_PLACEMENT_SCALEGOOD = $3000;
{***************************************************************************}
@ -676,18 +778,53 @@ const
PAT_WIDTH = 16;
PAT_HEIGHT = 16;
{ Workbench }
ID_WBNC = $57424E43;
type
PWorkbenchPrefs = ^tWorkbenchPrefs;
tWorkbenchPrefs = record
{ settings from workbench.library }
wbp_DefaultStackSize : ULONG;
wbp_TypeRestartTime : ULONG;
{ settings from icon.library }
wbp_IconPrecision : ULONG;
wbp_EmbossRect : tRectangle;
wbp_Borderless : BOOL;
wbp_MaxNameLength : LONG;
wbp_NewIconsSupport : BOOL;
wbp_ColorIconSupport : BOOL;
{ new for V45 }
wbp_ImageMemType : ULONG;
wbp_LockPens : BOOL;
wbp_NoTitleBar : BOOL;
wbp_NoGauge : BOOL;
end;
PWorkbenchHiddenDevicePrefs = ^tWorkbenchHiddenDevicePrefs;
tWorkbenchHiddenDevicePrefs = record
whdp_Name : array[0..0] of UBYTE; { C String including NULL char }
end;
const
ID_WBHD = $57424844;
IMPLEMENTATION
END.
{
$Log$
Revision 1.2 2002-11-19 18:48:39 nils
Revision 1.3 2003-02-07 20:45:08 nils
* update for amigaos 3.9
Revision 1.2 2002/11/19 18:48:39 nils
* missing semicolon
}

View File

@ -2,7 +2,7 @@
This file is part of the Free Pascal run time library.
A file in Amiga system run time library.
Copyright (c) 1998 by Nils Sjoholm
Copyright (c) 1998-2003 by Nils Sjoholm
member of the Amiga RTL development team.
See the file COPYING.FPC, included in this distribution,
@ -14,6 +14,17 @@
**********************************************************************}
{
History:
Update for AmigaOS 3.0.
Some const and records added and changes
was made to a few records.
31 Jan 2003.
nils.sjoholm@mailbox.swipnet.se Nils Sjoholm
}
{
printer device data definition
}
@ -22,7 +33,7 @@ unit prtbase;
INTERFACE
uses exec, parallel, serial, amigados, intuition, timer;
uses exec, parallel, serial, amigados, intuition, timer,utility;
Type
@ -38,11 +49,48 @@ Type
end;
Const
IOB_QUEUED = 4;
IOB_CURRENT = 5;
IOB_SERVICING = 6;
IOB_DONE = 7;
IOF_QUEUED = 1 shl IOB_QUEUED;
IOF_CURRENT = 1 shl IOB_CURRENT;
IOF_SERVICING = 1 shl IOB_SERVICING;
IOF_DONE = 1 shl IOB_DONE;
{ pd_Flags }
PB_IOR0 = 0;
PB_IOR1 = 1;
PB_IOOPENED = 2;
PB_EXPUNGED = 7;
PBF_IOR0 = 1 shl PB_IOR0;
PBF_IOR1 = 1 shl PB_IOR1;
PBF_IOOPENDED = 1 shl PB_IOOPENED;
PBF_EXPUNGED = 1 shl PB_EXPUNGED;
{ du_Flags (actually placed in pd_Unit.mp_Node.ln_Pri) }
DUB_STOPPED = 0;
DUF_STOPPED = 1 shl DUB_STOPPED;
P_OLDSTKSIZE = $0800; { stack size for child task }
P_STKSIZE = $1000;
P_BUFSIZE = 256; { size of internal buffers for text i/o }
P_SAFESIZE = 128; { safety margin for text output buffer }
P_OLDSTKSIZE = $0800; { stack size for child task }
P_STKSIZE = $1000;
P_BUFSIZE = 256; { size of internal buffers for text i/o }
P_SAFESIZE = 128; { safety margin for text output buffer }
{**************************************************************************}
{
"struct PrinterData" was a very bad concept in the old V1.0 days
because it is both: the device and the unit.
Starting with V44 PrinterData may be duplicated for many Units. But all
new fields that are specific to the Unit are now part of the new
"struct PrinterUnit". Don't touch the private fields!
A note on the function pointers in these data structure definitions:
unless otherwise specified, all functions expect that their parameters
are passed on the *stack* rather than in CPU registers. Every parameter
must be passed a 32 bit long word, i.e. an "UWORD" will use the same
stack space as an "ULONG".
}
Type
pPrinterData = ^tPrinterData;
@ -91,6 +139,22 @@ Const
PPC_COLORALPHA = 2; { color alphanumerics }
PPC_COLORGFX = 3; { color graphics }
{ extended PED structure (V44) }
PPCB_EXTENDED = 2;
PPCF_EXTENDED = $4;
{
Some printer drivers (PrinterPS) do not support
strip printing. An application has to print a page
using a single print request or through clever use
of the PRD_DUMPRPORTTAGS printing callback hook.
}
{ no strip printing, please }
PPCB_NOSTRIP = 3;
PPCF_NOSTRIP = $8;
{ Color Class }
PCC_BW = 1; { black&white only }
@ -118,24 +182,24 @@ Type
pPrinterExtendedData = ^tPrinterExtendedData;
tPrinterExtendedData = record
ped_PrinterName : STRPTR; { printer name, null terminated }
ped_Init : Pointer; { called after LoadSeg }
ped_Expunge : Pointer; { called before UnLoadSeg }
ped_Open : Pointer; { called at OpenDevice }
ped_Close : Pointer; { called at CloseDevice }
ped_PrinterClass : Byte; { printer class }
ped_ColorClass : Byte; { color class }
ped_MaxColumns : Byte; { number of print columns available }
ped_NumCharSets : Byte; { number of character sets }
ped_NumRows : Word; { number of 'pins' in print head }
ped_MaxXDots : ULONG; { number of dots max in a raster dump }
ped_MaxYDots : ULONG; { number of dots max in a raster dump }
ped_XDotsInch : Word; { horizontal dot density }
ped_YDotsInch : Word; { vertical dot density }
ped_Commands : Pointer; { printer text command table }
ped_DoSpecial : Pointer; { special command handler }
ped_Render : Pointer; { raster render function }
ped_TimeoutSecs : Longint; { good write timeout }
ped_PrinterName : STRPTR; { printer name, null terminated }
ped_Init : procedure; { called after LoadSeg }
ped_Expunge : procedure; { called before UnLoadSeg }
ped_Open : function:LONG; { called at OpenDevice }
ped_Close : procedure; { called at CloseDevice }
ped_PrinterClass : uByte; { printer class }
ped_ColorClass : uByte; { color class }
ped_MaxColumns : uByte; { number of print columns available }
ped_NumCharSets : uByte; { number of character sets }
ped_NumRows : uWord; { number of 'pins' in print head }
ped_MaxXDots : ULONG; { number of dots max in a raster dump }
ped_MaxYDots : ULONG; { number of dots max in a raster dump }
ped_XDotsInch : uWord; { horizontal dot density }
ped_YDotsInch : uWord; { vertical dot density }
ped_Commands : Pointer; { printer text command table }
ped_DoSpecial : function:LONG; { special command handler }
ped_Render : function:LONG; { raster render function }
ped_TimeoutSecs : Longint; { good write timeout }
{ the following only exists if the segment version is >= 33 }
@ -146,9 +210,73 @@ Type
{ ptr to conversion function for all chars }
ped_ConvFunc : Pointer;
{*************************************************************
*
* The following only exists if the segment version is >= 44
* AND PPCB_EXTENDED is set in ped_PrinterClass:
*
************************************************************}
{ Attributes and features }
ped_TagList : PTagItem;
{ driver specific preferences:
*
* LONG ped_DoPreferences(struct printerIO * ior,
* LONG command);
}
ped_DoPreferences : function :LONG;
{ custom error handling:
*
* VOID ped_CallErrHook(struct printerIO * ior,
* struct Hook * hook);
}
ped_CallErrHook : procedure ;
end;
{ The following tags are used to define more printer driver features }
const
PRTA_Dummy = TAG_USER + $50000;
{ }
{ V44 features }
{ LBOOL }
PRTA_8BitGuns = PRTA_Dummy + 1;
{ LBOOL }
PRTA_ConvertSource = PRTA_Dummy + 2;
{ LBOOL }
PRTA_FloydDithering = PRTA_Dummy + 3;
{ LBOOL }
PRTA_AntiAlias = PRTA_Dummy + 4;
{ LBOOL }
PRTA_ColorCorrection = PRTA_Dummy + 5;
{ LBOOL }
PRTA_NoIO = PRTA_Dummy + 6;
{ LBOOL }
PRTA_NewColor = PRTA_Dummy + 7;
{ LONG }
PRTA_ColorSize = PRTA_Dummy + 8;
{ LBOOL }
PRTA_NoScaling = PRTA_Dummy + 9;
{ User interface }
{ STRPTR }
PRTA_DitherNames = PRTA_Dummy + 20;
{ STRPTR }
PRTA_ShadingNames = PRTA_Dummy + 21;
{ LBOOL }
PRTA_ColorCorrect = PRTA_Dummy + 22;
{ STRPTR }
PRTA_DensityInfo = PRTA_Dummy + 23;
{ Hardware page borders }
{ LONG, inches/1000 }
PRTA_LeftBorder = PRTA_Dummy + 30;
{ LONG, inches/1000 }
PRTA_TopBorder = PRTA_Dummy + 31;
{ LBOOL }
PRTA_MixBWColor = PRTA_Dummy + 32;
{ Driver Preferences }
{ LBOOL }
PRTA_Preferences = PRTA_Dummy + 40;
type
pPrinterSegment = ^tprinterSegment;
tPrinterSegment = record
ps_NextSegment : ULONG; { (actually a BPTR) }
@ -158,6 +286,25 @@ Type
ps_PED : tPrinterExtendedData; { printer extended data }
end;
{**************************************************************************}
{
Driver specific preferences. This structure is device specific: every
driver must base its preferences structure on this to allow version
checking etc.
The application will read/write this structure as an I/O buffer.
}
PPrtDriverPreferences = ^tPrtDriverPreferences;
tPrtDriverPreferences = record
pdp_Version : UWORD; { PRIVATE! driver specific version }
{ PRIVATE! driver specific id }
pdp_PrinterID : array[0..31] of UBYTE;
pdp_PrefName : array[0..(FILENAME_SIZE - 16)-1] of char;
{ size of this structure }
pdp_Length : ULONG;
end;
IMPLEMENTATION
end.

View File

@ -14,11 +14,20 @@
**********************************************************************}
{
History:
Update for AmigaOS 3.9.
31 Jan 2003.
nils.sjoholm@mailbox.swipnet.se
}
unit prtgfx;
INTERFACE
uses exec;
uses exec,utility;
Const
PCMYELLOW = 0; { byte index for yellow }
@ -31,6 +40,7 @@ Const
PCMWHITE = PCMBLACK; { byte index for white }
Type
PUWORD = ^UWORD;
pColorEntry = ^tColorEntry;
tcolorEntry = record
@ -82,6 +92,11 @@ Type
pi_threshold : Word; { threshold value (from prefs) }
pi_tempwidth : Word; { PRIVATE - DO NOT USE! }
pi_flags : Word; { PRIVATE - DO NOT USE! }
{ V44 additions }
pi_ReduceBuf : PUWORD; { PRIVATE - DO NOT USE! }
pi_ReduceBufSize : UWORD; { PRIVATE - DO NOT USE! }
pi_SourceHook : PHook; { PRIVATE - DO NOT USE! }
pi_InvertHookBuf : PULONG; { RESERVED - DO NOT USE! }
end;
IMPLEMENTATION

View File

@ -2,7 +2,7 @@
This file is part of the Free Pascal run time library.
A file in Amiga system run time library.
Copyright (c) 1998 by Nils Sjoholm
Copyright (c) 1998-2003 by Nils Sjoholm
member of the Amiga RTL development team.
See the file COPYING.FPC, included in this distribution,
@ -13,7 +13,16 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
**********************************************************************}
{
History:
Update for AmigaOS 3.9.
Added const.
31 Jan 2003.
nils.sjoholm@mailbox.swipnet.se
}
{
SCSI exec-level device command
}
@ -64,6 +73,19 @@ uses exec;
* iddisk.device) for the second controller board, instead of
* implementing the 100's digit.
*
*
* With the advent of wide SCSI the scheme above fails miserably.
* A new scheme was adopted by Phase V, who appear to be the only
* source of wide SCSI for the Amiga at this time. Thus their
* numbering system kludge is adopted here. When the ID or LUN is
* above 7 the new numbering scheme is used.
*
* Unit =
* Board * 10 * 1000 * 1000 +
* LUN * 10 * 1000 +
* ID * 10 +
* HD_WIDESCSI;
*
* There are optional restrictions on the alignment, bus
* accessability, and size of the data for the data phase.
* Be conservative to work with all manufacturer's controllers.
@ -71,7 +93,7 @@ uses exec;
*------------------------------------------------------------------}
Const
HD_WIDESCSI = 8;
HD_SCSICMD = 28; { issue a SCSI command to the unit }
{ io_Data points to a SCSICmd }
{ io_Length is sizeof(struct SCSICmd) }

View File

@ -25,6 +25,10 @@
Added the define use_amiga_smartlink.
13 Jan 2003.
Update for AmigaOS 3.9.
Added a few overlays.
06 Feb 2003.
nils.sjoholm@mailbox.swipnet.se
}
@ -336,74 +340,60 @@ Type
ub_Reserved : Byte;
END;
function AddNamedObject(nameSpace,
obj : pNamedObject) : Boolean;
function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean;
function AllocateTagItems(num : ULONG) : pTagItem;
function AllocNamedObjectA(name : STRPTR;
TagList : pTagItem) : pNamedObject;
procedure Amiga2Date(amigatime : ULONG;
resultat : pClockData);
procedure ApplyTagChanges(TagList,
ChangeList : pTagItem);
function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject;
procedure Amiga2Date(amigatime : ULONG;resultat : pClockData);
procedure ApplyTagChanges(TagList : pTagItem; const ChangeList : pTagItem);
function AttemptRemNamedObject(obj : pNamedObject) : LongInt;
function CallHookPkt(h : pHook;
obj, paramPkt : APTR) : ULONG;
function CheckDate(date : pClockData) : ULONG;
function CloneTagItems(tagList : pTagItem) : pTagItem;
function Date2Amiga(date : pClockData) : ULONG;
procedure FilterTagChanges(changelist, oldvalues : pTagItem;
apply : ULONG);
function FilterTagItems(taglist : pTagItem ;
tagArray : Pointer;
logic : ULONG) : ULONG;
function FindNamedObject(nameSpace : pNamedObject;
name : STRPTR;
lastobject: pNamedObject) : pNamedObject;
function FindTagItem(TagVal : Tag;
TagList : pTagItem) : pTagItem;
function CallHookPkt(h : pHook;obj, paramPkt : APTR) : ULONG;
function CheckDate(const date : pClockData) : ULONG;
function CloneTagItems(const tagList : pTagItem) : pTagItem;
function Date2Amiga(const date : pClockData) : ULONG;
procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG);
function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG;
function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject;
function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem;
procedure FreeNamedObject(Obj : pNamedObject);
procedure FreeTagItems(TagList : pTagItem);
function GetTagData(tagval : Tag;
default : ULONG;
TagList : pTagItem) : ULONG;
function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG;
function GetUniqueID : ULONG;
procedure MapTags(TagList : pTagItem;
maplist : pTagItem;
IncludeMiss : ULONG);
procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG);
function NamedObjectName(Obj : pNamedObject) : STRPTR;
function NextTagItem(Item : ppTagItem) : pTagItem;
function PackBoolTags(InitialFlags : ULONG;
TagList, boolmap : pTagItem) : ULONG;
function PackStructureTags(packk: APTR;
packTable : Pointer;
TagList : pTagItem) : ULONG;
procedure RefreshTagItemClones(cloneTagItems,
OriginalTagItems : pTagItem);
function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG;
function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG;
procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem);
procedure ReleaseNamedObject(Obj : pNamedObject);
procedure RemNamedObject(Obj : pNamedObject;
Msg : pointer);
procedure RemNamedObject(Obj : pNamedObject;Msg : pointer);
function SDivMod32( dividend , divisor : LongInt) : LongInt;
function SMult32(Arg1, Arg2 : LongInt) : LongInt;
function SMult64(Arg1, Arg2 : LongInt) : LongInt;
function Stricmp(Str1, Str2 : STRPTR) : LongInt;
function Strnicmp(Str1, Str2 : STRPTR;
len : LongInt) : LongInt;
function TagInArray(t : Tag;
TagArray : Pointer) : Boolean;
function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt;
function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt;
function TagInArray(t : Tag;const TagArray : pULONG) : Boolean;
function ToLower(c : ULONG) : Char;
function ToUpper(c : ULONG) : Char;
function UDivMod32( dividend , divisor : ULONG) : ULONG;
function UMult32(Arg1, Arg2 : ULONG) : ULONG;
function UMult64(Arg1, Arg2 : ULONG) : ULONG;
function UnpackStructureTags(pac: APTR;
packTable: Pointer;
TagList : pTagItem) : ULONG;
function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG;
function AllocNamedObjectA(const name : string;const TagList : pTagItem) : pNamedObject;
FUNCTION FindNamedObject(nameSpace : pNamedObject; CONST name : string; lastObject : pNamedObject) : pNamedObject;
FUNCTION Stricmp(CONST string1 : string; CONST string2 : pCHAR) : LONGINT;
FUNCTION Stricmp(CONST string1 : pCHAR; CONST string2 : string) : LONGINT;
FUNCTION Stricmp(CONST string1 : string; CONST string2 : string) : LONGINT;
FUNCTION Strnicmp(CONST string1 : string; CONST string2 : pCHAR; length : LONGINT) : LONGINT;
FUNCTION Strnicmp(CONST string1 : pCHAR; CONST string2 : string; length : LONGINT) : LONGINT;
FUNCTION Strnicmp(CONST string1 : string; CONST string2 : string; length : LONGINT) : LONGINT;
IMPLEMENTATION
function AddNamedObject(nameSpace,
obj : pNamedObject) : Boolean;
uses pastoc;
function AddNamedObject(nameSpace,obj : pNamedObject) : Boolean;
begin
asm
MOVE.L A6,-(A7)
@ -434,8 +424,7 @@ begin
end;
end;
function AllocNamedObjectA(name : STRPTR;
TagList : pTagItem) : pNamedObject;
function AllocNamedObjectA(const name : STRPTR;const TagList : pTagItem) : pNamedObject;
begin
asm
MOVE.L A6,-(A7)
@ -448,8 +437,7 @@ begin
end;
end;
procedure Amiga2Date(amigatime : ULONG;
resultat : pClockData);
procedure Amiga2Date(amigatime : ULONG;resultat : pClockData);
begin
asm
MOVE.L A6,-(A7)
@ -461,8 +449,7 @@ begin
end;
end;
procedure ApplyTagChanges(TagList,
ChangeList : pTagItem);
procedure ApplyTagChanges(TagList : pTagItem;const ChangeList : pTagItem);
begin
asm
MOVE.L A6,-(A7)
@ -486,8 +473,7 @@ begin
end;
end;
function CallHookPkt(h : pHook;
obj, paramPkt : APTR) : ULONG;
function CallHookPkt(h : pHook;obj, paramPkt : APTR) : ULONG;
begin
asm
MOVEM.L a2/a6,-(A7)
@ -501,7 +487,7 @@ begin
end;
end;
function CheckDate(date : pClockData) : ULONG;
function CheckDate(const date : pClockData) : ULONG;
begin
asm
MOVE.L A6,-(A7)
@ -513,7 +499,7 @@ begin
end;
end;
function CloneTagItems(tagList : pTagItem) : pTagItem;
function CloneTagItems(const tagList : pTagItem) : pTagItem;
begin
asm
MOVE.L A6,-(A7)
@ -525,7 +511,7 @@ begin
end;
end;
function Date2Amiga(date : pClockData) : ULONG;
function Date2Amiga(const date : pClockData) : ULONG;
begin
asm
MOVE.L A6,-(A7)
@ -537,8 +523,7 @@ begin
end;
end;
procedure FilterTagChanges(changelist, oldvalues : pTagItem;
apply : ULONG);
procedure FilterTagChanges(changelist, oldvalues : pTagItem;apply : ULONG);
begin
asm
MOVE.L A6,-(A7)
@ -551,9 +536,7 @@ begin
end;
end;
function FilterTagItems(taglist : pTagItem ;
tagArray : Pointer;
logic : ULONG) : ULONG;
function FilterTagItems(taglist : pTagItem ;const tagArray : pULONG;logic : ULONG) : ULONG;
begin
asm
MOVE.L A6,-(A7)
@ -567,9 +550,7 @@ begin
end;
end;
function FindNamedObject(nameSpace : pNamedObject;
name : STRPTR;
lastobject: pNamedObject) : pNamedObject;
function FindNamedObject(nameSpace : pNamedObject;const name : STRPTR;lastobject: pNamedObject) : pNamedObject;
begin
asm
MOVEM.L a2/a6,-(A7)
@ -583,8 +564,7 @@ begin
end;
end;
function FindTagItem(TagVal : Tag;
TagList : pTagItem) : pTagItem;
function FindTagItem(TagVal : Tag;const TagList : pTagItem) : pTagItem;
begin
asm
MOVE.L A6,-(A7)
@ -619,9 +599,7 @@ begin
end;
end;
function GetTagData(tagval : Tag;
default : ULONG;
TagList : pTagItem) : ULONG;
function GetTagData(tagval : Tag;default : ULONG;const TagList : pTagItem) : ULONG;
begin
asm
MOVE.L A6,-(A7)
@ -646,9 +624,7 @@ begin
end;
end;
procedure MapTags(TagList : pTagItem;
maplist : pTagItem;
IncludeMiss : ULONG);
procedure MapTags(TagList : pTagItem;const maplist : pTagItem;IncludeMiss : ULONG);
begin
asm
MOVE.L A6,-(A7)
@ -685,8 +661,7 @@ begin
end;
end;
function PackBoolTags(InitialFlags : ULONG;
TagList, boolmap : pTagItem) : ULONG;
function PackBoolTags(InitialFlags : ULONG;const TagList, boolmap : pTagItem) : ULONG;
begin
asm
MOVE.L A6,-(A7)
@ -700,9 +675,7 @@ begin
end;
end;
function PackStructureTags(packk: APTR;
packTable : Pointer;
TagList : pTagItem) : ULONG;
function PackStructureTags(packk: APTR;const packTable : pULONG;const TagList : pTagItem) : ULONG;
begin
asm
MOVEM.L a2/a6,-(A7)
@ -716,12 +689,11 @@ begin
end;
end;
procedure RefreshTagItemClones(cloneTagItems,
OriginalTagItems : pTagItem);
procedure RefreshTagItemClones(cloneTagItem : pTagItem; const OriginalTagItems : pTagItem);
begin
asm
MOVE.L A6,-(A7)
MOVE.L cloneTagItems,a0
MOVE.L cloneTagItem,a0
MOVE.L OriginalTagItems,a1
MOVE.L _UtilityBase,A6
JSR -084(A6)
@ -740,8 +712,7 @@ begin
end;
end;
procedure RemNamedObject(Obj : pNamedObject;
Msg : pointer);
procedure RemNamedObject(Obj : pNamedObject;Msg : pointer);
begin
asm
MOVE.L A6,-(A7)
@ -792,7 +763,7 @@ begin
end;
end;
function Stricmp(Str1, Str2 : STRPTR) : LongInt;
function Stricmp(const Str1: STRPTR;const Str2 : STRPTR) : LongInt;
begin
asm
MOVE.L A6,-(A7)
@ -805,8 +776,7 @@ begin
end;
end;
function Strnicmp(Str1, Str2 : STRPTR;
len : LongInt) : LongInt;
function Strnicmp(const Str1: STRPTR;const Str2 : STRPTR;len : LongInt) : LongInt;
begin
asm
MOVE.L A6,-(A7)
@ -820,8 +790,7 @@ begin
end;
end;
function TagInArray(t : Tag;
TagArray : Pointer) : Boolean;
function TagInArray(t : Tag;const TagArray : pULONG) : Boolean;
begin
asm
MOVE.L A6,-(A7)
@ -903,9 +872,7 @@ begin
end;
end;
function UnpackStructureTags(pac: APTR;
packTable: Pointer;
TagList : pTagItem) : ULONG;
function UnpackStructureTags(const pac: APTR;const packTable: pULONG;TagList : pTagItem) : ULONG;
begin
asm
MOVEM.L a2/a6,-(A7)
@ -919,12 +886,57 @@ begin
end;
end;
function AllocNamedObjectA(const name : string;const TagList : pTagItem) : pNamedObject;
begin
AllocNamedObjectA := AllocNamedObjectA(pas2c(name),TagList);
end;
FUNCTION FindNamedObject(nameSpace : pNamedObject; CONST name : string; lastObject : pNamedObject) : pNamedObject;
begin
FindNamedObject := FindNamedObject(nameSpace,pas2c(name),lastObject);
end;
FUNCTION Stricmp(CONST string1 : string; CONST string2 : pCHAR) : LONGINT;
begin
Stricmp := Stricmp(pas2c(string1),string2);
end;
FUNCTION Stricmp(CONST string1 : pCHAR; CONST string2 : string) : LONGINT;
begin
Stricmp := Stricmp(string1,pas2c(string2));
end;
FUNCTION Stricmp(CONST string1 : string; CONST string2 : string) : LONGINT;
begin
Stricmp := Stricmp(pas2c(string1),pas2c(string2));
end;
FUNCTION Strnicmp(CONST string1 : string; CONST string2 : pCHAR; length : LONGINT) : LONGINT;
begin
Strnicmp := Strnicmp(pas2c(string1),string2,length);
end;
FUNCTION Strnicmp(CONST string1 : pCHAR; CONST string2 : string; length : LONGINT) : LONGINT;
begin
Strnicmp := Strnicmp(string1,pas2c(string2),length);
end;
FUNCTION Strnicmp(CONST string1 : string; CONST string2 : string; length : LONGINT) : LONGINT;
begin
Strnicmp := Strnicmp(pas2c(string1),pas2c(string2),length);
end;
end.
{
$Log$
Revision 1.4 2003-01-13 18:14:57 nils
Revision 1.5 2003-02-07 20:45:08 nils
* update for amigaos 3.9
Revision 1.4 2003/01/13 18:14:57 nils
* added the define use_amiga_smartlink
Revision 1.3 2002/11/20 22:09:14 nils