home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fresh Fish 4
/
FreshFish_May-June1994.bin
/
new
/
amigalibdisks
/
d996
/
startup-menu
/
source
/
reqtools.pas
< prev
next >
Wrap
Pascal/Delphi Source File
|
1994-04-05
|
27KB
|
1,093 lines
{ ReqTools (V38) interface for HSPascal }
{ }
{ ReqTools is (C) Copyright 1991/1992 by Nico François }
{ }
{ HSPascal interface v1.2 © 1992 by Gunter Indenhoek }
Unit ReqTools;
Interface
Uses Exec,AmigaDOS,Intuition,Graphics,Init,Utility;
Const
REQTOOLSNAME = 'reqtools.library';
REQTOOLSVERSION = 38;
Type
{ for Dosnames like Dir, Fontnames, etc. }
pString = ^tString;
tString = String;
{ array to pass your arguments to EZRequestA() }
argarray = array[0..31] of LongInt;
{ array to pass your flags to reqtools-requesters }
preqtaglist = ^treqtaglist;
treqtaglist = array[0..32] of tTagItem;
{ library - base }
pReqToolsBase = ^tReqToolsBase;
tReqToolsBase =
Record
Lib_Node: pLibrary;
Flags: ShortInt;
Pad: Array[0..2] of ShortInt;
SegList: BPTR;
{ The following library bases may be read and used by your program }
IntuitionBase: ^tIntuitionBase;
GfxBase: ^tGfxBase;
DOSBase: ^tDosLibrary;
{ Next two library bases are only (and always) valid on Kickstart 2.0!
(1.3 version of reqtools also initializes these when run on 2.0) }
GadToolsBase: pLibrary;
UtilityBase: pLibrary;
end;
Const
{ types of requesters, for rtAllocRequestA() }
RT_FILEREQ = 0;
RT_REQINFO = 1;
RT_FONTREQ = 2;
{ (V38) }
RT_SCREENMODEREQ = 3;
{***********************
* *
* File requester *
* *
***********************}
type
{ structure _MUST_ be allocated with rtAllocRequest() }
prtFileRequester = ^trtFileRequester;
trtFileRequester = Record
ReqPos: LongInt;
LeftOffset: Integer;
TopOffset: Integer;
Flags: LongInt;
{ OBSOLETE IN V38! DON'T USE! } Hook: pHook;
Dir: pString; { READ ONLY! Change with rtChangeReqAttrA()! }
MatchPat: pString; { READ ONLY! Change with rtChangeReqAttrA()! }
DefaultFont: pTextFont;
WaitPointer: LongInt;
{ (V38) }
LockWindow: LongInt;
ShareIDCMP: LongInt;
IntuiMsgFunc: pHook;
reserved1: Integer;
reserved2: Integer;
reserved3: Integer;
ReqHeight: Integer; { READ ONLY! Use RTFI_Height tag! }
{ Private data follows! HANDS OFF }
end;
{ returned by rtFileRequestA() if multiselect is enabled,
free list with rtFreeFileList() }
prtFileList = ^trtFileList;
trtFileList = Record
Next: prtFileList;
StrLen: LongInt; { -1 for directories }
Name: pString;
end;
{***********************
* *
* Font requester *
* *
***********************}
{ structure _MUST_ be allocated with rtAllocRequest() }
prtFontRequester = ^trtFontRequester;
trtFontRequester = Record
ReqPos: LongInt;
LeftOffset: Integer;
TopOffset: Integer;
Flags: LongInt;
{ OBSOLETE IN V38! DON'T USE! } Hook: pHook;
Attr: tTextAttr; { READ ONLY! }
DefaultFont: pTextFont;
WaitPointer: LongInt;
{ (V38) }
LockWindow: LongInt;
ShareIDCMP: LongInt;
IntuiMsgFunc: pHook;
reserved1: Integer;
reserved2: Integer;
reserved3: Integer;
ReqHeight: Integer; { READ ONLY! Use RTFO_Height tag! }
{ Private data follows! HANDS OFF }
end;
{*************************
* *
* ScreenMode requester *
* *
*************************}
{ structure _MUST_ be allocated with rtAllocRequest() }
prtScreenModeRequester = ^trtScreenModeRequester;
trtScreenModeRequester = Record
ReqPos: LongInt;
LeftOffset: Integer;
TopOffset: Integer;
Flags: LongInt;
private1: LongInt;
DisplayID: LongInt; { READ ONLY! }
DisplayWidth: Integer; { READ ONLY! }
DisplayHeight: Integer; { READ ONLY! }
DefaultFont: pTextFont;
WaitPointer: LongInt;
LockWindow: LongInt;
ShareIDCMP: LongInt;
IntuiMsgFunc: pHook;
reserved1: Integer;
reserved2: Integer;
reserved3: Integer;
ReqHeight: Integer; { READ ONLY! Use RTSC_Height tag! }
DisplayDepth: Integer; { READ ONLY! }
OverscanType: Integer; { READ ONLY! }
AutoScroll: LongInt; { READ ONLY! }
{ Private data follows! HANDS OFF }
end;
{***********************
* *
* Requester Info *
* *
***********************}
{ for rtEZRequestA(), rtGetLongA(), rtGetStringA() and rtPaletteRequestA(),
_MUST_ be allocated with rtAllocRequest() }
prtReqInfo = ^ trtReqInfo;
trtReqInfo = Record
ReqPos: LongInt;
LeftOffset: Integer;
TopOffset: Integer;
Width: LongInt; { not for rtEZRequestA() }
ReqTitle: pString; { currently only for rtEZRequestA() }
Flags: LongInt; { currently only for rtEZRequestA() }
DefaultFont: pTextFont; { currently only for rtPaletteRequestA() }
WaitPointer: LongInt;
{ (V38) }
LockWindow: LongInt;
ShareIDCMP: LongInt;
IntuiMsgFunc: pHook;
{ structure may be extended in future }
end;
{***********************
* *
* Handler Info *
* *
***********************}
{ for rtReqHandlerA(), will be allocated for you when you use
the RT_ReqHandler tag, never try to allocate this yourself! }
prtHandlerInfo = ^trtHandlerInfo;
trtHandlerInfo = Record
private1: LongInt;
WaitMask: LongInt;
DoNotWait: LongInt;
{ Private data follows, HANDS OFF }
end;
Const
{ possible return codes from rtReqHandlerA() }
CALL_HANDLER = $80000000;
{*************************************
* *
* TAGS *
* *
*************************************}
RT_TagBase = TAG_USER;
{ *** tags understood by most requester functions *** }
{ Optional pointer to window }
RT_Window = $80000001;
{ idcmp flags requester should abort on (useful for IDCMP_DISKINSERTED) }
RT_IDCMPFlags = $80000002;
{ position of requester window (see below) - default REQPOS_POINTER }
RT_ReqPos = $80000003;
{ signal mask to wait for abort signal }
RT_LeftOffset = $80000004;
{ topedge offset of requester relative to position specified by RT_ReqPos }
RT_TopOffset = $80000005;
{ name of public screen to put requester on (Kickstart 2.0 only!) }
RT_PubScrName = $80000006;
{ address of screen to put requester on }
RT_Screen = $80000007;
{ tagdata must hold the address of (!) an APTR variable }
RT_ReqHandler = $80000008;
{ font to use when screen font is rejected, _MUST_ be fixed-width font!
( pTextFont , not pTextAttr )
- default GfxBase^.DefaultFont }
RT_DefaultFont = $80000009;
{ boolean to set the standard wait pointer in window - default FALSE }
RT_WaitPointer = $8000000A;
{ (V38) char preceding keyboard shortcut characters (will be underlined) }
RT_Underscore = $8000000B;
{ (V38) share IDCMP port with window - default FALSE }
RT_ShareIDCMP = $8000000C;
{ (V38) lock window and set standard wait pointer - default FALSE }
RT_LockWindow = $8000000D;
{ (V38) boolean to make requester's screen pop to front - default TRUE }
RT_ScreenToFront = $8000000E;
{ (V38) Requester should use this font - default: screen font }
RT_TextAttr = $8000000F;
{ (V38) call this hook for every IDCMP message not for requester }
RT_IntuiMsgFunc = $80000010;
{ (V38) Locale ReqTools should use for text }
RT_Locale = $80000011;
{ *** tags specific to rtEZRequestA *** }
{ title of requester window - english default "Request" or "Information" }
RTEZ_ReqTitle = $80000014;
{ ($80000015) reserved }
{ various flags (see below) }
RTEZ_Flags = $80000016;
{ default response (activated by pressing RETURN) - default TRUE }
RTEZ_DefaultResponse = $80000017;
{ *** tags specific to rtGetLongA *** }
{ minimum allowed value - default MININT }
RTGL_Min = $8000001E;
{ maximum allowed value - default MAXINT }
RTGL_Max = $8000001F;
{ suggested width of requester window (in pixels) }
RTGL_Width = $80000020;
{ boolean to show the default value - default TRUE }
RTGL_ShowDefault = $80000021;
{ (V38) string with possible responses - english default " _Ok |_Cancel" }
RTGL_GadFmt = $80000022;
{ (V38) optional arguments for RTGL_GadFmt }
RTGL_GadFmtArgs = $80000023;
{ (V38) invisible typing - default FALSE }
RTGL_Invisible = $80000024;
{ (V38) window backfill - default TRUE }
RTGL_BackFill = $8